I've actually been working on a general invert plug in...almost done
with it and I'll post it..
I use it quite a bit for a lot of the plugins.like the port check..that
way you can also monitor
That a port is NOT open..for security type monitoring..theres actually
lots of uses for an invert plugin..
-Mark
-----Original Message-----
From: nagios-devel-admin@lists.sourceforge.net
[mailto:nagios-devel-admin@lists.sourceforge.net] On Behalf Of Stefano
Coletta
Sent: Monday, September 30, 2002 11:41 AM
To: nagios-devel@lists.sourceforge.net
Subject: [Nagios-devel] check_procs wrapper to invert logic of checks
Greetings to all,
I've written this simple bash script for the check_procs plug-in to
invert the logic of the result.
This is an excerpt from the script source...
# Why I need this wrapper?
# ------------------------
#
# This wrapper is useful to check for a missing process (like a Java
application or anything else) # that must be running all the time. In
this case you have to get a CRITICAL status from the plug-in when the
application # is not running. This is the typical scenario.
# I preferred to make a wrapper to add the 'NOT' functionality to the
check_procs plug-in instead of modifying the source code. # I've plenty
of installations of plug-ins and I'm too lazy to recompile them all. If
the 'NOT' feature will be included in a # future release of check_procs
plug-in, this wrapper will be useless.
# ... but for now... enjoy it!
# To use this script you need the check_procs plug-in that is part of
nagios/netsaint plug-ins # available from
http://www.nagios.org/download/#plugins
# example 1 (with original check_procs plug-in):
# ----------------------------------------------
#
# $ check_procs -c 0-0 -u root -a "someargument"
#
# This example gives a CRITICAL status when you have one or more
processes with "someargument" and OK # status when there are no
processes with "someargument"
# example 2 (with the plug-in wrapper):
# ----------------------------------------------
#
# $ check_procs_not "-c 0-0 -u root -a "someargument""
#
# gives an OK status when you have one or more processes with
"someargument" and CRITICAL status when # there are no processes with
"someargument"
Hope to be of help...
------------------------------------------------
xmedia
New Media Agency
------------------------------------------------
Stefano Coletta mailto:coletta@xmedia.net
Network Admin www.xmedia.net
Personal Site www.mindcreations.com
via Francesco Benaglia, 13 - Tel. +39 06 588851
00153 Rome Italy fax +39 06 58885016
------------------------------------------------
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: agios-devel-admin@lists.sourceforge.ne