Page 1 of 1

template for Nagios host group

Posted: Tue Feb 20, 2018 5:56 am
by anusha
Hi Team,

I am trying to add check_period for one hostgroup but I am getting error and unable to add it. Can someone please let me know the procedure for it.

hostgroup.cfg

define hostgroup {

hostgroup_name XXX
alias XXX
members XXX,YYY,ZZZZ
check_period multiple-time-slots
notification_period multiple-time-slots

}

Re: template for Nagios host group

Posted: Tue Feb 20, 2018 3:55 pm
by mcapra
That is not a valid directive for hostgroup definitions.

There's a few alternatives off the top of my head. You could define a check_period in a template and apply that to your corresponding hosts. Or apply your services to a hostgroup and let the common check_period propagate across your hosts' services that way.

Re: template for Nagios host group

Posted: Tue Feb 20, 2018 5:18 pm
by tmcdonald
Thanks for the assist, @mcapra!

This is correct - hostgroups are used for just that, grouping hosts. If you are looking at applying the same settings to multiple objects, look into templates.