Page 1 of 1

Check host only when services are critical?

Posted: Tue Aug 30, 2016 5:46 pm
by nthaler
Hi!

We are moving to XI and in our Core 3 and 2 instances host checks only happen when there are no services on a host or all the services associated with a host are critical. The people who set that up are no longer with us but I would like to replicate it in XI. How can I do that?

Re: Check host only when services are critical?

Posted: Tue Aug 30, 2016 6:31 pm
by Box293
Can you post host config files of both examples so we can determine what is going on.

Re: Check host only when services are critical?

Posted: Wed Aug 31, 2016 3:08 pm
by nthaler
Sure.

Config of Host template from xi.

define host {
name host
check_command check-host-alive!!!!!!!!
max_check_attempts 3
check_interval 0
active_checks_enabled 0
check_period 24x7
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contacts setup
notification_interval 10
notification_period 24x7
notification_options d,u,r,
notifications_enabled 1
register 0

}

Config of Host template from Core 3.

define host {
name host
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
check_command check-host-alive
check_interval 0
max_check_attempts 3
notification_interval 10
notification_period 24x7
notification_options d,u,r
contact_groups admins
register 0
}

Generic host template from Core 2.

define host {
name generic-host
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
check_command check-host-alive
max_check_attempts 3
notification_interval 10
notification_period 24x7
notification_options d,u,r
contact_groups highwire-notify
register 0
}

Re: Check host only when services are critical?

Posted: Wed Aug 31, 2016 3:40 pm
by ssax
Please post your check-host-alive command definition and attach the plugin if it differs from this:

Code: Select all

define command {
       command_name                             check-host-alive
       command_line                             $USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
Also, please post your nagios.cfg and a service definition so that we can see if you have event handlers setup on the old ones.

Thank you