summaryrefslogtreecommitdiff
path: root/parse-nagios
diff options
context:
space:
mode:
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 1b0ceae..4a2036c 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/ || m/DOWN/ || m/UNREACHABLE/ ) {
+if ($state =~ m/CRITICAL|DOWN|UNREACHABLE/ ) {
$hosttype = "4$host";
} elsif ($state =~ m/WARNING/) {
$hosttype = "5$host";
-} elsif ($state =~ m/OK/ || m/UP/ ) {
+} elsif ($state =~ m/OK|UP/ ) {
$hosttype = "3$host";
} elsif ($state =~ m/UNKNOWN/) {
$hosttype = "6$host";