Page 1 of 1

HOST PING Disabled/Not Allowed

Posted: Wed May 15, 2019 9:46 am
by amitgupta19
I have some servers which needs to be monitored, but ping is not allowed for them.

I have removed the check_command for those host from the host definition, so that ping can be avoided for those servers and Host does not shows down in the Nagios.

But still that host is showing down in Nagios console.

Kindly suggest.

Re: HOST PING Disabled/Not Allowed

Posted: Wed May 15, 2019 4:30 pm
by cdienger
The host will need a check_command but it doesn't have to be ping. Is there a service port that should always be up if the host is up? If so, you could use check the check_tcp command instead.

Re: HOST PING Disabled/Not Allowed

Posted: Thu May 16, 2019 4:41 am
by amitgupta19
Following is the definition of the template for the host.

define host {

name linux-server-pingdisabled
use generic-host
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 2
notification_period 24x7
notification_interval 0
notification_options d,u,r,f,s
contact_groups LinuxServers
register 0
hostgroups linux-servers
}

When i do the Preflight check then it is not giving any error.

Also when i see the Description of check_command at the following URL: https://assets.nagios.com/downloads/nag ... .html#host

Following is mentioned:
---------------------------------
If you leave this argument blank, the host will not be actively checked. Thus, Nagios will likely always assume the host is up (it may show up as being in a "PENDING" state in the web interface). This is useful if you are monitoring printers or other devices that are frequently turned off.

So as per the above description it should not show the server as down. But it is still showing down.

Re: HOST PING Disabled/Not Allowed

Posted: Fri May 17, 2019 9:31 am
by scottwilkerson
amitgupta19 wrote:So as per the above description it should not show the server as down. But it is still showing down.
It is showing it in the last state it was in before you removed the check_command

What is stated in the DOC is if you NEVER has a check_command specified.

I would just go to the host and click "Submit passive check result for this host"

Then you can change the state to what you want, enter something in the output filed and then it will go into that state and remain there

Re: HOST PING Disabled/Not Allowed

Posted: Fri May 17, 2019 11:18 am
by amitgupta19
Thanks for the clarification Scott.

Now i am using the check_tcp for the port 5666, to decide the up/down of the server.

I hope that it should not create any issue in the future, if we continue to use this.

Re: HOST PING Disabled/Not Allowed

Posted: Fri May 17, 2019 11:57 am
by scottwilkerson
amitgupta19 wrote:Thanks for the clarification Scott.

Now i am using the check_tcp for the port 5666, to decide the up/down of the server.

I hope that it should not create any issue in the future, if we continue to use this.
Sounds good