Servicegroups ignore services assigned via hostgroups
Posted: Fri Sep 09, 2016 1:04 pm
I never really got why servicegroups exist, since they don't seem to do much except for reporting. Be that as it may, in our XI 5.2.9 customer demo box, we wanted to showcase how easy things are to add in the future. So this is what we did:
Create a hostgroup called "Cars" into which we put the hosts Ford, Chevy, and Lexus. Then we created a service check called "check_gas_tank" with the config name of "Car Stuff" and assigned it to the Cars hostgroup. So far, so good, all the hosts are checking their gas. So then we create a service check called "check_emissions" and do the same thing. Then another called "check_inspection" and another called "check_tires" and another called "check_oil" and do the same thing. Yay. In the future, if we get a new car, like a Hyundai, we can add it to the Cars host group and everything is groovy.
But now we want to make a service group so we can do capacity planning reports on the things that are consumable. Namely, gas and oil. So we go to the CCM, go to make a service group called "Consumables" and then try to put in the check_gas and check_oil service checks, but woah, Nellie! They don't show up in the list. In fact, no service checks show up if they're assigned to hostgroups. They only show up if they are assigned to specific hosts.
Therefore, this breaks the "all you need to do is add a new host to the Cars group and everything is groovy" bit, since you can't just do that and have the service group pick up the new host.
I think it would be better, and more intuitive, if the servicegroup parsed the final host:service definitions, and allowed you to add each service on each host (or maybe the entire service check without specifying a host, specifically). That would be useful.
Create a hostgroup called "Cars" into which we put the hosts Ford, Chevy, and Lexus. Then we created a service check called "check_gas_tank" with the config name of "Car Stuff" and assigned it to the Cars hostgroup. So far, so good, all the hosts are checking their gas. So then we create a service check called "check_emissions" and do the same thing. Then another called "check_inspection" and another called "check_tires" and another called "check_oil" and do the same thing. Yay. In the future, if we get a new car, like a Hyundai, we can add it to the Cars host group and everything is groovy.
But now we want to make a service group so we can do capacity planning reports on the things that are consumable. Namely, gas and oil. So we go to the CCM, go to make a service group called "Consumables" and then try to put in the check_gas and check_oil service checks, but woah, Nellie! They don't show up in the list. In fact, no service checks show up if they're assigned to hostgroups. They only show up if they are assigned to specific hosts.
Therefore, this breaks the "all you need to do is add a new host to the Cars group and everything is groovy" bit, since you can't just do that and have the service group pick up the new host.
I think it would be better, and more intuitive, if the servicegroup parsed the final host:service definitions, and allowed you to add each service on each host (or maybe the entire service check without specifying a host, specifically). That would be useful.