diff options
author | Gavin Carr <gonzai@users.sourceforge.net> | 2006-12-18 23:33:48 +0000 |
---|---|---|
committer | Gavin Carr <gonzai@users.sourceforge.net> | 2006-12-18 23:33:48 +0000 |
commit | f05979b75c181690d1cafb79cf78c6096f1ead5d (patch) | |
tree | b1c08bf58e6cf8f82570e5019e6f943711bdbf2c | |
parent | aa580b8de5e40ee30dfba7d7b6db170dd2725b4d (diff) | |
download | monitoring-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
-rw-r--r-- | lib/Nagios/Plugin.pm | 14 |
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 | ||
536 | add_messages and check_messages are higher-level convenience methods to add | 536 | add_messages and check_messages are higher-level convenience methods to add |
537 | and then check a set of messages, returning an appropriate return code | 537 | and then check a set of messages, returning an appropriate return code |
538 | and/or result message. | 538 | and/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 | ||
540 | if 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 | ||