我需要從我的日誌中搜索範圍值,但是我的正則表達式在Kibana中不起作用。Kibana正則表達式不工作
/(took":[1-9][0-9][0-9][,])/g
內容:
{"real_time":"2016-05-03T10:02:13.360Z","content":{"delay":687,"updated":true,"searchItems":{"monitoring_id":"111354","params":{"pass":["111354"],"named":{"d":"2016-04-29|2016-04-30"},"action":"mentions","plugin":null,"controller":"api11","form":[],"url":{"url":"1.1\/mentions\/111354\/","publickey":"yn68FDuQ","time":"1462303544,8356","signature":"102ade1f6749e89be876fdb00a7b9ade","published_date":"2016-04-29|2016-04-30","ipp":"100","page":"14"},"isAjax":false},"source_ids":"","timestamp":"","pagination":"1300, 100","trackerId":"","onlyIds":[],"exceptIds":[],"timezone":"Brazil\/East"},"search":[{"index":"mentions_ro","type":"mention","from":1300,"size":100,"body":{"query":{"bool":{"must":[{"term":{"monitoring.id":"111354"}},{"range":{"published_at":{"gte":"1969-12-31T21:00:00-03:00","lte":"1969-12-31T21:00:00-03:00"}}}]}},"sort":{"published_at":{"order":"desc"}}},"fields":[]}],"response":{"took":500,"timed_out":false,"_shards":{"total":21,"successful":21,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}}}
我的正則表達式然而在這裏工作,:
https://regex101.com/r/pV4mR7/1
觀測數據:
- 我已經試圖逃跑的某些字符
- 如果我期待送到彈性的要求,Kibana使用查詢字符串:
任何提示嗎?
只是解析JSON。這裏不需要正則表達式。 – Makoto
你可以使用'took:[100-999]'作爲範圍過濾器。 –
我的內容是一個字符串,而不是json文件 – JoeLoco