=== Script provided as-is without support ===
These scripts and templates should allow you to get the route table size from your Cisco router.
These templates were from Cacti 0.8.6j , I don't expect it to work with any other version so don't ask me. Also, our system uses the 1 minute poller patch so that may effect your importing.
Take the four scripts;
ciscoroutesummary-ssh.sh
ciscoroutesummary-telnet.sh
ciscoroutesummary-ssh.exp
ciscoroutesummary-telnet.exp
And put them in /var/www/cacti/scripts/ modify ciscoroute-summary-ssh.sh and -telnet.sh to have the appropriate username/password
At present these scripts only support a single username across all routers. Not ideal but it was done for proof of concept then went live in a big way!
Cheers,
Gavin
Provided as is with no warranty
Route Table size from a Cisco Router
Moderators: Developers, Moderators
Route Table size from a Cisco Router
- Attachments
-
- ciscoroutesummary.tar.gz
- extract me to /var/www/cacti/scripts and edit both the .sh files to put your passwords in.
- (847 Bytes) Downloaded 765 times
-
- cacti_graph_template_cisco_routing_table_size_via_ssh.xml
- import me
- (8.29 KiB) Downloaded 606 times
-
- cacti_graph_template_cisco_routing_table_size_via_telnet.xml
- import me
- (7.76 KiB) Downloaded 703 times
-
- Cacti User
- Posts: 59
- Joined: Fri Mar 23, 2007 3:38 pm
This is very interesting. I had to do the following to get it to work...
I had to do go and install /usr/bin/expect
Didn't have to edit the ciscoroutesummary-ssh.exp at all
In the ciscoroutesummary-ssh.sh I had to edit the OUTPUT=$(/usr/bin/expect -d to point to my /cacti/scripts folder.
In the .xml file I had to edit the line where it says
<input_string>/bin/bash
so that it could also point to my /cacti/scripts directory.
I also had to ssh to the device that I want to monitor from the command line so that it could set up the RSA SSH key for that device.
Nice script.
I had to do go and install /usr/bin/expect
Didn't have to edit the ciscoroutesummary-ssh.exp at all
In the ciscoroutesummary-ssh.sh I had to edit the OUTPUT=$(/usr/bin/expect -d to point to my /cacti/scripts folder.
In the .xml file I had to edit the line where it says
<input_string>/bin/bash
so that it could also point to my /cacti/scripts directory.
I also had to ssh to the device that I want to monitor from the command line so that it could set up the RSA SSH key for that device.
Nice script.
-
- Cacti User
- Posts: 59
- Joined: Fri Mar 23, 2007 3:38 pm
Cacti does have a hash function at the top of the xml files though I'm not 100% on it's uses. I believed it was to do with the cacti version more than that of the xml file itself....osiris123d wrote:I edited your doc to graph the memory used by the routing table. When I import the edited .xml into cacti it removes the .xml file you have for routing table. Is there something in the .xml file that tells cacti that both .xml files are the same and not unique??
Just asking.
If anyone's having problems with this script though let me know.
Thanks
Gavin
Never mind. After a couple of polls the number appeared.MatsB wrote:Don't if anyone is still reading this post but I got the script to work on my system.
The problem how ever is that the graph doesn't display any numbers on the vertical axis. Graphing works ok and I get average, last and maximum values.
Who is online
Users browsing this forum: No registered users and 0 guests