Hello I've a Zabbix Server v.6.2.1 running on Ubuntu 20.04. The old data came from an older installation so a migration of the Maria DB has been done.
Everything seems to works as expected except the trends data. Graphs are empty If I show data older than 2 days.
As declared by the official documentation:
I ran some checks on DB trends_uint table (both clock and itemid last ordered row);
MariaDB [zabbix]> SELECT * From trends_uint order by itemid DESC LIMIT 1;
+--------+------------+-----+-----------+-----------+-----------+
| itemid | clock | num | value_min | value_avg | value_max |
+--------+------------+-----+-----------+-----------+-----------+
| 88516 | 1660723200 | 8 | 0 | 0 | 0 | -> Wednesday, August 17, 2022 10:00:00 AM GMT+02:00 DST
+--------+------------+-----+-----------+-----------+-----------+
1 row in set (0.002 sec)
MariaDB [zabbix]> SELECT * From trends_uint order by clock DESC LIMIT 1;
+--------+------------+-----+-----------+-----------+-----------+
| itemid | clock | num | value_min | value_avg | value_max |
+--------+------------+-----+-----------+-----------+-----------+
| 23271 | 1660737600 | 2 | 0 | 0 | 0 | -> Wednesday, August 17, 2022 2:00:00 PM GMT+02:00 DST
+--------+------------+-----+-----------+-----------+-----------+
1 row in set (23.580 sec)
Wednesday, August 17, 2022 was the time of lasts check of migrated data.
I also have another freshly Zabbix Server 6.2.1 with no data migration. This one update trend tables as expected:
MariaDB [zabbix]> SELECT * From trends_uint order by itemid DESC LIMIT 1;
+--------+------------+-----+-----------+-----------+-----------+
| itemid | clock | num | value_min | value_avg | value_max |
+--------+------------+-----+-----------+-----------+-----------+
| 39509 | 1662044400 | 3 | 1856 | 11730 | 24448 | -> Thursday, September 1, 2022 5:00:00 PM GMT+02:00 DST
+--------+------------+-----+-----------+-----------+-----------+
1 row in set (0.001 sec)
MariaDB [zabbix]> SELECT * From trends_uint order by clock DESC LIMIT 1;
+--------+------------+-----+-----------+-----------+-----------+
| itemid | clock | num | value_min | value_avg | value_max |
+--------+------------+-----+-----------+-----------+-----------+
| 23271 | 1662530400 | 60 | 0 | 0 | 0 | -> Wednesday, September 7, 2022 8:00:00 AM GMT+02:00 DST
+--------+------------+-----+-----------+-----------+-----------+
1 row in set (1.037 sec)
What's wrong on the first Zabbix ? Which kind of debug can I do in order to solve the issue?
Thanks in advance
Everything seems to works as expected except the trends data. Graphs are empty If I show data older than 2 days.
As declared by the official documentation:
Zabbix server accumulates trend data in runtime in the trend cache, as the data flows in. Server flushes previous hour trends of every item into the database (where frontend can find them) in these situations:
To see trends on a graph you need to wait at least to the beginning of the next hour (if item is updated frequently) and at most to the end of the next hour (if item is updated rarely), which is 2 hours maximum.
When server flushes trend cache and there are already trends in the database for this hour (for example, server has been restarted mid-hour), server needs to use update statements instead of simple inserts. Therefore on a bigger installation if restart is needed it is desirable to stop server in the end of one hour and start in the beginning of the next hour to avoid trend data overlap.
History tables do not participate in trend generation in any way.
- server receives the first current hour value of the item
- 5 or less minutes of the current hour left and still no current hour values of the item
- server stops
To see trends on a graph you need to wait at least to the beginning of the next hour (if item is updated frequently) and at most to the end of the next hour (if item is updated rarely), which is 2 hours maximum.
When server flushes trend cache and there are already trends in the database for this hour (for example, server has been restarted mid-hour), server needs to use update statements instead of simple inserts. Therefore on a bigger installation if restart is needed it is desirable to stop server in the end of one hour and start in the beginning of the next hour to avoid trend data overlap.
History tables do not participate in trend generation in any way.
MariaDB [zabbix]> SELECT * From trends_uint order by itemid DESC LIMIT 1;
+--------+------------+-----+-----------+-----------+-----------+
| itemid | clock | num | value_min | value_avg | value_max |
+--------+------------+-----+-----------+-----------+-----------+
| 88516 | 1660723200 | 8 | 0 | 0 | 0 | -> Wednesday, August 17, 2022 10:00:00 AM GMT+02:00 DST
+--------+------------+-----+-----------+-----------+-----------+
1 row in set (0.002 sec)
MariaDB [zabbix]> SELECT * From trends_uint order by clock DESC LIMIT 1;
+--------+------------+-----+-----------+-----------+-----------+
| itemid | clock | num | value_min | value_avg | value_max |
+--------+------------+-----+-----------+-----------+-----------+
| 23271 | 1660737600 | 2 | 0 | 0 | 0 | -> Wednesday, August 17, 2022 2:00:00 PM GMT+02:00 DST
+--------+------------+-----+-----------+-----------+-----------+
1 row in set (23.580 sec)
Wednesday, August 17, 2022 was the time of lasts check of migrated data.
I also have another freshly Zabbix Server 6.2.1 with no data migration. This one update trend tables as expected:
MariaDB [zabbix]> SELECT * From trends_uint order by itemid DESC LIMIT 1;
+--------+------------+-----+-----------+-----------+-----------+
| itemid | clock | num | value_min | value_avg | value_max |
+--------+------------+-----+-----------+-----------+-----------+
| 39509 | 1662044400 | 3 | 1856 | 11730 | 24448 | -> Thursday, September 1, 2022 5:00:00 PM GMT+02:00 DST
+--------+------------+-----+-----------+-----------+-----------+
1 row in set (0.001 sec)
MariaDB [zabbix]> SELECT * From trends_uint order by clock DESC LIMIT 1;
+--------+------------+-----+-----------+-----------+-----------+
| itemid | clock | num | value_min | value_avg | value_max |
+--------+------------+-----+-----------+-----------+-----------+
| 23271 | 1662530400 | 60 | 0 | 0 | 0 | -> Wednesday, September 7, 2022 8:00:00 AM GMT+02:00 DST
+--------+------------+-----+-----------+-----------+-----------+
1 row in set (1.037 sec)
What's wrong on the first Zabbix ? Which kind of debug can I do in order to solve the issue?
Thanks in advance
Comment