[Nagiosplug-checkins] Nagios-Plugin/lib/Nagios Plugin.pm, 1.18, 1.19
Gavin Carr
gonzai at users.sourceforge.net
Tue Dec 19 00:33:50 CET 2006
Update of /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6006/lib/Nagios
Modified Files:
Plugin.pm
Log Message:
Expand MESSAGE METHODS docs in Nagios::Plugin.
Index: Plugin.pm
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios/Plugin.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- Plugin.pm 21 Nov 2006 21:00:47 -0000 1.18
+++ Plugin.pm 18 Dec 2006 23:33:48 -0000 1.19
@@ -535,7 +535,19 @@
add_messages and check_messages are higher-level convenience methods to add
and then check a set of messages, returning an appropriate return code
-and/or result message.
+and/or result message. They are equivalent to maintaining a set of @critical,
+ at warning, and and @ok message arrays (add_message), and then doing a final
+if test (check_message) like this:
+
+ if (@critical) {
+ nagios_exit( CRITICAL, join(' ', @critical) );
+ }
+ elsif (@warning) {
+ nagios_exit( WARNING, join(' ', @warning) );
+ }
+ else {
+ nagios_exit( OK, join(' ', @ok) );
+ }
=over 4
More information about the Commits
mailing list