Let’s imagine you fancy a walk in a park. You look out of the window – it’s a lovely sunny day, the skies are clear, birds are flying high… So you dress up and head to the park. Halfway to the park the wind starts to blow, the sky becomes overcast.

At this point you start to regret that you have not taken an umbrella with you. You have to turn around and get back home as fast as you can, but at this point you have already no chance to stay dry… Where have you missed your step? You did not check the weather forecast before you left!

Integrated in Zabbix 3.0

In Zabbix 3.0 we have introduced the trend prediction functionality. It takes into account how your infrastructure has behaved over time and tries to forecast how it is going to behave in the future. Triggers can be set up to fire for the moment when something will go wrong and the full power of alerts, notifications and remote commands can be deployed as countermeasures to prevent anything from going wrong.

Behind the Scenes of Trend Prediction

Here is how it works. You choose an item and specify an interval to use for analysis. Zabbix does some maths to find the best fit and extrapolate it to the specified moment in the future, giving you back the result of calculation.

As the time goes by, the interval shifts making new data available and Zabbix recalculates the forecast. Since the forecasting result is needed now, Zabbix associates it with the current time moment, but to visualize forecasting results properly they should be shifted forward to the moment they actually refer to. This magic can be done using calculated items:


A situation where trend prediction functionality will be handy is free disk space monitoring.

Setting up a trigger to alert you when you have 1 GB or 10% of free disk space left does not work very well because disk can fill up at different rates. You will always get notifications either way too early or too late. The expression below will give you one hour to add more storage or free up some space on the disk:

{host:vfs.fs.size[/,free].timeleft(30m,,0)} < 1h

Moreover, you can specify 0 as a threshold which will work for disk of all different sizes!

In fact, for tricky situations Zabbix provides all trend line options of your favorite spreadsheet editor.

Clear View Into the Future

Weather forecasting saves us from the need to carry umbrellas when there is really no need for them and from the risk of getting wet and cold when there is a chance of rain.

Zabbix trend prediction is what ensures that services run smoothly and thus downtime is critically reduced when an upcoming problem is spotted in time and prevented, bringing more enjoyment and appreciation in your business.

Read more about the new features introduced in Zabbix 3.0 on the What’s New page, and learn more about forecasting at Predictive trigger functions & Supported trigger functions sections on our web site.

Get also acquainted with Encryption feature in our next blog post.

This article is available in Russian, on habrahabr.ru.