Ep. 11: View creation and customization in Checkmk

To load this YouTube video you are required to accept advertising cookies.

[0:00:00] Welcome back to the Checkmk channel. And in this episode, we're looking at creating and editing views in Checkmk.
[0:00:16] So we have just logged into our internal monitoring system here at tribe29, here you see the main dashboard. But what I want to edit is the view that you get when you search for a service. So lets for example search for CPU loads.


Now here you see an overview of each hostname and the service grouped together but what I want to make is one table where all where each row is a surface and then I want to add another column with the hostname so that makes it a bit more clear and less cluttered.
[0:00:55] So what we do now is we go to display and then click on customize view. Okay, let me collapse this.
[0:01:09] Okay, here under grouping you see how all the search results are grouped. So they are grouped by hostname and instance. So Checkmk site and we can remove that simply by clicking on the x for each item. And then go to save and go to view.
[0:01:33] As you can see all services are now listed in one table. But the only problem now is that you cannot see to which host each service belongs to.
[0:01:45] So what we want to do now is go again to display and Customize view. And then we go to columns and here we're going to add a new column. So at the bottom the button 'Add column', and then we're going to search for the item we want to add as a column.
[0:02:05] So in this case 'Hostname'. So here 'Hostname > Edit'. Okay so now once again go to Save and go to View. Now you see that there is a new column here on the right side with the hostname. 
[0:02:25] But it would be better if we can put it next to the state or between the state and the service name. So let's customize it again. Here you see at each item you see this icon where you can drag a column to a new sorting order.
[0:02:46] So we want it as the second item here as always save and go to view. And now you see the hostname is now the second item in the row. If we now search for something else so for example disk.
[0:03:06] You will see that all service views are now one table and have this hostname column added. And you might wonder if this view is only available to you? The answer is: Well you can configure that yourself. So if you go to display and customize view again and then in the general properties section and you see this last checkbox 'Make this view available to other users', if you check it and save it then other people can use this view if they want to.
[0:03:34] If you don't do that then only you have access to this view. Rather than editing an existing view it's of course way more interesting to build your own view completely from scratch.
[0:03:45] And what I want to show you next is how you can build quite an interesting view namely one that shows multiple services from a single host in one row. Let me show you exactly what I mean with this. So this time we go to the customize menu on the left and then we go to views.
[0:04:06] Here you see an overview of all views available in Checkmk, at the top you see your own customized views. So this is the one we just created, 'searchsvc'and this ID is important because if there are multiple IDs or views with the same ID, Checkmk will show you your own custom view instead of to built-in one. So at the top your own customized views and then you see views created by other people other users and then a long list of all the built-in views that come with Checkmk by default.
[0:04:41] But you also see this icon here on the left this lets you clone an existing view and then customize it for yourself. But what we want to do is we want to create our own view from scratch and for that we click on 'Add view', the first thing we need to do is set a data source and you can compare this with a table in a database. So in practice you most often use all hosts or all services.
[0:05:09] We want to create an overview of host so we pick all hosts. And press 'Continue', this step we can skip for now, we press 'Continue' again and then here under 'General Properties', we can set the ID. So I'm going to give it an ID of performance_view.
[0:05:35] And then the title, the title you'll see on the on the view itself and you will also see it in the snap-in if you have added to the sidebar so here in the snap-in and my name will be again Performance view.
[0:05:56] Next, we can set a topic and this determines where in the snap-in it will be placed. So I will pick other for now. Now the last thing we need to do we need to add a minimum of one column otherwise it would be a completely empty view. So let's add a column and let's do again the hostname.
[0:06:21] Okay looks good, now press Save and go to list and now it should appear in the snap-in. So here you see 'Other' and then performance_view, the view that we just created.
[0:06:33] So let's have a look at what we did. And as you can see we now created a view with all hosts listed in a car and a table but let's make it a bit more interesting and add a few more columns, so once again go to Display and Customize view.
[0:06:52] As promised we are going to create a view of host that includes service information, that might sound easy but there is a little trick to it because we have to configure which surface we want to show.
[0:07:05] Okay so we want to add a column so let's press 'Add column' and then you see here you have an option to pick a 'Joined column' and a 'Joined column' is basically like a database query where you would join two tables or the information of two tables together.
[0:07:23] Now now we need to type in the service we want to show or join and we will do CPU load. And it's important that you type it correctly, and this is also case sensitive so make sure that you type it in correctly otherwise it will be an empty column.
[0:07:43] Now how do we want to show the data we want to show it as a 'Perf-O-Meter'. And that will show the CPU load in a bar graph. And next you can also give it a title if you don't give it a title or explicitly set a title then it will inherit the name of the service so in this case it would be CPU load or just call it load and then press 'Save & go to view'.
[0:08:18] Here you can now see our new column on the right side, the CPU load. Of course, you can only see it for the hosts that actually have a service called CPU load. Now let's add a few more columns.
[0:08:32] Customize view again. Again add column, And another Joined column. But this time the service will be CPU utilization. And we'll again show it as a Perf-O-Meter. And the title will be util.
[0:08:59] Our next service should tell us something about the memory that's being used on the system. So again 'Joined column' and service will be 'Memory'. Once again the Perf-O-Meter.
[0:09:14] And the title will leave empty so it will inherit the name of the service, so Memory. Let's press Save & go to view. And as you can see we have quite interesting view now where for each host we can see the CPU utilization, loads and the memory that's being used. Now the CPU load that tells you how many active processors that are currently running on the system and the utilization and that's the percentage of available computing time that's currently being used.
[0:09:50] You can also sort this table by simply clicking on the column header now you'll see that it's sorted from low to high so all this host without a CPU load service will show first. But you can also sort it in reverse order simply by clicking the column header again.
[0:10:10] That was it for this episode I hope you learned something, if so please subscribe to our channel and like the video. See you in the next episode.

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

Register now

More Checkmk Videos