如何获取kibana仪表板ID?用于从仪表板导出数据的API调用。
我到处搜索,但我找不到仪表板的ID,如示例所示(仪表板ID为942dcef0-b2cd-11e8-ad8e-85441f0c2e5c)。
我使用的是ELK堆栈7.4.1 OSS(社区版)。
发布于 2019-12-13 14:21:31
你可以在Elasticsearch的命令行中查询你的.kibana索引,如下所示;
$ curl -s http://localhost:9200/.kibana/dashboard/_search?pretty
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : ".kibana",
"_type" : "dashboard",
"_id" : "New-Dashboard",
"_score" : 1.0,
"_source" : {
"title" : "New Dashboard",
"hits" : 0,
"description" : "",
"panelsJSON" : "[{\"id\":\"Visualization-VerticalBarChart\",\"type\":\"visualization\",\"panelIndex\":1,\"size_x\":3,\"size_y\":2,\"col\":1,\"row\":1}]",
"optionsJSON" : "{\"darkTheme\":false}",
"uiStateJSON" : "{}",
"version" : 1,
"timeRestore" : false,
"kibanaSavedObjectMeta" : {
"searchSourceJSON" : "{\"filter\":[{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}}}]}"
}
}
} ]
}
}或者,如果你想要单独的,你可以包括标题或id;
curl -s 'http://localhost:9200/.kibana/dashboard/_search?pretty=1,q=_id=New-Dashboard'您可以参考https://www.elastic.co/guide/en/kibana/current/index.html以获得更多参考
https://stackoverflow.com/questions/59317064
复制相似问题