Ep. 9: Working with Hosts and Service Groups

Note: All the videos on our website offered in the German language have English subtitles and transcripts, as given below.

[0:00:00] Welcome back to the Checkmk-Channel! Today we're looking at host and service groups.
[0:00:15] Host and service groups are in themselves very simple. You can simply combine any hosts and even services into groups, name these, and helped by their relatively clearly-arranged structure, can then access the groups in the operation.
[0:00:26] I'm now going to show you how this is done.
[0:00:31] For the administration of the groups there is a separate configuration module. This is called 'Host & Service Groups'.
[0:00:38] Please do not be surprised when the option takes you to 'Host Groups' – because the 'service groups' are hiding behind this button.
[0:00:45] That means I can switch over here.
[0:00:50] Here again is the 'Host Groups' button – so I can toggle backwards and forwards between these two panels.
[0:00:52] Let's start with a host group. The first step is to select 'Create new host group'.
[0:00:58] Now, for example, I create the group 'Production systems‘, and name it 'prod' as the internal ID, and then save it.
[0:01:14] Next I’ll create a second group and call it 'test’, and so these are my 'Test systems'. Relatively simple.
[0:01:21] You also need to know that a host can be in can be any number of groups.
[0:01:25] In this example, a host will of course always be either in the production or test system group.
[0:01:29] But a host would also be allowed to be in multiple groups.
[0:01:32] So, now the question is - how to assign a host to a group?
[0:01:36] Well, we're in Checkmk, so of course we're going to go via rules.
[0:01:40] There is a suitable rule for this. If I go to 'Rules' , I come straight to this rule, and it is called 'Assignment of host to host groups'.
[0:01:49] We have already explained this principle in our trilogy covering the rules.
[0:01:55] I'm just going to create my rule and say – here the options are the selection of test or production systems, and conveniently enough, I already have a 'Host tag' for it.
[0:02:04] This is what I use, and I simply say, if the 'Criticality' is a test system, then it will go into the 'Test Systems' Group.
[0:02:18] This is of course a very simplified example when I say that I have a tag which corresponds exactly to one host group.
[0:02:23] In practice, this can be of any complexity, and therefore the groups also make sense as an extension to the 'Host tags'.
[0:02:30] I am now saving here.
[0:02:33] Now I'm going to create a second rule for the 'production systems' by specifying 'condition' is 'criticality‘, and 'Production system‘ – and then it goes into the Production systems group.
[0:02:52] So, let's take a look at both rules. Conditions – 'Test system', group 'Test systems', 'Production system' group ’Production systems'.
[0:03:00] If I now activate the change, I will have just assigned the hosts to one of the groups, and can view them in the monitoring.
[0:03:10] You will find the fastest access to the groups in the 'Views' under 'Host Groups‘, with the 'Host Groups (Summary)' view.
[0:03:17] And there you can now see that we have a host group 'prod', 'Production systems', and that it has seven hosts – six of which are up, and one is down. And here is also an overview of the services – so a very concentrated view.
[0:03:38] Now where is the group 'Test systems'?
[0:03:42] Yes, the group 'Test systems' is empty in this case because apparently not a single host has fulfilled the conditions for the 'Test systems'.
[0:03:50] So you can see, that in order for a group to exist, not only do you have to create it, but it must also contain hosts.
[0:03:58] Well, that's no problem. Let's simply give a few hosts the tag 'test' so that the 'Test Systems' group will be filled, and accordingly it will also be displayed here.
[0:04:06] To do that, I simply go back into my host administration, to my servers, activate the checkboxes, and specify that the Database servers 3 and 4 should be ’Test systems'.
[0:04:21] 'Edit'. I specify 'Criticality' explicitly as Test system for both hosts.
[0:04:30] I save the whole thing, and activate the changes.
[0:04:40] If I now go back to my Group overview, you'll see that we now have a group called 'Test Systems' with two hosts.
[0:04:43] 'Production systems' has four active of five hosts, because one is down. So you see how easy it is to divide the hosts into groups.
[0:04:53] I can do the same with the services.
[0:05:00] There are also corresponding service groups.
[0:05:02] Let's go back in and set up a service group.
[0:05:07] For this I go back to my 'Host & Service Groups'.
[0:05:10] Now I choose the 'Service Groups' button and create a new service group.
[0:05:16] I will call this group simply 'CPU', and then assign all services that have anything have to do with CPU usage to it.
[0:05:28] Again, here is the Rules button.
[0:05:34] Now I'm going to create a rule that specifies that it doesn't matter which hosts are involved.
[0:05:39] I simply say that if the service's name begins with 'CPU', then it should go into this service group.
[0:05:47] The service groups are in fact cross-host – that is also their advantage.
[0:05:50] So, I activate the changes, and go into my view of the service groups, into the Summary, and now see, that in the service group 'CPU' there are ten services.
[0:06:07] Now in the group I can always click on the name and then come to a view of all of the services in this group, or the hosts in this host group.
[0:06:16] This allows me to have very clear overviews, and as we will see in the the next episode, via the 'Quicksearch' function also search for host and service groups.
[0:06:29] So, with the Host and Service Groups you can you can do a lot more in monitoring.
[0:06:33] But that's it for today. I hope it was interesting for you, and we’ll meet again in the next episode .

Want to know more about Checkmk? Join us for our Introduction to Checkmk Webinar

Register now

More Checkmk Videos