REPAIRED: SmokePing Like 1.0

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

Moderators: Moderators, Developers

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

REPAIRED: SmokePing Like 1.0

#1 Post by drose12 » Fri Jul 15, 2005 10:55 am

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 104523 times
sm1.JPG
sm1.JPG (31.54 KiB) Viewed 104522 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

#2 Post by drose12 » Fri Jul 15, 2005 10:58 am

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 11448 times
ping-latency.pl.txt
(305 Bytes) Downloaded 12332 times

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

Zoomed in

#3 Post by drose12 » Fri Jul 15, 2005 11:03 am

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 104518 times

tamaqua
Posts: 7
Joined: Fri Apr 29, 2005 12:06 pm

#4 Post by tamaqua » Fri Jul 15, 2005 4:10 pm

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 104490 times
cacti_graph_template_smokepinglike_1_1.xml
smokepinglike 1.1 xml
(36.36 KiB) Downloaded 5200 times

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

#5 Post by drose12 » Wed Jul 20, 2005 11:07 am

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: 299
Joined: Tue May 03, 2005 8:54 am
Location: GA

Hash errors

#6 Post by spoonman » Thu Jul 21, 2005 1:33 pm

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: 14855
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#7 Post by TheWitness » Thu Jul 21, 2005 4:16 pm

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 3487 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

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

#8 Post by TheWitness » Thu Jul 21, 2005 4:17 pm

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

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

#9 Post by TheWitness » Fri Jul 22, 2005 5:30 am

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

User avatar
egarnel
Cacti Pro User
Posts: 703
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

#10 Post by egarnel » Fri Jul 22, 2005 8:15 am

Watch out for bears :wink:

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

#11 Post by TheWitness » Sat Jul 23, 2005 1:07 pm

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

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

#12 Post by drose12 » Mon Jul 25, 2005 1:42 pm

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: 299
Joined: Tue May 03, 2005 8:54 am
Location: GA

#13 Post by spoonman » Mon Jul 25, 2005 1:46 pm

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

#14 Post by petredaniel » Fri Jul 29, 2005 10:48 am

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 103523 times

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

#15 Post by TheWitness » Tue Aug 02, 2005 5:59 pm

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

Post Reply