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    


[XML/PERL] Cisco Remote Ping Template and script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
Mikf



Joined: 13 Aug 2004
Posts: 46
Location: Paris, France

PostPosted: Wed Oct 06, 2004 12:35 pm    Post subject: [XML/PERL] Cisco Remote Ping Template and script Reply with quote

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:

Link to zip file : rping.zip



cacti_graph_template_cisco_remote_ping.xml
 Description:
0.8.6h version of xml file

Download
 Filename:  cacti_graph_template_cisco_remote_ping.xml
 Filesize:  19.05 KB
 Downloaded:  1670 Time(s)


rping.zip
 Description:
Cisco Remote ping template and script

Download
 Filename:  rping.zip
 Filesize:  6.76 KB
 Downloaded:  1850 Time(s)



Last edited by Mikf on Thu Nov 02, 2006 6:12 am; edited 3 times in total
Back to top
..::BFS::..
Cacti User


Joined: 12 Mar 2004
Posts: 52
Location: Beusichem

PostPosted: Fri Oct 08, 2004 2:51 am    Post subject: Reply with quote

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)
Back to top
Mikf



Joined: 13 Aug 2004
Posts: 46
Location: Paris, France

PostPosted: Fri Oct 08, 2004 3:27 am    Post subject: Reply with quote

attachment reposted
Back to top
..::BFS::..
Cacti User


Joined: 12 Mar 2004
Posts: 52
Location: Beusichem

PostPosted: Fri Oct 08, 2004 3:38 am    Post subject: Reply with quote

Same error...could you send it to me by email? (kc@bfsquad.com) Thnx!
Back to top
Guest






PostPosted: Fri Oct 08, 2004 11:36 am    Post subject: Reply with quote

I guess something is wrong with the .zip links in cacti forum :S I just cant download any file in that format...
Back to top
Mikf



Joined: 13 Aug 2004
Posts: 46
Location: Paris, France

PostPosted: Fri Oct 08, 2004 12:54 pm    Post subject: Reply with quote

i have added a link to the zip file
Back to top
guest
Guest





PostPosted: Wed Oct 13, 2004 12:08 pm    Post subject: data input methods specifications Reply with quote

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



Joined: 13 Aug 2004
Posts: 46
Location: Paris, France

PostPosted: Wed Oct 13, 2004 12:40 pm    Post subject: Reply with quote

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 <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)


i'm only using -c for community

perl rping.pl -c <your community> <cisco router> <remote host>
Back to top
Guest






PostPosted: Wed Oct 13, 2004 1:47 pm    Post subject: Reply with quote

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



Joined: 06 Oct 2004
Posts: 11

PostPosted: Tue Oct 19, 2004 10:17 am    Post subject: Reply with quote

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



Joined: 16 Sep 2004
Posts: 13

PostPosted: Tue Oct 19, 2004 11:43 am    Post subject: Reply with quote

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.
Back to top
mpdsville1
Cacti User


Joined: 16 Mar 2005
Posts: 61
Location: Albany , NY , USA

PostPosted: Mon Jul 30, 2007 9:27 am    Post subject: CRP..Modify graph to include ping target .. Reply with quote

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 !



graph_image.gif
 Description:
 Filesize:  22.7 KB
 Viewed:  19481 Time(s)

graph_image.gif


Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 17009
Location: Muenster, Germany

PostPosted: Mon Jul 30, 2007 1:48 pm    Post subject: Reply with quote

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



Joined: 03 Apr 2007
Posts: 15
Location: Brisbane, Australia

PostPosted: Wed Dec 05, 2007 9:42 pm    Post subject: Allowing longer Round Trip Times Reply with quote

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.



rping.jpg
 Description:
 Filesize:  56.07 KB
 Viewed:  17860 Time(s)

rping.jpg


Back to top
duanew



Joined: 03 Apr 2007
Posts: 15
Location: Brisbane, Australia

PostPosted: Fri Dec 14, 2007 1:24 am    Post subject: Multiple destinations on a source Reply with quote

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');
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 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group