elasticsearch slow query log

Call the following api

 

This is the cluster level api
/_cluster/settings/

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


This is the index level api:
/indexname/_settings/

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

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326498227&siteId=291194637