[Nagiosplug-help] check_http and --invert-regex

Jim Avery jim at jimavery.me.uk
Fri Oct 8 19:00:30 CEST 2010


On 8 October 2010 16:04, Architecture Mercenary <itarchmerc at archmerc.com> wrote:
> I was writing a check using check_http with the --invert-regex option.  It
> works perfectly from the command line, but fails when running through
> Nagios.  I looked at the expanded command definition and it looks correct,
> but I get an UNKNOWN status from the plugin via Nagios.  When I take the
> --invert-regex option out of the check, it succeeds.  Is that option
> deprecated, or is it an issue with Nagios?  For now, I wrapped the check in
> negate and it is working.  If that option doesn't work, can it be removed
> from the help section of the plugin?  Thanks.


I think there was a discussion on that very topic here a few months ago.

If I recall, I managed to get the check working after a fashion like so:

check_command check_http!-I $HOSTADDRESS$ -r Alarmed --invert-regex \\"\\"

where the command definition is simply:

define command{
        command_name    check_http
        command_line    $USER1$/check_http $ARG1$
        }

I've stopped using it now, not if I recall because it didn't work, but
because the web page I was monitoring was a bit bizarre and didn't
lend itself to that kind of monitoring.

I hope that helps,

Cheers,

Jim




More information about the Help mailing list