In the previous section, we discussed adding custom URLs and introduced shortcuts to a screen section. Now it's time to go deep into screens. Screens are easy to generate and very intuitive to handle. Basically, a screen is a page that can display multiple Zabbix elements, such as graphs, maps, and text. One of the main differences between screens and maps is that in maps, you can place a lot of elements, but you can't, for instance, add a graph or the trigger status. They have two different targets. The screen can group all the elements that are common into a particular kind of server to have a complete picture of the situation.
To create a screen, you need to navigate to Configuration | Screen | Create. A form will appear, asking for the screen name and the initial size in terms of columns and rows. After this step, you need to come back inside the screen that you just created.
In this part of the configuration, you will probably notice that there isn't a Save button. This is because screens are saved automatically every time that you complete an action, such as adding a graph. The screen appears similar to a table (basically, it is a table), as shown in the following screenshot:
Now, if you need more rows or columns, you only need to click on the + sign where you want to add fields as rows or as columns.
On a screen, you can add the following kinds of elements:
hostgroup
All those sources have two common configuration parameters—the column span and the row span. With the column span, you can extend a cell to a certain number of columns. With the row span, you can extend a cell for a certain number of rows. For instance, in a table of two columns, if you indicate a column span of two, the cell will be centered in the table and will be widened with exactly two fields. This is useful to add a header to your screen.
Once you have inserted and configured your elements on the screen, you can move them using drag and drop, and all your settings will be preserved.
Most of the elements are not dynamic, which means that they will not be dynamically applied to all your hosts in a group.
Zabbix provides dynamic elements that are really useful:
The dynamic item Graph prototypes are based on custom graph prototypes created in low-level discovery (LLD) rules. Practically the Simple graph prototype is based on item prototypes in low-level discovery. While monitoring, the screen cell will display a graph created from an LLD-generated item. Please note that if the item is not generated, nothing will be displayed.
Also, starting with Zabbix 2.4, the URLs are now dynamic items. To properly support this new functionality, now we can use several macros in the URL field: {HOST.CONN}
, {HOST.DNS}
, {HOST.ID}
, {HOST.IP}
, {HOST.HOST}
, {HOST.NAME}
, and {$MACRO}
user macro. These macros are quite useful, and we can do a lot with them, generating dynamic URLs to retrieve data from an external source.
Dynamic items can be identified by checking the following option:
Now, for instance, you can add a map in your screen and some dynamic elements, such as graphs. When you add a dynamic element at the top of the screen, you will have a bar with some listboxes that will help you to change the target of your dynamic elements, as shown in the following screenshot:
An example of a screen that mixes dynamic elements and standard elements is shown in the following screenshot:
Obviously, when you choose and host this, it will affect only the dynamic graphs. You can switch between your two hosts and change the x axis. This will update all the dynamic elements on the same time base, making it easy to relate elements between them.