-
Problem report
-
Resolution: Unresolved
-
Critical
-
6.0.34
-
None
-
Sprint candidates
Hello,
I've found that while troubleshooting - for some reason not every value is exported into .json file, but in DB it's okay,
Test environment: Zabbix 6.0.34 on Rocky linux 9 (mariadb 10.5, apache2.4)
How to reproduce:
1. On clean instance add one host with working item/items (i used template, Linux by zabbix agent),
2. Configure update interval for 15s to make it faster
3. After doing that, go to /etc/zabbix/zabbix_server.conf, and change those:
### Option: ExportDir ExportDir=/tmp/zabbix/files ### Option: ExportFileSize # Only used for rotation if ExportDir is set. ExportFileSize=1M ### Option: ExportType # Valid only if ExportDir is set. ExportType=trends
Set export dir to whatever you want, but set up correct owner with chown zabbix:zabbix
4. After doing that, restart server and leave it for some time - .json files needs to be created,
After some time we would get this result:
Insides of "trends-history-syncer-1.ndjson" contains only four entries of "itemid":70404
Insides of trends-main-process-0.ndjson contains nothing about "itemid":70404
But inside database we have that:
SELECT * from trends WHERE itemid='70404';
+--------+------------+-----+-----------+---------------------+-----------+
| itemid | clock| num | value_min | value_avg| value_max |
+--------+------------+-----+-----------+---------------------+-----------+
| 70404 | 1729846800 | 231 |0 | 0.10840934632034631 | 0.908106 |
| 70404 | 1729850400 | 277 |0 | 0.08581436462093855 | 1.000667 |
| 70404 | 1729854000 | 265 |0 | 0.10450683773584912 | 1.359183 |
| 70404 | 1729857600 | 277 |0 | 0.0946375631768953 | 0.996539 |
| 70404 | 1729861200 | 277 |0 | 0.07629530324909749 | 1.084101 |
| 70404 | 1729864800 | 277 |0 | 0.09910984476534296 | 1.021131 |
| 70404 | 1729868400 | 116 |0 | 0.1499747241379311 | 0.733761 |
+--------+------------+-----+-----------+---------------------+-----------+
3 entries are missing inside exported .json - there is no exact patter which one are missing, at least i didn't find that pattern,
Correct outcome would be to export every trends to .json file,
I can provide more details if they would be needed - it was also tested with 2M file size, and result was the same,
Regards,
Tomasz