[Freeswitch-users] SNMP fs_cli: Permission denied"

Deon Vermeulen vermeulen.deon at gmail.com
Wed Jan 29 23:21:13 MSK 2014


Anthony thanks for your input. I'll check it out with our sysadmin of
Zenoss tomorrow when back in office

regards
-- 
Deon



> Anthony McGarry <mailto:agtmcgarry at icloud.com>
> January 29, 2014 at 7:31 PM
> Hi,
>
> I use this script, located in ~/bin of my freeswitch user, to graph
> channel usage.
>
> #!/bin/sh
> # script to gather channel usage per customer
>
> CHANNELS=`/usr/local/freeswitch/bin/fs_cli -x "limit_usage db channels
> testcustomer"`
>
> echo .1.3.6.1.4.1.2021.8.0
> echo integer
> echo $CHANNELS
>
> Then in snmpd.conf
>
> pass .1.3.6.1.4.1.2021.8.0 /bin/sh /home/fsadmin/bin/channel_usage.sh
>
> Zenoss
> Advanced -- monitoring templates
> Create a new template under linux servers for freeswitch
> add data point with snmp oid.
>
> Set graph creation to GUAGE and set cmd to 
>
> RRA:AVERAGE:0.5:1:600
> RRA:AVERAGE:0.5:6:600
> RRA:AVERAGE:0.5:24:600
> RRA:AVERAGE:0.5:288:600
> RRA:MAX:0.5:6:600
> RRA:MAX:0.5:24:600
> RRA:MAX:0.5:288:600
> RRA:LAST:0.5:1:600
> RRA:LAST:0.5:6:600
> RRA:LAST:0.5:24:600
> RRA:LAST:0.5:288:600
>
> Add graph definition and the manage graph point.
>
> Update consolidation to LAST. 
>
> Also change format to %5.0lf%s
>
>
> Hope this helps
>
>
> Anthony
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> Deon Vermeulen <mailto:vermeulen.deon at gmail.com>
> January 29, 2014 at 6:46 PM
> Hi
>
> I'm trying to export calls count into snmp for graphing with zenoss.
> I used this post for cacti.  http://wiki.freeswitch.org/wiki/Snmp_Cacti
>
>
> Script:
>
> #!/bin/bash
> /usr/local/freeswitch/bin/fs_cli -x "show calls count" | grep total |
> awk '{print $1}'
>
>
> Permissions:
>
> -rwxrwxrwx  1 root staff  295 Jan 29 17:01 curcalls
>
>
> in snmpd.conf I have following:
>
> ### ---- FreeSWITCH Active Calls ----
> extend .1.3.6.1.4.1.2021.8.1.101 curcalls /usr/local/scripts/curcalls
>
>
> When I run:
>
> snmpwalk localhost -c public -v2c .1.3.6.1.4.1.2021.8.1.101
>
> I get following output:
>
> iso.3.6.1.4.1.2021.8.1.101.1.0 = INTEGER: 1
> iso.3.6.1.4.1.2021.8.1.101.2.1.2.8.99.117.114.99.97.108.108.115 =
> STRING: "/usr/local/freeswitch/bin/fs_cli -x 'show calls count' | grep
> total | awk '{print $1}'"
> iso.3.6.1.4.1.2021.8.1.101.2.1.3.8.99.117.114.99.97.108.108.115 = ""
> iso.3.6.1.4.1.2021.8.1.101.2.1.4.8.99.117.114.99.97.108.108.115 = ""
> iso.3.6.1.4.1.2021.8.1.101.2.1.5.8.99.117.114.99.97.108.108.115 =
> INTEGER: 5
> iso.3.6.1.4.1.2021.8.1.101.2.1.6.8.99.117.114.99.97.108.108.115 =
> INTEGER: 1
> iso.3.6.1.4.1.2021.8.1.101.2.1.7.8.99.117.114.99.97.108.108.115 =
> INTEGER: 1
> iso.3.6.1.4.1.2021.8.1.101.2.1.20.8.99.117.114.99.97.108.108.115 =
> INTEGER: 4
> iso.3.6.1.4.1.2021.8.1.101.2.1.21.8.99.117.114.99.97.108.108.115 =
> INTEGER: 1
> iso.3.6.1.4.1.2021.8.1.101.3.1.1.8.99.117.114.99.97.108.108.115 =
> STRING: "/usr/local/freeswitch/bin/fs_cli: Permission denied"
> iso.3.6.1.4.1.2021.8.1.101.3.1.2.8.99.117.114.99.97.108.108.115 =
> STRING: "/usr/local/freeswitch/bin/fs_cli: Permission denied"
> iso.3.6.1.4.1.2021.8.1.101.3.1.3.8.99.117.114.99.97.108.108.115 =
> INTEGER: 1
> iso.3.6.1.4.1.2021.8.1.101.3.1.4.8.99.117.114.99.97.108.108.115 =
> INTEGER: 1
> iso.3.6.1.4.1.2021.8.1.101.4.1.2.8.99.117.114.99.97.108.108.115.1 =
> STRING: "/usr/local/freeswitch/bin/fs_cli: Permission denied"
>
>
> I run on Debian 6.0 with FreeSWITCH version:
> FreeSWITCH Version 1.2.15+git~20131210T035405Z~b1288520bc~64bit (git
> b128852 2013-12-10 03:54:05Z 64bit)
>
>
> Any input will be appreciated.
>
>
> Thank you
> -- 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140129/dd3d868e/attachment-0001.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list