Compare HTTP Page to Saved Copy

Andrew Cruse andrew at profitability.net
Wed Sep 20 22:43:12 CEST 2006


nagios-users-bounces at lists.sourceforge.net wrote:
> I understand about the -s, -r and -R flags. These all look
> for a specific pattern. Can I look for the absense of a pattern?

So you want it to return critical only if the pattern is found?  Check
out the negate utility that I believe is still part of the plugins
package:

negate (nagios-plugins 1.4.0alpha1) 1.13
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may
redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Copyright (c) 2002-2003 Nagios Plugin Development Team
        <nagiosplug-devel at lists.sourceforge.net>

Negates the status of a plugin (returns OK for CRITICAL, and
vice-versa).

Usage: negate [-t timeout] <definition of wrapped plugin>
       negate (-h | --help) for detailed help
       negate (-V | --version) for version information

Options:
 -h, --help
    Print detailed help screen
 -V, --version
    Print version information
 -t, --timeout=INTEGER
    Seconds before connection times out (default: 9)
     [keep timeout than the plugin timeout to retain CRITICAL status]
  negate "/usr/local/nagios/libexec/check_ping -H host"
    Run check_ping and invert result. Must use full path to plugin
  negate "/usr/local/nagios/libexec/check_procs -a 'vi negate.c'"
    Use single quotes if you need to retain spaces
This plugin is a wrapper to take the output of another plugin and invert
it.
If the wrapped plugin returns STATE_OK, the wrapper will return
STATE_CRITICAL.
If the wrapped plugin returns STATE_CRITICAL, the wrapper will return
STATE_OK.
Otherwise, the output state of the wrapped plugin is unchanged.

Send email to nagios-users at lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest
improvements,
send email to nagiosplug-devel at lists.sourceforge.net


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list