Running a script
Jason Martin
jhmartin at toger.us
Sat Sep 4 17:51:41 CEST 2004
On Fri, Sep 03, 2004 at 09:50:57PM -0500, Anton Krall wrote:
> I have a script that return a number, how can I use nagios to run this and
> check the returned number and if less than X trigger an alert? I havent
When you say 'return' a number, do you mean 'print' a number or
actually 'return' it? Nagios keys off of exit codes and not
printed data. To pluginize your script you'd need to have it
accept arguments saying what a warning and criticla threshold
are, and exit with the appropriate code.
Or, if you can't modify the script, you could write a wrapper
plugin that does the equivalent function.
-Jason Martin
--
Never test for an error you don't know how to handle.
This message is PGP/MIME signed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 211 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040904/f2636b62/attachment.sig>
More information about the Users
mailing list