Asterisk - Channels In Use (via res_snmp.so)

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Asterisk - Channels In Use (via res_snmp.so)

Post by Howie »

Since I couldn't find a template that used the SNMP support in Asterisk, I made one.

This template gives you a graph per channel type (zap, sip, iax etc) showing how many channels are in use. We'll be using it with threshold to help spot if someone has attacked our pbx again (lots of outgoing calls! :-( ).

I've attached the asterisk-channels.xml, which goes into resources/snmp_queries and the exported templates from 0.8.7b (should work in anything from 'b' onwards).
Attachments
cacti_graph_template_asterisk_channels_in_use.xml
(13.22 KiB) Downloaded 1699 times
asterisk-channels.xml
snmp_queries file
(1.4 KiB) Downloaded 1729 times
asterisk-channels.png
asterisk-channels.png (12.43 KiB) Viewed 18286 times
Last edited by Howie on Mon Mar 02, 2009 8:46 am, edited 1 time in total.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
jki
Posts: 2
Joined: Wed Nov 07, 2007 9:37 am

Post by jki »

Howie,

The template file isn't right. It seems to be the html of your export page rather than the actual xml!

Any chance you could post the template?

Thanks

JKI
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

jki wrote:Howie,

The template file isn't right. It seems to be the html of your export page rather than the actual xml!

Any chance you could post the template?

Thanks

JKI
oops. try that now.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
dazza76
Posts: 2
Joined: Mon Aug 10, 2009 7:01 pm

Asterisk 1.6 res snmp

Post by dazza76 »

I Build one cause I could not find a good one to use
Similar to yours except it has the Channel Type selection

Thaught I should donate the work so it can be used by all

Cheers
D
Attachments
cacti_host_template_asterisk.zip
(3.83 KiB) Downloaded 2195 times
sip Channels.jpg
sip Channels.jpg (29.75 KiB) Viewed 17447 times
osiris123d
Cacti User
Posts: 59
Joined: Fri Mar 23, 2007 3:38 pm

Re: Asterisk 1.6 res snmp

Post by osiris123d »

Dazza76,

I looks like in your ast_channel.xml file you need to edit your <index_order> line to be

<index_order>ifDescr:ifName:ifIndex</index_order>

Or else when you do we verbose test you get an error saying that only stuff with <direction>input</direction> can be indexed. So ifChannels needs to be removed.


dazza76 wrote:I Build one cause I could not find a good one to use
Similar to yours except it has the Channel Type selection

Thaught I should donate the work so it can be used by all

Cheers
D
psnyder1985
Posts: 1
Joined: Thu Jan 27, 2011 12:11 pm

Re: Asterisk - Channels In Use (via res_snmp.so)

Post by psnyder1985 »

I am attempting to use these to monitor my asterisk box; however, I am not sure where to find: "Host's number (from script)" which is default to 0 in the cacti template. Can any one direct me of how to get the hosts number ?

UPDATE:

I noticed in the data template that this was checked "Use Per-Data Source Value (Ignore this Value)" which tells me to ignore that host value but I still get nothing on my graphs ?
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests