我正在尝试绘制我在grafana中存储在elasticsearch中的数据。所有数据如下所示:
{
"_index": "cisco-ios-xr-pfi-im-cmd-oper:interfaces-interface-briefs-interface-brief",
"_type": "devices",
"_id": "oPcd_mMBJueaJFICTywM",
"_version": 1,
"_score": null,
"_source": {
"keys": [
{
"interface-name": "Bundle-Ether23"
}
],
"content": [
{
"interface": "Bundle-Ether23",
"parent-interface": "<No interface>",
"type": "IFT_ETHERBUNDLE",
"state": "im-state-up",
"actual-state": "im-state-up",
"line-state": "im-state-up",
"actual-line-state": "im-state-up",
"encapsulation": "ether",
"encapsulation-type-string": "ARPA",
"mtu": 2000,
"sub-interface-mtu-overhead": 0,
"l2-transport": "false",
"bandwidth": 10000000
}
],
"node": "ncs-5508-CX",
"timestamp": 1529004751493
},
"fields": {
"timestamp": [
"2018-06-14T19:32:31.493Z"
]
},
"sort": [
1529004751493
]
}
我想绘制时间戳的图形(当我将弹性搜索添加到grafana时,它采用了时间戳字段,我将索引作为*)。
如何查询内容值?
说我想图索引:键:{键值} - &gt; y轴上的content.mtu。
我看到当我计算时,我得到的所有文件都与我给出的任何索引相匹配,但我似乎无法弄清楚如何得到一个值来绘制。