Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently for testing I set the service check as follows:

define service{
use     generic-service 
host_name       <host>
service_description HTTP
check_command   check_http!-s "blablabla" -f follow

Note the string "blablabla" does not exist on the page, this is simply for testing.

Nagios is reporting

HTTP OK: HTTP/1.1 301 Moved Permanently - 294 bytes in 6.607 second response time
Performance Data:   time=6.606636s;;;0.000000 size=294B;;;0

However if I run the check_http plugin directly I get the following:

<user>@<nagiosbox>:/usr/lib/nagios/plugins# ./check_http -H <host> -s "blablabla" -f follow
HTTP CRITICAL: HTTP/1.1 200 OK - string 'blablabla' not found on 'http://<host>:80/' - 92654 bytes in 3.984 second response time |time=3.983636s;;;0.000000 size=92654B;;;0
share|improve this question
up vote 5 down vote accepted

Are you sure you are calling the same plugin with the same arguments? It seems to me that you did not define the service correctly. Usually, the arguments are passed without options such as:

check_command   check_http!blablabla!follow

They are spearated by !. In the command definition, you can specify the correct options of the check_http plugin such as:

# 'check_http' command definition
define command{
        command_name    check_http
        command_line    /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -s '$ARG1$' -f '$ARG2$'

The arguments $ARG1$ and $ARG2$ will be replaced with the real values you specified in the service definition.

share|improve this answer
Thanks! That did it, I forgot I need to pass just the arguments. – Brandon Feb 26 '12 at 10:25
For people who don't understand this answer: – Keith Apr 11 '12 at 18:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.