The most important task performed by Checkmk’s user interface is displaying the current status of hosts and services. This is achieved largely with tabular views. In order for the daily operations to run as efficiently as possible, these tabular views offer numerous functions, and they can be customised to meet your requirements.
We distinguish between global views and those that require a context. Global views can always be directly called up. An example of a global view is the list of all current service problems. A context view – the Status of Host ... view for example – namely needs to specify by name the host whose status is to be displayed. Such views can only be called-up in situations relevant to a particular host.
The global view is most easily accessed via the Tactical Overview and Views. In the tactical overview each number is clickable and takes you to a global view that individually lists the hosts or services counted in each case.
In the Views element all global views are accessible – grouped according to theme. In addition you will find a few entries that aren’t actually Views – such as for example, the Dashboards, which are sorted under the Overview theme. Dashboards can however contain views.
From a global view, with a further step you can access the details for a particular host or service. On the one hand, the names of hosts and services and the individual cells in other columns are clickable for more detailed views:
On the other hand, at the top of views that relate to a specific host or service you can find a row of buttons that can be opened with . These buttons then open further views with the same context – meaning those from the same host or service.
Another way to the detailed view is via the quicksearch snapin in the sidebar:
Which view you receive will depend on the result of the search. If the search identifies a host explicitly, you will reach this host's Services of host ... page directly. There you will again find the buttons for the other views of this same host. A click on the host's name takes you to the view Status of Host.
2. Using views
2.1. Options, filters and commands
|Opens the dialogue with the filters. With this
you can further limit the displayed data. As soon as you set a filter the symbol on
changes so that it is clear that under certain circumstances not all
data will be will be displayed.
Conversely, some views already have predefined filters, (e.g. the list of all problems). Here, by removing the filters you can also have more data displayed.
Changes to filters are not saved, rather they are reset when you quit the view.
|Opens the display options, with which you can, e.g., define the time data format (relative or absolute). Which options are available depends on what is appropriate for the information displayed in the view.|
|Here you can execute commands to the object shown (e.g., entering scheduled downtimes). The commands are described in detail in their own article.|
|With this you switch checkboxes on or off. With the checkboxes you can restrict the commands to selected data sets.|
|This ‘thumbwheel’ can be turned by clicking on it or with the mouse wheel. It defines the number of columns for the selected view. Views with multiple columns allow the space available on wider monitors to be exploited. For views that only display a single data set this setting has no effect.|
|This ‘thumbwheel’ defines the view’s refresh interval. You can also disable the automatic refreshing. Be aware that in this case it is possible that you will not be informed of problems that occur in the meantime!|
2.2. Time and Date
Checkmk shows time stamps as relative values in all of the views of states if these are less than 24 hours in the past or future – e.g., 16 hours. You can switch to absolute time values if you change the time stamp format option to absolute.
The tabular views can be sorted by clicking on the column heading. A column has three states that can be selected in a loop of multiple clicks:
- sorted in ascending order
- sorted in descending order
- column unsorted
Views are initially sorted ‘naturally’ according to how the view is defined. In service lists the sorting is alphabetic by service name – with the exception of Check_MK services that are always at the top. The Check_MK service is responsible for managing the monitoring agent. There are also Check_MK Discovery and Check_MK HW/SW Inventory services. In order to sort such a list by the current state of the services a click on STATE will suffice.
Sorting by the Perf-O-Meter column sometimes produces surprising results. This is due to the graphic display of the values being partly a percentaged summarisation of the actual values. The sorting is however performed according to absolute values, and is always based on the first metric produced by a service.
Data displayed in a view can be exported in several formats:
|Only Enterprise Editions: The PDF-export button is found in the view’s heading – possibly hidden behind . With this the so-called Instant-Report is produced. This is a sort of ‘snap’ report with only a single element. Its layout can be customised with special templates in the report module.|
|CSV||The symbol for CSV-export is found at the foot of the page. A semicolon is used as a separator. The individual cells are enclosed in quotes. The first line contains the internal abreviations for each column. Some of the columns cannot be meaningfully converted into CSV format. One example is the Icons. These columns will be included in the CSV data but will nevertheless be empty.|
|JSON||Because a JSON-Export is generally used for automatic scripts it has no symbol. You produce the export by entering &output_format=json in the view’s URL field. You can test this simply by first exiting the frameset with the sidebar, and by only displaying the frame with the view. This is done with, e.g., the symbol at the end of the page. You can then extend the URL in the browser.|
|Python||Exporting as a Python data structure is like JSON, in which you enter output_format=python for the format. This is particularly practical if you wish to continue processing the data directly in a Python script.|
2.5. The display limit
In a larger monitoring environment displaying all views is no longer practical. When you are monitoring 50,000 services and select the All Services view, not only will the display require a very long time – it will also not be very useful.
In such situations, in order to protect the user from long waiting times and to avoid crippling the system with absurd quantities of data, views are limited to 1000 entries in their display. Exceeding this limit produces the following warning:
As you can see, the records being displayed are not necessarily the first 1000 corresponding to the selected sorting method! There is a technical reason for this: namely that the limit is applied to the data source in the connected instance’s monitoring cores. This is very important, because if we accumulate one million data records from your environment spread around the world, then 99.9% of the data will be deleted immediately. The sorting takes place from the end of the list, thus it happens after the limit. The data from all instances must, after all, be sorted together.
If you really want to see more than one thousand records, then you can reach the next level by clicking on Repeat query and allow more results. Here the limit is 5,000 records. If this limit has again been exceeded, with unlimited you can continue. Insofar this is a potentially risky action, you will require Administrator rights. You have been warned!
You can define both levels in the WATO ➳ Global Settings under User interface:
3. Customising views
3.1. The basics
- General items such as title, theme, etc.
- Which data source to be displayed (e.g. hosts, services, events on the event console, etc.)?
- Which selection of records is to be displayed (filtering)?
- Which columns will be displayed?
- Which other views are linked to the text in the columns?
- What is the standard sorting method?
- Is there a grouping, and if so, how does it look?
- Where and for which user should the view be visible?
- Which style of table layout should be used?
The edit mode for views can be reached in two ways:
- From an active view via the button (which is possibly hidden behind ).
- From the sidebar element Views via the button. Here you can create completely new views with , or customise existing ones with :
3.2. Clone first – then modify
The views supplied as standard are a part of the software and as such cannot be changed, however Checkmk does recognise the concept of cloning. When a view is first customised (regardless if by using or via the list) a copy of that view is created automatically. This copy is added to your user profile.
This copy can then be customised as desired. The original view is retained but is ‘greyed-out’ – overlaid by your version in effect. You can return to the standard view later by simply deleting your clone (achieved in the table of views, as you might expect, with ).
This concept has one further advantage: namely, that you can define whether the view should be changed for all users or just for yourself. This is specified in the view’s General Properties with the checkbox Make this view available for all users. Not surprisingly, you can only select this checkbox if you have administrator permissions (or more correctly, this function has its own permission – Publish views). Additionally, single views can be locked in the role definitions.
What happens when a view is customised and published by several users? Each user then has their own variant of the view. Which view will be visible for which user(s)? This can be determined with the following rules:
- When a user creates a view for themself, this always has priority for him/her.
- After this are views that have been customised and published by an administrator (to be precise, someone with the Modify builtin views permission).
- If there are none here, then those views apply that another normal user with the Publish Views permission has published.
- And when there is also nothing here then the supplied version will be visible.
How can you create a real copy of a view, so that when done you can have both the supplied and your own views? This is defined by using Unique ID in the General Properties. Simply give your view a new name, so that it will no longer be identified as a clone of the supplied view, rather it will begin its own life.
The ID is the decisive keyword for opening views in the URL. The schema is very simple. Here for example is how the global view with its ID allhosts is opened:
The concept with cloning, customising and visibility can be found at many other locations in Checkmk, namely in:
3.3. Integrating a view into the sidebar
How and if a view will be shown in the sidebar’s Views element, is defined by the following characteristics under General Properties:
- Title – the item’s name
- Topic – the view will be sorted under this topic. You can also define other topics.
- Hide this view from the sidebar – this view will not appear in the sidebar
3.4. Context button for a view
A Context Button only makes sense for views with a context. An example is the button which is linked to the host view (and which will always be shown when a host is known). This is defined in the view’s characteristics:
- The view has a context, namely Show information of single... host.
- has been selected as the Icon for the button.
- The Button Text has been set as services.
- The checkbox Do not show a context button to this view is deactivated.
3.5. Basic layout
The next block – View Properties – defines the view’s general appearance:
The Number of Columns setting is the default for the counter for specifying the number of columns. Similarly, Automatic page reload is the default for the display refresh counter.
Under Basic Layout there are various styles for displaying the data in tables. Most views use table – a normal table that can be sorted by columns -- or Single data set - which has the legend on the left and which is mostly used for single data sets. You can however also use single data set for views with more than one object. The All Hosts view looks something like this when altered to Single data set:
3.6. Columns and grouping
The Columns box defines which columns you wish to see. The number of columns possible selection depends on the selected data source. The most columns are found in services, naturally, as all information for the particular service is available. The list can be quite long here, and if you are uncertain which column is the right one, there is only one thing to do – try it out:
The Link field offers a selection of all views. If a view is selected here, then the column’s respective cell is clickable and takes the the user to the chosen view. This really only makes sense if the targetted view has a context. The best example is the All Hosts view. The Hostname column is clickable here and takes the user to this host’s Services of host. As of Checkmk 1.6.0 the hostname painter can be configured to colorize the hostname's background depending on its current state.
Under Tooltip, on the other hand, you will find a list of all columns. Thus you can show further information for the host or service, when the user moves the mouse cursor over the respective cell (the IP-address in this example).
3.7. Information for services in a host view
Let’s imagine that you’d like to display the information for particular services in a table of hosts. The following example illustrates this situation very well: here the current uptime, the CPU load, the memory usage and the NTP-synchronisation are shown for each host:
Here a table of hosts has been generated in which for each host the Perf-O-Meter service column for four different services is displayed. One sees that for one of the three hosts the CPU load and the Memory services do not exist and that the column is consequently empty.
This view’s configuration was achieved by adding columns of the Joined column type. Here the column for services in which Perf-O-Meter has been selected appears under Column. The Title entry defines the column's heading. The service’s exact name is entered (upper and lower case sensitive!) in the Of Service field:
Naturally such a display is only useful if the view shows a list of similar hosts which also all utilise the selected services. That is also the reason why Checkmk does not provide views of this type – which columns are meaningful here depends entirely on the type of host selected. For Linux servers the information of interest is certainly completely different to that for USVs, for example.
The sorting of a view is configured in the the fourth block. It’s only a matter of the predefined sorting method. Users can – as described above – determine the sorting order themselves with a click on the column heading. In the view’s configuration however you have more possibilities – you can define a multi-step sorting order, e.g. first by service-status, and for the same status by service name. The order so determined is retained as a subordinate sorting when the user resorts in a specific column.
Through grouping you divide a table into several segments – in which each segment’s data is related in some way. The best example of this is the Service problems view, which is simply reached via the Tactical overview. As you can see, this table is grouped with Service status (first all CRIT, then UNKNOWN, then WARN):
The grouping in a view is configured similarly to the columns. Simply define which column the grouping should relate to. It is usually only one, but can be more. All records with the same value for all selected columns will then be displayed in a group – and the column heading will be shown as the group title.
It is important that you also sort the records by priority according to the group’s selected characteristic! Otherwise it can be possible that the same group makes multiple appearances (which may at times be desirable). Incidentally, a resorting by column performed by a user has no effect on the grouping – in such a case only the group’s sequence is determined and the records sorted within the group. The groups themselves are unchanged.
3.10. Filters, contexts and searches
An important aspect of views is the data selection. Which hosts or services should be displayed in a table? Checkmk uses the Filter concept for this purpose. Here are a couple of examples of host-filters:
Every filter can be defined with search terms or other criteria by a user, thus reducing the list of results to those records meeting the criteria. In this way the filters are AND-linked. The filter criteria actually used for a view are assembled from three sources:
- Filters with criteria defined as standard for the view
- Filters set interactively by the user with in the view
- Filters that can be set with variables via the URL
The filters you assemble by editing in the view’s context/search filters box have two functions. Firstly, you decide which filter will be available to a user with a click on . Secondly, you can predefine filters with criteria, thus limiting the data to be displayed in the view (point 1 above).
If you create or edit a view with context – instead of the filter for the relevant object only an optional entry field appears. In this an exact comparison always applies (upper and lower case sensitive). As an example we can take the host view, which displays all services of a specified host. The host’s name will be added through a context to the view. You can also build a display in which the diplayed host is effectively hard-coded directly in the view:
3.11. Special search views
The supplied as standard Host search and Service search (and others) views behave in a special way in relation to the filters. When you you select one of these views, it opens with a filter formula, and then only shows hosts and services when this filter is activated.
Why? It would simply be very impractical if you first had to go to All services, and then be forced to wait until several thousand services are displayed before you could filter the result with a search entry. This behaviour is regulated by the Show data only on search option:
4. Creating new views
4.1. Data source
The data source is what you might call a table or database view in databases. Checkmk does not use SQL-Data bases, but it is similarly-structured internally. In most cases you will be correct with All services or All hosts. There are however a few data sources that should be listed briefly:
|Host and service groups, various||see below|
|Alert Statistics||status statistics|
|BI, various||Business Intelligence|
|Event Console, host and service events||Event Console|
|Inventory, various||inventory items|
|The Logfile||Livestatus data|
Host and service groups
The data sources Hostgroups and Servicegroups – per line – provide the information about the group itself – accordingly there are no filters for individual hosts or services. An example of this data source is the standard Host groups (Summary) view. In distributed environments the data sources Hostgroups, merged and Servicegroups, merged do exactly the same.
However, if you want information about individual hosts, just grouped by host groups, you can use Hosts grouped by host groups. Here each host is listed once for each group it belongs to, as seen in the default view Host groups. In the world of databases one would speak here of a Join of the Hosts table with the Hostgroups table.
You can proceed in the same way with services: Services grouped by host groups corresponds to a Join of the Services table with the Hostgroups, and Services grouped by service groups accordingly with the Servicegroups table.
4.2. Object type – global or with context
Here it can be decided whether your new view should have a context or if it will be a global view. The selections available to you depend on the data source. The most common context by far is ‘Host’. The image above appears after selecting the All services data source.
Checking the Show information of a single host box defines that the new view describes one specific host. Thus you have created the basis for a view that is not globally-visible, but instead visible via a link:
- For a host view with a context button (possibly hidden behind )
- As a link in a column (see above, e.g., click on a host name in a view)
There are two options for the Service context type. If you select only Show information of a single service, you can build a view that displays all services with the same name on different hosts. If it should be a specific service for a single host, then check the Show information of a single host box.
5. The matrix
When you specify the Matrix layout in one of your views you will probably see strange things at first, and ask yourself what is going on. The matrix is certainly not intuitive on first viewing, but you can achieve good things with it.
In the supplied standard views there is one that utilises this layout – and that is Metrics ➳ Search peformance data. The following image shows how I searched for the CPU|Memory|Filesystem service printout in this view in my test system:
The result is a neat table of my hosts, in which all of the service’s metrics are listed adjacent. Not all hosts have the same services, so some of the fields are simply empty:
The result at first looks very similar to that described somewhat earlier Information for services in a host view. There are a couple of significant differences however:
- The list of services is dynamic and has no fixed configuration.
- Here the hosts are the columns – not the lines.
- With the matrix you can do much more.
When you look at the view’s definition you can see how it is constructed:
- Matrix is specified in Basic layout.
- The Hostname is specified as the only column in Grouping.
- In Columns the Service description and the Service Perf-O-Meter are specified.
The rule for the matrix layout is:
- The Grouping columns are used as headings for the vertical columns.
- The first normal column on the left provides the titles for the lines.
- All further normal columns are shown in the cells.
If you, e.g., wish to display more information about the host, simply add more columns in the Grouping section. Thus the table from above will look like this when you insert the Host icons and WATO folder – just folder name columns:
Further normal columns then land directly in the cells. The following example shows (abreviated) the matrix with the additional Output of check plugin column:
5.1. Recognising outliers
Why do some cells have a coloured background? This alerts you to values lying outside the majority. This is actually not so meaningful for measurement data, but there are, for example, users with a specially-constructed matrix who can tell at a glance if an incorrect contact group has been entered for certain hosts or services!
6. Alarm sounds
A view can sound an alarm tone over the browser if at least one problem appears in the table (a host that is not UP, or a service that is not OK). This primitive type of alarm is, e.g., interesting for control centres where there is always a list of problems on a screen that the operator doesn’t want to be continuously staring at.
The alarm sounds are deactivated by default. You can switch them on with the Global settings ➳ User interface ➳ Enable sounds in views global switch. As always the search field helps here:
Sounds will not be heard in all views, rather only in those for which sounds are activated in View Properties:
7. Embedding views in external websites
Since every view is accessible via a URL you can also embed these in other websites, for example, via an <iframe>. A number of elements in a view however make no sense or are even distracting in such a context. In a case like this you can attach a display_options=... variable to the URL, via which you can precisely control which component of the view should be generated in HTML code.
Every component is coded with a letter. If you use lower case letters the denoted element will be deactivated and all those remaining will be created (effectively an ‘opt-out’). With capital letters this situation is reversed: here with capitals you nominate only the elements to be created (‘opt-in’). A mixture of upper and lower cases makes no sense.
The following letters have been defined:
|On||Off||What will be displayed?|
|H||h||HTML headers and footers including the <HTML>, <HEAD> and <BODY> tags|
|T||t||Title line with a heading and the logged-in users|
|B||b||Context buttons that link to other views|
|F||f||Buttons that open the filter|
|C||c||Buttons that open the Command box, and likewise icons for executing commands|
|O||o||The setting-wheels for the number of columns and for screen-refresh|
|D||d||The button for a display’s options|
|E||e||The button for editing the view|
|Z||z||The footer in which refresh: 30s will appear|
|S||s||The playing of alarm sounds for the WARN and CRIT service states|
|I||i||Links to other views|
|X||x||All other links|
|M||m||With this option links are assigned the main HTML-frame as their target. Checkmk itself uses this when embedding views in dashboards.|
|L||l||Links in column headings|
|W||w||Limit and live status error messages|
For example – if you want to switch off all control elements and buttons and only display the actual table, a link on the allhosts view will look like this:
8. Adding your own icons and actions
In views of hosts and services you will also see a column for icons, and in this the Action menu icon with which you can select host or service actions. You can also add your own icons to views. These can be used simply for visualization, or your own actions can be assigned to them.
For example, hosts with a graphic web interface can be quickly identified using such an individual icon and can also be controlled directly via a link.
The procedure for adding your own icons and actions is divided into three steps:
- Upload the icons
- Define the icons/actions
- Assign the icons to hosts/services
Start with WATO ➳ Custom Icons and upload a local file with a maximum size of 80x80 pixels. The icon is now in the system, but is not yet in use.
Now you have to define the icon as an object that can be addressed via rules, and optionally, an associated action. You can find the settings under WATO ➳ Global Settings ➳ User Interface ➳ Custom icons and actions. Create a new entry here using Add new element, and define ID, Icon and a title; The title will later be displayed as a tool tip directly on the icon via on-mouse-over-effect, and is therefore indispensable for users.
Now it gets interesting with the point Action. Action is equivalent to a URL, and for this you can use some variables like $HOSTNAME$ or $SERVICEDESC$ (service-description) – you can get further information from the online help. A valid action would be, for example, view.py?host=$HOSTNAME$&site=mysite&view_name=host, which is simply the standard host view for the respective host on the mysite page calls.
With a check mark at Show in column you can then display the icon as an independent icon next to , otherwise your action will end up in this action menu.
In the last step, you now determine which hosts or services the new icon is to be displayed for – specifying these using rules of course. You can find the two rules Custom icons or actions for hosts in status GUI and Custom icons or actions for services in status GUI under WATO ➳ Host & Service Parameters ➳ User Interface. Create a new rule in the desired folder and set at least two options in it. First select the icon just created under Custom icons or actions for hosts in status GUI, then as usual, filter in the Conditions area for the desired hosts/services. Finally, save and confirm the changes.
In host and service views you will now be able to see your new icon next to or in the action menu for the filtered hosts and services.