HOST PING Disabled/Not Allowed

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

HOST PING Disabled/Not Allowed

Post 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.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: HOST PING Disabled/Not Allowed

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: HOST PING Disabled/Not Allowed

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: HOST PING Disabled/Not Allowed

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: HOST PING Disabled/Not Allowed

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: HOST PING Disabled/Not Allowed

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked