📜 ⬆️ ⬇️

Zabbix 3.0: Problem Prediction

In a large review article, we briefly talked about the main features of Zabbix 3.0. Now we want to bring to your attention a series of mini-reviews of new features of Zabbix 3.0, let's start with the prediction of problems .

Why do we watch the weather forecast? So that on a sunny day, it would seem, having chosen the park, not to be caught off guard in the pouring rain. Accurate weather forecast helps us take countermeasures: take an umbrella, a raincoat, or even go to the cinema instead of a park.

The new version of Zabbix has added the ability to also make predictions in order to find out if there will be a storm on the network or in the server rack, and when this may happen.
')

How it works in Zabbix

Zabbix looks at the history of the collected data and predicts how events will develop in the future. Then the triggers can be configured to trigger even before the onset of a future problem with the subsequent launch of such actions as responsible notifications or automatic launch of scripts, remote commands.


Forecast visualization

To visualize the prediction on the chart, you select a data element (for example, the amount of free space on the hard disk) and create a new calculated data element (let's call it 30m linear forecast) based on it using the forecast function. Specify the time interval in the past, which is used for statistical analysis (for example, 30 minutes) and indicate how far to build the forecast (for example, 30 minutes). Then Zabbix does the calculation, finds the best option and returns it to you:
forecast(host:item,30m,,30m) 

The only problem is that the forecast will be displayed on the graph not in the future, and the forecast value will be tied to the time when it was calculated. To see the forecast on the graph in the future, use another computed data element (let's call it 30m linear forecast shifted), which will simply shift the forecast value 30 minutes ahead using the timeshift feature available for all functions:
 last(host:item_forecast,#1,30m) 







Use in triggers

The ability to predict can be useful when monitoring free disk space.
A trigger with a simple threshold of 1GB or 10% does not take into account one very serious nuance - the disks can be filled with completely different speeds. Therefore, it will either work too early, or (worse) too late, when we are at zero.
A trigger using the timeleft statistic will give us 1 hour to clean or expand the disk:
 {host:vfs.fs.size[/,free].timeleft(30m,,0)} < 1h 
And it will work for all discs, regardless of their size.

In addition, for complex cases, Zabbix offers a choice of trend line functions that you could use in a familiar tabular processor:



Clearly look to the future



Accurate weather forecast saves us from having to carry an umbrella when it is simply not needed, and from getting wet when it is likely that it will rain.
The prediction functions in Zabbix will help the infrastructure to work with as few disruptions as possible, and the services to remain available. After all, to prevent future problems is easier than already accomplished.

Translation of an article from our blog.

Source: https://habr.com/ru/post/277473/


All Articles