简体   繁体   English

是否可以将kibana索引模式发布到elasticsearch的.kibana索引中?

[英]Is it possible to POST kibana index patterns into the .kibana index of elasticsearch?

I have a kibana instance that is brought up using docker and ansible. 我有一个使用docker和ansible提出的kibana实例。 When this kibana instance is being brought up the Elasticsearch instance it's connected to is already running. 当这个kibana实例被启动时,它所连接的Elasticsearch实例已经在运行。 I apply some index templates using curl and want to do something similar for index patterns and later on visualizations and dashboards. 我使用curl应用一些索引模板,并希望对索引模式以及稍后的可视化和仪表板执行类似的操作。

I've succeeded in using the kibana API to do this but in my scenario I need this to be done automatically and before the kibana instance is up and running so I get a connection refused since kibana obviously isn't running yet. 我已成功使用kibana API执行此操作但在我的场景中我需要自动完成并且在kibana实例启动并运行之前因此我拒绝连接,因为kibana显然还没有运行。

Both ES and kibana are running on version 6.2.x ES和kibana都在6.2.x版本上运行

这个CURL应该适合你:

curl -XPOST "http://localhost:9200/.kibana/doc/index-pattern:my-index-pattern-name" -H 'Content-Type: application/json' -d' { "type" : "index-pattern", "index-pattern" : { "title": "my-index-pattern-name*", "timeFieldName": "execution_time" } }'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM