Hey there,
Struggling to work out the regexp escaping for a log.count line - basically it's a simple multiple pattern match in the zabbix_agent2.log for trying to find logs that it can't read (that then need to set an setfacl string).
My regexp that's working on the log is as follows:
and the 'escaped' version should be:
But when I construct the full string in Zabbix I'm getting `Invalid fourth parameter` .
Key is as follows:
I've tried it with and without the quotes, is there a trick I'm missing here? I have got lots of single regexp patterns working, but this one requires an match first and then this.
Zabbix 6.4.x agents here.
Struggling to work out the regexp escaping for a log.count line - basically it's a simple multiple pattern match in the zabbix_agent2.log for trying to find logs that it can't read (that then need to set an setfacl string).
My regexp that's working on the log is as follows:
Code:
^(?=.*kamailio\.log)(?=.*Permission denied).*$
Code:
\^\(\?=\.\*kamailio\\\.log\)\(\?=\.\*Permission\ denied\)\.\*\$
Key is as follows:
Code:
log.count[/var/log/zabbix/zabbix_agent2.log,"\^\(\?=\.\*kamailio\\\.log\)\(\?=\.\*Permission\ denied\)\.\*\$",,skip,2]
Zabbix 6.4.x agents here.
)
Comment