From: Marc Powell <marc@en...> - 2003-12-16 22:22:11
> -----Original Message-----
> From: Jeff Rodriguez [mailto:jeff@...]
> Sent: Tuesday, December 16, 2003 3:01 PM
> To: nagios-devel@...;
> Subject: [Nagios-users] Why are host checks run from the main process?
> Does anyone have a patch to change it?
> We have 270 hosts in nagios right now with a total of 1184 service
> I've noticed an issue where the host checks are run from the main
> process. I'm not sure as to the reasoning behind this but it can cause
> problems galore.
> Since the main process does all the scheduling, having it do host
> seriously breaks things when several hosts are down.
This is intended behavior. Nagios must determine the status of the host
before it can determine if other hosts and services are down or
> Does anyone have a patch to set host checks to be done outside the
> scheduling process? Or any suggestions as to how I can alleviate the
> problems it causes?
7. Optimize host check commands. If you're checking host states using
the check_ping plugin you'll find that host checks will be performed
much faster if you break up the checks. Instead of specifying a
max_attempts value of 1 in the host definition and having the check_ping
plugin send 10 ICMP packets to the host, it would be much faster to set
the max_attempts value to 10 and only send out 1 ICMP packet each time.
This is due to the fact that Nagios can often determine the status of a
host after executing the plugin once, so you want to make the first
check as fast as possible. This method does have its pitfalls in some
situations (i.e. hosts that are slow to respond may be assumed to be
down), but I you'll see faster host checks if you use it. Another option
would be to use a faster plugin (i.e. check_fping) as the
host_check_command instead of check_ping.
No patch exists to change this behavior that I am aware of.