|
|
| Author |
Message |
drose12
Joined: 10 Mar 2005 Posts: 31
|
Posted: Fri Jul 15, 2005 10:55 am Post subject: REPAIRED: SmokePing Like 1.0 |
|
|
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.
| Description: |
|
| Filesize: |
31.54 KB |
| Viewed: |
42941 Time(s) |

|
| Description: |
|
| Filesize: |
39.42 KB |
| Viewed: |
42942 Time(s) |

|
Last edited by drose12 on Fri Jul 15, 2005 10:59 am; edited 1 time in total |
|
| Back to top |
|
 |
drose12
Joined: 10 Mar 2005 Posts: 31
|
Posted: Fri Jul 15, 2005 10:58 am Post subject: SmokePing Like 1.0 XML and script |
|
|
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
| Description: |
|
 Download |
| Filename: |
ping-latency.pl.txt |
| Filesize: |
305 Bytes |
| Downloaded: |
5417 Time(s) |
| Description: |
|
 Download |
| Filename: |
cacti_graph_template_smokepinglike_1_0.xml |
| Filesize: |
34.84 KB |
| Downloaded: |
4760 Time(s) |
|
|
| Back to top |
|
 |
drose12
Joined: 10 Mar 2005 Posts: 31
|
Posted: Fri Jul 15, 2005 11:03 am Post subject: Zoomed in |
|
|
Here is a look at a zoomed in graph. I used the deviation returned from the ping script to graph the dark smoke...
| Description: |
|
| Filesize: |
31.39 KB |
| Viewed: |
42937 Time(s) |

|
|
|
| Back to top |
|
 |
tamaqua
Joined: 29 Apr 2005 Posts: 7
|
Posted: Fri Jul 15, 2005 4:10 pm Post subject: |
|
|
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.
| Description: |
|
| Filesize: |
65.56 KB |
| Viewed: |
42909 Time(s) |

|
| Description: |
|
 Download |
| Filename: |
cacti_graph_template_smokepinglike_1_1.xml |
| Filesize: |
36.36 KB |
| Downloaded: |
2283 Time(s) |
|
|
| Back to top |
|
 |
drose12
Joined: 10 Mar 2005 Posts: 31
|
Posted: Wed Jul 20, 2005 11:07 am Post subject: |
|
|
| Quote: | | 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
|
|
| Back to top |
|
 |
spoonman Cacti User
Joined: 03 May 2005 Posts: 243
|
Posted: Thu Jul 21, 2005 1:33 pm Post subject: Hash errors |
|
|
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
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9691 Location: MI, USA
|
Posted: Thu Jul 21, 2005 4:16 pm Post subject: |
|
|
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
| Description: |
|
 Download |
| Filename: |
ss_fping.zip |
| Filesize: |
777 Bytes |
| Downloaded: |
1550 Time(s) |
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9691 Location: MI, USA
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9691 Location: MI, USA
|
Posted: Fri Jul 22, 2005 5:30 am Post subject: |
|
|
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
|
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Fri Jul 22, 2005 8:15 am Post subject: |
|
|
Watch out for bears
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9691 Location: MI, USA
|
Posted: Sat Jul 23, 2005 1:07 pm Post subject: |
|
|
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]
|
|
| Back to top |
|
 |
drose12
Joined: 10 Mar 2005 Posts: 31
|
Posted: Mon Jul 25, 2005 1:42 pm Post subject: |
|
|
| Any more details around this? My graphs appear to be working ok. Perhaps I don't quite understand what part is broken.
|
|
| Back to top |
|
 |
spoonman Cacti User
Joined: 03 May 2005 Posts: 243
|
Posted: Mon Jul 25, 2005 1:46 pm Post subject: |
|
|
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
|
|
| Back to top |
|
 |
petredaniel
Joined: 06 Jul 2005 Posts: 3 Location: pitesti, romania
|
Posted: Fri Jul 29, 2005 10:48 am Post subject: |
|
|
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] |
| Description: |
|
| Filesize: |
23.54 KB |
| Viewed: |
41940 Time(s) |

|
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9691 Location: MI, USA
|
Posted: Tue Aug 02, 2005 5:59 pm Post subject: |
|
|
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
|
|
| Back to top |
|
 |
|