如何包含索引';标题';在kibana url中?
在Kibana 6之前,我曾经能够通过编程为特定索引的Kibana查询构造url,其中索引由其名称/标题指定,即如何包含索引';标题';在kibana url中?,kibana,Kibana,在Kibana 6之前,我曾经能够通过编程为特定索引的Kibana查询构造url,其中索引由其名称/标题指定,即logstash-*或my index-* 构造的URL类似于: http://127.0.0.1:5601/app/kibana#/discover?_g=(time:(from:now-1h,mode:quick,to:now))&_a=(query:(language:lucene,query:'my search goes here'),index:'my-index-
logstash-*
或my index-*
构造的URL类似于:
http://127.0.0.1:5601/app/kibana#/discover?_g=(time:(from:now-1h,mode:quick,to:now))&_a=(query:(language:lucene,query:'my search goes here'),index:'my-index-*')
由于Kibana 6,这不再有效,因为“索引”似乎需要索引ID(?)值,如3dbd5d60-163c-11e9-8130-471e0fe97583
例如,这将起作用:
http://127.0.0.1:5601/app/kibana#/discover?_g=(time:(from:now-1h,mode:quick,to:now))&_a=(query:(language:lucene,query:'my search goes here'),index:3dbd5d60-163c-11e9-8130-471e0fe97583)
但是,在构建url时,我无法知道该值
有人知道索引名/标题是否仍然可以在url中使用(显然,它将使用不同的键,例如index\u title:'my-index-*'
)
如果没有,Kibana是否可以在给定索引名称/标题的情况下查询自身以显示索引ID?我认为您不能再在URL上使用
索引模式
,您需要使用与该索引模式
关联的ID
要获取ID
,您可以使用以下关于开发工具的查询:
GET .kibana/_search
{
"_source": ["index-pattern.title"],
"query": { "term": { "type": "index-pattern" }}
}