From d8b81e9ef3947a36e2647f4e54a63e3b259b103b Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 1 Oct 2013 14:59:35 +0200 Subject: check_oracle: --tns bad string matching check_oracle in the 1.4.15 release doesn't correctly parse the output gotten from at least Oracle 11 (with german locales). I guess it's probably more. Also it completely needlessly uses sed where basic bash string parsing actually does more than suffice (and does not run into possible problems with locales like sed ;)). -- Just turning attached patch of github issue #1015 into a push request. (Closes #1015 and #1191) --- THANKS.in | 1 + plugins-scripts/check_oracle.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/THANKS.in b/THANKS.in index 883387e5..0c2dc842 100644 --- a/THANKS.in +++ b/THANKS.in @@ -323,3 +323,4 @@ Eric J. Mislivec Jean-Claude Computing Andy Brist Mikael Falkvidd +Frederic Krueger diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh index ceac95dc..1873a3c2 100755 --- a/plugins-scripts/check_oracle.sh +++ b/plugins-scripts/check_oracle.sh @@ -137,7 +137,7 @@ case "$cmd" in tnschk=` tnsping $2` tnschk2=` echo $tnschk | grep -c OK` if [ ${tnschk2} -eq 1 ] ; then - tnschk3=` echo $tnschk | sed -e 's/.*(//' -e 's/).*//'` + tnschk3=${tnschk##*(}; tnschk3=${tnschk3%)*} echo "OK - reply time ${tnschk3} from $2" exit $STATE_OK else -- cgit v1.2.3 From d4b6d09f104f73c462e0e0c8a297ba9fc7c5a53e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 20 Aug 2014 20:29:23 +0200 Subject: check_log.sh: droping path from basename while evaluating PROGNAME (Closes Debian Bug #758662) --- plugins-scripts/check_log.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh index 8653a5e1..f67eff69 100755 --- a/plugins-scripts/check_log.sh +++ b/plugins-scripts/check_log.sh @@ -58,7 +58,7 @@ # Paths to commands used in this script. These # may have to be modified to match your system setup. -PROGNAME=`/bin/basename $0` +PROGNAME=`basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` REVISION="@NP_VERSION@" PATH="@TRUSTED_PATH@" -- cgit v1.2.3 From 3a668c0f87f3ad31f28997ed43b374edf78f6227 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 20 Aug 2014 20:32:09 +0200 Subject: Setting PATH at first --- plugins-scripts/check_log.sh | 5 ++--- plugins-scripts/check_oracle.sh | 3 ++- plugins-scripts/check_sensors.sh | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh index f67eff69..d28c8d0a 100755 --- a/plugins-scripts/check_log.sh +++ b/plugins-scripts/check_log.sh @@ -58,12 +58,11 @@ # Paths to commands used in this script. These # may have to be modified to match your system setup. +PATH="@TRUSTED_PATH@" +export PATH PROGNAME=`basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` REVISION="@NP_VERSION@" -PATH="@TRUSTED_PATH@" - -export PATH . $PROGPATH/utils.sh diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh index 1873a3c2..96078aca 100755 --- a/plugins-scripts/check_oracle.sh +++ b/plugins-scripts/check_oracle.sh @@ -6,10 +6,11 @@ # This Monitoring plugin was created to check Oracle status # +PATH="@TRUSTED_PATH@" +export PATH PROGNAME=`basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` REVISION="@NP_VERSION@" -PATH="@TRUSTED_PATH@" . $PROGPATH/utils.sh diff --git a/plugins-scripts/check_sensors.sh b/plugins-scripts/check_sensors.sh index 05c64c48..f7428301 100755 --- a/plugins-scripts/check_sensors.sh +++ b/plugins-scripts/check_sensors.sh @@ -1,11 +1,10 @@ #!/bin/sh +PATH="@TRUSTED_PATH@" +export PATH PROGNAME=`basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` REVISION="@NP_VERSION@" -PATH="@TRUSTED_PATH@" - -export PATH . $PROGPATH/utils.sh -- cgit v1.2.3 From 2edec08b824a87044b9f3917b9d759912a854e3b Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 21 Jul 2014 21:28:20 +0200 Subject: travis-ci: Using libfreeradius-client-dev as build-dep --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 02fa084e..f03ac9cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,12 @@ language: c before_install: + - sudo add-apt-repository -y ppa:waja/precise-backports - sudo apt-get update -qq - sudo apt-get purge -qq gawk install: - - sudo apt-get install -qq --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev libmysqlclient-dev libradiusclient-ng-dev libkrb5-dev libnet-snmp-perl procps + - sudo apt-get install -qq --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev libmysqlclient-dev libfreeradius-client-dev libkrb5-dev libnet-snmp-perl procps - sudo apt-get install -qq --no-install-recommends libdbi0-dev libdbd-sqlite3 libssl-dev dnsutils snmp-mibs-downloader - sudo apt-get install -qq --no-install-recommends fping snmp netcat smbclient fping pure-ftpd apache2 postfix - sudo apt-get install -qq --no-install-recommends autoconf automake -- cgit v1.2.3 From eee374189775e7146bb9233a29f2c0f6304249d0 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 21 Jul 2014 21:58:13 +0200 Subject: travis-ci: Installing libhttp-daemon-ssl-perl to make plugins/tests/check_http.t possible to run --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f03ac9cd..cec78786 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ before_install: install: - sudo apt-get install -qq --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev libmysqlclient-dev libfreeradius-client-dev libkrb5-dev libnet-snmp-perl procps - sudo apt-get install -qq --no-install-recommends libdbi0-dev libdbd-sqlite3 libssl-dev dnsutils snmp-mibs-downloader - - sudo apt-get install -qq --no-install-recommends fping snmp netcat smbclient fping pure-ftpd apache2 postfix + - sudo apt-get install -qq --no-install-recommends fping snmp netcat smbclient fping pure-ftpd apache2 postfix libhttp-daemon-ssl-perl - sudo apt-get install -qq --no-install-recommends autoconf automake before_script: -- cgit v1.2.3 From 369dba6206d331f59f0b70804595141b2528c685 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 30 Jul 2014 13:04:09 +0200 Subject: travis-ci: create MySQL database 'test' --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index cec78786..2275be3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ before_install: - sudo add-apt-repository -y ppa:waja/precise-backports - sudo apt-get update -qq - sudo apt-get purge -qq gawk + # ensure we have a test database in place for tests + - mysql -e "create database IF NOT EXISTS test;" -uroot install: - sudo apt-get install -qq --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev libmysqlclient-dev libfreeradius-client-dev libkrb5-dev libnet-snmp-perl procps -- cgit v1.2.3 From 013ca2c508386c548ec145832ab8be1e8306cca0 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 16 Sep 2014 12:28:51 +0200 Subject: Fix check_jabber to work with Openfire servers The plugin expected: But Openfire sends: --- NEWS | 4 ++++ plugins/check_tcp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f2898aba..8109f803 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ This file documents the major additions and syntax changes between releases. +2.0.1 ... + FIXES + Fix check_jabber to work with Openfire servers + 2.0 11th July 2014 ENHANCEMENTS check_mailq now supports auto detection of qmail, postfix, exim and nullmailer with diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index bd7736b5..fc0adba0 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -172,7 +172,7 @@ main (int argc, char **argv) } else if (!strncmp(SERVICE, "JABBER", 6)) { SEND = "\n"; - EXPECT = " Date: Mon, 1 Sep 2014 17:08:49 +0200 Subject: check_mailq: fixed mailer names (Closes #1289) --- plugins-scripts/check_mailq.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl index bd78981e..0e8100d0 100755 --- a/plugins-scripts/check_mailq.pl +++ b/plugins-scripts/check_mailq.pl @@ -332,7 +332,7 @@ elsif ( $mailq eq "postfix" ) { }elsif ($lines[0]=~/Mail queue is empty/) { $msg_q = 0; }else{ - print "Couldn't match $utils::PATH_TO_QMAIL_QSTAT output\n"; + print "Couldn't match $utils::PATH_TO_MAILQ output\n"; exit $ERRORS{'UNKNOWN'}; } @@ -340,7 +340,7 @@ elsif ( $mailq eq "postfix" ) { #if ($lines[1]=~/^messages in queue but not yet preprocessed: (\d+)/) { # my $msg_p = $1; #}else{ - # print "Couldn't match $utils::PATH_TO_QMAIL_QSTAT output\n"; + # print "Couldn't match $utils::PATH_TO_MAILQ output\n"; # exit $ERRORS{'UNKNOWN'}; #} -- cgit v1.2.3 From 6100950329ff28ba52fa16b67539687efcb1ff08 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 29 Sep 2014 10:26:05 +0200 Subject: Adding Simon to Thanks file --- THANKS.in | 1 + 1 file changed, 1 insertion(+) diff --git a/THANKS.in b/THANKS.in index 0c2dc842..7e3295b8 100644 --- a/THANKS.in +++ b/THANKS.in @@ -324,3 +324,4 @@ Jean-Claude Computing Andy Brist Mikael Falkvidd Frederic Krueger +Simon Meggle -- cgit v1.2.3