In Zabbix, “trends” are a type of data storage representing aggregated historical data. Zabbix monitors and collects a vast amount of data from various sources, which can quickly become large and cumbersome to manage and analyze. To efficiently handle this, Zabbix uses two primary types of historical data storage: History and Trends.
The primary purpose of Trends is to reduce storage requirements and improve the performance of long-term data analysis and visualization. By storing trends, Zabbix allows users to maintain historical performance and status information over extended periods (months or even years) without overwhelming the database with detailed history records.
The message “Zabbix server: More than 75% used in the trends cache” from your Zabbix monitoring system indicates that the trends cache size is nearing or exceeding its configured maximum limit, which can impact performance.
This issue arises when the trends cache, which stores trend data before it is written to the database, fills up due to high data input rates or insufficient flushing.
As you can see in the graph below, the trends cache is reaching its maximum value, which is currently 4 MB.
How to fix high trends cache usage on the Zabbix server
After SSH into the Zabbix server, open the Zabbix configuration file with your favorite editor, like the Nano editor. You can typically find it in /etc/zabbix/zabbix_server.conf
sudo nano /etc/zabbix/zabbix_server.conf
Find the parameter TrendsCacheSize.
Change the size of Trends Cache to a greater value than the current one. In this case, I’m changing the value from 4 MB to 64 MB.
To apply the new TrendsCache size, you have to restart the zabbix-server service. Type the following command:
sudo systemctl restart zabbix-server
As you can see in the Trends Cache Usage graph below, after I restarted the server, the problem no longer exists.
As an extra precaution, you can view the graph of all of your Zabbix server caches, like the Configuration Cache, where we had a similar issue before, in the Zabbix Server Health Dashboard.
By taking these steps, you should manage the trends cache usage more effectively and keep your Zabbix server running smoothly.