Hi -
I'm trying to use web.page.regexp[] on an item to query a JSON endpoint for some data. I'm trying to match for the value of 126.096 in the following JSON data:
I can make a global regex of type "Character string not included" and using the regex tester, I can take the entire JSON output and put it in the "Test string" dialog and get a match. I can also use grep -E to match for the pattern and the match. I can use \1 \2 etc for match groups in the item. I can use extended and simple regular expressions, with or without character classes. No matter what I (legally, syntactically correct) try or how I query for this item, the end result is the same:
1112:20150422:214757.717 Sending back []
The item in its current form is:
Anyone have experience with these complex regex statements in Zabbix and might be able to point me in the right direction?
I'm trying to use web.page.regexp[] on an item to query a JSON endpoint for some data. I'm trying to match for the value of 126.096 in the following JSON data:
Code:
{
"code": 0,
"data": [
{
"downloaded": 301,
"executionTime": 126.096,
"ip": "4.5.6.7",
"jobId": 597044,
"no": 12052,
"result": {
"downloaded": 301,
"error": "",
"httpStatus": 200,
"ip": "1.2.3.4",
"output": "HTTP/1.1 200 OK\r\nCache-Control: private\r\nContent-Type: text/html; charset=utf-8\r\nContent-Encoding: gzip\r\nVary: Accept-Encoding\r\nServer: Microsoft-IIS/7.5\r\nX-AspNetMvc-Version: 3.0\r\nX-AspNet-Version: 4.0.30319\r\nX-Powered-By: ASP.NET\r\nDate: Wed, 22 Apr 2015 21:45:09 GMT\r\nContent-Length: 128\r\n\r\nDONE: 1h",
"url": "http://domain.tld/services/local/events/grouped/onehour"
},
"startTime": 1429738982,
"status": 0
},
...
...
...
...
1112:20150422:214757.717 Sending back []
The item in its current form is:
Code:
web.page.regexp[www.domain.com,/api/cron.logs/token/sometoken/id/597044,443,"(\"executionTime\":)([[:digit:]]+\.[[:digit:]]+)",100,\1]
Comment