Hi,
I have issue with web.page.regex.
Application I need to monitor returns output in JSON format, since this should be easily parsable.
Output:
{"monitoring":"cd.smsgateway", "name":"con_status_a01", "value":1}
Regex:
\"value\"\
\w+)
But result to ZABBIX UI is []. When I try to getresults with zabbix_agentd or zabbix_get it returns a desired value.
Eg. command:
result into:
which is great because 10 is the value I need.
So why in UI result is []? And how can one debug response (besides zabbix_agentd and zabbix_get)?
Thanks
-----
I just figured it out.
correct regexp is "(\"value\"
(.*)(\})", so it has to be in double quotes and enclosed by brackets.
So you can close this thread.
Thanks
I have issue with web.page.regex.
Application I need to monitor returns output in JSON format, since this should be easily parsable.
Output:
{"monitoring":"cd.smsgateway", "name":"con_status_a01", "value":1}
Regex:
\"value\"\
\w+)But result to ZABBIX UI is []. When I try to getresults with zabbix_agentd or zabbix_get it returns a desired value.
Eg. command:
Code:
zabbix_agentd -t web.page.regexp[127.0.0.1,'monitoring.aspx?repval=con_status_a01&num=1',80,'\"value\"\:(\w+)',,"\1"]
Code:
web.page.regexp[127.0.0.1,monitoring.aspx?repval=con_status_a01&num=1,80,\"value\"\:(\w+),,"\1"] [B][s|10][/B]
So why in UI result is []? And how can one debug response (besides zabbix_agentd and zabbix_get)?
Thanks
-----
I just figured it out.
correct regexp is "(\"value\"
(.*)(\})", so it has to be in double quotes and enclosed by brackets.So you can close this thread.
Thanks