-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
5.0.4
-
None
-
Dockerized Zabbix using:
zabbix/zabbix-server-pgsql:latest
zabbix/zabbix-agent2:latest but tested also with zabbix/zabbix-agent:latest
Steps to reproduce:
- Create a new item with:
- key: log["/var/lib/zabbix/test.log"]
- name: test log
- type: Zabbix agent (active)
- type of information: numeric (float)
- In the "Preprocessing" tab, add a preprocessing step, for example "left trim" with "a" as parameter
- Create and add a line to the test.log file, in this example we need to add a number as we set the information to numeric (float), for example: echo "2" >> /var/lib/zabbix/test.log
- Check that the "2" is shown in the latest data
- Restart the zabbix-agent
- Check that the "2" is collected again
- repeat as needed/wanted
- Check that item_rtdata for the created item shows "lastlogsize" = 0 and does not update even if other lines are added to the test.log file
- Edit the item, remove the preprocessing step (wait for config cache to be reloaded, zabbix agent to refresh the active items, ....)
- Check that now the "lastlogsize" is properly updated and restarting the agent doesn't cause the log file to be re-read and all the data sent again to the zabbix server
I tested this behavior also using a fresh install using zabbix-server-pgsql docker image with "latest" tag, currently at time of writing 5.0.4.
Also tested with both zabbix-agent2 and zabbix-agent images just for safety as preprocessing is done by server so this shouldn't be affected by the agent version.
Any additional info please let me know
thanks!