Templated screens

The screens we have configured so far are global screens—they can contain lots of different elements, are available in the Monitoring | Screens section, and, if some elements are set to be dynamic, we can choose any other host in the drop-down to see its data. Zabbix also offers another way to configure and use screens: templated screens, also known as host screens. These are configured on a template and are then available for all the hosts that are linked to that template. Let's create a simple screen: navigate to Configuration | Templates and click on Screens next to C_Template_Linux. Then, click on the Create screen button. In the Name field, enter Templated screen, and click on Add. As with global screens, click on Constructor in the Actions column. So far, the configuration has been pretty much the same. Now, click on the Change link in the only cell, and expand the Resource drop-down. The list of available resources is much smaller than it was in the global screens. Let's compare those lists.

The global screen resources are as follows:

The templated screen resources are as follows:

As can be seen, global screens offer 19 different types of elements, while templated screens offer only 7.

For our screen right now, leave the Resource drop-down at Graph and click on Select next to the Graph field. Notice how the current template is selected and cannot be changed—all elements added to a templated screen must come from the same template.

In the popup, perform the following steps:

  1. Click on CPU load & traffic in the Name column, and then click on Add.
  2. Click on the + icon in the upper-right corner to add another column, and click on the Change link in the rightmost cell.
  3. In the Resource drop-down, choose Simple graph, click on Select next to the Item field, and then click on CPU Load in the Name column.
  4. Click on the Add button.
  5. Navigate to Configuration | Hosts and take a look at the available columns for each host. There is no column for screens. Templated or host screens are only configured on the template level; they do not get a copy on the host whereas items, triggers, and other entities do.

Let's go to Monitoring | Screens. If we look at the screen list there, the screen we just configured cannot be found. Templated or host screens can only be accessed from the host pop-up menu in the following locations:

  • Monitoring | Dashboard (in the Problems widget)
  • Monitoring | Problems (if hosts are in problem state)
  • Monitoring | Overview (if hosts are in the leftmost column)
  • Monitoring | Latest data (if filtering by the Host field isn't done)
  • Monitoring | Maps

They are also available from these two pages:

  • Global search results
  • The host inventory page

Let's move on to Monitoring | Maps: click on Host group elements in the Name column. In the map, click on either A test host or Another host. This time, the Host screens entry in the menu is enabled—click on that one:

The screen we configured earlier opens, showing the data from this specific host:

If we had multiple screens configured in this template, they would be available in the drop-down in the upper-right corner. Remember that these screens will only be available for hosts that are linked to this template.

One thing to notice on this screen is the difference in height for both graphs. When configuring the screen, we did not change the height value, and it was the same for both graphs, 100. Unfortunately, that's not the height of the whole graph, but only of the graph wall area. As a result, if you have different item counts, a trigger or a percentile line will result in a different graph height. For a screen, this means a tedious configuration to get the dimensions to match. The same also applies to width—there, having one or two Y-axis values will result in a different graph width.

If the legend is disabled for a custom graph, the height will not vary based on item count. There is currently no way to show the legend for a custom graph when it is displayed on its own and hide it when the custom graph is included in a screen.

Should we use a templated or global screen? Several factors will affect that decision:

  • The availability of the elements (global screens have many more)
  • Navigation (Monitoring | Screens versus the popup menus)
  • Which and how many hosts need such a screen
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.109.151