Where is this implemented


Also i would like to know that how is ping implemented in host

checking.what and where is the logic implemented for host checking that.if all services down then host down.?



If services are down the host gets pinged (check_host_alive), if this fails the host is reported as down.



For nagios 1.2 and earlier yes, that’s true.
Host’s are NEVER checked, unless the service check is failed. the logic is, why bother to check a host, if the service check is good. Obviously, the host HAS to be alive.


Ya if services are checked but with that it shows me host also down.in checkcommands.cfg there is command for check-host-alive by default.it is as follows

define command {
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1

also i have disabled ping from cgi.cfg.
ping _syntax statement i have disabled.still it takes ping path as /bin/ping

whts wrong and why this is happening.i am new to this.help me out with this



how have you disabled ping? Make it easy on yourself. Define one host with one service check. Make it an easy service check like check_ping. If the service check passes, then the host will NOT be checked. But if the service check fails, then the HOST check will be performed. Paste your command, host and service definintions aloong with the output that you get from the check, when you are done.


disabled ping i mean that in cgi.cfg there is a statement
i have commented it.

check_ping doesnt work for me.
Also in Makefile in plugins the ping_path is /bin/ping



I’m not sure you did much by commenting that out, since it is only used in the statuswml CGI.

can we start over? Define one host, with one service(make it a check_ping). If the checkfails, then of course the host will fail, since it is also a ping command.

Now define a host and service that you know should work. If the service check(check_ping) is good, then the host will NOT be checked.

Paste your results. and any .cfg file entries that may help, if you have troubles.