Nagios Negate
w.pfeiffer at enbw.com
w.pfeiffer at enbw.com
Mon Jan 19 15:28:15 CET 2004
Simon Lorenz wrote:
> Am I correct in thinking that the Nagios negate plug-in only
> works as a wrapper for plug-ins that require no options?
> When running it always returns an error that suggests this is so:
>
> ./negate ./check_http -H 192.168.0.100
> ./negate: invalid option -- H
> negate: Unknown argument - H
>
> If so are there other options out there, or will I need to
> write my own?
Strange... It shouldn't do that. It works for me:
$ ./negate -V
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.
$ ./check_http -V
check_http (nagios-plugins 1.3.1) 1.24.2.4
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.
$ ./negate ./check_http -H 127.0.0.1
HTTP ok: HTTP/1.1 200 OK - 0.003 second response time |time= 0.003
$ echo $?
2
What version of the plugins are you using? What happens if you quote the
argument to negate, i.e. ./negate './check_http -H 192.168.0.100'?
> What I am trying to do is get the check_http plug-in to check
> for a specific piece of content, that will only be shown if
> there IS a problem. To do this I need to reverse the response
> generated by this plug-in, so that it generates a CRITICAL
> alert if it finds the string.
I'm using a custom check http plugin (written in Perl) that, among other
things, also allows to specify a regex that a webpage must NOT match.
If you're somewhat fluent in Perl something like that is quite easy to
do using the LWP module. This could at least provide a temporary
workaround for your problem.
Regards,
Wolfram Pfeiffer
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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