Script to Monitor E1/BRI Channel Usage

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

Moderators: Developers, Moderators

User avatar
kjmattakat
Posts: 15
Joined: Fri Oct 12, 2007 3:03 pm

Post by kjmattakat »

gonz0,

so it is working now or are you still having problems?
User avatar
kjmattakat
Posts: 15
Joined: Fri Oct 12, 2007 3:03 pm

Post by kjmattakat »

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.
zarahel
Posts: 33
Joined: Wed Feb 06, 2008 3:49 pm

Post by zarahel »

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
User avatar
kjmattakat
Posts: 15
Joined: Fri Oct 12, 2007 3:03 pm

Post by kjmattakat »

sorry for the delay, been a while since i check in here.

never seen that problem before. But sounds like the script is returning an error when running the command on the router.

what type of router and voice circuit are you running?
fourier
Posts: 5
Joined: Fri Sep 29, 2006 3:52 am

Script to Monitor E1/BRI Channel Usage

Post by fourier »

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.
zsirmo
Posts: 1
Joined: Tue Oct 30, 2007 5:29 am

Post by zsirmo »

Install Net/SSH/W32Perl
cpan Net::SSH::W32Perl
crazy72
Posts: 17
Joined: Mon Sep 29, 2008 8:09 am

Post by crazy72 »

Sorry but I'm a bit noob in this case.
I copied the perl script in cacti/scripts dir, but I'm not able to import xml file.
When I go to improt template and choose ur file nothing happens.
Is your xml a template file ? How can I use it ?

Thanks
Chris
crazy72
Posts: 17
Joined: Mon Sep 29, 2008 8:09 am

Post by crazy72 »

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.
whatuusay1
Posts: 1
Joined: Tue Dec 02, 2008 10:40 am

Trouble setting up this script..

Post by whatuusay1 »

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
jimbob000
Posts: 1
Joined: Wed Jan 28, 2009 4:41 pm

Post by jimbob000 »

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
aitm908
Posts: 15
Joined: Fri Jan 16, 2009 9:50 am

*** CISCO AS5XXX GW - POLLING PRI/E1 FOR CONCURRENT CALLS **

Post by aitm908 »

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
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Post by JJX »

Is possible to monitor concurent calls directly from SNMP?

Any template available??

Thanks
cacti rulez!
sumath
Posts: 1
Joined: Wed Feb 03, 2016 4:35 pm

Re: Script to Monitor E1/BRI Channel Usage

Post by sumath »

I have Se interface more than 1 interface. but cacti actech have 1 row
somone can help me? please.
Image
Attachments
1 Row
1 Row
2-4-2016 4-39-45 AM.png (40.22 KiB) Viewed 1739 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest