Zabbix error expression vfs.file.regexp

4.8k views Asked by At

Regex it does not work. I need to monitor a log in the format log_ddmmyyyy.txt Test in cmd return error:

zabbix_agentd.exe -t "vfs.file.regexp[C:\^log_\d{8}.txt$,Text,,,,1"
**vfs.file.regexp[C:\^log_\d{8}.txt$,Text,,,,1  [m|ZBX_NOTSUPPORTED] [Invalid item key format.]**

Trigger in zabbix:

{note-sued:vfs.file.regexp[C:\^log_\d{8}.txt$,Text,,,,1].last()}=1
1

There are 1 answers

2
asaveljevs On

There seem to be two problems with the key you are trying on the command line.

The first problem is that, unlike logrt[] item, the first parameter to vfs.file.regexp[] is not a regexp pattern, but a file name.

The second problem is that the key is not terminated properly: it should have "]" at the end.

Please see Zabbix documentation for more information on this item.