nrpep plug in - how to return results
Ranga Nathan
RNathan at baxglobal.com
Wed Feb 23 03:27:30 CET 2005
But I also need to return a piece of information that will be displayed on
the page:
E.g the following is supposed to show the number of items in the queue.
command[check_baxp_inboundq]=echo "DISPLAY QUEUE(BAXP.AMS.RECEIVE.LOCAL)
CURDEPTH" | runmqsc -e BAXP.AMS.QMGR | grep CURDEPTH | sed
"s/^.*CURDEPTH(/Item
s (/"
and it returns the result : Items (0)
So I want to return some status as well as a piece of data just like what
the "ping" does:
PING OK - Packet loss = 0%, RTA = 0.71 m
Thanks
__________________________________________
Ranga Nathan / CSG
Systems Programmer - Specialist; Technical Services;
BAX Global Inc. Irvine-California
Tel: 714-442-7591 Fax: 714-442-2840
Jason Martin <jhmartin at toger.us>
Sent by: nagios-users-admin at lists.sourceforge.net
02/22/2005 06:17 PM
To
nagios-users at lists.sourceforge.net
cc
Subject
Re: [Nagios-users] nrpep plug in - how to return results
On Tue, Feb 22, 2005 at 06:03:46PM -0800, Ranga Nathan wrote:
> I have an nrpep command that returns the string "Items (55)" for
example.
> Nagios interprets it as "RC: 0 ". I have not been able to figure out
the
> format of the response.
Nagios doesn't attempt to parse your output at all. Instead it
looks for the return code of the plugin. So, the last line if
your script should be something like "exit 2" for a CRITICAL
alert, or "exit 1" for a warning, or "exit 0" for an OK.
-Jason Martin
--
Did you know that 7/5 people don't know how to use fractions?
This message is PGP/MIME signed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: att9vu6j.dat
Type: application/octet-stream
Size: 219 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050222/0f7ac76a/attachment.obj>
More information about the Users
mailing list