Including discovered graphs in screens

When we configure screens with normal graphs, we just choose the graph that should be included in the screen. With LLD-generated graphs, it becomes more complicated—we never know for sure how many graphs could be there for each host. Luckily, Zabbix allows us to include LLD-generated graphs in a way that automatically figures out the number of discovered entities.

To try this feature out, execute the following steps:

  1. Go to Monitoring | Screens, go to the list of screens, and click on Constructor next to Local servers.
  2. Click on the + icon in the lower-left corner to add another row here, and then click on Change in the lower-left cell.
  3. In the Resource drop-down, select Graph prototype.
  4. Click on Select next to the Graph prototype field.
  5. In the popup, choose Linux servers in the Group drop-down and A test host in the Host drop-down, and then click on Traffic on {#IFNAME} in the Name column.
  6. In the Width field, enter 400.
  7. Click on Add.

Notice how this cell does not seem that useful in the screen configuration—no data is displayed, and the title just says Traffic on {#IFNAME}. Let's check this screen in the monitoring view and see whether it's any better.

Depending on the number of network interfaces your system had, the lower-left corner of the screen will have a different number of graphs. If there's only one interface (excluding lo), the screen will look decent. If there are more, all of them will be displayed, but they will be stuffed in a single cell, making the screen layout less appealing:

We did not set Dynamic item for this screen element. When the host selection is changed in the monitoring section, these graphs always show data for A test host. We discussed screen configuration in more detail in Chapter 9, Visualizing Data with Screens and Slideshows.

To improve this, return to the constructor of the Local servers screen and click on the Change link in the lower-left corner. Change Column span to 2. Our screen has two columns, so the network interface graphs will now use full screen width. Additionally, take a look at the Max columns field—by default, it is set to 3. If your system had three or more network interfaces discovered, the graphs would take the width of three columns, not two, breaking the screen layout again. Let's set it to 2. When done, click on Update, and then check the screen in the monitoring view again:

This looks better now; the network traffic graphs take full screen width, and any further traffic graphs will be placed underneath in two columns. This was a custom graph prototype that we added. Now, let's see how this works for simple graphs by following these steps:

  1. Open the constructor of the Local servers screen again and click on the + icon in the lower-left corner.
  2. Click on the Change link in the lower-left table cell and select Simple graph prototype in the Resource drop-down.
  3. Then, click on Select next to the Item prototype field.
  4. Choose Linux servers in the Group drop-down and A test host in the Host drop-down, and then click on Free space on {#FSNAME} in the Name column.
  5. Set both Max columns and Column span to 2 again, and click on Add.
  6. Check this screen in the monitoring view. All of the discovered filesystems should be shown in this screen, below the network traffic graphs.

This works the same way in templated screens (also known as host screens), except that we may only select item and graph prototypes from a single template:

..................Content has been hidden....................

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