Hello fellow Zabbix users,
first of all i'd like to mention i'm not a Zabbix specialist at all, i have been using it for only one week and please forgive my english as i'm french.
I'm using Zabbix 2.2.2 version on a Ubuntu 14.04 system
I have been trying to use the vfs.file.regexp function to parse a .txt file which contain a number of values following the patern:
nameofvalue1 {value1}
nameofvalue2 {value2}
I'm using an online regexp tester and the zabbixagentd -t command line to verify my regexp.
My values are float type (execution time in microsecond).
My problem is that i can't get the item to properly return the value matching the regexp.
I have tried a lot of regular expressions syntax but most of the time i get a ZBX-NOTSUPPORTED when i test my item with zabbixagentd -t.
For example when i type this very global regexp just to see if i get a result(i'm escaping {} because command line doesn't use extended posix):
zabbix_agentd -t vfs.file.regexp[path/to/file,"test1 \{(.*)\}$",,,,]
i get the following result:
[s|nameofvalue1 {value1}] which is the whole line containing the float number i want to parse (value1).
So i read about the output mode of the vfs.file.regexp function and changed the command to:
zabbix_agentd -t vfs.file.regexp[path/to/file,"test1 \{(.*)\}$",,,,\1]
But now i get:
[s|1]
...And if i change the output mode to \2 i get [s|2] etc. I'm confused.
I tried a lot of syntax but the only results i get are either [s|ZBX-NOTSUPPORTED] or [s| ] or [s|thevalueofoutputmode]...
All i want to get is the value1 (22,2222222 for example) to be able to make a graph with it.
As i said i'm new to all of this(even ubuntu and regexp) and i'm probably doing something wrong so i apologize if the mistake seems obvious to you...
Thx in advance
first of all i'd like to mention i'm not a Zabbix specialist at all, i have been using it for only one week and please forgive my english as i'm french.
I'm using Zabbix 2.2.2 version on a Ubuntu 14.04 system
I have been trying to use the vfs.file.regexp function to parse a .txt file which contain a number of values following the patern:
nameofvalue1 {value1}
nameofvalue2 {value2}
I'm using an online regexp tester and the zabbixagentd -t command line to verify my regexp.
My values are float type (execution time in microsecond).
My problem is that i can't get the item to properly return the value matching the regexp.
I have tried a lot of regular expressions syntax but most of the time i get a ZBX-NOTSUPPORTED when i test my item with zabbixagentd -t.
For example when i type this very global regexp just to see if i get a result(i'm escaping {} because command line doesn't use extended posix):
zabbix_agentd -t vfs.file.regexp[path/to/file,"test1 \{(.*)\}$",,,,]
i get the following result:
[s|nameofvalue1 {value1}] which is the whole line containing the float number i want to parse (value1).
So i read about the output mode of the vfs.file.regexp function and changed the command to:
zabbix_agentd -t vfs.file.regexp[path/to/file,"test1 \{(.*)\}$",,,,\1]
But now i get:
[s|1]
...And if i change the output mode to \2 i get [s|2] etc. I'm confused.
I tried a lot of syntax but the only results i get are either [s|ZBX-NOTSUPPORTED] or [s| ] or [s|thevalueofoutputmode]...
All i want to get is the value1 (22,2222222 for example) to be able to make a graph with it.
As i said i'm new to all of this(even ubuntu and regexp) and i'm probably doing something wrong so i apologize if the mistake seems obvious to you...
Thx in advance
Comment