check_http plugins returns "No output"


#1

Hi,

I am having a problem with the check_http plugin that is returning “No output” and hope that somebody can help me with this. The problem excists with Nagios version 2.9 and the plugins version 1.4.9. This is all running on a Solaris 10 sparc server.

When I run the check_http plugin from the prompt as user nagios I am receiving the next output:

HTTP OK HTTP/1.1 200 OK - 215 bytes in 0.264 seconds |time=0.263687s;;;0.000000 size=215B;;;0

When I run the check_http from nagios (that is running as user nagios) I am receiving “(No output)” as status information.

No other output is generated in the log files or on the screen.

In the past this all has run on a Solaris 8 sparc server without any problems.

Thanks in advantage, Tinus.


#2

Can you post command and service definitions? And lines from nagios.log which correspond to this plugin output.

Maybe it is some argument mistype or something like that…


#3

Hi Albin,

hereby all the information. I have replaced some information within the <>, because I don’t want anybody to have this information.

define service{
use generic-service ; Name of service template to use
host_name <host_name>
service_description admin
is_volatile 0
check_period 24x7
max_check_attempts 2
normal_check_interval 15
retry_check_interval 1
contact_groups nagios
notification_options w,u,c,r
notification_interval 0
notification_period none
check_command check_max!warning!/opt/nagios/libexec/check_http --onredirect=follow -H $HOSTADDRESS$ -p -u /
}

define command{
command_name check_http
command_line /opt/nagios/libexec/check_http -H $HOSTADDRESS$ -t 20
}

define host{
use generic-host ; Name of host template to use
host_name <host_name>
alias
address
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period production
notification_options d,r
contact_groups nagios
}

The only information I am getting in the log file is the next sentence:
[1227186402] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;;;1227186401

I hope anybody can help me. Cheers, Tim.


#4

Your check_command in service definition is wrong. What have you tried to do here? If you only want to check_http on service’s hostaddress with the timeout value of 20 seconds then you only have to write check_command of your service definition like this:

because you have alredy defined those arguments in command definition.

Otherwise, if you want all those arguments from your check_command definition, then modify the command definition like this:

define command{ command_name check_http_modified command_line /opt/nagios/libexec/check_http -H $HOSTADDRESS$ -p <poort> -u / -t 20 --onredirect=follow }
and again put you check_command variable in service definition like this:


#5

Hi Albin,

Thanks for your reply. This was already been setup by another person. That is why I made the changes you mentioned, but without the result. I am stil getting “(No output!)”. Does anybody know how I can change this check to get more information what the problem can be?

Thanks, Tim.


#6

Maybe it’s some special script that parses an output on it’s particular way. Find the check_max command definititon and post it here. Also check the plugin/script it uses in command_line