Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Script to Monitor E1/BRI Channel Usage
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
kjmattakat



Joined: 12 Oct 2007
Posts: 15

PostPosted: Fri Mar 28, 2008 8:56 am    Post subject: Reply with quote

gonz0,

so it is working now or are you still having problems?
Back to top
kjmattakat



Joined: 12 Oct 2007
Posts: 15

PostPosted: Fri Mar 28, 2008 9:24 am    Post subject: Reply with quote

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.
Back to top
zarahel



Joined: 06 Feb 2008
Posts: 20

PostPosted: Thu Aug 07, 2008 7:02 am    Post subject: Reply with quote

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
Back to top
kjmattakat



Joined: 12 Oct 2007
Posts: 15

PostPosted: Tue Aug 19, 2008 6:23 pm    Post subject: Reply with quote

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?
Back to top
fourier



Joined: 29 Sep 2006
Posts: 5

PostPosted: Tue Sep 16, 2008 10:56 pm    Post subject: Script to Monitor E1/BRI Channel Usage Reply with quote

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.
Back to top
zsirmo



Joined: 30 Oct 2007
Posts: 1

PostPosted: Fri Oct 17, 2008 7:36 pm    Post subject: Reply with quote

Install Net/SSH/W32Perl
cpan Net::SSH::W32Perl
Back to top
crazy72



Joined: 29 Sep 2008
Posts: 17

PostPosted: Tue Nov 11, 2008 1:32 pm    Post subject: Reply with quote

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
Back to top
crazy72



Joined: 29 Sep 2008
Posts: 17

PostPosted: Wed Nov 12, 2008 5:52 am    Post subject: Reply with quote

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.
Back to top
whatuusay1



Joined: 02 Dec 2008
Posts: 1

PostPosted: Tue Dec 02, 2008 10:42 am    Post subject: Trouble setting up this script.. Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group