Dar*_*911 4 elasticsearch kibana kibana-5
我想使用HTTP方法将新的仪表板发布到我的本地Kibana实例,但是我找不到太多有关使用API进行此操作的文档。
在Kibana上有一个请求请求,提到它正在添加此功能,但是关于如何使用它的文档有限:https : //github.com/elastic/kibana/pull/10858
我尝试发布的仪表板示例:
{
"_id": "12345678-1234-1234-1234-1234567890op",
"_type": "dashboard",
"_source": {
"title": "my-app",
"hits": 0,
"description": "",
"panelsJSON": "",
"optionsJSON": "{\"darkTheme\":false}",
"uiStateJSON": "",
"version": 1,
"timeRestore": true,
"timeTo": "now/d",
"timeFrom": "now/d",
"refreshInterval": {
"display": "1 minute",
"pause": false,
"section": 2,
"value": 60000
},
"kibanaSavedObjectMeta": {
"searchSourceJSON": ""
}
}
}
小智 7
出口:
curl "localhost:5601/api/kibana/dashboards/export?dashboard=980381a0-a266-11e7-8f86-edd4a877426e" > export.json
{
"version": "7.0.0-alpha1",
"objects": [
{
"id": "12345678-1234-1234-1234-1234567890op",
"type": "dashboard",
"properties": {
"title": "my-app",
"hits": 0,
"description": "",
"panelsJSON": "",
"optionsJSON": "{\"darkTheme\":false}",
"uiStateJSON": "",
"version": 1,
"timeRestore": true,
"timeTo": "now/d",
"timeFrom": "now/d",
"refreshInterval": {
"display": "1 minute",
"pause": false,
"section": 2,
"value": 60000
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
进口:
从仪表板导出API发布响应。
curl -X POST -H "Content-Type: application/json" -H "kbn-xsrf: true" -d @export.json http://localhost:5601/api/kibana/dashboards/import
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3663 次 |
| 最近记录: |