summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGavin Carr <gonzai@users.sourceforge.net>2006-12-18 23:33:48 (GMT)
committerGavin Carr <gonzai@users.sourceforge.net>2006-12-18 23:33:48 (GMT)
commitf05979b75c181690d1cafb79cf78c6096f1ead5d (patch)
treeb1c08bf58e6cf8f82570e5019e6f943711bdbf2c /lib
parentaa580b8de5e40ee30dfba7d7b6db170dd2725b4d (diff)
downloadmonitoring-plugin-perl-f05979b75c181690d1cafb79cf78c6096f1ead5d.tar.gz
Expand MESSAGE METHODS docs in Nagios::Plugin.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1551 f882894a-f735-0410-b71e-b25c423dba1c
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