Chage params for several services assigned to hostgroup

Hello!
I have a lot of services assigned to hostgroups. How can I change, say, notification/check period for these services for only some hosts but not for entire hostgroup?

define two different templates and assign them :slight_smile:

nagios.sourceforge.net/docs/3_0/ … tance.html

Templates for what? And how to use them?
I have
hostgroup1: h1, h2, h3, h4, h5
service1 -> hostgroup1
I need to change notification_period for service1 on h3 and on h4. ( :!: not for host notification, but for service notification)
How to use templates and accomplish this?

If you already use hostgroups it shouldn’t be too difficult, and reading the docs i linked would be a good starting point :slight_smile:

OK, ok. I’ve red all this documents and the only reason I’m asking for help here is that I didn’t managed to find answer to my question in documents.
Could you provide me with short example how to accomplish that?
Yepp, I have hostgroup with many hosts. I have a service which belongs to this group. I have several hosts for which I want to change service settings. If I’ll change my service then it will affect service on all hosts of this group. AFAIK I can’t change settings for service in host definition.
So I’m waiting for more detailed explanation of your idea.

Thanks!

can’0t access my server now… but something like this should work

define service {
name template1
nortification_period 1
register 0
}

define service {
name template2
nortification_period 2
register 0
}

in the services which need notification period 2 put the line
use template2

in the others put use template1

when you need to change the timings you can change the timing only in the template.

*Check for correct definitons in the docs, i’m going from memory here.

I suspect you didn’t understood my question properly. Please read once more. I don’t have two services. I have only one service assigned to hostgroup. This hostgroup includes several dozens of hosts. I don’t want to create service for each host but instead create one and attach it to hostgroup. Do you understand this approach now?

you can’t have a single service with a single definiiton with different parameters on different hosts.
you need to associate each host with a service template.

For people who also need a solution for a problem like mine:
you can use:[code]
define service{
use template
hostname !h3,!h4
hostgroup_name hostgroup1
service_description service1
check_command ckeck_load!3,2,1!4,3,2
}

define service{
use template
hostname h3,h4
service_description service1
check_command ckeck_load!3,2,1!4,3,2
check_period workhours
}
[/code]