REPAIRED: SmokePing Like 1.0
Moderators: Developers, Moderators
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.
- Attachments
-
- cisco.JPG (39.42 KiB) Viewed 110550 times
-
- sm1.JPG (31.54 KiB) Viewed 110549 times
Last edited by drose12 on Fri Jul 15, 2005 10:59 am, edited 1 time in total.
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
Place script in /var/www/html/cacti/scripts
- Attachments
-
- cacti_graph_template_smokepinglike_1_0.xml
- (34.84 KiB) Downloaded 11772 times
-
- ping-latency.pl.txt
- (305 Bytes) Downloaded 12629 times
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.
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 (65.56 KiB) Viewed 110517 times
-
- cacti_graph_template_smokepinglike_1_1.xml
- smokepinglike 1.1 xml
- (36.36 KiB) Downloaded 5381 times
Well, the simple math of it should dictate your granularity.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.
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
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
Thanks
Spoon
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
Use the following link to ss_tping.php as a guide.
TheWitness
- Attachments
-
- ss_fping.zip
- (777 Bytes) Downloaded 3689 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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Ok, who wins the battle of the pings:
http://forums.cacti.net/viewtopic.php?p=37590#37590
TheWitness
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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]
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?
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?
-
- Posts: 3
- Joined: Wed Jul 06, 2005 5:35 am
- Location: pitesti, romania
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
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 (9.01 KiB) Viewed 109550 times
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
Who is online
Users browsing this forum: No registered users and 3 guests