Hi
Text file contains data from many hosts and I get a file to Zabbix with HTTP agent
There is a string which contains hostname and value. I need to extract the value for the host.
Let's say:
name="HOST1:freemem" value="7164.998"
If I put "HOST1" to preprocess regex
name="HOST1:freemem" value="(.*)" that matches.
If I put {HOST.HOST} to regex, that does not make a match. Should it?
I also tried to make additional macro {$HOSTNAME} and put that to regex, that makes a match. But then I need some automation to set {$HOSTNAME} according to real hostname.
Any ideas how to do this?
I'm using Zabbix 4.0.0
Text file contains data from many hosts and I get a file to Zabbix with HTTP agent
There is a string which contains hostname and value. I need to extract the value for the host.
Let's say:
name="HOST1:freemem" value="7164.998"
If I put "HOST1" to preprocess regex
name="HOST1:freemem" value="(.*)" that matches.
If I put {HOST.HOST} to regex, that does not make a match. Should it?
I also tried to make additional macro {$HOSTNAME} and put that to regex, that makes a match. But then I need some automation to set {$HOSTNAME} according to real hostname.
Any ideas how to do this?
I'm using Zabbix 4.0.0
Comment