This article was written for op5 Monitor 6.2 and it could work for later versions as well if nothing else is stated
Listing hosts is nice, but I want more
The default view of hosts (and other objects) are designed to give you a good overview, but can be tweaked to fit your workflow. Read on for some examples of why listviews are the best way to present data.
Start editing columns in your profile
We start by visiting the user page: click your name in the upper right corner of the screen. Now, you should edit the text field labelled Table Hosts under the Columns in listview heading.
Understanding what's possible
For every example here, copy the text and enter it to the Table Hosts field. Don't forget to save the changes by submitting the form for each change you do, then reload the Host Detail view to see the changes take effect.
Allright, let's get started right away with some examples:
That's not very useful, is it? You just replaced all the regular columns with a single one, the host's name. Let's go back a step:
Whenever you want to reset, just replace everything in the text area with default to get the original view back.
We will now try to define multiple columns:
Here we see that every column definition is separated by a comma (,), every column label is quoted ("Column") and the content of every column is on the right hand side of an equal sign (=). Don't forget to label every column. This is important enough to state again: Don't forget to label every column.
Let's continue by backtracing to default and adding links to every hostgroup our host is a member of
OK, that was useful, let's make each group name a link as well:
Good for you, you just modified a large part of the user interface by builtin tools in Monitor! Read on to discover the whole collection of helpful tools at your hands.
Complete guide to column definitions
Copy each of these examples into your GUI and see what effect you get out of it.
These are some heavier examples that were mentioned during talks at our Gothenburg office (come visit us):
Another example that has large impacts on how the information is made accessible:
This next example shows that you can out of the box modify Monitor without resorting to third party solutions. This is the target outcome, image found at nagios.org:
To get Monitor to display this image, this column definition should suffice:
Together with what you already learned, this should be enough for you to do some really fancy stuff to your interface.
Finding columns to display
You have already used columns such as name, state and plugin_output. The easiest way to find all other columns is by bringing up the graphical filter builder which is located in any listview: it's a filter icon located in the top right. Edit the filter to display
and anywhere outside the textarea. Now, click the dropdown that has the value of "name" - now you see all the columns available for hosts. This is what it looks like in the GUI:
The example above would exclude the alias column from listviews.
Using custom variables
If you want to list a custom variable, you could use the following example:
You define custom columns in the configuration interface:
With that information specified, the listview will now look like this:
Services, servicegroups, hostgroups
Until now, we've only worked with hosts and a host's properties. You can, however, continue to edit other object types such as services. We recommend you to read through this document again and replace "host" with "service" wherever you read it, but also keeping your newly acquired knowledge about filter columns in mind.
I need more help
Feel free to post questions to the mailinglist firstname.lastname@example.org (register first at http://lists.op5.com/mailman/listinfo/op5-users). That same mailinglist would like to hear about what you just pulled off thanks to listviews. Thanks for helping us making a better product!
Listview filter date function (GUI (Ninja))
Listviews (OP5 Monitor Documentation)
Filters (OP5 Monitor Documentation)
My account (OP5 Monitor Documentation)
Logger Interface (OP5 Monitor Documentation)