summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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";