No check_interval for generic-host?


Hello everyone !

I’m facing problems with latency. We’ve got Nagios 3.2.0 and we’re monitoring almost 800 hosts, with one service for each.

I’m taking over the adminsitration of the Nagios server so I’m not fully aware of the choices of configuration that have been made, but I guess that so far, hosts and services are both pinged, which is useless for us, because we care only about the services.

To be sure of that, I ran nagios3stats with this result :

[code]Total Hosts: 758
Hosts Checked: 758
Hosts Scheduled: 758
Hosts Actively Checked: 758
Host Passively Checked: 0

Total Services: 843
Services Checked: 843
Services Scheduled: 843
Services Actively Checked: 843
Services Passively Checked: 0[/code]

So is it ok to say that hosts and services are both checked ?

I want to know how often the check hosts are done. The nagios3 -s command gives me :


Total hosts: 758
Total scheduled hosts: 758
Host inter-check delay method: SMART
Average host check interval: 300.00 sec
Host inter-check delay: 0.40 sec
Max host check spread: 30 min[/code]

So it seems here that hosts are checked every 5 min, right ?

The hosts definitions are using the generic-host template, but it seems there’s no check_interval defined :

[code]define host{
name generic-host ; The name of this host template
notifications_enabled 0 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
check_command check-host-alive

SR max_check_attempts 3

    max_check_attempts              3
    notification_interval           0
    notification_period             24x7
    notification_options            d,u,r
    contact_groups                  admins
    register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE![/code]

So where does Nagios take its value for the check_interval for the hosts ?

Thank you for any answer you would give me !


go to a service definition, see if it has a cehck period, if it hasn’t go and see what template it uses, it might be a template defined from another tmeplate. so using the first generic template isn’t enough.



Yes the service template has a check_interval, but this is for service checks. My question was about host check. In the template used by the check host, you see there’s no check_interval (and of course it’s not defined in the definition of the hosts).


sorry my fault :slight_smile:

By default you don’t need a check interval for hosts.
Hosts should be checked ONLY when a service fails (if say the http server works it is quite accpetable to presume the host is up without the need to check it).


So if the check host is done only when the service fails, then it’s on-demande check, right ?

In that case, how come I don’t see any on-demand host checks but only scheduled host check in the result of my nagios3stats ? I’m a bit lost.


if you never had a host failure it may be correct, but i don’t know the exact nagios internals so there might be a problem in the stats too :slight_smile: