Code Monkey home page Code Monkey logo

smokeping's Introduction

____                  _        ____  _             
/ ___| _ __ ___   ___ | | _____|  _ \(_)_ __   __ _ 
\___ \| '_ ` _ \ / _ \| |/ / _ \ |_) | | '_ \ / _` |
 ___) | | | | | | (_) |   <  __/  __/| | | | | (_| |
|____/|_| |_| |_|\___/|_|\_\___|_|   |_|_| |_|\__, |
                                              |___/ 

Original Authors: Tobias Oetiker and Niko Tyni

Build Test

SmokePing is a latency logging and graphing and alerting system. It consists of a daemon process which organizes the latency measurements and a CGI which presents the graphs.

SmokePing is ...

  • extensible through plug-in modules

  • easy to customize through a webtemplate and an extensive configuration file.

  • written in perl and should readily port to any unix system

  • an RRDtool frontend

  • able to deal with DYNAMIC IP addresses as used with Cable and ADSL internet.

cheers tobi

smokeping's People

Contributors

bevhost avatar cgull avatar dagelf avatar daxtorim avatar dfrli avatar dne avatar eskyuu avatar fenner avatar fgtb avatar heistp avatar hendrikf avatar hinatakato avatar hufman avatar jsoref avatar jweather avatar lelutin avatar mad-ady avatar matellis avatar mcdarren avatar mdiehm avatar nschermer avatar oetiker avatar rborgmaster avatar rezzorix avatar rixvet avatar saaly182 avatar simfishing avatar skoef avatar strykar avatar twilde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smokeping's Issues

FPing feature detection does not work

in FPing.pm we see the following code:

$self->{enable}{S} = (`$binary -h 2>&1` =~ /\s-S\s/);
$self->{enable}{O} = (`$binary -h 2>&1` =~ /\s-O\s/);

The regular expression always fails.
Let's have a look at the current source of fping: In fping.c we see:

fprintf(out, " -S, --src=IP set source address\n");
Notice the comma after the -S, it does not match the \s.

I propose the change the regular expressions in FPing.pm to /\s-S[\s,]/ and /\s-O[\s,]/ respectively.

Changed config is not pushed to slaves

Happens at least on Debian because master config file (/etc/smokeping/config) uses only includes. Smokeping.pm load_cfg method checks only mtime of submitted config file which is not changed:
my $cfmod = (stat $cfgfile)[9].
So we should change mtime of this file on every config change to make slave config updates happen.

Ubuntu - Issues with Smokeping on 16.04 Upgrade

I have smokeping working fine since 15.10. I did the online upgrade to 16.04.
Smokeping was the only app with errors. It is still running OK, but I get errors during updates, and tried to fix, with no change:

root@mybox# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up smokeping (2.6.11-2) ...
dpkg: error processing package smokeping (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
smokeping
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@mybox# apt-get --reinstall install smokeping
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for smokeping:amd64

need to update TCPPing doc

I tried TCPPing probe few days ago following this page:

http://oss.oetiker.ch/smokeping/probe/TCPPing.en.html

Found that we need to comment out the "tcptraceroute" line in the config file since the latest tcpping script doesn't accept "-e" option:

#tcptraceroute = -e "sudo /usr/bin/tcptraceroute"

Here is the tcpping script download url:

http://www.vdberg.org/~richard/tcpping

Others also mentioned this issue in the mailing list:
https://lists.oetiker.ch/pipermail/smokeping-users/2014-September/005546.html

OpenSSHJunOSPing.pm assumes $dest parameter will be present in @output

$dest is extracted from my $dest = $target->{vars}{host};

Here are the relevant lines from my config:

+ Junos
probe = OpenSSHJunOSPing
host = www.bbc.co.uk

Here is the command-line output from my Juniper router (it's an SRX210):
Admin@router> ping www.bbc.co.uk
PING www.bbc.net.uk (212.58.246.93): 56 data bytes
64 bytes from 212.58.246.93: icmp_seq=0 ttl=55 time=12.369 ms
64 bytes from 212.58.246.93: icmp_seq=1 ttl=55 time=12.724 ms
64 bytes from 212.58.246.93: icmp_seq=2 ttl=55 time=12.734 ms
^C

Please note: the hostname is changed in the first line of the output (now www.bbc.net.uk) and also the output in the command is the numeric IP address.

Here's the match string from OpenSSHJunOSPing.pm:

/^\d+ bytes from $dest: icmp_seq=\d+ ttl=\d+ time=(\d+\.\d+) ms$/ and push @times,$1

$dest isn't going to match in the output, because the numeric IP of the "host" field has been substituted.

Unfortunately the numeric IP address will change often since high-volume websites rotate around a number of valid IP addresses. And it's not safe to pick a singe IP as it may be taken out of the cluster for maintenance. So, specifying the IP address in the "host" field in the config file is not a good plan.

Since the match isn't captured, it would probably be OK to check for any IP address at this position in the output, unless this probe type supports multiple overlapping probes somehow (doesn't look likely).

For now, I'm going to cheat horribly, since this is in my own test lab, and not in production:

OpenSSHJunOSPing.pm, line 21 changed to:
/^\d+ bytes from [0-9.]+: icmp_seq=\d+ ttl=\d+ time=(\d+\.\d+) ms$/

This works OK.

The preferred match for an IP address would be
(from O'Reilly's Mastering Regular Expressions):

m/^([01]?\d\d?|2[0-4]\d|25[0-5]).([01]?\d\d?|2[0-4]\d|25[0-5]).
([01]?\d\d?|2[0-4]\d|25[0-5]).([01]?\d\d?|2[0-4]\d|25[0-5])$/;
but this is overkill for the job at hand, I think.

SmokePing FAQ

After having been on the smokeping-users mailing list for a while now, I've noticed that there are a few questions that come up over and over again, for example:

  • "Why do I see the smokeping source in my web browser?"
  • "My slave seems running ok but there is no data showing up in the graphs!"
  • etc..

So it's probably worth adding a FAQ section to the documentation to cover these commonly asked questions?

People could then simply be directed to this when appropriate.

debian no longer ships a fping6 binary

I upgraded to fping v4 on my debian machine and noticed that all my FPing6 probes stopped working. I ended up making two tiny fping4/fping6 scripts to pass -4/-6 to fping, but it would be nice to be able to set protocol version in FPing probe settings and not use wrapper scripts.

curl task does NOT push data into rrd

i already have the data in log:
Wed May 28 11:06:25 2014 - Curl: curl output: 'Time: 0.082 DNS time: 0.000 Redirect time: 0.000', result: 0.082
Wed May 28 11:06:25 2014 - Curl: curl output: 'Time: 0.092 DNS time: 0.000 Redirect time: 0.000', result: 0.092
Wed May 28 11:06:25 2014 - Curl: curl output: 'Time: 0.070 DNS time: 0.000 Redirect time: 0.000', result: 0.07
Wed May 28 11:06:26 2014 - Curl: curl output: 'Time: 0.072 DNS time: 0.000 Redirect time: 0.000', result: 0.072
Wed May 28 11:06:26 2014 - Curl: curl output: 'Time: 0.085 DNS time: 0.000 Redirect time: 0.000', result: 0.085
Wed May 28 11:06:26 2014 - Curl: curl output: 'Time: 0.083 DNS time: 0.000 Redirect time: 0.000', result: 0.083

but when i fetch the rrd,it shows me :
1401239520: -nan -nan -nan -nan -nan -nan -nan -nan
1401240240: -nan -nan -nan -nan -nan -nan -nan -nan
1401240960: -nan -nan -nan -nan -nan -nan -nan -nan
1401241680: -nan -nan -nan -nan -nan -nan -nan -nan
1401242400: -nan -nan -nan -nan -nan -nan -nan -nan
1401243120: -nan -nan -nan -nan -nan -nan -nan -nan
1401243840: -nan -nan -nan -nan -nan -nan -nan -nan
1401244560: -nan -nan -nan -nan -nan -nan -nan -nan
1401245280: -nan -nan -nan -nan -nan -nan -nan -nan
1401246000: -nan -nan -nan -nan -nan -nan -nan -nan
1401246720: -nan -nan -nan -nan -nan -nan -nan -nan

"Date" header in SmokeAlert mails may not be RFC compliant

Hi,

we moved SmokeAlert recently to a new server and since then I
recognized that the received mails are not properly sorted by my mail
client. The reason is the following header, which is not RFC
compliant:

Date: Fr, 27 Mai 2016 00:42:02 +0200

"Mai" is the name of the month for the German locale, which we use on
that server. My mail client interprets that as something around 26 Jan 2016
23:42:02, so both date and time are wrong.

The problem is in Smokeping.pm around line 1931:

my $rfc2822stamp = POSIX::strftime("%a, %e %b %Y %H:%M:%S %z", @stamp);

At least using %a and %b is wrong here, since both are locale
dependent1, while RFC2822 is not2:

date-time = [ day-of-week "," ] date FWS time [CFWS]
[...]
day-name = "Mon" / "Tue" / "Wed" / "Thu" /
"Fri" / "Sat" / "Sun"
[...]
date = day month year
[...]
month-name = "Jan" / "Feb" / "Mar" / "Apr" /
"May" / "Jun" / "Jul" / "Aug" /
"Sep" / "Oct" / "Nov" / "Dec"

As you can see, "Fr" instead of "Fri" and "Mai" instead of "May" are
both wrong. The same timestamp is given in the body, but this time
only as a stringified localtime and in this case it seems to be locale
independent:

my $stamp = localtime($time);
Fri May 27 00:42:02 2016

Sadly, this timestamp is not RFC compliant as well. So in my opinion
you should either create a truly locale independent date header using
some other function or changing LC_* or such or remove it at all and
let the mail system provide that. I do understand that you want to
have both in sync, but in my opinion having the timestamp in the body
is enough for most people and it simply avoids the problems I have
currently.

Thanks!

autorefresh resets zoom level

I see that there is now a navigator graph which I can click-drag to zoom - awesome! (Maybe that's an old feature but I'm not a heavy smokeping user so I only just noticed.)

However, the autorefresh thing every ten seconds or so causes it to reset the zoom to the original level. Needless to say, this has a significant impact on usability of the feature. Could it be easily fixed?

cURL interface support

Hi,
I've currently added interface select support for the FPing probe, and I noticed that the cURL probe already supported the --interface param.
When running smokeping with --debug I can see the traffic flow out of the desired interface, but when run with --debug-daemon it does not. FPing goes out the correct interface regardless.

My Probes look like this:

*** Probes ***

+ FPing
binary = /usr/bin/fping
blazemode = true
hostinterval = 1.5
offset = 50%
packetsize = 120
pings = 6

++ iFPing

++ vFPing
interface = eth0.2

+ Curl
offset = 50%
pings = 3
urlformat = https://%host%/
timeout = 4

++ iCurl

++ vCurl
interface = eth0.2

And I see this in the log file:

Fri May  5 21:07:30 2017 - vCurl: executing command list '/usr/bin/curl','-m','4','--interface','eth0.2','-w','Time: %{time_total} DNS time: %{time_namelookup} Redirect time: %{time_redirect}\n','https://google.com/'
Fri May  5 21:07:30 2017 - iCurl: executing command list '/usr/bin/curl','-m','4','-w','Time: %{time_total} DNS time: %{time_namelookup} Redirect time: %{time_redirect}\n','https://google.com/'

Is there some oddity when creating the cURL probe processes that it's inheriting sockets strangely or something? How should I go about debugging this further?

Thanks.

AnotherCurl.pm fails to build on Slackware 14.2

AnotherCurl.pm fails to build on Slackware-14.2
Perl v5.22.2 RRDtool 1.6.0 Kernel 4.4.14

  GEN      Smokeping_probes_EchoPingHttps.3
  GEN      Smokeping_probes_AnotherCurl.pod
String found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 324, near "case 'time_total'"
        (Do you need to predeclare case?)
Bareword found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 325, near "case"
        (Missing semicolon on previous line?)
String found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 325, near "case 'time_namelookup'"
        (Do you need to predeclare case?)
Bareword found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 326, near "case"
        (Missing semicolon on previous line?)
String found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 326, near "case 'time_redirect'"
        (Do you need to predeclare case?)
Bareword found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 327, near "case"
        (Missing semicolon on previous line?)
String found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 327, near "case 'time_connect'"
        (Do you need to predeclare case?)
Bareword found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 328, near "case"
        (Missing semicolon on previous line?)
String found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 328, near "case 'time_appconnect'"
        (Do you need to predeclare case?)
Bareword found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 329, near "case"
        (Missing semicolon on previous line?)
String found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 329, near "case 'time_pretransfer'"
        (Do you need to predeclare case?)
Bareword found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 330, near "case"
        (Missing semicolon on previous line?)
String found where operator expected at ../lib/Smokeping/probes/AnotherCurl.pm line 330, near "case 'time_starttransfer'"
        (Do you need to predeclare case?)
require Smokeping::probes::AnotherCurl failed: syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 323, near ") {"
syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 326, near "case 'time_redirect'"
syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 327, near "case 'time_connect'"
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 327.
syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 328, near "case 'time_appconnect'"
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 328.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 329.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 330.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 331.
Global symbol "$t" requires explicit package name (did you forget to declare "my $t"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 333.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 334.
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 336.
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 347.
Global symbol "$i" requires explicit package name (did you forget to declare "my $i"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 347.
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 350.
Global symbol "$t" requires explicit package name (did you forget to declare "my $t"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 350.
Global symbol "@times" requires explicit package name (did you forget to declare "my @times"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 352.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 352.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 352.
syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 353, near "}"
../lib/Smokeping/probes/AnotherCurl.pm has too many errors.
Compilation failed in require at (eval 20) line 2.
Makefile:617: recipe for target 'Smokeping_probes_AnotherCurl.pod' failed

I tried the patch suggested at #38 after which I get:

GEN      Smokeping_probes_EchoPingHttps.3
  GEN      Smokeping_probes_AnotherCurl.pod
require Smokeping::probes::AnotherCurl failed: syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 323, near ") {"
syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 326, near ")      {"
syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 327, near ")       {"
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 327.
syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 328, near ")    {"
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 328.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 329.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 330.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 331.
Global symbol "$t" requires explicit package name (did you forget to declare "my $t"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 333.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 334.
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 336.
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 347.
Global symbol "$i" requires explicit package name (did you forget to declare "my $i"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 347.
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 350.
Global symbol "$t" requires explicit package name (did you forget to declare "my $t"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 350.
Global symbol "@times" requires explicit package name (did you forget to declare "my @times"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 352.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 352.
Global symbol "$val" requires explicit package name (did you forget to declare "my $val"?) at ../lib/Smokeping/probes/AnotherCurl.pm line 352.
syntax error at ../lib/Smokeping/probes/AnotherCurl.pm line 353, near "}"
../lib/Smokeping/probes/AnotherCurl.pm has too many errors.
Compilation failed in require at (eval 20) line 2.
Makefile:617: recipe for target 'Smokeping_probes_AnotherCurl.pod' failed

What am I missing?

Error in TraceroutePing.pm

I am receiving following error when i am trying to use TracroutePing probe

"addrinfo" is not defined in %Socket::EXPORT_TAGS at /opt/smokeping/bin/../lib/Smokeping/probes/TraceroutePing.pm line 25
require Smokeping::probes::TraceroutePing failed: Can't continue after import errors at /opt/smokeping/bin/../lib/Smokeping/probes/TraceroutePing.pm line 25
BEGIN failed--compilation aborted at /opt/smokeping/bin/../lib/Smokeping/probes/TraceroutePing.pm line 25, <$fh> line 116.
Compilation failed in require at (eval 31) line 3, <$fh> line 116.

Version of smokeping which i am using is 2.6.9

alertee: error with snpp address

when adding snpp addresses as alertees, smokeping errors out with 'the alertee must be an email address here'. The reason for this seems to be that whitespaces in the list aren't properly stripped:
alertee = [email protected], snpp:12345
leads to an error while
alertee = [email protected],snpp:12345
works fine.
On the other hand, specifying an snpp contact only does not work at all:
alertee=snpp:12345
and requires me to change Smokeping.pm like this work:

--- /usr/share/perl5/Smokeping.pm       2016-08-31 14:11:41.659624995 +0200
+++ /usr/share/perl5/Smokeping.pm       2016-08-31 15:52:26.639298107 +0200
@@ -2296,7 +2296,7 @@
 DOC
            },

-           alertee => { _re => '(\|.+|.+@\S+|snpp:)',
+           alertee => { _re => '(\|.+|.+@\S+|.*snpp:.+)',
                         _re_error => 'the alertee must be an email address here',
                         _doc => <<DOC },
 If you want to have alerts for this target and all targets below it go to a particular address

(I am using smokeping 2.6.9-1+deb8u1 on Debian/Jessie)

TCPPing gives exponential results

Hi there,

No idea why this is happening - I've tried running the very latest smokeping, tcpping and tcptraceroute on my Ubuntu 14.04.3 AWS instance - but I keep getting "exponential" results back from TCPPing:

ubuntu@[SERVER]:~/smokeping-2.6.11/bin$ sudo ./smokeping --debug --config=/etc/smokeping/config
### assuming you are using an tcpping copy reporting in milliseconds
### Compiling alert detector pattern 'someloss'
### >0%,*12*,>0%,*12*,>0%
sub {
    my $d = shift;
    my $y = $d->{loss};
    for(1){
        my $imax2 = min(@$y - 3, 12);
        my $imax1 = min(@$y - 3, 12);
        my $minlength = 3;
        my $maxlength = 27;
        next if scalar @$y < $minlength ;
        my $i1;
        for($i1=0; $i1 < min($maxlength,$imax1); $i1++){
            my $i2;
            for($i2=0; $i2 < min($maxlength-$i1,$imax2); $i2++){
                next unless defined $y->[-3-$i1-$i2]
                                and $y->[-3-$i1-$i2] =~ /^\d/
                                and $y->[-3-$i1-$i2] > 0
                                     ;                last;
            }
            return 0 if $i2 >= min($maxlength-$i1-$i2,$imax2);
            next unless defined $y->[-2-$i1]
                            and $y->[-2-$i1] =~ /^\d/
                            and $y->[-2-$i1] > 0
                                 ;            last;
        }
        return 0 if $i1 >= min($maxlength-$i1,$imax1);
        next unless defined $y->[-1]
                        and $y->[-1] =~ /^\d/
                        and $y->[-1] > 0
                             ;        return 1;
    }
    return 0;
}



Smokeping version 2.006011 successfully launched.
Not entering multiprocess mode with '--debug'. Use '--debug-daemon' for that.
TCPPing: probing 2 targets with step 300 s and offset 6 s.
FPing: probing 3 targets with step 10 s and offset 6 s.
TCPPing: forks 5, timeout for each target 76
TCPPing: Executing /usr/bin/tcpping -C -x 5 [[HOSTNAME OF SERVER 2]] 80TCPPing: Executing /usr/bin/tcpping -C -x 5 [HOSTNAME OF SERVER 1] 80

TCPPing: Received: GLOB(0x34a4df8)
TCPPing: [HOSTNAME OF SERVER 1]: got 3.5204000000e-02 3.5630000000e-02 3.6362000000e-02 5.4572000000e-02 1.3730100000e-01
TCPPing: Received: GLOB(0x34c3ca0)
TCPPing: [HOSTNAME OF SERVER 2]: got 1.6229000000e-02 1.6406000000e-02 1.6523000000e-02 1.6535000000e-02 1.6688000000e-02
FPing: Executing /usr/bin/fping -C 20 -q -B1 -r1 -i10 localhost [IP OF SERVER 3] [HOSTNAME OF SERVER 4]
FPing: Got fping output: 'localhost        : 0.01 0.03 0.03 0.03 0.03 0.03 0.05 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.02 0.03 0.03 0.06 0.03'
FPing: Got fping output: '[IP OF SERVER 3]     : 24.37 21.50 21.18 20.89 20.54 20.21 20.10 25.42 19.45 24.94 18.80 18.50 18.20 17.93 17.71 23.65 17.46 17.22 16.96 16.74'
FPing: Got fping output: '[HOSTNAME OF SERVER 4] : 56.39 55.40 54.40 53.19 62.32 51.26 49.33 34.28 73.92 57.12 56.01 55.64 54.04 53.06 51.97 51.06 60.43 59.44 58.51 57.40'
Calling RRDs::update(/var/lib/smokeping/Local/LocalMachine.rrd --template uptime:loss:median:ping1:ping2:ping3:ping4:ping5:ping6:ping7:ping8:ping9:ping10:ping11:ping12:ping13:ping14:ping15:ping16:ping17:ping18:ping19:ping20 1464074858:U:0:3.0000000000e-05:1.0000000000e-05:2.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:3.0000000000e-05:5.0000000000e-05:6.0000000000e-05)
Calling RRDs::update(/var/lib/smokeping/MyClient/Link1Exetel.rrd --template uptime:loss:median:ping1:ping2:ping3:ping4:ping5 1464074858:U:0:1.6523000000e-02:1.6229000000e-02:1.6406000000e-02:1.6523000000e-02:1.6535000000e-02:1.6688000000e-02)
Calling RRDs::update(/var/lib/smokeping/MyClient/Link2ADSL.rrd --template uptime:loss:median:ping1:ping2:ping3:ping4:ping5 1464074858:U:0:3.6362000000e-02:3.5204000000e-02:3.5630000000e-02:3.6362000000e-02:5.4572000000e-02:1.3730100000e-01)
Calling RRDs::update(/var/lib/smokeping/MyCompany/MainServer1.rrd --template uptime:loss:median:ping1:ping2:ping3:ping4:ping5:ping6:ping7:ping8:ping9:ping10:ping11:ping12:ping13:ping14:ping15:ping16:ping17:ping18:ping19:ping20 1464074858:U:0:5.5640000000e-02:3.4280000000e-02:4.9330000000e-02:5.1060000000e-02:5.1260000000e-02:5.1970000000e-02:5.3060000000e-02:5.3190000000e-02:5.4040000000e-02:5.4400000000e-02:5.5400000000e-02:5.5640000000e-02:5.6010000000e-02:5.6390000000e-02:5.7120000000e-02:5.7400000000e-02:5.8510000000e-02:5.9440000000e-02:6.0430000000e-02:6.2320000000e-02:7.3920000000e-02)
Calling RRDs::update(/var/lib/smokeping/MyCompany/Office1.rrd --template uptime:loss:median:ping1:ping2:ping3:ping4:ping5:ping6:ping7:ping8:ping9:ping10:ping11:ping12:ping13:ping14:ping15:ping16:ping17:ping18:ping19:ping20 1464074858:U:0:2.0100000000e-02:1.6740000000e-02:1.6960000000e-02:1.7220000000e-02:1.7460000000e-02:1.7710000000e-02:1.7930000000e-02:1.8200000000e-02:1.8500000000e-02:1.8800000000e-02:1.9450000000e-02:2.0100000000e-02:2.0210000000e-02:2.0540000000e-02:2.0890000000e-02:2.1180000000e-02:2.1500000000e-02:2.3650000000e-02:2.4370000000e-02:2.4940000000e-02:2.5420000000e-02)

I am very new to reporting these sorts of issues, so apologies if I've missed anything here.

TraceroutePing requires new Socket.pm

While I admit I am building on an ancient system, I get:

"addrinfo" is not defined in %Socket::EXPORT_TAGS at ../lib/Smokeping/probes/TraceroutePing.pm line 25
require Smokeping::probes::TraceroutePing failed: Can't continue after import errors at ../lib/Smokeping/probes/TraceroutePing.pm line 25
BEGIN failed--compilation aborted at ../lib/Smokeping/probes/TraceroutePing.pm line 25.
Compilation failed in require at (eval 23) line 2.
make[1]: *** [Smokeping_probes_TraceroutePing.pod] Error 255

I see some hints that getaddrinfo might be supported starting with Socket.pm 1.94. Maybe autoconf can try the appropriate "use Socket" invocation and skip including TraceroutePing if it doesn't work?

OpenSSHJunOSPing.pm Enhancement (TOS)

OpenSSHJunOSPing.pm currently does not support setting the tos bit in the ping command. Having the ability to test class-of-service would be a great enhancement to smokeping.

Having the capability to set this as a per host override would be great that way we can have multiple graphs per host each one for a different class-of-service

Any chance you can implement this?

junos command is 'ping x.x.x.x tos Y'
where Y is the type of service between 0 and 7

IO-Tty-1.10 takes longer than 60seconds to install

Ran the ./setup/build-perl-modules.sh /opt/smokeping/thirdparty command and it kept failing on IO-Tty-1.1.0, I downloaded it manually and it installed fine at my system it just took longer than 60seconds to succeed. Might want to increase the timeout, or provide an option for specifying a longer timeout.

Slaves are not given same Step/Ping config as Master

Hello there!
I've configured my Smokeping master to have:

*** Database ***
step     = 600
pings    = 10

And starting my slave with:

./smokeping --debug --master-url=http://master.domain.com/smokeping.fcgi --shared-secret=../secret.txt --cache-dir=../cache/

My master says:

Tue Mar 25 17:13:28 2014 - FPing: probing 126 targets with step 600 s and offset 246 s.

Yet the slave says:

FPing: probing 84 targets with step 300 s and offset 294 s.

... and shows 20 pings per node rather than the configured 10.

So my slave is missing 42 targets (which it is defintiely configured for!) and is using the wrong config overall...

Does this need to be explicitly defined per-slave somewhere?

basefork

I setup the configuration and it never writes any data. I get this error in the syslog.

Nov 28 17:53:30 rochlinux1 smokeping[14989]: pingone: this must be overridden by the subclass at /usr/share/perl5/Smokeping.pm line 1722.

I dont know what to do so pingone works

CheckLoss.pm and CheckLatency.pm - incorrect evaluation of sample array (fix included)

Matchers CheckLoss and CheckLatency is evaluates the sample array using a foreach loop. This works OK under circumstances where the FPing sample array does not contain more values than the parameter x.

As stated in documentaiton, smokeping may pass more values than desried by the Length() method. If this happens, CheckLoss and CheckLatency will, instead of considering only the last x number of values, satisfy with any x number of values within the array that matches the l condition parameter.

Example:
The below loss pattern results in raised alert, while it really shouldn't have.
Pattern: CheckLoss(l=>25,x=>5)
Data: loss: 0%, 10%, 30%, 20%, 20%, 30%, 30%, 20%

AnotherCurl.pm fails to build on Ubuntu 15.04

AnotherCurl.pm uses Switch which is not recommended due to it being a source filter.

Instead it may be better (needed in may case) to use experimental given/when language control structure.

My diff file:

20c20,21
< use Switch;

---
> use feature "switch";
> #use Switch;
323,331c324,332
<                                 switch ($t->{vars}{write_out}) {
<                   case 'time_total'         {$val += $1}
<                   case 'time_namelookup'    {$val += $2}
<                   case 'time_redirect'      {$val += $3}
<                   case 'time_connect'       {$val += $4}
<                   case 'time_appconnect'    {$val += $5}
<                   case 'time_pretransfer'   {$val += $6}
<                   case 'time_starttransfer' {$val += $7}
<                                         else {$val += $1 - $2;}

---
>                                 given ($t->{vars}{write_out}) {
>                   when ('time_total')         {$val += $1}
>                   when ('time_namelookup')    {$val += $2}
>                   when ('time_redirect')      {$val += $3}
>                   when ('time_connect')       {$val += $4}
>                   when ('time_appconnect')    {$val += $5}
>                   when ('time_pretransfer')   {$val += $6}
>                   when ('time_starttransfer') {$val += $7}
>                                         default {$val += $1 - $2;}

Smokeping 2.6.9 fails to build on FreeBSD

Smokeping 2.6.9 is the latest version in the FreeBSD ports tree, and it currently fails to build with an error:

smokeping_config.pod around line 81: alternative text 'the master/slave mode' contains non-escaped | or /

I believe this is because of lib/Smokeping.pm:2634:

L<the master/slave mode|smokeping_master_slave>.

The "/" character there has to be escaped.

Smokeping::probes::DNS ignores retransmissions

We're having some pretty serious DNS troubles, and yet our Smokeping::probes::DNS probe is not really showing anything. It turns out that it completely ignores retransmissions - so the dig subprocess might take 10 seconds to get a reply (since two requests were dropped), but the one response that did succeed got a reply in 20ms, so the total response time is returned as 20ms.

I think the best thing to do here would be to report retransmissions as loss - so, if a query took 20ms but required two retransmissions to be answered, add two to $run.

(Can dig report the number of retransmissions required? I don't know.)

Another thing to do is to time the dig command itself from inside perl.

do_syslog confusion

Hi,

I was getting syslogentries like:
Feb 10 08:24:42 urz-noc-tools smokeping[1468]: Alert onelossOver20percent is active for Datacenter.TEST-urz-netgw_short loss: 100%%(3/3) rtt: U prevmatch: 0 comment: loss 1st time

and thought i might have done sth. wrong in my extension for logging but it turns out that the following is responsible for that (why is it like that?):

    sub do_syslog ($){
            my $str = shift;
            $str =~ s,%,%%,g;

shouldn't it be more like:

$str =~ s,%%,%,g;

Thx,
-m

TraceroutePing

Is the Probe TraceroutePing supposed to work ?
It doesn't work for me and I am getting this debug output:

smokeping[30577]: TraceroutePing: forks 5, timeout for each target 26
smokeping[30579]: TraceroutePing: Host 2.2.8.1
smokeping[30579]: TraceroutePing: Desthost 8.2.1.7
smokeping[30579]: TraceroutePing: validated 2.2.8.1
smokeping[30579]: TraceroutePing: Executing /usr/bin/traceroute -w 1 -f 10 -m 10 -q 1 -n 8.2.1.7
smokeping[30579]: TraceroutePing: stdout: traceroute to 8.2.1.7 (8.2.1.7), 10 hops max, 60 byte packets
smokeping[30579]: TraceroutePing: stdout: 10  2.2.8.1  2.547 ms
smokeping[30579]: TraceroutePing: Executing /usr/bin/traceroute -w 1 -f 10 -m 10 -q 1 -n 8.2.1.7
smokeping[30579]: TraceroutePing: stdout: traceroute to 8.2.1.7 (8.2.1.7), 10 hops max, 60 byte packets
smokeping[30579]: TraceroutePing: stdout: 10  2.2.8.1  2.420 ms
smokeping[30579]: TraceroutePing: Executing /usr/bin/traceroute -w 1 -f 10 -m 10 -q 1 -n 8.2.1.7
smokeping[30579]: TraceroutePing: stdout: traceroute to 8.2.1.7 (8.2.1.7), 10 hops max, 60 byte packets
smokeping[30579]: TraceroutePing: stdout: 10  2.2.8.1  2.393 ms
smokeping[30579]: TraceroutePing: Executing /usr/bin/traceroute -w 1 -f 10 -m 10 -q 1 -n 8.2.1.7
smokeping[30579]: TraceroutePing: stdout: traceroute to 8.2.1.7 (8.2.1.7), 10 hops max, 60 byte packets
smokeping[30579]: TraceroutePing: stdout: 10  2.2.8.1  2.294 ms
smokeping[30579]: TraceroutePing: Executing /usr/bin/traceroute -w 1 -f 10 -m 10 -q 1 -n 8.2.1.7
smokeping[30579]: TraceroutePing: stdout: traceroute to 8.2.1.7 (8.2.1.7), 10 hops max, 60 byte packets
smokeping[30579]: TraceroutePing: stdout: 10  2.2.8.1  2.183 ms
smokeping[30579]: TraceroutePing: Times:
smokeping[30577]: TraceroutePing: 2.2.8.1: got
smokeping[30577]: Calling RRDs::update(/var/lib/smokeping/2-2-8-1.rrd --template uptime:loss:median:ping1:ping2:ping3:ping4:ping5 1469207490:U:5:U:U:U:U:U:U)
smokeping[30577]: TraceroutePing: Sleeping 60 seconds.

So the traceroute outputs looks OK but Smokeping not.

OpenSSHJunOSPing.pm TOS

Hi there,

I put you wrong on a previous enhancement request. The value range for this variable is between 0 and 255 not 0-7 as previously requested.

Cheers
Donald

Fractional value for waittime option in EchoPingHTTP params

Official docs said (http://oss.oetiker.ch/smokeping/probe/EchoPingHttp.en.html):

waittime
The "-w" echoping(1) option.
Example value: 1

When man echoping related to -w option:

-w nnn Number of seconds to wait between two tests (default is one). On systems which have usleep(), you can write it as a fractional number, such as 3.14. Otherwise, use integers.

So, echoping supports fractial value for waittime options, but SmokePing 2.6.11 config parser don't (when trying waittime = 0.5):

ERROR: /usr/local/smokeping/bin/../etc/config, line 136: syntax error in value of 'waittime'

I guess it's bug of config parser?

smokeping probes still alive after restart

Hi,

We use smokeping on a few dozens of servers and generate the configs automatically. When config is updated, we restart smokeping on all of the slaves. Unfortunately, we keep seeing an issue where the probes (fping/curl) are not getting killed during the restart, example:

# ps -ef | grep -i smokeping
nobody    4447     1  0 Mar18 ?        00:10:03 /usr/local/bin/smokeping [Curl]
nobody    5476     1  0 Mar14 ?        00:01:39 /usr/local/bin/smokeping [FPing]
nobody    5481     1  0 Mar14 ?        00:09:01 /usr/local/bin/smokeping [Curl]
nobody    6057     1  0 Mar21 ?        00:02:48 /usr/local/bin/smokeping [FPing]
nobody    6058     1  0 Mar21 ?        00:14:55 /usr/local/bin/smokeping [Curl]
nobody    6254     1  0 Mar21 ?        00:14:27 /usr/local/bin/smokeping [Curl]
nobody    6255     1  0 Mar21 ?        00:02:44 /usr/local/bin/smokeping [FPing]
nobody    6733     1  0 Mar18 ?        00:01:51 /usr/local/bin/smokeping [FPing]
nobody    6737     1  0 Mar18 ?        00:09:58 /usr/local/bin/smokeping [Curl]
nobody   11455     1  0 Mar21 ?        00:02:44 /usr/local/bin/smokeping [FPing]
nobody   11459     1  0 Mar21 ?        00:14:31 /usr/local/bin/smokeping [Curl]
nobody   11819 24197  2 10:51 ?        00:00:00 /usr/local/bin/smokeping [Curl]
nobody   21475     1  0 Mar27 ?        00:59:55 /usr/local/bin/smokeping [Curl]
nobody   21476     1  0 Mar27 ?        00:11:24 /usr/local/bin/smokeping [FPing]
nobody   21490     1  0 Mar27 ?        00:11:12 /usr/local/bin/smokeping [FPing]
nobody   21491     1  0 Mar27 ?        00:59:47 /usr/local/bin/smokeping [Curl]
nobody   24192     1  0 Mar27 ?        00:00:00 /usr/bin/perl /usr/local/bin/smokeping --config=xxx --cache-dir=xxx --master-url http://xxx/smokeping.cgi --shared-secret xxx --cache-dir=xxx --cache-dir /var/lib/smokeping --pid-dir /var/run/smokeping
nobody   24193 24192  0 Mar27 ?        00:11:00 /usr/local/bin/smokeping [FPing]
nobody   24197 24192  0 Mar27 ?        00:59:05 /usr/local/bin/smokeping [Curl]

You can see here a bunch of smokeping processes. And you can guess when smokeping was restarted - on March 14, March 18, March 21, March 27. The parent PID of these processes switches to 1.

The kill script sends -15 to the smokeping master process.
It doesn't happen every time, and can happen on one server, but not on the other.

What do the CURL graphs actually show ?

Hi,

not an issue - more a general question - when using CURL to graph a URL, what does it actually show me as they seem to be the same as for PING - so I'm assuming "connect" time ?

Alex

Error running smokeping

Hello,

I'm having this error when I run this command:
sh -c '/opt/smokeping/bin/smokeping --config=/opt/smokeping/etc/config --logfile=/opt/smokeping/smoke.log --debug'
ERROR:

### Compiling alert detector pattern 'someloss'
### >0%,*12*,>0%,*12*,>0%
sub {
    my $d = shift;
    my $y = $d->{loss};
    for(1){
        my $imax2 = min(@$y - 3, 12);
        my $imax1 = min(@$y - 3, 12);
        my $minlength = 3;
        my $maxlength = 27;
        next if scalar @$y < $minlength ;
        my $i1;
        for($i1=0; $i1 < min($maxlength,$imax1); $i1++){
            my $i2;
            for($i2=0; $i2 < min($maxlength-$i1,$imax2); $i2++){
                next unless defined $y->[-3-$i1-$i2]
                                and $y->[-3-$i1-$i2] =~ /^\d/
                                and $y->[-3-$i1-$i2] > 0
                                     ;                last;
            }
            return 0 if $i2 >= min($maxlength-$i1-$i2,$imax2);
            next unless defined $y->[-2-$i1]
                            and $y->[-2-$i1] =~ /^\d/
                            and $y->[-2-$i1] > 0
                                 ;            last;
        }
        return 0 if $i1 >= min($maxlength-$i1,$imax1);
        next unless defined $y->[-1]
                        and $y->[-1] =~ /^\d/
                        and $y->[-1] > 0
                             ;        return 1;
    }
    return 0;
}



Calling RRDs::create(/opt/smokeping/data/services/LDAP/AD3.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/LDAP/AD2.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/AnotherDNS/dns2.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/EchoPingLDAP/AD.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/DNS/dns2.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/DNS/dns1.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/Server/Server1.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:20 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 DS:ping6:GAUGE:600:0:180 DS:ping7:GAUGE:600:0:180 DS:ping8:GAUGE:600:0:180 DS:ping9:GAUGE:600:0:180 DS:ping10:GAUGE:600:0:180 DS:ping11:GAUGE:600:0:180 DS:ping12:GAUGE:600:0:180 DS:ping13:GAUGE:600:0:180 DS:ping14:GAUGE:600:0:180 DS:ping15:GAUGE:600:0:180 DS:ping16:GAUGE:600:0:180 DS:ping17:GAUGE:600:0:180 DS:ping18:GAUGE:600:0:180 DS:ping19:GAUGE:600:0:180 DS:ping20:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/Server/Server2.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:20 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 DS:ping6:GAUGE:600:0:180 DS:ping7:GAUGE:600:0:180 DS:ping8:GAUGE:600:0:180 DS:ping9:GAUGE:600:0:180 DS:ping10:GAUGE:600:0:180 DS:ping11:GAUGE:600:0:180 DS:ping12:GAUGE:600:0:180 DS:ping13:GAUGE:600:0:180 DS:ping14:GAUGE:600:0:180 DS:ping15:GAUGE:600:0:180 DS:ping16:GAUGE:600:0:180 DS:ping17:GAUGE:600:0:180 DS:ping18:GAUGE:600:0:180 DS:ping19:GAUGE:600:0:180 DS:ping20:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/Server/google.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:20 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 DS:ping6:GAUGE:600:0:180 DS:ping7:GAUGE:600:0:180 DS:ping8:GAUGE:600:0:180 DS:ping9:GAUGE:600:0:180 DS:ping10:GAUGE:600:0:180 DS:ping11:GAUGE:600:0:180 DS:ping12:GAUGE:600:0:180 DS:ping13:GAUGE:600:0:180 DS:ping14:GAUGE:600:0:180 DS:ping15:GAUGE:600:0:180 DS:ping16:GAUGE:600:0:180 DS:ping17:GAUGE:600:0:180 DS:ping18:GAUGE:600:0:180 DS:ping19:GAUGE:600:0:180 DS:ping20:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
### parsing dig output...OK
sh: 1: Syntax error: "(" unexpected

I didn't undestood anything of this.
My OS is Ubuntu:16.04 and my smokeping version is 2.6.11.

Regards,
Joaquín Silva

SmokePing Charts Show Wrong Image for Std Dev, Median, Max, Packet Loss, etc.

System:
Ubuntu 14.04.3 LTS
SmokePing 2.6.8

Issue:
Data seems to be appearing properly on my pages that are configured via the Presentation + detail section of the smokeping config. The issue seems to be when using the default + charts section, for stddev, max, loss, and median. I'm using the following configuration:

menu = Charts
title = The most interesting destinations

++ stddev
sorter = StdDev(entries=>4)
title = Top Standard Deviation
menu = Std Deviation
format = Standard Deviation %f

++ max
sorter = Max(entries=>5)
title = Top Max Roundtrip Time
menu = by Max
format = Max Roundtrip Time %f seconds

++ loss
sorter = Loss(entries=>5)
title = Top Packet Loss
menu = Loss
format = Packets Lost %f

++ median
sorter = Median(entries=>5)
title = Top Median Roundtrip Time
menu = by Median
format = Median RTT %f seconds

The issue here is that the images that appear are the ones generated in /var/cache/smokeping/images/__chartscache -- which only shows a single image existing per Target. The image that is generated only shows a Last Hour latency graph. This image, xxxx_last_3600.png, is referenced in every chart for std dev, median, max, packet loss.

I'm not sure what to do here to resolve this issue?

Huge discrepancy between DNS vs AnotherDNS

Hello,
I have a huge discrepancy between AnotherDNS and DNS probes.
image
image
As shown in the images DNS has 10 times more latency than AnnotherDNS.

This is my config:

+ DNS

binary = /usr/bin/dig # mandatory
forks = 5
offset = 50%
step = 300
timeout = 15
# The following variables can be overridden in each target section
lookup = www.akainix.com
pings = 5
server = 8.8.8.8

+ AnotherDNS

forks = 5
offset = 50%
step = 300
# The following variables can be overridden in each target section
ipversion = 4
lookup = www.akainix.com
mininterval = 0.5
pings = 5
port = 53
protocol = udp
recordtype = A
require_answers = 0
require_noerror = 0
timeout = 5

Regards,
Joaquín Silva

Smokeping crashes when ran under sudo

After installing smokeping from apt on ubuntu 12.04, I tried to run it (being root) like so:

sudo -HEu smokeping env PATH="${PATH}" \
  LC_ALL=C \
  smokeping \
    --debug \
    --static=/var/www/html/smokeping \
    --config=/etc/smokeping/config

This went fine, until I tried it from cron.

After getting to the cronjob's STDERR, I found this error:

require Smokeping::probes::FPing failed: Can't locate IPC/Open3.pm:   Permission denied at /usr/share/perl5/Smokeping/probes/FPing.pm line 19, <File> line 3.
BEGIN failed--compilation aborted at /usr/share/perl5/Smokeping/probes/FPing.pm line 19, <File> line 3.
Compilation failed in require at (eval 22) line 2, <File> line 3.

It turned out that because my PWD was still /root FPing had some pathfinding troubles.

Changing the current directory to something owned by the smokeping user before running the sudo command, fixed my problem.

While maybe not directly a Smokeping issue, pathfinding from the script's directory (vs the user executing), or a more helpful error message might go a long way into a smoother onboarding process.

OpenSSHJunOSPing.pm - Net:OpenSSH ctl_dir "permission" issue

Today I encountered the following error in my syslog:

Jul 20 09:55:34 monitor smokeping[24588]: OpenSSHJunOSPing connecting <ip>: ctl_dir /var/lib/smokeping/.libnet-openssh-perl/ is not secure
Jul 20 09:55:35 monitor smokeping[24594]: OpenSSHJunOSPing connecting <ip>: ctl_dir /var/lib/smokeping/.libnet-openssh-perl/ is not secure

After researching the Net:OpenSSH documentation I found out that you use Net:OpenSSH's default for "ctl_dir".

ctl_dir => $path
Directory where the SSH master control socket will be created.
This directory and its parents must be writable only by the current effective user or root, otherwise the connection will be aborted to avoid insecure operation.
By default ~/.libnet-openssh-perl is used.

So a .libnet-openssh-perl directory is created in /var/lib/smokeping (smokeping home) and due to the strict_mode method (default = 1) the script fails.

strict_mode => 0
By default, the connection will be aborted if the path to the socket used for multiplexing is found to be non-secure (for instance, when any of the parent directories is writable by other users).
This option can be used to disable that feature. Use with care!!!

I assume it fails because some user has write permissions to a other directory in /var or /var/lib.

This leaves me with two options, either setting strict_mode to 0 or creating a directory for the smokeping user in /home and write create the .libnet-open-perl directory there, both seem to work.

my $ssh = Net::OpenSSH->new(
        $source,
        $login ? ( user => $login ) : (),
        $password ? ( password => $password ) : (),
        timeout => 60,
#       strict_mode => 0,
#       ctl_dir => "/home/smokeping/.libnet-openssh-perl"
    );

Please let me know if I did anything wrong or how I can help improving Smokeping, because this is my first issue ever.

Help

Hi Tobi,

Thanks for smokeping but trying to install it but ive got error when i m runing

./configure --prefix=/opt/smokeping

checking checking for perl module 'RRDs'... Ok
checking checking for perl module 'FCGI'... Failed <- this
checking checking for perl module 'CGI'... Ok
checking checking for perl module 'CGI::Fast'... Failed <- this
checking checking for perl module 'Config::Grammar'... Ok
checking checking for perl module 'Digest::HMAC_MD5'... Ok
checking checking for perl module 'LWP'... Ok

when i m trying to follow what it recomand me to do :

Now you can install local copies of the missing modules
by running

 ./setup/build-perl-modules.sh /opt/smokeping/thirdparty  <- this

The RRDs perl module is part of RRDtool. Either use the rrdtool
package provided by your OS or install rrdtool from source.
If you install from source, the RRDs module is located
PREFIX/lib/perl

the output is :

[root@ns smokeping]# ./setup/build-perl-modules.sh /opt/smokeping/thirdparty
Building in /opt/smokeping/thirdparty
FCGI is up to date. (0.74)
CGI is up to date. (3.60)
CGI::Fast is up to date. (1.09)
Config::Grammar is up to date. (1.10)
Digest::HMAC_MD5 is up to date. (1.01)
Net::Telnet is up to date. (3.03)
Net::OpenSSH is up to date. (0.57)
Net::SNMP is up to date. (v6.0.1)
Net::LDAP is up to date. (0.44)
Net::DNS is up to date. (0.68)
IO::Pty is up to date. (1.10)
LWP is up to date. (6.04)

please advise on the next step to resolve those probleme

Thanks

Add option to change probe description in graphs

Maybe I've missed an option, but as far as I can tell there is no way to change the "probe description" in the graphs generated by SmokePing. At the very bottom it always says:

probe: 20 ICMP Echo Pings (56 bytes) every 300s

This is true for simple ping probes, but what about more sophisticated probes? In my case, for instance, I'm not only pinging my targets, but also have some DNS probes configured. It uses dig in the background and definitely is not sending ICMP packets ;).

There should be a way for each probe to define such a string for itself, and possibly overwrite it with an option in the configuration file.

smokeping 2.6.8 memory leak(OOM)

We deploy smokeping 2.6.8 as master/slave mode in our serval IDCs, after running a long time, all our servers occured out of memory, and the whole machine hang, We have to warm reboot the machine.
The machine(Ubuntu 10.04.3 x86_64 & CentOS 6.0) only run smokeping 2.6.8 and have no other services.

Web content missing

Hi!
I had faced with this trouble after apache22 replaced to apache24. Webpage consists now only

#!/bin/sh
exec /usr/local/bin/smokeping_cgi /usr/local/etc/smokeping/config

instead of spoken graphs&menues.
Could you advice please.

/etc/smokeping/config is not managed by puppet

Hello,

i am using this module in puppet3 and smokeping is set in standalone mode

i have successfully deployed it on the server using puppet and /etc/smokeping/config file was generated as below and all is working great:

@include /etc/smokeping/config.d/General
@include /etc/smokeping/config.d/Alerts
@include /etc/smokeping/config.d/Database
@include /etc/smokeping/config.d/Presentation
@include /etc/smokeping/config.d/Probes
@include /etc/smokeping/config.d/Slaves
@include /etc/smokeping/config.d/Targets

but when i deleted /etc/smokeping/config i found that it was not recreated when i run puppet,

and i cannot find /etc/smokeping/config in puppet templates or manifests in your module,

can you please look at this and maybe add possibility to manage /etc/smokeping/config using puppet

thank you!

smokeping users

Need a guide how to setup smokeping users with different content

how should I parse the rrd file?

I wanted to parse the rrd data file and store the loss in mysql so I can use them later, and I parsed it like this
rrdtool fetch /opt/smokeping/data/Test/name/xxxxxx.rrd AVERAGE -s -1days -e now
And I got this
`
uptime loss median ping1 ping2 ping3 ping4 ping5 ping6 ping7 ping8 ping9 ping10 ping11 ping12 ping13 ping14 ping15 ping16 ping17 ping18 ping19 ping20

1445531400: -nan 6.6666666667e-02 3.2316666667e-03 3.1000000000e-03 3.1086666667e-03 3.1203333333e-03 3.1300000000e-03 3.1310000000e-03 3.1313333333e-03 3.1526666667e-03 3.1530000000e-03 3.1726666667e-03 3.2023333333e-03 3.2316666667e-03 3.2320000000e-03 3.2516666667e-03 3.2620000000e-03 3.2910000000e-03 3.3006666667e-03 4.0983333333e-03 1.1435333333e-02 1.2727666667e-02 1.1380000000e-02
1445531700: -nan 1.9400000000e+00 3.2788000000e-03 -nan 3.0718000000e-03 3.1303000000e-03 3.1309000000e-03 3.1603000000e-03 3.1703000000e-03 3.2285000000e-03 3.2385000000e-03 3.2494000000e-03 3.2688000000e-03 3.2788000000e-03 3.2885000000e-03 3.2991000000e-03 3.3185000000e-03 3.3188000000e-03 3.3188000000e-03 2.5406900000e-02 2.3891420000e-01 2.7595940000e-01 -nan
`
So here is the problem , the loss is 1.9400000000e+00, does it mean the loss rate is 1.94%?
And where can I get some doc on the meanings of rrd file?

Per target binary support

I'm trying to execute a probe for a given target within a Linux network namespace / FreeBSD fib / OpenBSD rdomain. It does not seem currently possible.

An interesting way would be to be able to define the binary at the Target level, instead of Probe. One could then create a wrapper around the OS way (ip netns exec foo <fping|dig> / route -Tfoo exec). It would allow any probe to be used within a routing instance.

Another way would be to adapt each probe code to use a "instance" variable, but that would require much more work.

Do you think it could be doable?

Thanks.

Smokeping.cgi permission issue

Hi ,

I had installed smokeping in centos 7. Config is fine. But while load the smokeping url via web it produce below error. Anyone help to solve this issue ?

"You don't have permission to access /smokeping/smokeping.fcgi on this server."

slaves die when master has new config

from logs:

Tue Aug 11 20:08:51 2015 - Sent data to Server and got new config in response.
Tue Aug 11 20:08:51 2015 - server has new config for me ... HUPing the parent
Tue Aug 11 20:08:53 2015 - Sent data to Server and got new config in response.
Tue Aug 11 20:09:09 2015 - Sent data to Server and got new config in response.
Tue Aug 11 20:09:09 2015 - server has new config for me ... HUPing the parent
Tue Aug 11 20:09:09 2015 - ERROR: no instance of SmokePing running (pid 38550)?

i am running smokeping 2.006011 on freebsd 10.1-RELEASE with perl 5.18.4. from my troubleshooting, it seems that the HUP that smokeping sends actually kills the process. when i test sending a HUP manually, it works as expected.

Problems with slave config on ubuntu

smokeping -v
2.006008
For some crazy reason, smokeping claims it cannot open the smokeping_secrets file on the slave. Anyone know what could be wrong? I am running as root, the smokeping_secrets has one word in it.

BTW, the slave config is a nightmare, the docs are so far out of date, it isn't funny

root@xxxxx:/etc/smokeping# smokeping --master-url=http://smoker.yyy.svc/cgi-bin/smokeping.cgi --cache-dir=/var/cache/smokeping --shared-secret=/etc/smokeping/smokeping_secrets --debug --logfile=/tmp/smoke.log
WARNING: Opening secrets file /etc/smokeping/smokeping_secrets: Permission denied

Sent data to Server. Server said WARNING: Opening secrets file /etc/smokeping/smokeping_secrets: Permission denied
ERROR: we did not get config from the master. Maybe we are not configured as a slave for any of the targets on the master ?

-rw-r----- 1 root root 4 Nov 1 15:13 smokeping_secrets

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.