From 589ea56efaa087811c2bf0cf37781843f9992c51 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Mon, 6 Feb 2012 23:17:32 +0100 Subject: make SipSak work with sip servers implementing OPTIONS --- CHANGES | 2 ++ lib/Smokeping/probes/SipSak.pm | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index ed31fe7..e8944a0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +* Make SipSak work with sip services actually implementing OPTIONS -- tobi + 2012/01/11 -- released version 2.6.7 * be more careful in handling input from the web to prevent xss. Thanks to diff --git a/lib/Smokeping/probes/SipSak.pm b/lib/Smokeping/probes/SipSak.pm index 9e6c3a2..25f1649 100644 --- a/lib/Smokeping/probes/SipSak.pm +++ b/lib/Smokeping/probes/SipSak.pm @@ -73,14 +73,23 @@ sub pingone { shift @reply; my $filter = '.*'; + $self->do_debug("SipSak: got ".(scalar @reply)." replies, expected $pingcount"); if (scalar @reply > $pingcount){ - $filter = $keep eq 'yes' ? 'final' : 'provisional'; + $filter = $keep eq 'yes' ? 'final received' : 'provisional received'; } for my $item (@reply){ - next unless $item =~ /$filter/; - if (/^(?:\s+and|\sreceived\safter)\s(\d+(?:\.\d+))\sms\s/){ + $self->do_debug("SipSak: looking at '$item'"); + if (not $item =~ /$filter/){ + $self->do_debug("SipSak: skipping as there was not match for $filter"); + next; + } + if ($item =~ /(?:\sand|\sreceived\safter)\s(\d+(?:\.\d+)?)\sms\s/){ + $self->do_debug("SipSak: match"); push @times,$1/1000; } + else { + $self->do_debug("SipSak: no match"); + } } return sort { $a <=> $b } @times; } -- cgit v1.2.3-24-g4f1b From 9672c02ac02b2a152dc786b57053cc93d4f510fe Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Mon, 6 Feb 2012 23:18:25 +0100 Subject: update for release --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 31d51e2..2727b11 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ # -AC_INIT([smokeping],[2.6.7],[tobi@oetiker.ch]) +AC_INIT([smokeping],[2.6.8],[tobi@oetiker.ch]) AC_PREREQ([2.59]) AC_CONFIG_AUX_DIR(conftools) AC_CANONICAL_TARGET -- cgit v1.2.3-24-g4f1b From cb1c7d001fd4a410e50112585f03694edf4a1474 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Tue, 7 Feb 2012 06:43:36 +0100 Subject: update RRD location --- release-smokeping.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-smokeping.sh b/release-smokeping.sh index a459d15..c9c725b 100755 --- a/release-smokeping.sh +++ b/release-smokeping.sh @@ -7,7 +7,7 @@ aclocal autoconf automake -a -c ./setup/build-perl-modules.sh /tmp/smokeping-$$-build/thirdparty -./configure --enable-maintainer-mode --prefix=/tmp/smokeping-$$-build PERL5LIB=/scratch/oetiker/rrd-dev/lib/perl +./configure --enable-maintainer-mode --prefix=/tmp/smokeping-$$-build PERL5LIB=/scratch/rrd-trunk/lib/perl make install make dist echo READY TO SYNC ? -- cgit v1.2.3-24-g4f1b From 872cadbfdf1ee27db786389c941671a2e0df1b4f Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Tue, 7 Feb 2012 07:00:56 +0100 Subject: added release --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index e8944a0..ace6376 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +2012/02/07 -- released version 2.6.8 + * Make SipSak work with sip services actually implementing OPTIONS -- tobi 2012/01/11 -- released version 2.6.7 -- cgit v1.2.3-24-g4f1b From c3539403a5ba22a633488764a68200a06aa3ba95 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Mon, 13 Feb 2012 06:53:21 +0100 Subject: added hacking notes --- HACKING | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 HACKING diff --git a/HACKING b/HACKING new file mode 100644 index 0000000..6f62af4 --- /dev/null +++ b/HACKING @@ -0,0 +1,14 @@ +SmokePing Hacking +----------------- + +The source of SmokePing lives on + + https://github.com/oetiker/SmokePing + +If you come up with new and cool features, send a pull request. + +If you find a bug, report it on GitHub as an issue. + +If you are planning to implement something large, +please discuss it on the smokeping-users mailinglist. + -- cgit v1.2.3-24-g4f1b From 82162859fa9bc528fedf284e5bf6618ae98f1a7d Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Thu, 22 Mar 2012 23:00:25 +0100 Subject: fork alert handlers, so that smokeping does not block --- lib/Smokeping.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index bba6dca..f5743c0 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -1872,10 +1872,18 @@ sub check_alerts { next unless $addr; if ( $addr =~ /^\|(.+)/) { my $cmd = $1; - if ($edgetrigger) { - system $cmd,$_,$line,$loss,$rtt,$tree->{host}, ($what =~/raise/); - } else { - system $cmd,$_,$line,$loss,$rtt,$tree->{host}; + # fork them in case they + unless ($pid = fork) { + unless (fork) { + $SIG{CHLD} = 'DEFAULT'; + if ($edgetrigger) { + exec $cmd,$_,$line,$loss,$rtt,$tree->{host}, ($what =~/raise/); + } else { + exec $cmd,$_,$line,$loss,$rtt,$tree->{host}; + } + die "exec failed!"; + } + exit 0; } } elsif ( $addr =~ /^snpp:(.+)/ ) { -- cgit v1.2.3-24-g4f1b From 79b6c9346c950d0b3e22dc9ba337bbcdcbed052e Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Thu, 22 Mar 2012 23:01:14 +0100 Subject: fork alert handlers, so that smokeping does not block --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index ace6376..bef8953 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +* Fork alert handler scripts so that sokeping does not block + 2012/02/07 -- released version 2.6.8 * Make SipSak work with sip services actually implementing OPTIONS -- tobi -- cgit v1.2.3-24-g4f1b