[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 04/14: check_httpd_status: Updating to rev153
Jan Wagner
waja at moszumanska.debian.org
Mon Sep 29 13:54:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
waja pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.
commit 30df0a95ce1a37de54a7fe80f0f6e7eb55b171a2
Author: Jan Wagner <waja at cyconet.org>
Date: Mon Sep 29 13:57:36 2014 +0200
check_httpd_status: Updating to rev153
---
check_httpd_status/check_httpd_status | 14 +++++++++++++-
check_httpd_status/control | 2 +-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/check_httpd_status/check_httpd_status b/check_httpd_status/check_httpd_status
index 7c1bae1..bc5e809 100644
--- a/check_httpd_status/check_httpd_status
+++ b/check_httpd_status/check_httpd_status
@@ -232,14 +232,18 @@ my $webcontent = $response->content;
logD("Web content :\n----------------------------\n".$webcontent."\n----------------------------");
+my $patternFound = 0;
+
my $Uptime = 0;
if ( $webcontent =~ m/Uptime: (.*?)\n/) {
$Uptime = $1;
+ $patternFound++;
}
my $TotalAccesses = 0;
if ( $webcontent =~ m/Total Accesses: (.*?)\n/) {
$TotalAccesses = $1;
+ $patternFound++;
} else {
$np->add_message(WARNING, _gt('"Total Accesses" not set ! (need extented status ?)') );
}
@@ -247,11 +251,13 @@ if ( $webcontent =~ m/Total Accesses: (.*?)\n/) {
my $TotalKbytes = 0;
if ( $webcontent =~ m/Total kBytes: (.*?)\n/) {
$TotalKbytes = $1;
+ $patternFound++;
}
my $ScoreBoard = '';
if ( $webcontent =~ m/Scoreboard: (.*?)\n/) {
$ScoreBoard = $1;
+ $patternFound++;
} else {
$np->add_message(WARNING, _gt("Scoreboard not found in reponse !") );
}
@@ -259,6 +265,7 @@ if ( $webcontent =~ m/Scoreboard: (.*?)\n/) {
my $BusyWorkers = 0;
if ( $webcontent =~ m/(BusyWorkers|BusyServers): (.*?)\n/) {
$BusyWorkers = $2;
+ $patternFound++;
if ($1 eq 'BusyServers') {
$httpserver = 'LIGHTTPD';
}
@@ -267,8 +274,13 @@ if ( $webcontent =~ m/(BusyWorkers|BusyServers): (.*?)\n/) {
my $IdleWorkers = 0;
if ( $webcontent =~ m/(IdleWorkers|IdleServers): (.*?)\n/) {
$IdleWorkers = $2;
+ $patternFound++;
}
-
+
+if ( $patternFound <= 1) {
+ $np->nagios_exit(CRITICAL, _gt("Server-status informations not found !") );
+}
+
my $TempFile = $TempPath.$o_host.'_check_httpd_status'.md5_hex($url);
diff --git a/check_httpd_status/control b/check_httpd_status/control
index 006371d..89529d4 100644
--- a/check_httpd_status/control
+++ b/check_httpd_status/control
@@ -1,7 +1,7 @@
Homepage: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_httpd_status.pl?view=log
Watch: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_httpd_status.pl?view=log <a name="(rev[^"]+)"></a>
Recommends: liblocale-gettext-perl, libnagios-plugin-perl, liblwp-useragent-determined-perl
-Version: rev148
+Version: rev153
Uploaders: Jan Wagner <waja at cyconet.org>
Description: plugin checking Apache or Lighthttpd
server-status page (using mod_status)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git
More information about the Pkg-nagios-changes
mailing list