Hi,
I have the same question as someone had on this forum. here is the link: https://support.nagios.com/forum/viewto ... led#p89696
Unfortunately the answer does not satisfy me. I plan to do more or less the same.
About my environment:
In 95% of my monitored hosts I am using check_icmp to check if a host is up or down.
I need this since it is crucial in networking I use the performance data to see the RTT and packet loss as well.
Now my plan is to change active_checks_enabled 1 in my host templates to active_checks_enabled 0 and move this check as a service eg: check_icmp.
So I would still have the periodic checks for the hosts but from now as a service.
What would this change cause when a host goes down?
- I am using host dependency (parents directive in config).
- How does this change effect the scheduling? (I hope positive effect on scheduling since after the modification nagios has to deal only with active service checks and no active host checks)
- What else side effect can be?
- Will I get unnecessary notifications when a host goes down? (eg. will I get notification from all the services of the host?)
Thanks for your help,
klajosh
host active_checks_enabled vs. scheduling checks
Re: host active_checks_enabled vs. scheduling checks
If the host itself goes down (and by that I mean the remote machine, not the host object in Nagios) and you do not have a host check running for it (and by this I do mean the host object in Nagios) then:
- You will get an alert for each service on that host that is non-OK, instead of the usual logic of just getting a host alert and ignoring its down services
- None of the host dependency or parent logic will work - bear in mind, dependencies and parent-child relationships are two different things
- If the dependency is from one service to another service, it will still work just fine
- Scheduling on the macro scale should not change - on the micro scale things will probably be a few seconds closer to their check_interval since there are less checks competing for CPU cycles
As for side effects, it's hard to say. On the positive side you will probably see a dip in CPU load. On the negative, your network host reachability logic is now shot since a host cannot be set to UNKNOWN in the case that a switch or router goes down.
Overall I'd say you should be fine, just do as much as you can to make those service checks act like their respective host checks (mostly just set up service dependencies).
- You will get an alert for each service on that host that is non-OK, instead of the usual logic of just getting a host alert and ignoring its down services
- None of the host dependency or parent logic will work - bear in mind, dependencies and parent-child relationships are two different things
- If the dependency is from one service to another service, it will still work just fine
- Scheduling on the macro scale should not change - on the micro scale things will probably be a few seconds closer to their check_interval since there are less checks competing for CPU cycles
As for side effects, it's hard to say. On the positive side you will probably see a dip in CPU load. On the negative, your network host reachability logic is now shot since a host cannot be set to UNKNOWN in the case that a switch or router goes down.
Overall I'd say you should be fine, just do as much as you can to make those service checks act like their respective host checks (mostly just set up service dependencies).
Former Nagios employee
Re: host active_checks_enabled vs. scheduling checks
thanks for answer.
Are your assertions true when I have active_checks_enabled 0 but I have host check defined for my host objects?
I am asking because of this:
http://nagios.sourceforge.net/docs/3_0/ ... hecks.html
in other words:
Nagios would have the ability to check the host (check is added to the host object) but it is not actively used.
thanks for help and clarification.
klajosh
Are your assertions true when I have active_checks_enabled 0 but I have host check defined for my host objects?
I am asking because of this:
http://nagios.sourceforge.net/docs/3_0/ ... hecks.html
in other words:
Nagios would have the ability to check the host (check is added to the host object) but it is not actively used.
thanks for help and clarification.
klajosh
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: host active_checks_enabled vs. scheduling checks
Also note - on service failure and reachability logic upsets an on-demand check is issued. This logic will also break - although it sounds like you don't care.
Host Checks wrote: When Are Host Checks Performed?
Hosts are checked by the Nagios daemon:
At regular intervals, as defined by the check_interval and retry_interval options in your host definitions.
On-demand when a service associated with the host changes state.
On-demand as needed as part of the host reachability logic.
On-demand as needed for predictive host dependency checks.
Re: host active_checks_enabled vs. scheduling checks
jdalrymple, rather the opposite. I am asking for clarification because I do care.
So setting the active_checks_enabled 0 is not a good idea. Then what should I do to move the host checks to service checks but I want to keep these:
(the goal is to force nagios to focus only to service checks and I do not have to care host checks latency etc. etc.).
So setting the active_checks_enabled 0 is not a good idea. Then what should I do to move the host checks to service checks but I want to keep these:
- On-demand when a service associated with the host changes state.
On-demand as needed as part of the host reachability logic.
On-demand as needed for predictive host dependency checks.
(the goal is to force nagios to focus only to service checks and I do not have to care host checks latency etc. etc.).
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: host active_checks_enabled vs. scheduling checks
klajosh2 wrote:I need this since it is crucial in networking I use the performance data to see the RTT and packet loss as well.
You're going to have to be more clear to me about the actual goal. This seems conflicting and it makes it difficult to understand why you'd care to be rid of host checks at all. Note of course you can change your host check command:klajosh2 wrote:(the goal is to force nagios to focus only to service checks and I do not have to care host checks latency etc. etc.).
Object Definitions wrote:check_command: This directive is used to specify the short name of the command that should be used to check if the host is up or down. Typically, this command would try and ping the host to see if it is "alive". The command must return a status of OK (0) or Nagios will assume the host is down. 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. The maximum amount of time that the notification command can run is controlled by the host_check_timeout option.