REPAIRED: SmokePing Like 1.0

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

Moderators: Developers, Moderators

HappyCZ
Posts: 6
Joined: Tue Aug 09, 2005 6:17 pm
Contact:

Post by HappyCZ »

As always your advice was fast, simple and whats more important solve my problem ... thank you.
HappyCZ
Posts: 6
Joined: Tue Aug 09, 2005 6:17 pm
Contact:

Post by HappyCZ »

Hi, its me again :lol: Now i have no questions but one sugestion ... if packet loss reach 100% then ss_fping stops returning purposeful results (it returns AV:U PL:100) - so in graph it looks absolutly same as if poller is turn off ... so i sugest to change this code

Code: Select all

	if ($failed_results == $ping_sweeps) {
		return "AV:U PL:100";
to

Code: Select all

	if ($failed_results == $ping_sweeps) {
		$loss = 100;
		return sprintf("loss:%0.4f", $loss);
After this little change when packet loss reach 100% then in graph you can see red backround without any ping, so you know that something is really wrong :wink:
predou
Posts: 45
Joined: Fri Jan 07, 2005 8:42 am

Post by predou »

I don't understand why do you create this script.
Cause I already created an script smokeping like four month ago !!!!

http://forums.cacti.net/viewtopic.php?t=7090&highlight=

Don't forget that dose12 please !!!
kslt
Cacti User
Posts: 85
Joined: Tue Aug 02, 2005 4:12 am

can't zoom

Post by kslt »

hello guys,

i can't zoom the smokyping graphs and i cant see graph tumbnail ...
whats wrong ?

using 086c
johndoe123
Posts: 17
Joined: Mon Oct 03, 2005 1:20 pm

Post by johndoe123 »

Ok, now I added 10 data sources and I'm trying to make the graphs. How do I find out which datasource points to what host? They are all called the same thing and I cna't distinguish between them while making the graphs.
the_sphynx_2k5
Posts: 7
Joined: Thu Oct 27, 2005 4:32 pm

Post by the_sphynx_2k5 »

I must be a little confused...I downloaded the template from the original post and my graph looks like the below graph.
Any suggestions?
Attachments
SmokePingLike Graph, although I did migrate it to Advanced Ping 1.3 this morning.
SmokePingLike Graph, although I did migrate it to Advanced Ping 1.3 this morning.
ping_graph.JPG (32.93 KiB) Viewed 23735 times
kslt
Cacti User
Posts: 85
Joined: Tue Aug 02, 2005 4:12 am

Post by kslt »

who can explain me what meaning of the grayscale "smoke" colors ?
Attachments
smoke.JPG
smoke.JPG (29.49 KiB) Viewed 23551 times
drose12
Posts: 31
Joined: Thu Mar 10, 2005 11:02 am

Post by drose12 »

The smoke represents the overall jitter. The darker the smoke signifies that most of your ping pkts were in that latency range. The 2 darkest smoke colors are based on the deviation return by the ping test. The deviation is divided by 2 and stacked on top of the green avg line. The next 3 grays are based on the max ping, ie) max - (dev+avg) / 3, and stacked on top of the 2 darkest grays representing deviation. This was the closest approximation to the original smokeping created by Tobi O. Hope this helps.
suse
Posts: 23
Joined: Sun Nov 13, 2005 1:05 am

Post by suse »

perl /home/mrtg/cacti/scripts/ping-latency.pl 202.96.209.5'
11/19/2005 07:35:02 PM - CACTID: Poller[0] Host[11] DS[135] WARNING: Result from SCRIPT not valid. Partial Result: ...


I got this from cacti.log

by running that in command line
I can get the result.

perl /home/mrtg/cacti/scripts/ping-latency.pl 202.96.209.5
min:1.046 avg:1.607 max:3.823 dev:0.835 loss:10

what's issue here?

thanks
patrickdaj
Posts: 4
Joined: Tue Dec 20, 2005 4:37 pm
Location: Tempe, AZ

Post by patrickdaj »

I'm guessing that these gaps are outages...is that correct? Why would it still show my avg loss is 0.00%?
Attachments
what2.png
what2.png (149.63 KiB) Viewed 23175 times
what.png
what.png (8.5 KiB) Viewed 23177 times
User avatar
GLR
Cacti User
Posts: 55
Joined: Mon Jul 21, 2008 5:45 am
Location: Paris suburbs, France
Contact:

too short ping deadline

Post by GLR »

Code: Select all

/bin/ping -nqc 20 -i .5 -w 5 $host
A deadline of 5 seconds is much too short.

If you send 20 echo requests in 10 seconds you must wait at least 10 seconds...

Otherwise you don't let the time to send the 20 packets and also often lose packets (in fact cut echo replies).
-w deadline
Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this
case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are
answered or for some error notification from network.
I would suggest to set the deadline to something like 12 or 14 seconds to be sure :

Code: Select all

/bin/ping -nqc 20 -i .5 -w 14 $host
Cacti 0.8.8b + spine 0.8.8b
on Debian / Apache 2.2 / PHP 5.2 / MySQL 5.0
biyuhbiyuh
Posts: 2
Joined: Mon Oct 13, 2008 11:12 pm
Contact:

Smokeping cannt monitor untill 100-hosts

Post by biyuhbiyuh »

I use smokeping for monitoring branch company, but a lot of our branches to the number of hundreds that smokeping until it is not able to monitor again. I'm confused though what I should be monitoring through smokeping ?
cerberus
Posts: 1
Joined: Mon Feb 23, 2009 1:01 pm

Results if I make packet size very small?

Post by cerberus »

Hello.

Will the results be the same if I ping with the smallest packet size?

Regards,
spartan82
Posts: 1
Joined: Tue Mar 24, 2009 8:52 am

Post by spartan82 »

tamaqua wrote: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, here is an example of the modded graph (without much data on it yet)
And the modded xml.
I try to use this one, but my instalation path of cacti is /cacti , I put the script in /cati/scripts and I am trying to modify the template but cacti doesn't give me the graph.

Can you help me?

THKS
vivalibre
Posts: 1
Joined: Wed Feb 17, 2016 2:08 pm

Re: REPAIRED: SmokePing Like 1.0

Post by vivalibre »

I noticed that ping latency does not work with IPv6 addresses. Assuming you need to use /bin/ping6 to ping an IPv6 host, I've updated the script to detect if an IP is v6 and call /bin/ping6 instead. Regex for IPv6 address obtained from:

https://rt.cpan.org/Public/Bug/Display.html?id=50693

Note: use pinglatency.zip not ping-latency.zip -- latter has two missing lines
pinglatency.zip
(607 Bytes) Downloaded 261 times
Attachments
ping-latency.zip
Fixed ping-latency.pl for cacti script with IPv6 support (Linux)
(575 Bytes) Downloaded 182 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests