Script to Monitor E1/BRI Channel Usage
Moderators: Developers, Moderators
- kjmattakat
- Posts: 15
- Joined: Fri Oct 12, 2007 3:03 pm
- kjmattakat
- Posts: 15
- Joined: Fri Oct 12, 2007 3:03 pm
I know how to do the telnet, it is just creating a script that will automatically determine if it needs to use telnet with just password, telnet with username/password or SSH and then store that info so that when the script does a 'get' for the call count it does not have to determine the access method again.
I could just change the index so that it is some thing like:
0/0/0:23_t for telnet with password
0/0/0:23_u for telnet with username/pass
0/0/0:23_s for SSH.
but that isn't very sexy.
I could just change the index so that it is some thing like:
0/0/0:23_t for telnet with password
0/0/0:23_u for telnet with username/pass
0/0/0:23_s for SSH.
but that isn't very sexy.
kjmattakat
I´ve implemented the script on Cacti, but I have a small bug (or at least I think it´s a bug):
My Calls Current, Average and Maximum never exceed the value 1.
I know at the time there´s at leat 10 calls entering in my router, but I only comeup with the value 1.
Do you know why this happens?
Thkx
I´ve implemented the script on Cacti, but I have a small bug (or at least I think it´s a bug):
My Calls Current, Average and Maximum never exceed the value 1.
I know at the time there´s at leat 10 calls entering in my router, but I only comeup with the value 1.
Do you know why this happens?
Thkx
- kjmattakat
- Posts: 15
- Joined: Fri Oct 12, 2007 3:03 pm
Script to Monitor E1/BRI Channel Usage
Hi Kjmattakat,
My OS is suse 10, not windows.Thus, It's can't execute Cisco_Calls.pl.
Sorry, I am not a programmer.
Could you provide Cisco_Calls.pl for Linux version ?
Thanks a lot.
----------------------------------------------------------------------
Can't locate Net/SSH/W32Perl.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i586-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at Cisco_Calls.pl line 11.
BEGIN failed--compilation aborted at Cisco_Calls.pl line 11.
My OS is suse 10, not windows.Thus, It's can't execute Cisco_Calls.pl.
Sorry, I am not a programmer.
Could you provide Cisco_Calls.pl for Linux version ?
Thanks a lot.
----------------------------------------------------------------------
Can't locate Net/SSH/W32Perl.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i586-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at Cisco_Calls.pl line 11.
BEGIN failed--compilation aborted at Cisco_Calls.pl line 11.
Sorry I solved my previous issue, anyway I'm always receiving nan value and graphs is not plotted.
Just a little step by step og what I made:
- save xml file under
<path_cacti>/resource/snmp_queries/cisco_calls_899.xml
- save pl file under
<path_cacti>/scripts
If you want to use telnet instead of ssh you have to modify pl file and install net::telnet::cisco.
To do this run cpan, and type install NET::TELNET::CISCO
and make install
Done this, go to Data queries and Add Channel Usage query
fill Name, Description, XML Path
Data Input Method and choose Script Data (Indexed) or Get Script Server Data (Indexed) (I'm not sure which one is right)
Add an associated graph template (maybe you can create one previously)
But I'm not able to plot anything. How can I verify if the script is working fine ? Are my steps correct ?
Thanks
Chris
Results from a verbose query:
Data Query Debug Information
+ Running data query [11].
+ Found type = '4 '[script query].
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/cisco_calls_899.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 index'
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 query index'
+ Found item [Index='1/0:15'] index: 1/0:15
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 query name'
+ Found item [name='Serial1/0:15'] index: 1/0:15
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 query controller'
+ Found item [contr='T1 1/0'] index: 1/0:15
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 query description'
+ Found item [descr=''] index: 1/0:15
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/cisco_calls_899.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/cisco_calls_899.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/cisco_calls_899.xml'
I've 2 E1 on this router but only 1 is discovered.
Just a little step by step og what I made:
- save xml file under
<path_cacti>/resource/snmp_queries/cisco_calls_899.xml
- save pl file under
<path_cacti>/scripts
If you want to use telnet instead of ssh you have to modify pl file and install net::telnet::cisco.
To do this run cpan, and type install NET::TELNET::CISCO
and make install
Done this, go to Data queries and Add Channel Usage query
fill Name, Description, XML Path
Data Input Method and choose Script Data (Indexed) or Get Script Server Data (Indexed) (I'm not sure which one is right)
Add an associated graph template (maybe you can create one previously)
But I'm not able to plot anything. How can I verify if the script is working fine ? Are my steps correct ?
Thanks
Chris
Results from a verbose query:
Data Query Debug Information
+ Running data query [11].
+ Found type = '4 '[script query].
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/cisco_calls_899.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 index'
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 query index'
+ Found item [Index='1/0:15'] index: 1/0:15
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 query name'
+ Found item [name='Serial1/0:15'] index: 1/0:15
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 query controller'
+ Found item [contr='T1 1/0'] index: 1/0:15
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/Cisco_Calls.pl 10.130.186.4 query description'
+ Found item [descr=''] index: 1/0:15
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/cisco_calls_899.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/cisco_calls_899.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/cisco_calls_899.xml'
I've 2 E1 on this router but only 1 is discovered.
-
- Posts: 1
- Joined: Tue Dec 02, 2008 10:40 am
Trouble setting up this script..
Hi guys,
I'm working to get the above script implemented in my VoIP environment. I've installed Cacti using the standard windows installer and imported the XML template.. and now I'm stuck. Can anyone give me some pointers on setting up the rest of the process? It looks like I need to install a SSH package or sorts, as well as create a device. I apologize in advance.. I'm a Cacti Newbie, however I'm quiet technical and any assistance would be appreciated.
Thanks!
Andrew
I'm working to get the above script implemented in my VoIP environment. I've installed Cacti using the standard windows installer and imported the XML template.. and now I'm stuck. Can anyone give me some pointers on setting up the rest of the process? It looks like I need to install a SSH package or sorts, as well as create a device. I apologize in advance.. I'm a Cacti Newbie, however I'm quiet technical and any assistance would be appreciated.
Thanks!
Andrew
I'm having a problem getting this to work properly, and was hoping someone might have some insight....
I am running cacti 0.8.7b on a linux system and can sucessfully execute Cisco_Calls.pl from the shell and return data (including indexes, call stats, call stats per PRI), but cannot get any of this data to populate in cacti. Also, it does not appear to be creating an .rrd file in /var/www/cacti/rra/
The data query for Cisco Active Gateway Calls shows sucess status, but with 0 items (the gateway in question has consistently between 50-100 active calls).
This is the output from running a verbose query:
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/cacti/resource/script_queries/Cisco_Calls.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x index'
+ Executing script query 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x query index'
+ Executing script query 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x query name'
+ Executing script query 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x query controller'
+ Executing script query 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x query description'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/Cisco_Calls.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/Cisco_Calls.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/Cisco_Calls.xml'
If anyone has any sugesstions, that would be much appreciated...
thanks
I am running cacti 0.8.7b on a linux system and can sucessfully execute Cisco_Calls.pl from the shell and return data (including indexes, call stats, call stats per PRI), but cannot get any of this data to populate in cacti. Also, it does not appear to be creating an .rrd file in /var/www/cacti/rra/
The data query for Cisco Active Gateway Calls shows sucess status, but with 0 items (the gateway in question has consistently between 50-100 active calls).
This is the output from running a verbose query:
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/cacti/resource/script_queries/Cisco_Calls.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x index'
+ Executing script query 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x query index'
+ Executing script query 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x query name'
+ Executing script query 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x query controller'
+ Executing script query 'perl /var/www/cacti/scripts/Cisco_Calls.pl x.x.x.x query description'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/Cisco_Calls.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/Cisco_Calls.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/Cisco_Calls.xml'
If anyone has any sugesstions, that would be much appreciated...
thanks
*** CISCO AS5XXX GW - POLLING PRI/E1 FOR CONCURRENT CALLS **
All,
Good afternoon. Note that there is an OID for a Cisco AS5350 to poll information from. It is:
.1.3.6.1.4.1.9.10.19.1.1.4.0 <- total calls
.1.3.6.1.4.1.9.10.19.1.1.9.1.3.3.x <- x is the PRI in question
Hope this help.
George
Good afternoon. Note that there is an OID for a Cisco AS5350 to poll information from. It is:
.1.3.6.1.4.1.9.10.19.1.1.4.0 <- total calls
.1.3.6.1.4.1.9.10.19.1.1.9.1.3.3.x <- x is the PRI in question
Hope this help.
George
Re: Script to Monitor E1/BRI Channel Usage
I have Se interface more than 1 interface. but cacti actech have 1 row
somone can help me? please.
somone can help me? please.
- Attachments
-
- 1 Row
- 2-4-2016 4-39-45 AM.png (40.22 KiB) Viewed 1742 times
Who is online
Users browsing this forum: No registered users and 3 guests