Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Apr 24, 2019 11:01 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [XML/PERL] Cisco Remote Ping Template and script
PostPosted: Wed Oct 06, 2004 12:35 pm 
Offline

Joined: Fri Aug 13, 2004 11:35 am
Posts: 47
Location: Paris, France
hi!
My first template :)

This template is to monitor remote hosts by using the cisco remote ping

Here are the template exported from my cacti 0.8.6a and the perl script used.

The script is an old perl script which was written by Omer Ansari in 2000, and i just format the output to be :
rate:100 min:8 avg:8 max:8

Community MUST be ReadWrite.

First copy the script into "scripts" directory
then import the template
edit "Cisco Remote Ping" in the "Data Input Methods" and verify the perl path.


ATTENTION : i'm using a history of 1 year in daily rra !! rows=105120 for me, default is 600 (edit : "Data Sources" "RRAs")

Output example: Image

Link to zip file : rping.zip


Attachments:
File comment: 0.8.6h version of xml file
cacti_graph_template_cisco_remote_ping.xml [19.05 KiB]
Downloaded 3567 times
File comment: Cisco Remote ping template and script
rping.zip [6.76 KiB]
Downloaded 3932 times


Last edited by Mikf on Thu Nov 02, 2006 6:12 am, edited 3 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 2:51 am 
Offline
Cacti User

Joined: Fri Mar 12, 2004 3:01 am
Posts: 52
Location: Beusichem
Could you repost the script? If I try to download it I get the download.php (used save as and just a single left click)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 3:27 am 
Offline

Joined: Fri Aug 13, 2004 11:35 am
Posts: 47
Location: Paris, France
attachment reposted


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 3:38 am 
Offline
Cacti User

Joined: Fri Mar 12, 2004 3:01 am
Posts: 52
Location: Beusichem
Same error...could you send it to me by email? ([email protected]) Thnx!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 11:36 am 
I guess something is wrong with the .zip links in cacti forum :S I just cant download any file in that format...


Top
  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 12:54 pm 
Offline

Joined: Fri Aug 13, 2004 11:35 am
Posts: 47
Location: Paris, France
i have added a link to the zip file


Top
 Profile  
 
 Post subject: data input methods specifications
PostPosted: Wed Oct 13, 2004 12:08 pm 
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.


Top
  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 12:40 pm 
Offline

Joined: Fri Aug 13, 2004 11:35 am
Posts: 47
Location: Paris, France
you can use many options :
Code:
./rping.pl
rping v0.1 RemotePing Facility
Lets you ping machine(s) from router X while sitting on box A!
Freeware by Omer Ansari <[email protected]>

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)


i'm only using -c for community

perl rping.pl -c <your community> <cisco router> <remote host>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 1:47 pm 
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?


Top
  
 
 Post subject:
PostPosted: Tue Oct 19, 2004 10:17 am 
Offline

Joined: Wed Oct 06, 2004 7:22 am
Posts: 11
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 19, 2004 11:43 am 
Offline

Joined: Thu Sep 16, 2004 12:32 pm
Posts: 13
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.


Top
 Profile  
 
 Post subject: CRP..Modify graph to include ping target ..
PostPosted: Mon Jul 30, 2007 9:27 am 
Offline
Cacti User
User avatar

Joined: Wed Mar 16, 2005 12:11 pm
Posts: 71
Location: Albany , NY , USA
I wish to modify the graph template to include the
address of the ping target .. I attempted to use
| rhost | variable without success..

What variable can I use in the template to reveal the
ping target of a Cisco Remote Ping in the outputted graph?

Thanks !


Attachments:
graph_image.gif
graph_image.gif [ 22.7 KiB | Viewed 37767 times ]

_________________
Mike Donnelly , Albany , NY
| Cacti 0.8.7g | Spine 0.8.7g | MySQL 5.0.77 | Net-SNMP 5.3.2.2 | Apache 2.2.3 | PHP 5.3.3 | RRDtool 1.2.27 | Rhel6 | Dual Xeon [email protected] | Sunfire x4150
Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 30, 2007 1:48 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
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

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Allowing longer Round Trip Times
PostPosted: Wed Dec 05, 2007 9:42 pm 
Offline

Joined: Tue Apr 03, 2007 12:04 am
Posts: 16
Location: Brisbane, Australia
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.


Attachments:
rping.jpg
rping.jpg [ 56.07 KiB | Viewed 36146 times ]
Top
 Profile  
 
 Post subject: Multiple destinations on a source
PostPosted: Fri Dec 14, 2007 1:24 am 
Offline

Joined: Tue Apr 03, 2007 12:04 am
Posts: 16
Location: Brisbane, Australia
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:


Code:
$response = $session->set_request($ciscoPingEntryStatus_OID, INTEGER, '6');


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group