cisco 2851 channel usage/active calls oid trouble

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

terminal86
Posts: 2
Joined: Fri Jan 23, 2009 12:21 pm

cisco 2851 channel usage/active calls oid trouble

Post by terminal86 »

I've been searching for a while and I have been unable to find an OID that works for the 2851 router. I've tried the isdnBearerOperStatus(1.3.6.1.2.1.10.20.1.2.1.1.2), but that just tells me that all of the channels are always idle.

I also tried the cpmDS1ActiveDS0s (.1.3.6.1.4.1.9.10.19.1.1.9.1.3), but that always returned 0 and 16 for our two routers.

I am able to get information via snmp from routers, even OIDs in the ISDN-MIB. Any ideas? Thank you.
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Post by erickbe »

If your gateway is MGCP, you won't be able to get this info via SNMP (bug).

If it is H323 it should work with the OIDs mentioned in the forums in other posts here. I am not in front of my setup I recently did so can't get the OID at this moment but can later.
llow
Cacti User
Posts: 170
Joined: Fri Oct 05, 2007 5:34 pm

Post by llow »

I got a script that counts up the status of each ISDN bearer channels oper status. I'll post it when I get a chance this weekend.

It should work with any gateway that supports the ISDN-MIB.
terminal86
Posts: 2
Joined: Fri Jan 23, 2009 12:21 pm

Post by terminal86 »

[quote="erickbe"]If your gateway is MGCP, you won't be able to get this info via SNMP (bug). [/quote]

We are using MGCP. Do you know where there is an article or bug report at cisco that talks about this?

Thank you
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Post by erickbe »

The issue with MGCP is the calls are controlled by Call Manager, and not the gateway so the variables aren't populated on the router.

(1) CSCsh28603: callActiveDS0s MIB variable not populated when MGCP configured.

and

(2) CSCsh50451: rscmon returns wrong number of active DS0 calls when no dp assoc in MGCP

Here is a post on these forums with script on how to get this on a Windows based call manager.

http://forums.cacti.net/about10857.html[/url]
llow
Cacti User
Posts: 170
Joined: Fri Oct 05, 2007 5:34 pm

Post by llow »

Here is the script server script and the script server xml file.

I glanced at my code and this will likely only work on Cisco devices. It makes some assumptions on the order the interfaces being returned but should likely work for you.
Attachments
isdnbeareroperstatus.zip
(2.13 KiB) Downloaded 789 times
vitroth
Posts: 15
Joined: Wed Jan 14, 2009 3:03 pm

Post by vitroth »

If you've got login access to the routers, I've got a script you can use which will login to the router and run "show voice port summary" (IIRC) and count the output. I can post it for you tomorrow.

(My cacti system runs on the same machine as my rancid system, so I just use rancid's clogin to connect to the router, saves me from maintaining a separate config file for users/passwords.)
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Post by erickbe »

llow wrote:Here is the script server script and the script server xml file.

I glanced at my code and this will likely only work on Cisco devices. It makes some assumptions on the order the interfaces being returned but should likely work for you.
I tried these out and downloaded them to my resource and script folder, and setup the data querie as Get Script Data pointed to the XML file. Under the device, if I add the data query it saids 4 rows returned and verbose query shows right info from the device.

How do I set up a graph to use this Data Query? Thanks.
vitroth
Posts: 15
Joined: Wed Jan 14, 2009 3:03 pm

Post by vitroth »

Here is a set of templates and a script that can collect this data, assuming you have automated login access to the router. (I do it with clogin from rancid, but you could replace that with something else.)

Import the three templates, put the xml file in your resource/script_queries directory, and put the perl script in your scripts directory.
Attachments
cisco-voice-channels.zip
(8.15 KiB) Downloaded 892 times
llow
Cacti User
Posts: 170
Joined: Fri Oct 05, 2007 5:34 pm

Post by llow »

erickbe wrote:
llow wrote:Here is the script server script and the script server xml file.

I glanced at my code and this will likely only work on Cisco devices. It makes some assumptions on the order the interfaces being returned but should likely work for you.
I tried these out and downloaded them to my resource and script folder, and setup the data querie as Get Script Data pointed to the XML file. Under the device, if I add the data query it saids 4 rows returned and verbose query shows right info from the device.

How do I set up a graph to use this Data Query? Thanks.
Read the Cacti documentation it would help you. You will create the graph as normal with possibly setting the graph title "Use Per-Graph Value". You then just add that graph to the data query. The cacti documentation is very thorough. I would post mine but I use some customer patches that would cause it not to work.
Cornloaf
Posts: 18
Joined: Sun Dec 30, 2007 3:27 pm
Contact:

Post by Cornloaf »

I know this is an old thread, but I'm having a hard time converting the perl script to work with the Net::Telnet::Cisco or even one of the SSH packages. I spent a couple hours trying to Frankenstein a script using this perl script and the one that was made to collect data from E1/T1 voice channels, but had no luck.

Anyone successful in doing this before?
vitroth
Posts: 15
Joined: Wed Jan 14, 2009 3:03 pm

Post by vitroth »

I know this is an old thread, but I'm having a hard time converting the perl script to work with the Net::Telnet::Cisco or even one of the SSH packages. I spent a couple hours trying to Frankenstein a script using this perl script and the one that was made to collect data from E1/T1 voice channels, but had no luck.
You're referring to my perl script? I haven't looked at this code recently (it just works), but it doesn't seem like it should be hard. I'll take a look...
vitroth
Posts: 15
Joined: Wed Jan 14, 2009 3:03 pm

Post by vitroth »

Try this one. I restructured the code a bit to handle either rancid's clogin or Net::Telnet::Cisco.

I don't have Net::Telnet::Cisco installed here so I can't test it, but it at least compiles without errors...
Attachments
voice-port-usage.pl
(3.51 KiB) Downloaded 529 times
Cornloaf
Posts: 18
Joined: Sun Dec 30, 2007 3:27 pm
Contact:

Post by Cornloaf »

WOW! Thanks for the quick response!

I changed over the script and I am getting 0 items when doing the query.

The debug information just includes :

+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_queries/voice-port-usage.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl C:\Inetpub\wwwroot\cacti\scripts\voice-port-usage.pl 172.16.17.1 index'
+ Executing script query 'perl C:\Inetpub\wwwroot\cacti\scripts\voice-port-usage.pl 172.16.17.1 query ports'
+ Executing script query 'perl C:\Inetpub\wwwroot\cacti\scripts\voice-port-usage.pl 172.16.17.1 query description'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_queries/voice-port-usage.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_queries/voice-port-usage.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_queries/voice-port-usage.xml'

When I run the command from a command prompt, I get the following :

C:\Perl\bin>perl "c:\inetpub\wwwroot\cacti\scripts\voice-port-usage.pl" 172.16.17.1
readline() on unopened filehandle PORTS at c:\inetpub\wwwroot\cacti\scripts\voice-port-usage.pl line 63.
Use of uninitialized value $action1 in string eq at c:\inetpub\wwwroot\cacti\scripts\voice-port-usage.pl line 99.
Use of uninitialized value $action1 in string eq at c:\inetpub\wwwroot\cacti\scripts\voice-port-usage.pl line 106.
Use of uninitialized value $action1 in string eq at c:\inetpub\wwwroot\cacti\scripts\voice-port-usage.pl line 113.
Use of uninitialized value $action1 in string eq at c:\inetpub\wwwroot\cacti\scripts\voice-port-usage.pl line 120.
Use of uninitialized value $action1 in string eq at c:\inetpub\wwwroot\cacti\scripts\voice-port-usage.pl line 138.
Use of uninitialized value $action1 in string eq at c:\inetpub\wwwroot\cacti\scripts\voice-port-usage.pl line 145.

I'm sure that I am missing something on my end but no luck so far.

Thank you!

-Reinier
vitroth
Posts: 15
Joined: Wed Jan 14, 2009 3:03 pm

Post by vitroth »

Oops, I missed one change. On line 63, change this:

while (my $line = <PORTS>) {

becomes

foreach my $line (@lines) {



The change I did earlier was to make both code paths read the output of the commands from the router and stuff the results into @lines. I just missed the critical line where it starts parsing that data.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest