diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rwxr-xr-x | bin/smokeping.dist | 2 | ||||
-rwxr-xr-x | bin/tSmoke.dist | 2 | ||||
-rwxr-xr-x | htdocs/smokeping.cgi.dist | 2 | ||||
-rw-r--r-- | lib/Smokeping.pm | 4 | ||||
-rw-r--r-- | lib/Smokeping/probes/FPing.pm | 2 |
7 files changed, 11 insertions, 9 deletions
@@ -1,3 +1,5 @@ + + * alerts can now have a priority. if multiple prioritized alerts match, only the one with the highest priority will cause any action. Alerts without priority setting are not affected eitherway. --tobi @@ -1,12 +1,12 @@ SHELL = /bin/sh -VERSION = 2.0.903 +VERSION = 2.0.905 ############ A is for features ############ B is for bugfixes ############ V.AAABBB ############ 2.000001 ############ 2.000002 -NUMVERSION = 2.000903 -IGNORE = ~|CVS|var/|smokeping-$(VERSION)/smokeping-$(VERSION)|cvsignore|rej|orig|DEAD|pod2htm[di]\.tmp|\.svn|tar\.gz +NUMVERSION = 2.000905 +IGNORE = ~|CVS|var/|smokeping-$(VERSION)/smokeping-$(VERSION)|cvsignore|rej|orig|DEAD|pod2htm[di]\.tmp|\.svn|tar\.gz|DEADJOE GROFF = groff PERL = perl .PHONY: man html txt ref examples check-examples patch killdoc doc tar rename-man symlinks remove-symlinks diff --git a/bin/smokeping.dist b/bin/smokeping.dist index 657af22..ec6501b 100755 --- a/bin/smokeping.dist +++ b/bin/smokeping.dist @@ -4,7 +4,7 @@ use lib qw(/usr/pack/rrdtool-1.0.49-to/lib/perl); use lib qw(lib); -use Smokeping 2.000901; +use Smokeping 2.000904; Smokeping::main("etc/config.dist"); diff --git a/bin/tSmoke.dist b/bin/tSmoke.dist index 888e294..e1aa915 100755 --- a/bin/tSmoke.dist +++ b/bin/tSmoke.dist @@ -53,7 +53,7 @@ use strict; use lib qw(lib); use lib "/usr/local/rrdtool-1.0.39/lib/perl"; -use Smokeping 2.000901; +use Smokeping 2.000904; use Net::SMTP; use Getopt::Long; use Pod::Usage; diff --git a/htdocs/smokeping.cgi.dist b/htdocs/smokeping.cgi.dist index f38fbe4..c08a03f 100755 --- a/htdocs/smokeping.cgi.dist +++ b/htdocs/smokeping.cgi.dist @@ -5,7 +5,7 @@ use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl); use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib); use CGI::Carp qw(fatalsToBrowser); -use Smokeping 2.000901; +use Smokeping 2.000904; Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config"); diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index 10ef63e..5535df1 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -1161,8 +1161,8 @@ sub update_rrds($$$$$) { shift @{$x->{loss}}; shift @{$x->{rtt}}; } - for (sort { $cfg->{Alerts}{$a}{priority}||0 - <=> $cfg->{Alerts}{$b}{priority}||0} @{$tree->{alerts}}) { + for (sort { ($cfg->{Alerts}{$a}{priority}||0) + <=> ($cfg->{Alerts}{$b}{priority}||0)} @{$tree->{alerts}}) { my $alert = $cfg->{Alerts}{$_}; if ( not $alert ) { do_log "WARNING: Empty alert in ".(join ",", @{$tree->{alerts}})." ($name)\n"; diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm index 7223d44..553aaae 100644 --- a/lib/Smokeping/probes/FPing.pm +++ b/lib/Smokeping/probes/FPing.pm @@ -65,7 +65,7 @@ sub new($$$) if $return =~ m/only.+root/; if ($return =~ m/bytes, ([0-9.]+)\sms\s+.*\n.*\n.*:\s+([0-9.]+)/ and $1 > 0){ - $self->{pingfactor} = 1000 * $2/$1; + $self->{pingfactor} = 1000 * $1/$2; print "### fping seems to report in ", $1/$2, " milliseconds\n"; } else { $self->{pingfactor} = 1000; # Gives us a good-guess default |