About on-demand check of host

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
nagioslinux
Posts: 4
Joined: Tue Jan 15, 2019 7:19 am

About on-demand check of host

Post by nagioslinux »

I use Nagios Core 4.3.2 with CentOS 7.3, and I am monitoring it with nagios. I would like to set the host's life / death monitoring to be on-demand checking rather than regular monitoring.

In the case of monitored targets that are active checking both host and service, only on-demand check of the host is working normally.

However, in the case of a monitored object that is active checking the host and passively checking the service, setting it as on-demand check of the host does not work well.
The setting difference of both host definitions is only the value of "event_handler_enabled", the former being set to "0" and the latter to "1".

What is the cause of this problem and how can I avoid it?

Also, what should I do if you want to monitor host death monitoring not only on a periodic basis but on the host only for on-demand checking?
Should it be set as follows?

----
check_interval = 0
active_checks_enabled = 1
----

Also, is there anything that the transition of status by passive monitoring does not trigger on-demand check of the host?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: About on-demand check of host

Post by scottwilkerson »

I'm not 100% sure what your desired behavior is but I am guessing you want to work with the cached_host_check_horizon directive.
https://assets.nagios.com/downloads/nag ... ck_horizon

additional information is available here
https://assets.nagios.com/downloads/nag ... hecks.html
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
nagioslinux
Posts: 4
Joined: Tue Jan 15, 2019 7:19 am

Re: About on-demand check of host

Post by nagioslinux »

thank you for your comment.

If you set cached_host_check_horizon (15s), check_interval = 0, active_checks_enabled = 1, you can only check on-demand checking of the host's alive monitoring instead of regular monitoring. Is it Correct?

Also, is there anything that the transition of status by passive monitoring does not trigger on-demand check of the host? Can you tell me if you understand?
nagioslinux
Posts: 4
Joined: Tue Jan 15, 2019 7:19 am

Re: About on-demand check of host

Post by nagioslinux »

scottwilkerson wrote:I'm not 100% sure what your desired behavior is but I am guessing you want to work with the cached_host_check_horizon directive.
https://assets.nagios.com/downloads/nag ... ck_horizon

additional information is available here
https://assets.nagios.com/downloads/nag ... hecks.html
thank you for your comment.

If you set cached_host_check_horizon (15s), check_interval = 0, active_checks_enabled = 1, you can only check on-demand checking of the host's alive monitoring instead of regular monitoring. Is it Correct?

Also, is there anything that the transition of status by passive monitoring does not trigger on-demand check of the host? Can you tell me if you understand?
nagioslinux
Posts: 4
Joined: Tue Jan 15, 2019 7:19 am

Re: About on-demand check of host

Post by nagioslinux »

scottwilkerson wrote:I'm not 100% sure what your desired behavior is but I am guessing you want to work with the cached_host_check_horizon directive.
https://assets.nagios.com/downloads/nag ... ck_horizon

additional information is available here
https://assets.nagios.com/downloads/nag ... hecks.html
I'm sorry. I was wrong.
It was "cached_host_check_horizon (0s)" instead of "cached_host_check_horizon (15s)".
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: About on-demand check of host

Post by scottwilkerson »

for cached_host_check_horizon from the documentation

Code: Select all

Use a value of 0 if you want to disable host check caching.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked