In this recipe, we will show you how to build some nice looking graphs from the data that we have gathered from our items.
For this recipe, we need a Zabbix installation and an agent installed on the Zabbix server or another host that we can use. We also need admin rights in Zabbix to be able to create our graph.
system.cpu.load[percpu,avg1]
. If you don't know how to do this, have look at Chapter 4, Passive agents or Active agents.CPU load
.Normal
, Stacked
, Pie
, or Exploded
. Normal
is with lines, Stacked
is layers above each other and Pie
/ Exploded
is a representation in a pie form. Exploded
is almost exactly the same except that it shows the individual segments of the pie in an exploded view.Calculated
, Fixed
, or Item
. When choosing Calculated
those will be calculated by Zabbix. Fixed
will set a fixed min or max value. This can't be done for pie
and exploded pie
. When we choose X, it will be the last value of the selected item.pie
or exploded pie
, we also have the option 3D view which will create a 3D view of our pie.avg
, max
, and min
. This will show us the average minimum or maximum values.Left
to Right
.For every item in Zabbix, we can create a graph. For this, we should select the item that the graph should check. We can select more then one item from the item box. Another great feature is that we can mix different items in one graph, example. CPU load
, Memory usage
, Disk I/O
, and so on. This way we could, for instance, see the impact of memory usage on other parts of our system.
We can make use of macros in map names but have to do it a bit differently. We have to add it with this syntax: {host:key.function(param)}
. In our case, it would look like this, CPU load {{HOST.HOST}:system.cpu.load[percpu,avg1].last(0)}
. This example would return a header such as: CPU load 0.5
.
Also Zabbix supports some graphs out of the box. That means if you add a Zabbix template to your host, it will probably already contain some graphs.
Since Zabbix 2.4, there is support for ad hoc graphs on several items. When you go to monitor latest data you will have the option Graph behind most of the items. By clicking on this link, you will see a graph built by Zabbix for this item.
https://www.zabbix.com/documentation/2.4/manual/appendix/macros/supported_by_location