summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2008-04-13 10:29:50 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2008-04-13 10:29:50 +0000
commit62547001eac9a0932ecafb2f2eae126838fc5e19 (patch)
tree4856e544336096f9f265810996cc892fad4a31c0
parentc8f0bc4b569285192650bfe84d697fbfe41a8371 (diff)
and fix last commit
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@341 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-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";