summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Nagios/Plugin.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Nagios/Plugin.pm b/lib/Nagios/Plugin.pm
index 23d8450..576322b 100644
--- a/lib/Nagios/Plugin.pm
+++ b/lib/Nagios/Plugin.pm
@@ -535,7 +535,19 @@ EXPERIMENTAL AND SUBJECT TO CHANGE
535 535
536add_messages and check_messages are higher-level convenience methods to add 536add_messages and check_messages are higher-level convenience methods to add
537and then check a set of messages, returning an appropriate return code 537and then check a set of messages, returning an appropriate return code
538and/or result message. 538and/or result message. They are equivalent to maintaining a set of @critical,
539@warning, and and @ok message arrays (add_message), and then doing a final
540if test (check_message) like this:
541
542 if (@critical) {
543 nagios_exit( CRITICAL, join(' ', @critical) );
544 }
545 elsif (@warning) {
546 nagios_exit( WARNING, join(' ', @warning) );
547 }
548 else {
549 nagios_exit( OK, join(' ', @ok) );
550 }
539 551
540=over 4 552=over 4
541 553