I am trying to use vfs.file.regexp on Zabbix 5.0 as per manual - 1 Zabbix agent [Zabbix Documentation 5.0]
And first example works:
But third one does not:
What I am doing wrong?
Code:
Examples: ⇒ vfs.file.regexp[/etc/passwd,zabbix] ⇒ vfs.file.regexp[/path/to/some/file,"([0-9]+)$",,3,5,\1] ⇒ vfs.file.regexp[/etc/passwd,"^zabbix:.:([0-9]+)",,,,\1] → getting the ID of user [I]zabbix[/I]
Code:
root@centos8:~# zabbix_get -s 127.0.0.1 -k vfs.file.regexp[/etc/passwd,zabbix] zabbix:x:984:980:Zabbix Monitoring System:/var/lib/zabbix:/sbin/nologin
Code:
root@centos8:~# zabbix_get -s 127.0.0.1 -k vfs.file.regexp[/etc/passwd,"^zabbix:.:([0-9]+)",,,,\1] ZBX_NOTSUPPORTED: Invalid item key format.
but you can probably replace end of it also with .* from the point where you do not need anything captured...
Comment