Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Hi,
I am a newbie to Cacti and I am experimenting with running external scripts for Cacti to graph. While adding your perl script to data input methods, how many output fields must i specify and what would be their names? Please let me know about this.
./rping.pl
rping v0.1 RemotePing Facility
Lets you ping machine(s) from router X while sitting on box A!
Freeware by Omer Ansari <omer@ansari.com>
Syntax:
rping [-c comm_string] [-w wait_time] [-t timeout] [-g gap]
[-n probe_count] [-s probe_size] [-h] <Source> <Destination>
rping [-c comm_string] [-w wait_time] [-t timeout] [-g gap]
[-n probe_count] [-s probe_size] [-h] <-f input_file> <Source>
Options:
-c comm_string: The RW community string on the cisco router
(i.e. the <Source>). Default: private
-w wait_time: The amount of time the script waits before
polling the <Source> for the ping results
[Note: Increase this if you're not
getting results] Default: 2s
-t timeout: Defines the timeout value after which the
packet is considered dropped. Default: 3000ms
-g gap: The gap between successive ping probes
Can be set to zero. Default: 3ms
-n probe_count: The number of packets to be sent. Default: 5
-s probe_size: The size of each ping packet. Default: 64bytes
-f input_file: The file which has multiple destinations to ping
-h help: Help (this dump)
Thanks for the quick response! I appreciate it. Can you send me a detailed documetation on how you did it. It would be ver helpful for me if I have a step by step process for going from script to graph. I also have one other problem. When I import the xml file downloaded from here, it is not showing up in the graph templates menu. Has anyone encountered problems like this?
Hello
Do you try to import the template in the 0.6.8b version ?
I follow the steps by adding the script & the xml but the cacti interface is not showing the new data input method
Kind Regards
Hi,
I am using the latest version and it is working now. The template shows up in data sources. In the earlier version of cacti I could not import the template at all.
Support for using "private" script variables is working for Data Queries only. There have been some improvements with latest 0.8.6k (currently beta status), but I'm quite sure they will not work on Data Input Methods
Reinhard
This script and template works very well but I had trouble when I wanted to monitor response times over a Mobile Data Network. The RTT is usually around 600 to 700 milliseconds.
It took me a while to find out why the success rates were very low and why the lines weren't appearing on the graph.
I had to allow a longer wait time to allow the router to complete the pings before getting the results. Because the RTT is almost 700ms and timeout is 1 second and number of pings is 5 (defaults) I increased the wait time to 6 seconds (rping.pl -w 6 ... ).
The Data Template normally allows a maximum of 100 milliseconds for min, avg and max and I increased them all to 2000.
We have an issue where we are pinging quite a few remote devices from one distribution router. The first ones worked OK but after about 5 or 6 devices the last ones added often wouldn't get any data. I tried running the script manually and would sometimes get no data or an SNMP error "requested table is empty or does not exist'.
When the script is run it creates a SNMP ping entry on the source device. The entry is based on the "$leaf" value. It is set to 90 and then increments by 10 for each destination. The script has the command to destroy the SNMP ping entry commented out. This isn't a problem in this version because the entry is reused.
I think I was losing entries because the script told the router to setup these entries and maybe the router was too slow or fast but it was out of sync with the device.
I changed to a random number for the first leaf. $leaf = int(rand(100)); and uncommented the line: