REPAIRED: SmokePing Like 1.0

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

drose12
Posts: 31
Joined: Thu Mar 10, 2005 11:02 am

REPAIRED: SmokePing Like 1.0

Post by drose12 »

I thought I'd give a crack at something that was similar to SmokePing. It's not perfect, and please comment if you find any issues with it. Essentially it pings 20 times much like the original. I've made the packet loss show up as a vertical bar instead of just a section of a line. Please note that the ping-latency.pl perl script that should go in /var/www/html/cacti/scripts, takes advantage of a shorter interval time and this may or may not be supported on your platform. I am currently running this on RH EL AS3. Your mileage may vary.
Attachments
cisco.JPG
cisco.JPG (39.42 KiB) Viewed 110992 times
sm1.JPG
sm1.JPG (31.54 KiB) Viewed 110991 times
Last edited by drose12 on Fri Jul 15, 2005 10:59 am, edited 1 time in total.
drose12
Posts: 31
Joined: Thu Mar 10, 2005 11:02 am

SmokePing Like 1.0 XML and script

Post by drose12 »

Of course, here are the .xml file and ping-latency.pl script. I had to add .txt to the script to get it to attach.

Place script in /var/www/html/cacti/scripts
Attachments
cacti_graph_template_smokepinglike_1_0.xml
(34.84 KiB) Downloaded 11881 times
ping-latency.pl.txt
(305 Bytes) Downloaded 12769 times
drose12
Posts: 31
Joined: Thu Mar 10, 2005 11:02 am

Zoomed in

Post by drose12 »

Here is a look at a zoomed in graph. I used the deviation returned from the ping script to graph the dark smoke...
Attachments
sm2.JPG
sm2.JPG (31.39 KiB) Viewed 110987 times
tamaqua
Posts: 7
Joined: Fri Apr 29, 2005 12:06 pm

Post by tamaqua »

drose-
Thanks a million times over for posting this. I have been messing with the orig script posted here (smokeping 86c) to get it to look more like the orig. It worked, but when I upgraded to 86f and rrdtool1.2, it started failing. This works great for me. I modded it just a bit, added a new class of loss (1-2% and 3-5% now instead of just 1-5%) and am using fping with more pings so that you can actually get 1-2% loss. I.E. 19/20 pings returned = 5%loss 18/20 = 10% loss, etc. I upped to 40 pings and now able to get 39/40 = 2.5% loss, which matches the first instance. How hard would it be to change the loss return from % to actual ping loss? I.E. actually have 1 packet lost = 1st color, 2 packet lost = 2nd color, etc? It would be nice to reduce my pings back down to 20ish as the ping process takes a long time across many devices.... but I really need the low end loss stats.

Here is my ping-latency.pl -- CAUTION - only use if you know what you are doing, as this amount of pinging and pause time may overwhelm/ or effect the poller, etc in bad ways. CAUTION!

#!/usr/bin/perl

$host = $ARGV[0];
$ping=`/usr/sbin/fping -c 40 -p 130 -i 130 -q $host 2>&1`;
($x, $y) = split (",", $ping);
($xmt,$rcv,$loss) = ($x =~ /(\d+)\/(\d+)\/(\d+)/);
($min,$avg,$max) = ($y =~ /(\d+\.?\d*)\/(\d+\.?\d*)\/(\d+\.?\d*)/);
$dev1 = $avg - $min;
$dev2 = $max - $avg;
$dev = ($dev1 + $dev2)/2;
printf ("min:%.3f avg:%.3f max:%.3f dev:%.3f loss:%.0f", $min, $avg, $max, $dev, $loss);


And, heres an example of the modded graph (without much data on it yet)
And the modded xml.
Attachments
smoke1.1.jpg
smoke1.1.jpg (65.56 KiB) Viewed 110959 times
cacti_graph_template_smokepinglike_1_1.xml
smokepinglike 1.1 xml
(36.36 KiB) Downloaded 5535 times
drose12
Posts: 31
Joined: Thu Mar 10, 2005 11:02 am

Post by drose12 »

How hard would it be to change the loss return from % to actual ping loss? I.E. actually have 1 packet lost = 1st color, 2 packet lost = 2nd color, etc? It would be nice to reduce my pings back down to 20ish as the ping process takes a long time across many devices.... but I really need the low end loss stats.
Well, the simple math of it should dictate your granularity.

20 pkts gives you at most a granularity of 5% ie) 1/20 = .05
40 pkts gives at most a granularity of 2.5% etc.

Personally, for me, anything over 1% catches my eye, and when it gets over 15% you really have a problem, so it doesn't matter for me that its 60% or 80%..

If you have a look at the CDEF's they are really doing the calculations for pkt loss, it should be real easy to modify, infact it looks like you already have done this. I'm guessing people have different needs. I was mostly posting this as a "template" to give enough information for people to extend it for their own liking.

If you need help with a specific change, just PM me and I'll see what I can do.

I'm still a bit of a noob when it comes to Cacti
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Hash errors

Post by spoonman »

Has anyone had issued importing either of these 2 templates?? I'm using cacti vs. d and I get Error: XML: Hash version does not exist when trying to import either 1.0 or 1.1 templates?? Any suggestions??

Thanks

Spoon
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I have created a PHP Script Server version of fping using builtin Cacti modules and the specification in your perl script. This may be much faster than your current perl script. Give it a try. Your existing Data Sources should be 100% compatible.

Use the following link to ss_tping.php as a guide.

TheWitness
Attachments
ss_fping.zip
(777 Bytes) Downloaded 3866 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok, who wins the battle of the pings:

http://forums.cacti.net/viewtopic.php?p=37590#37590

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I am thinking of making this the Gold Standard. I would like comments from the Cacti community. Please provide feedback.

Also, if somebody could package the ss_fping.php into a complete "Data Input", "Data Template" and "Graph Template" package, I would appreciate it.

I will be away starting this Sunday for a week and will have no access to the Internet. Heading for the woods...

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

Watch out for bears :wink:
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

DANGER DANGER DANGER:

I have been working with this template and have found a flaw associated with it or Cacti that will make you unhappy (eventually) if you use it.

It saddens me to say this, because I really like it and cudo's to the author's.

However, there is a problem when this Graph Template is applied to create Graphs. When you do so, the Graphs, although they will function, are damaged internally. If they are edited, say by modifying the graph template, you will likely loose all of your graphs.

I have sent the Exported Graph Template to the Cacti author and major domo ("Ian Berry") in hopes that he can correct the problem.

Till then, buyer beware. Sorry

TheWitness[/b]
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
drose12
Posts: 31
Joined: Thu Mar 10, 2005 11:02 am

Post by drose12 »

Any more details around this? My graphs appear to be working ok. Perhaps I don't quite understand what part is broken.
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

I also would like to know has anyonehad problems importing these xml templates?? I get hash errors on 1.0 and the 1.1 templates...

I'm running .8.6d

Thanks
petredaniel
Posts: 3
Joined: Wed Jul 06, 2005 5:35 am
Location: pitesti, romania

Post by petredaniel »

indeed, sadly, look how my starting graph looks like, in the attachament.
im running :

Latest version installed: 0.8.6f

and rrdtool 1.2.11


TheWitness wrote:DANGER DANGER DANGER:

I have been working with this template and have found a flaw associated with it or Cacti that will make you unhappy (eventually) if you use it.

It saddens me to say this, because I really like it and cudo's to the author's.

However, there is a problem when this Graph Template is applied to create Graphs. When you do so, the Graphs, although they will function, are damaged internally. If they are edited, say by modifying the graph template, you will likely loose all of your graphs.

I have sent the Exported Graph Template to the Cacti author and major domo ("Ian Berry") in hopes that he can correct the problem.

Till then, buyer beware. Sorry

TheWitness[/b]
Attachments
graph_image.php.png
graph_image.php.png (9.01 KiB) Viewed 109992 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I have received an updated template from the Cacti Author, but have not had time to modify for the ss_fping.php program and post to this site. Been I vacation and in the woods with the Boy Scouts, apparently hunting bears :) BTB, with the ss_fping.php Script Server add on, the performance does improve significantly depending on how many ping retries you select.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests