Elasticsearch开启慢日志之后,新创建的索引如何自动开启慢日志
匿名 | 发布于2022年06月21日 | 阅读数:1274
如题。ES 开启了慢日志,但是新创建的索引默认是没有开启,有没有相关的参数设置可以让开启了慢日志之后的索引自动匹配慢日志规则。
curl -XPUT /_all/_settings -H "Content-Type:application/json" -d '
{
"index.search.slowlog.threshold.query.warn":"1ms",
"index.search.slowlog.threshold.query.info":"1ms",
"index.search.slowlog.threshold.query.debug":"1ms",
"index.search.slowlog.threshold.query.trace":"1ms",
"index.search.slowlog.threshold.fetch.warn":"1ms",
"index.search.slowlog.threshold.fetch.info":"1ms",
"index.search.slowlog.threshold.fetch.debug":"1ms",
"index.search.slowlog.threshold.fetch.trace":"1ms",
"index.indexing.slowlog.threshold.index.warn":"1ms",
"index.indexing.slowlog.threshold.index.info":"1ms",
"index.indexing.slowlog.threshold.index.debug":"1ms",
"index.indexing.slowlog.threshold.index.trace":"1ms"
}'
2 个回复
Charele - Cisco4321
赞同来自: zerolh
新建一个template,
"index_patterns": ["*"],
然后加上你要的配置,不就行了么
kin122
赞同来自: