I am pulling the contents of a file using vfs.file.contents and I am trying to use regex to filter speciffic lines. I have found that zabbix does not support the /g flag so its only returing the first line.
Here is an example of what I am trying to acheive (with the g flag) https://regex101.com/r/M8UQvP/1
I have looked at using log, but once the history is cleared it will not pull old data so this will not work for me. As the file will not be changed too often, my plan is to set the update interval to 1 day and the history to 1 day, so I only get the latest data.
Is there any way I can do this either with vfs.file.contents, or something else. Idealy it would not require a change on all agents as I have quite a lot.
Thanks
Here is an example of what I am trying to acheive (with the g flag) https://regex101.com/r/M8UQvP/1
I have looked at using log, but once the history is cleared it will not pull old data so this will not work for me. As the file will not be changed too often, my plan is to set the update interval to 1 day and the history to 1 day, so I only get the latest data.
Is there any way I can do this either with vfs.file.contents, or something else. Idealy it would not require a change on all agents as I have quite a lot.
Thanks
Comment