AWS OpenSearch(ES)启用慢速日志

问题

最近有个搜索请求超过了29秒,想要排查一下这个问题。

思路

启用ES(AWS OpenSearch)搜索慢速日志,看看到底发生了什么问题。

控制台启用慢速日志组

设置慢速日志阀值

bash 复制代码
# 查看搜索请求慢速日志阈值
GET _cluster/settings?flat_settings

# 设置搜索请求慢速日志阈值
PUT /_cluster/settings
{
  "transient": {
    "cluster.search.request.slowlog.threshold.warn": "5s",
    "cluster.search.request.slowlog.threshold.info": "2s"
  }
}

# 查询索引搜索请求慢速日志阀值
GET 索引前缀*/_settings?pretty

# 设置分片慢速日志阈值
PUT 索引前缀*/_settings
{
  "index.search.slowlog.threshold.query.warn": "5s",
  "index.search.slowlog.threshold.query.info": "2s"
}

如果觉得这两个日志影响集群性能,可以设置会原来默认值-1即可。

参考

相关推荐
Elasticsearch1 天前
如何使用 Agent Builder 排查 Kubernetes Pod 重启和 OOMKilled 事件
elasticsearch
Elasticsearch2 天前
通用表达式语言 ( CEL ): CEL 输入如何改进 Elastic Agent 集成中的数据收集
elasticsearch
海兰4 天前
离线合同结构化提取与检索:LangExtract + 本地DeepSeek + Elasticsearch 9.x
大数据·elasticsearch·django
yumgpkpm4 天前
AI视频生成:Wan 2.2(阿里通义万相)在华为昇腾下的部署?
人工智能·hadoop·elasticsearch·zookeeper·flink·kafka·cloudera
Sheffield4 天前
如果把ZooKeeper按字面意思比作动物园管理员……
elasticsearch·zookeeper·kafka
嗝屁小孩纸4 天前
ES索引重建(零工具纯脚本执行)
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客4 天前
使用 Jina Embeddings v5 和 Elasticsearch 构建“与你的网站数据聊天”的 agent
大数据·人工智能·elasticsearch·搜索引擎·容器·全文检索·jina
Elastic 中国社区官方博客4 天前
Elastic 公共 roadmap 在此
大数据·elasticsearch·ai·云原生·serverless·全文检索·aws
码云数智-大飞4 天前
像写 SQL 一样搜索:dbVisitor 如何用 MyBatis 范式颠覆 ElasticSearch 开发
sql·elasticsearch·mybatis