HTTP check config

Hi,

I´m new in the Nagios world.
I’ve already set up my server, installed NRPE in remote linux servers and it works.

I would like to monitor a remote http server (which is not mine, so i cannot install plugins)

I’ve created the following rules

[code]define host{
use linux-server
host_name www.acme.com
alias www.acme.com
address www.acme.com
parents modem_1
}

define command{
command_name check_www_acme
command_line $USER1$/check_http -H www.acme.com $ARG1$
}

define service{
use generic-service
host_name www.acme.com
service_description http
check_command check_www_acme
}[/code]

In Nagios, the service is OK, all green
but the host is down, all red…

What did I miss ???

Thanks,

the command check_http should already be defined… and working by default with a simple service using check_http

ok,

I´m using the check_http command defined in the command.cfg now.

The problem is still the same

Host Status: DOWN (for 0d 0h 17m 33s)
Status Information: (Host Check Timed Out)

but the service is OK

I just want to test this nly service for this host.

It is a problem of host state… but don´t know how to resolve it…

do you have a check-host_alive command defined?

nagios.sourceforge.net/docs/3_0/ … .html#host

particularly:
check_command command_name
initial_state [o,d,u]

Thanks for your help.

I didn’t put a check_command in the host definition.

The remote host does not allow ping and I didn’t know that the host itself has to got own check_command. I thought that 1 service was enough

Well, starting with nagios is a nightmare ! but when it works, it’s great !

or try putting the inital state to up… and see if it keeps it…

I’ve tried, but didn’t work
thanks

use the same check you use as a servicecheck… :slight_smile: