欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

elasticsearch慢查询日志

程序员文章站 2022-06-02 12:16:31
...

调用如下api

 

这是集群级别的api
/_cluster/settings/

{
  "transient": {
    "logger.index.search.slowlog": "DEBUG",
    "logger.index.indexing.slowlog" : "INFO"
  }
}


这个是索引级别的api:
/索引名/_settings/

{
    "index.search.slowlog.threshold.query.debug" : "20ms", 
    "index.search.slowlog.threshold.fetch.debug": "20ms", 
    "index.indexing.slowlog.threshold.index.info": "20ms" 
}