summaryrefslogtreecommitdiff
path: root/parse-nagios
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2008-04-13 09:58:19 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2008-04-13 09:58:19 +0000
commitc8f0bc4b569285192650bfe84d697fbfe41a8371 (patch)
treeff8c638045fca257a320597766871cadbf74842f /parse-nagios
parenta64b04ba7dac0881071dfc897661577133c016ae (diff)
and up and down and unreachable
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@340 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'parse-nagios')
-rwxr-xr-xparse-nagios4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse-nagios b/parse-nagios
index 56c6502..1b0ceae 100755
--- a/parse-nagios
+++ b/parse-nagios
@@ -95,11 +95,11 @@ die ("$PROGRAM_NAME - $project: No info found.\n") unless defined $info;
$type =~ tr/A-Z/a-z/;
$service = $host unless defined $service;
-if ($state =~ m/CRITICAL/) {
+if ($state =~ m/CRITICAL/ || m/DOWN/ || m/UNREACHABLE/ ) {
$hosttype = "4$host";
} elsif ($state =~ m/WARNING/) {
$hosttype = "5$host";
-} elsif ($state =~ m/OK/) {
+} elsif ($state =~ m/OK/ || m/UP/ ) {
$hosttype = "3$host";
} elsif ($state =~ m/UNKNOWN/) {
$hosttype = "6$host";