cisco 2851 channel usage/active calls oid trouble
Moderators: Developers, Moderators
-
- Posts: 2
- Joined: Fri Jan 23, 2009 12:21 pm
cisco 2851 channel usage/active calls oid trouble
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.
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.
-
- Posts: 2
- Joined: Fri Jan 23, 2009 12:21 pm
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]
(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]
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 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
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.)
(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.)
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.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.
How do I set up a graph to use this Data Query? Thanks.
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.
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
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.erickbe wrote: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.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.
How do I set up a graph to use this Data Query? Thanks.
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?
Anyone successful in doing this before?
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...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.
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...
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
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
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
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.
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.
Who is online
Users browsing this forum: No registered users and 1 guest