HOST PING Disabled/Not Allowed

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

HOST PING Disabled/Not Allowed

Postby amitgupta19 » Wed May 15, 2019 9:46 am

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.
amitgupta19
 
Posts: 180
Joined: Fri Sep 08, 2017 5:53 am

Re: HOST PING Disabled/Not Allowed

Postby cdienger » Wed May 15, 2019 4:30 pm

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

Re: HOST PING Disabled/Not Allowed

Postby amitgupta19 » Thu May 16, 2019 4:41 am

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.
amitgupta19
 
Posts: 180
Joined: Fri Sep 08, 2017 5:53 am

Re: HOST PING Disabled/Not Allowed

Postby scottwilkerson » Fri May 17, 2019 9:31 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 15398
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: HOST PING Disabled/Not Allowed

Postby amitgupta19 » Fri May 17, 2019 11:18 am

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.
amitgupta19
 
Posts: 180
Joined: Fri Sep 08, 2017 5:53 am

Re: HOST PING Disabled/Not Allowed

Postby scottwilkerson » Fri May 17, 2019 11:57 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 15398
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 25 guests