【发布时间】:2018-02-24 17:15:44
【问题描述】:
我为弹性搜索观察程序设置创建了一个查询。结果集如下所示:
"_index": "transaction_broker-2017.09.15",
"_type": "transaction_broker",
"_id": "AV6Fn_UQ9KbnKce40avY",
"_score": 3.8539968,
"_source": {
"tbroker.workitem.sync_check.tbroker_value": 7000,
"source": "/logs/web/tomcat/tbroker.log.json",
"type": "transaction_broker",
"tbroker.job.instance_id": "lixporta-p00.xxxxxxx.15053054001381505305457198",
"tbroker.workitem.sync_check.backend_total_value": 6995,
"tbroker.appversion": "1.1.135-180",
"@version": 1,
"beat": {
"hostname": "lixporta-p00",
"name": "lixporta-p00",
"version": "5.1.1"
在操作部分,我可以使用以下方法访问字段:
"actions": {
"my-logging-action": {
"logging": {
"text": "There are {{ctx.payload.hits.hits.0._source.....
在源标记之后,我使用例如上面列表中的“类型”字段。另一个例子是:
"ctx.payload.hits.hits.0._source.beat.hostname"
这很好用... 但是不能使用像
这样的字段"tbroker.workitem.sync_check.tbroker_value"
解析器认为这个字段是嵌套的,但这只是一个带有点的字段名。 有没有可能“转义”这个字段名? 有谁也遇到过这个问题吗?
非常感谢和最好的问候 克劳斯
【问题讨论】:
标签: json elasticsearch elasticsearch-watcher