I am trying to use Icinga to monitor a website for a particular string. When I run the plugin from the command line, it seems to work fine, but in Icinga-Web, it always shows up as successful no matter what I enter for the string.
#Doesn't Work - always returns ok
define service {
host_name mywebserver
service_description Check Website
servicegroups Websites
check_command check_http!-s "no such string" -H www.mysite.com -u /apath/ -t 7
use generic-service
notification_interval 60 ; set > 0 if you want to be renotified
}
The wierd thing is if I run the plugin located in /usr/lib/nagios/plugins/check_http as follows, it gives me what I would expect:
./check_http -H www.mysite.com -u "/apath/" -s "no such string"
HTTP CRITICAL: HTTP/1.1 200 OK - string 'no such string' not found on...
Why would this be?