29-Elasticsearch 集群监控

Elasticsearch Stats 相关的 API

● Elasticsearch 提供了多个监控相关的 API

Node Stats: _nodes/stats

Cluster Stats: _cluster/stats

Index Stats: index_name/_stats

Elasticsearch Task API

● 查看 Task 相关的 API

Pending Cluster Tasks API: GET _cluster/pending_tasks

Task Management API:GET _tasks (可以用来 Cancel 一个 Task)

● 监控 Thread Pools

○ GET _nodes/thread_pool

○ GET _nodes/stats/thread_pool

○ GET _cat/thread_pool?v

○ GET _nodes/hot_threads

The Index & Query Slow Log

● 支持将分片上, Search 和 Fetch 阶段的慢 查询写入文件

● 支持为 Query 和 Fetch 分别定义阈值

● 索引级的动态设置,可以按需设置,或者通过Index Template 统一设定

● Slow log 文件通过 log4j2.properties 配 置

复制代码
# 设置 Index Slowlogs
# the first 1000 characters of the doc's source will be logged
PUT my_index/_settings
{
  "index.indexing.slowlog":{
    "threshold.index":{
      "warn":"10s",
      "info": "4s",
      "debug":"2s",
      "trace":"0s"
    },
    "level":"trace",
    "source":1000  
  }
}

# 设置查询
DELETE my_index
//"0" logs all queries
PUT my_index/
{
  "settings": {
    "index.search.slowlog.threshold": {
      "query.warn": "10s",
      "query.info": "3s",
      "query.debug": "2s",
      "query.trace": "0s",
      "fetch.warn": "1s",
      "fetch.info": "600ms",
      "fetch.debug": "400ms",
      "fetch.trace": "0s"
    }
  }
}
相关推荐
柯南小海盗6 小时前
Elasticsearch同义词配置全攻略
大数据·elasticsearch·jenkins
杰拉拉德6 小时前
Spring AI + Elasticsearch:语义/关键字/混合检索与知识问答
elasticsearch·知识库·rag·spring ai·混合检索·语义检索·关键字检索
yumgpkpm8 小时前
基于GPU的Spark应用加速 Cloudera CDP/华为CMP鲲鹏版+Nvidia英伟达联合解决方案
大数据·数据库·人工智能·hadoop·elasticsearch·spark·cloudera
精致先生9 小时前
ElasticSearch
elasticsearch·搜索引擎
Elastic 中国社区官方博客9 小时前
更高的吞吐量和更低的延迟: Elastic Cloud Serverless 在 AWS 上获得了显著的性能提升
大数据·数据库·elasticsearch·搜索引擎·云原生·serverless·aws
Elastic 中国社区官方博客20 小时前
使用 Elastic 中的 OpenTelemetry 为 Nginx 实现端到端分布式追踪的实用指南
大数据·运维·分布式·elasticsearch·搜索引擎·信息可视化·全文检索
Elastic 中国社区官方博客1 天前
JINA AI 与 Elasticsearch 的集成
大数据·人工智能·elasticsearch·搜索引擎·全文检索·jina
tebukaopu1481 天前
es searchSourceBuilder.trackTotalHits(true);的作用
大数据·elasticsearch·搜索引擎
single-life1 天前
Linux 下 部署es+nebula(附带内网部署方式)
linux·运维·elasticsearch·nebula
一个向上的运维者1 天前
实战解析|EFK 日志系统数据同步问题全解(附核心配置模板)
elasticsearch·云原生