
John Hayes
Observability Advocate, SquaredUp

Transform raw infrastructure metrics into high-impact, real-time dashboards
Zabbix is one of the most popular open source monitoring platforms in the world, with first class capabilities for monitoring networks and infrastructure at scale. It also boasts a rich ecosystem of adapters and plugins for collecting telemetry from thousands of device types.
The scale and complexity of many Zabbix installations makes effective dashboarding a must. While Zabbix is excellent for backend server monitoring, its data becomes even more powerful when combined with the rest of your tool stack. SquaredUp allows you to go straight to the source to get your data without the overhead of data ingestion or duplication. We have recently overhauled our Zabbix data source. In this article we’ll walk you through using its new, streamlined logic to visualise your infrastructure metrics.
To get started, just add a new dashboard tile and then add the Zabbix data source. To configure the data source, you just need to enter the URL of your Zabbix instance and your Zabbix API key:

Once you click on the Test and Add button, the SquaredUp integration engine automatically maps data streams and constructs an object graph. Once this process is complete you will see that two out-of-the-box dashboards have been created.
The first is a summary, which provides you with an overview of some critical system metrics such as top 10 hosts by CPU utilization. There is also a Hosts dashboard, where you can drill down by selecting a particular host from a dropdown list. This will provide properties such as host status as well as key metrics such as CPU and disk space utilization.

In SquaredUp, data streams are our way of organising backend API data into logical groupings. The Zabbix data source ships with the following three streams:
The Metrics data stream is a raw time series of metric data points which represent a relatively recent time frame at high granularity — such as minutes or even seconds. To maintain efficiency, most providers aggregate aging data — swapping high granularity for long-term trend analysis. These are the types of metrics provided by the Trend data stream. The Properties stream is used primarily for indicating the status of a particular host.
Let’s have a look at how we can create a dashboard like the one below for tracking metrics and properties relating to our important infrastructure resources:

First, we will create a new dashboard and select the Zabbix data source. Then we will select the Metrics data stream:

Next, we can select one or more objects. For this visualisation we are just interested in the uptime of the Zabbix server – so we will select just that one object:

Now we can go ahead and select our metric. The metrics drop down list does actually support multi-select – so you can easily create a single visualisation showing different metrics series. We are just interested in a single metric – System uptime:

Zabbix returns the value for uptime as the total number of seconds since the system started – which is not particularly meaningful. In SquaredUp we can easily use JavaScript expressions to create a custom format. Just click on Columns> Add > Custom. You can now configure the column. You can either use Basic formatting, which allows you to define properties such as the number of decimal places and the separator to use, or you can go fully into custom mode. We are going to hit the custom option and then enter our JavaScript expression:
{{ var a = Math.floor($['value']/86400); var b = Math.floor($['value'] % 86400/3600); a + ' d ' + b + ' h' }}
This will convert the raw value for seconds into a rounded value for days and hours:

Next, we want to track the health of our servers. For this we will create a new tile, but this time, select the Properties data stream. This will produce a table like the one below:

This is useful but it is not visually impactful. With a few tweaks we can generate a Block view like the one below, so that we can easily identify any unhealthy instances:

To do this we will add a State column, which the Block visualization can map to. Again, we will click on the Columns option and then Add > Custom. This time select State as the column type. The Block visualization renders either red or green depending on whether the value of a State field is ‘success’ or ‘error’. The properties data stream returns values of ‘enabled’ or ‘disabled’, so we can just enter a simple JavaScript statement to do the mapping for us:

Next, we can add a Monitor – this enables us to ‘roll up’ the health state to a Workspace or even an organisation wide dashboard, so that other teams can gain visibility of the status of critical infrastructure.
If we switch on the Monitoring toggle you can see that the Monitor will automatically detect our Server state field and recognise that we have at least one device in an unhealthy state:

The SquaredUp Zabbix data source supports a large number of raw and aggregated metrics for tracking the state of your infrastructure. SquaredUp is also a powerful enterprise platform packed with features to enable you to collaborate across teams as well as creating notifications, automated reporting and sharing dashboards with stakeholders.
If you don’t have an account, you can get started with our Free Forever tier and see how you can take your Zabbix dashboards to the next level.