Page 2 of 3
Re: check_http failing to compile regex
Posted: Tue Jul 07, 2015 4:45 pm
by tgriep
Try changing the command and service check like the following and see if it works for you.
Code: Select all
define command{
command_name check_https_uri_regex
command_line $USER1$/check_http -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -t 4 -u $ARG3$ -r $ARG4$ --ssl
}
define service {
use generic-service
host_name $HOSTNAME$
servicegroups SomeServiceaGroup
service_description Some Description
check_command check_https_uri_regex!3!5!'/api/assort/failed'!'\[\]'!
}
Re: check_http failing to compile regex
Posted: Tue Jul 07, 2015 5:01 pm
by ssax
I had to set it up this way for it to work on mine:
Code: Select all
define command{
command_name check_https_uri_regex
command_line $USER1$/check_http -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -t 4 -u $ARG3$ -r '$ARG4$' --ssl
}
define service {
use generic-service
host_name $HOSTNAME$
servicegroups SomeServiceaGroup
service_description Some Description
check_command check_https_uri_regex!3!5!/api/assort/failed!'\\[\\]'!
}
Re: check_http failing to compile regex
Posted: Wed Jul 15, 2015 4:45 pm
by northwood128
I've tried all these options. None of them seem to work. I either get a critical for no matches when the service certainly responds [], or the same compilation error.

Re: check_http failing to compile regex
Posted: Thu Jul 16, 2015 1:59 pm
by tmcdonald
What version of check_http are you using?
Code: Select all
/usr/local/nagios/libexec/check_http --version
I ask because that is our normal plugin path, but you seem to also use
~/development/nagios-plugins/check_http and
/usr/local/nagios/production/libexec/check_http. Have you been modifying the code at all?
Re: check_http failing to compile regex
Posted: Thu Jul 16, 2015 2:28 pm
by northwood128
That's just the path our our Nagios installation and my personal workplace. It haven't been messing up with the check.
Code: Select all
$ ../nagios-plugins/check_http --version
check_http v1.4.15 (nagios-plugins 1.4.15)
Re: check_http failing to compile regex
Posted: Thu Jul 16, 2015 2:43 pm
by tmcdonald
Could you try the latest version of the Plugins?
https://github.com/nagios-plugins/nagios-plugins/
The bug might still exist but I want to make sure we're fixing the latest code if we do have to make a patch.
Re: check_http failing to compile regex
Posted: Thu Jul 16, 2015 2:51 pm
by jolson
Please update your plugins as indicated by tmcdonald.
I got this working on a test Nagios XI box of my own, with the following configurations in place:
command:
Code: Select all
define command {
command_name check_xi_host_http
command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
}
service:
Code: Select all
define service {
host_name insightfulcowthoughts.com
service_description check HTTP for []
use generic-service
check_command check_xi_service_http!-r "\[\]"!!!!!!!
notifications_enabled 1
register 1
}
After upgrading your plugins, give the above a shot. If you need define a URL, I can verify that ssax's solution worked properly for me as well.
Re: check_http failing to compile regex
Posted: Thu Jul 16, 2015 3:06 pm
by northwood128
thanks guys! I have an outdated version. I'll evaluate the compatibility of the new plugin with our monitoring server and release a new rpm that includes the new version of the plugin.
$ ./check_http --version
check_http v2.0.3.2.g472e (nagios-plugins 2.0.3)
Re: check_http failing to compile regex
Posted: Thu Jul 16, 2015 3:09 pm
by jolson
Sounds good, let us know how it works out.
Re: [SOLVED] check_http failing to compile regex
Posted: Sat Sep 19, 2015 4:11 pm
by northwood128
Updating the plugin worked! Sorry for the delay!