We use cookies to ensure that we give you the best experience on our website.  Visit our Privacy Policy to learn more. If you continue to use this site, we will assume that you are okay with it.

Your choices regarding cookies on this site.
Your preferences have been updated.
In order for the changes to take effect completely please clear your browser cookies and cache. Then reload the page.

View creation and customization in Checkmk

[0:00:02] The main task of the user interface of Checkmk is to display the current status of hosts and services. This is mostly done in tabular views, which are called "Views" in the English interface. And today I will show you how to adjust such views, and how you can even create completely custom views for yourself. And as usual, we will do this with our own monitoring system from tribe29.
[0:00:34] I’ve just logged-in to our own monitoring, and you can see the main dashboard as always. What I want to customize now is the view, that you get when you are in Quicksearch looking for a service. So, if I for example search for CPU Load, I get the following view. For every hit I see a text line, above this I always see the instance, and the hostname, and here the single service is listed.
[0:01:00] I think the whole thing is a bit confusing and because of that I now want to do the following: for one, I want to remove these subheadings, so that I get a nice table, and then I want to insert the host name into the table.
[0:01:12] I’m just going to go to the "Edit View" button. You see here now a whole bunch of boxes, most of which we don't need. That's why first I'm simply going to close them. I just close all the boxes.
[0:01:26] So, as I said, the first thing I want to do is to remove these headings and the headings belong to a grouping.
[0:01:33] The entries are namely grouped by host. That is, if the search finds several things on one host, then the items for that host are grouped together.
[0:01:42] I remove the grouping by host name, and also that for the instance. Simply click the trash at each entry. I save this down here and we'll try it out again, and as you can see, I now have a nice table here.
[0:01:59] Now, of course, there is a disadvantage: I can no longer see which host it is on. So now what I have to do is insert the hostname here as a new column. To do this, I simply go to "Edit View" again, and now I need the "Columns" box – meaning the columns that are to be displayed in this view.
[0:02:23] The whole thing is admittedly a bit confusing now, but if you look closely, it's not really a problem. For example, I see here in the first column the "Service state", in the second column the "Service description", in other words the name of the service in question, and so on. At the bottom of the list you will find the "Add column" button.
[0:02:44] If I click here, a new column will be added at the end. I can select it here. There are a lot of different columns, so I'll use the search field and just search for "hostname" - in one word - and right away I find the first entry here.
[0:03:01] There are still options to color the hostname, depending on its state - I don't want that now. What I will do is to just save it for now and we can see that we now have a new column with the host name in the far right and I would like to have the column here between "State" and "Service" according to the order.
[0:03:23] Now I'll go for the third time to "Edit View". We know this game by now. Now I'll go back to my columns - with each column you will find this small symbol for moving it. So now, I'll grab this column and drag it up. Now it's a bit tricky to drag the item while scrolling the list with the mouse wheel until I am in the second position. I want it right after the service state and before the service name. Now, of course, don't forget to save it. As always, use the button that's right at the end. I save and now have the exact the view that I wanted.
[0:03:59] I have here the state, host name, service name and so on. If you want, you can - of course - adjust the view further. For example, you can just remove a column you don't want or add more columns.
[0:04:11] You could try it out with another search. For example, let's search for "disk" and as you can see, all the results from that search for services are now formatted with this new view.
[0:04:28] Now you will probably be wondering whether these changes apply for all Checkmk users or only for yourself. The answer is that you can set it yourself, so now we go back to the "Edit View", for the fourth time to close the "Columns" and open the "General Properties". There you will find a number of checkboxes from where you can choose, for example, "Make this view available for other users".
[0:04:56] When you check this box, all users will get the search view that you have customised, and if you don't do this, it will simply have made a change for yourself.
[0:05:07] Much more interesting than adapting views is, of course, to create your own new views completely. And now I want to show you how you can build a very interesting view, namely one that creates a table of hosts that shows information for several different services from this hosts.
[0:05:21] I'll show you exactly what I mean by that. This time I'm going in a completely different way. Namely, in the Views snap-in you will find a button at the bottom right called "Edit". I'm going to click on that now. What you now see here is a list of all views, starting with the views that you have made or adapted yourself.
[0:05:44] Here you can see the one we just did, namely the "Service search" with the ID "searchsvc". The ID is important because two views with the same ID will overlap each other. For example, if there is a built-in view with the same name "searchsvc" and you make yours with the same ID, then in any case yours will be the one that is actually used. So, you see your own, those from other users - there are already quite a few, because we have this system in production - and below you see a very long list of built-in views. With the built-in views, with this icon you can make a copy of the view, and in the duplicate make changes for yourself - in effect, to get the same result that we got earlier with the Service-Search.
[0:06:29] Now we want to do something completely different. We want to create a completely new view and we do that with the "New" button. A mask will open which you didn't get with the editing of existing views, namely the selection of the data source. The data source is something like a table in a database. You will almost always only need the "All hosts" or "All services" table. I said we want to make a host view, so I will choose "All hosts", and go to "Continue". I'll just skip the next step and then come back to "General Properties".
[0:07:07] The first thing we need for our view is an unique ID, that is an ID that ideally has no View already in the system. For example, I will choose "myperformance" as an ID. The title - this will be displayed in the view itself, and again here in the View snap-in. You can decide for yourself where this is sorted into the snap-in, namely via the topic. For example, I will just choose the topic "My Views". That doesn't exist yet, but the moment I choose it, a new topic will appear here.
[0:07:45] The only thing that I absolutely need now is at least one column and, as we have seen, this can be done with "Add column" in the columns box and here I simply select - Column - again the host name. Simply "hostname" and I'll save the whole thing.
[0:08:08] Try it out - the views snap-in is simple, and as promised, a new topic appears in the Views snap-in. This means "My Views" and the view is called "Performance", so I will have a look at it. And surprise: I get a list of all my hosts.
[0:08:22] So now that we, of course, have some interesting information, we go back to "Edit View" and see what columns we can add. What I want to do now is what I promised you earlier. Namely a view of hosts that includes information from services.
[0:08:41] This sounds very simple at first, but there is a little trick behind it, because I need to specify which service is actually involved.
[0:08:49] Such columns are special columns, which is why there is a selection for "Column", and in that is a second option, "Joined column".
[0:08:57] Similarly to a database request, the tables of hosts and services are linked together here. For this I have to specify which service I am referring to, which service I would like to link, and here I choose, for example, "CPU load". It is important here that you use the exact correct spelling lower and uppercase are distinguished, so it just has to be correct here, otherwise the link will not work and the column will simply be empty. So, and now I can again choose what I actually want to know about the service. And here there is a very odd column called Perf-O-Meter, which shows you the values for the CPU load in a bar graph. You can give the column a title here. If I don't enter one, it will simply be called "CPU load". To save space I just call it "Load".
[0:09:51] I save this so that you can see what a nice thing we now have. As you can see, we have received an additional column "Load" which lists the CPU load for each host. But of course only from those hosts that also have this service.
[0:10:08] For now it doesn't matter to me that here there are some where this is not relevant. I will just keep going now. I'll go to "Edit View" and add two more columns in exactly the same way. I again select "Add column" and "Joined column". This time enter CPU utilization with 'z' of course, not with 'y'. Here again choose "Service: Perf-O-Meter" and call it simply "Util" and the third column should show me something about memory usage, namely the service "Memory used" and again the Perf-O-Meter, title simply "Memory". Save and you will see a very interesting overview of where I can see the current load, the utilization and the memory usage for each host.
[0:11:09] By the way, here you can also see - if anyone cares - that the load and CPU utilization are both values, that say something about the CPU load. The load is always the number of currently active processes, and the utilization is the percentage of available computing time, which is being consumed by processing.
[0:11:33] I can now also sort the columns, I can say that I sort by "Load". However, it sorts in ascending order, so that I don't see anything at firsts, so the interesting bit is at the bottom. If you again click on "Load", the sorting is reversed and you will see a very, very nice view, of which hosts are currently being processed.
[0:11:52] I would be excited to see what kind of views you will build, and, of course, am looking forward to see you again in the next episode on the Checkmk Channel.
Want to know more about Checkmk? Join us for our Introduction to Checkmk Webinar
Register now