Different check_http?

Richard Luys-Nagios User nagios at thebug.demon.nl
Fri Jan 26 13:31:40 CET 2007


Yolanda,

With the plugin package came (if I'm not mistaken) a small binary called  
'negate'. This should be in your plugin directory. With this you can  
negate the returncodes of your plugins; ie: Error becomes Ok, and vice  
versa. See the help output of negate below:

negate (nagios-plugins 1.3.1) 1.5.2.2
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 Karl DeBisschop <kdebisschop at users.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:
   -t, --timeout=INTEGER
     Terminate test if timeout limit is exceeded (default: 9)
      [keep this less than the plugin timeout to retain CRITICAL status]

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

Richard




On Fri, 26 Jan 2007 13:11:55 +0100, Yolanda Santos <iamyolanda at gmail.com>  
wrote:

> Hi,
>
> I have Nagios 2.5 with plugins 1.4.5
> I have an url and it can happend 2 possibilities:
>
> 1º If it's OK, it responds a binary file
>
> 2º If it's ERROR, it responds a html page, wich tell us that 'The  
> service is
> not available'
>
> I want to check this, but... how can I do it?
> How can I check if a determinated string is in the binary file?
> Or.... can I change the check_http for giving me an ERROR when find an
> string?
>
> Normaly, if you check an url, and a string to expect in the content, if  
> you
> find it, you have an OK answer.
> I want the opposite. If I find a string in the content, I want an ERROR
> answer...
> Is this possible?
>
> Thanks.
> Yolanda



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-------------------------------------------------------------------------
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