Disable Host checking


#1

I have an external server that I want to check that its web page is working. I can do a check_http and that works fine but when I create a service in Nagios it insists on doing a server check as well. The owner of server has turned piong reply off so I cannot get a reply. This causes the service in Nagios to show RED Critical even though the Http get check is wroking fine and is shwoing green
How can I disable the host check and just have the check_http service being checked


#2

put
active_checks_enabled 0
in your host definition. ( define host{ …)
Or change your check_command in your host definition to another check that always exits 0.


#3

Hi,
I 'am a little bit confused,
Do you want to disable check_host_alive?
Or do you just want to exclude your server for the check_ping service check?

The second one is much easier,
just go to the template where your check ping command stay’s and by host_name fill in hostnames, !yourservername
host_name *, !exclude_your_server

After this you restart your nagios service and the ping check is gone by the server you’ve filled in.

About the check_host_alive (you whole server status is down…)
To remove check-host-alive for all your machines
Go to /usr/local/nagios/etc/objects/commands.cfg
Remove the check_host_alive command defenition.
Then you go to your templates, you have define_host somewhere, and just remove the:
check_command check-host-alive

Then, if you think you’re ready, verify your configuration:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

If no errors it’s ok. If you do have any errors after this, search in all you config files to check-host-alive and remove it.
After this you will get no errors about it anymore and no host alive check will be executed for none of your servers.

Howto exclude your check-host-alive? I don’t know, could 't find that, check_ping does the same, so i can live without check-host-alive

Succes!


#4

Thanks that worked fine by excluded that one server