[Nagiosplug-help] return message for plugins

David Lee palann at gmail.com
Wed Feb 3 23:08:49 CET 2010


(appologized for hitting send in the previous message)

> No. Was '<some message here>' in the first line of output from your
plugin?
That is part of the output from my plugin.  The output is obtained from
doing a "grep ORA" from Oracle's alert log.  If there is a message, prefix
it with "Warning - ", follow by the output from grep.

To give you an example, if I run the stock check_load command that came with
Nagios I get these message.  I'd like my plugin to show extra messages as
well.

./check_load -w 0 -c 0
CRITICAL - load average: 0.50, 0.40, 0.26|load1=0.500;0.000;0.000;0;
load5=0.400;0.000;0.000;0; load15=0.260;0.000;0.000;0;

./check_load -w 0 -c 1
WARNING - load average: 0.52, 0.40, 0.27|load1=0.520;0.000;1.000;0;
load5=0.400;0.000;1.000;0; load15=0.270;0.000;1.000;0;

./check_load -w 1 -c 2
OK - load average: 0.59, 0.42, 0.28|load1=0.590;1.000;2.000;0;
load5=0.420;1.000;2.000;0; load15=0.280;1.000;2.000;0;

=David

On Wed, Feb 3, 2010 at 4:07 PM, Marc Powell <marc at ena.com> wrote:

>
> On Feb 3, 2010, at 2:47 PM, David Lee wrote:
>
> > Good day!
> >
> > After looking around Nagios's exchange and various other website, I am
> resorted to writing my own plugins.  I took the examples and have my shell
> script returning "OK - <some message here>".  "OK" was picked up and
> reported in Nagios web interface.  The color was green for my check.  The
> message however wasn't.  Am I missing some kind of flag to report "messages"
> in service or command.cfg?
>
> No. Was '<some message here>' in the first line of output from your plugin?
>
> At the barest minimum, your plugin needs to check something, exit with the
> correct exit code for the state and to output one line of text for display
> in the GUI. There are other things it might do and this doc represents the
> standards for a 'good' plugin (including return codes)--
> http://nagiosplug.sourceforge.net/developer-guidelines.html
>
> > Another thing, I have in my possession Apress book on Nagios 2.0.  How
> much is that out of date in the current 3.0 version?
>
> Not too much... This document will help you identify what's different -
> http://nagios.sourceforge.net/docs/3_0/whatsnew.html
>
> --
> Marc
>
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20100203/083e4dd3/attachment.html>


More information about the Help mailing list