How to assign a service group to a host group.
Posted: Thu Jan 09, 2014 4:30 pm
Any help with my following question would be greatly appreciated.
I am trying to create a group of services that I hope to then assign to a group of hosts. I am not sure if I am going down the correct path by doing the following:
Create a service template that contains a service group as well as a host group
Now I define a host group and a service group each with a few members with the same name as the ones mentioned in the template above.
At this point I am confused, because when I go to define my services, it requires me to declare a host_name within it.
How can I declare my service without giving it a specific host to apply itself to?
Since I have already made it a member of servicegroup web-services will it apply itself to the hostgroup web-servers?
Let me know if this question makes sense or you need more clarification.
I am trying to create a group of services that I hope to then assign to a group of hosts. I am not sure if I am going down the correct path by doing the following:
Create a service template that contains a service group as well as a host group
Code: Select all
define service {
name generic-web-service
servicegroup web-services
hostgroup_name web-servers
.
.
.
register 0
}
Code: Select all
# my host group
define hostgroup {
hostgroup_name web-servers
alias Web Servers
members webserver1,webserver2,webserver3
}
# my service group
define servicegroup {
servicegroup_name web-services
alias Web services
members service1,service2,service3
}
Code: Select all
define service {
use generic-web-service
host_name ??
service_descriptioin Service 1
check_command check_service1!70!90
}
Since I have already made it a member of servicegroup web-services will it apply itself to the hostgroup web-servers?
Let me know if this question makes sense or you need more clarification.