Data sent by Zabbix agent2 is not saved on Zabbix server
1. Persistent buffer is enabled
PersistentBufferFile=1
2. Stop Zabbix server and accumulate data in zabbix agent2
3. Starting Zabbix Server after a few minutes to a few hours, data stored in Zabbix Agent 2 is not saved by Zabbix Server and is discarded
Checking the debug log of the zabbix server, receiving with unsorted id.
{"id":24484643,"itemid":37273,"value":"0","clock":1676025193,"ns":2843864},{"id":24483170,"itemid":37325,"lastlogsize":580062,"mtime":1676024510,"clock":1676024525,"ns":6194602},{"id":24483230,"itemid":78221,"lastlogsize":1044293,"mtime":1676024510,"clock":1676024561,"ns":2709513},{"id":24483301,"itemid":37325,"lastlogsize":580571,"mtime":1676024584,"value":"2023-02-10 19:22:57 XXXXXXXXXXXXXXXXXXXXXXXXXX","clock":1676024585,"ns":3579383},{"id":24483302,"itemid":37325,"lastlogsize":580671,"mtime":1676024584,"clock":1676024585,"ns":3584512},{"id":24483436,"itemid":37325,"lastlogsize":581254,"mtime":1676024602,"clock":1676024645,"ns":2873950},{"id":24483567,"itemid":37325,"lastlogsize":581471,"mtime":1676024704,"clock":1676024705,"ns":3263562},{"id":24483960,"itemid":37325,"lastlogsize":581625,"mtime":1676024882,"value":"2023-02-10 19:27:39 XXXXXXXXXXXXXXXXXXXXXXXXXX","clock":1676024885,"ns":4434449},{"id":24483961,"itemid":37325,"lastlogsize":585531,"mtime":1676024882,"clock":1676024885,"ns":4438843},{"id":24484024,"itemid":78221,"lastlogsize":1071599,"mtime":1676024871,"clock":1676024921,"ns":3749313},{"id":24484094,"itemid":37325,"lastlogsize":589736,"mtime":1676024939,"value":"XXXXXXXXXXXXXXXXXXXXXXXXXX","clock":1676024945,"ns":4766057},{"id":24484095,"itemid":37325,"lastlogsize":603496,"mtime":1676024939,"clock":1676024945,"ns":4779612},{"id":24484157,"itemid":78221,"lastlogsize":1092533,"mtime":1676024954,"clock":1676024981,"ns":3254450},{"id":24484226,"itemid":37325,"lastlogsize":621348,"mtime":1676025002,"clock":1676025005,"ns":4550027},{"id":24484489,"itemid":37325,"lastlogsize":621506,"mtime":1676025075,"value":"ZZZZZZZZZZZZZZZZZZZZZZZZZZZ","clock":1676025125,"ns":3724389},{"id":24484620,"itemid":37325,"lastlogsize":622095,"mtime":1676025168,"clock":1676025185,"ns":3215908}],"session":"***********************************","host":"test server","version":"5.0"}'
If the id is not up-to-date, the data appears to be discarded.
Only ZZZZZZZZZZZZZZZZZZZZZZZZZZZ will be inserted.
query [txnlev:1] [insert into history_log (itemid,clock,ns,timestamp,source,severity,value,logeventid) values (37325,1676025125,3724389,0,'',0,'ZZZZZZZZZZZZZZZZZZZZZZZZZZZ',0);