From 6676d2b6d85c20d66150520b86a070bb968612ca Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 3 Jan 2012 10:28:00 +0100 Subject: [PATCH] check_junos: Added OK message for the 'system_storage' check. --- check_junos.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/check_junos.pl b/check_junos.pl index 997e67a..8965904 100755 --- a/check_junos.pl +++ b/check_junos.pl @@ -419,6 +419,8 @@ sub check_system_storage my $res = $plugin->send_query('get_system_storage'); + my $all_ok = 1; + foreach my $re ($plugin->get_query_object($res, 'multi-routing-engine-item')) { my $re_name = $plugin->get_query_object_value($re, 're-name'); @@ -437,6 +439,7 @@ sub check_system_storage my $state = $plugin->check_threshold($used); if ($state != OK) { + $all_ok = 0; $plugin->add_message($state, "$re_name $mnt_pt: " . "$used\% used"); } @@ -450,5 +453,9 @@ sub check_system_storage ); } } + + if ($all_ok) { + $plugin->add_message(OK, "all filesystems within thresholds"); + } }