<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div><div>Hi,</div><div><br></div><div>I use this script, located in ~/bin of my freeswitch user, to graph channel usage.</div><div><br></div><div>#!/bin/sh</div><div># script to gather channel usage per customer</div><div><br></div><div>CHANNELS=`/usr/local/freeswitch/bin/fs_cli -x "limit_usage db channels testcustomer"`</div><div><br></div><div>echo .1.3.6.1.4.1.2021.8.0</div><div>echo integer</div><div>echo $CHANNELS</div><div><br></div><div>Then in snmpd.conf</div><div><br></div><div>pass .1.3.6.1.4.1.2021.8.0 /bin/sh /home/fsadmin/bin/channel_usage.sh</div><div><br></div><div>Zenoss</div><div>Advanced – monitoring templates</div><div>Create a new template under linux servers for freeswitch</div><div>add data point with snmp oid.</div><div><br></div><div>Set graph creation to GUAGE and set cmd to </div><div><br></div><div>RRA:AVERAGE:0.5:1:600</div><div>RRA:AVERAGE:0.5:6:600</div><div>RRA:AVERAGE:0.5:24:600</div><div>RRA:AVERAGE:0.5:288:600</div><div>RRA:MAX:0.5:6:600</div><div>RRA:MAX:0.5:24:600</div><div>RRA:MAX:0.5:288:600</div><div>RRA:LAST:0.5:1:600</div><div>RRA:LAST:0.5:6:600</div><div>RRA:LAST:0.5:24:600</div><div>RRA:LAST:0.5:288:600</div><div><br></div><div>Add graph definition and the manage graph point.</div><div><br></div><div>Update consolidation to LAST. </div><div><br></div><div>Also change format to %5.0lf%s</div><div><br></div><div><br></div><div>Hope this helps</div><div><br></div><div><br></div><div>Anthony</div><div><br></div></div><div><div>On 29 Jan 2014, at 16:46, Deon Vermeulen <<a href="mailto:vermeulen.deon@gmail.com">vermeulen.deon@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><div style="font-family: Calibri; font-size: 11pt;" bgcolor="#FFFFFF" text="#000000">
<div style="font-size: 11pt;font-family: Calibri;"><span style="font-family: Calibri;">Hi<br><br>I'm trying to export calls count
into snmp for graphing with zenoss.<br>I used this post for cacti.
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org/wiki/Snmp_Cacti">http://wiki.freeswitch.org/wiki/Snmp_Cacti</a><br><br><br>Script:<br><br>#!/bin/bash<br>/usr/local/freeswitch/bin/fs_cli
-x "show calls count" | grep total | awk '{print $1}'<br><br><br>Permissions:<br><br>-rwxrwxrwx
1 root staff 295 Jan 29 17:01 curcalls<br><br><br>in snmpd.conf I have
following:<br><br>### ---- FreeSWITCH Active Calls ----<br>extend
.1.3.6.1.4.1.2021.8.1.101 curcalls /usr/local/scripts/curcalls<br><br><br>When
I run:<br><br>snmpwalk localhost -c public -v2c
.1.3.6.1.4.1.2021.8.1.101<br><br>I get following output:<br><br>iso.3.6.1.4.1.2021.8.1.101.1.0
= INTEGER: 1<br>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}'"<br>iso.3.6.1.4.1.2021.8.1.101.2.1.3.8.99.117.114.99.97.108.108.115
= ""<br>iso.3.6.1.4.1.2021.8.1.101.2.1.4.8.99.117.114.99.97.108.108.115
= ""<br>iso.3.6.1.4.1.2021.8.1.101.2.1.5.8.99.117.114.99.97.108.108.115
= INTEGER: 5<br>iso.3.6.1.4.1.2021.8.1.101.2.1.6.8.99.117.114.99.97.108.108.115
= INTEGER: 1<br>iso.3.6.1.4.1.2021.8.1.101.2.1.7.8.99.117.114.99.97.108.108.115
= INTEGER: 1<br>iso.3.6.1.4.1.2021.8.1.101.2.1.20.8.99.117.114.99.97.108.108.115
= INTEGER: 4<br>iso.3.6.1.4.1.2021.8.1.101.2.1.21.8.99.117.114.99.97.108.108.115
= INTEGER: 1<br>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"<br>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"<br>iso.3.6.1.4.1.2021.8.1.101.3.1.3.8.99.117.114.99.97.108.108.115
= INTEGER: 1<br>iso.3.6.1.4.1.2021.8.1.101.3.1.4.8.99.117.114.99.97.108.108.115
= INTEGER: 1<br>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"<br><br><br>I
run on Debian 6.0 with FreeSWITCH version:<br>FreeSWITCH Version
1.2.15+git~20131210T035405Z~b1288520bc~64bit (git b128852 2013-12-10
03:54:05Z 64bit)<br><br><br>Any input will be appreciated.<br><br><br>Thank
you<br></span>-- <br><div class="moz-signature"><span><span style="background-color: rgba(255, 255, 255, 0);">Deon</span></span><br>
</div></div>
</div>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>