###################ElasticSearch監控指標梳理########################### #author:lugh1 # #date:2021-09-26 # #description:ES監控指標 # ###################ElasticSearch監控指標梳理########################### ##集群 status #集群狀態green、yellow、red number_of_nodes #集群節點個數 active_primary_shards #正常的主分片數量 active_shards #正常的分片數 relocating_shards #正在遷移的分片數 initializing_shards #剛剛創建的分片數 unassigned_shards #未分配的分片數 nodes.count #節點數量 indices.count #總的索引數量 indices.shards.total #總分片數 indices.docs.count #總的文檔數 indices.store.size_in_bytes #總存儲大小 indices.fielddata.memory_size_in_bytes #用於fielddata的內存總大小 indices.query_cache.memory_size_in_bytes #用於查詢緩存的總內存大小 indices.segments.count #段總數量 #如上內容可以通過/_cat/_health和/_cluster/stats查看 ##查詢 indices.search.query_total #查詢總數 indices.search.query_time_in_millis #查詢總時間 indices.search.query_current #當前正在進行的查詢數量 indices.search.fetch_total #提取總數 indices.search.fetch_time_in_millis #花費在提取上的總時間 indices.search.fetch_current #當前正在進行的提取數 ##索引 indices.indexing.index_total #索引的文件總數 indices.indexing.index_time_in_millis #索引文檔總時間 indices.indexing.index_current #目前索引的文件數量 indices.refresh.total #索引刷新總數 indices.refresh.total_time_in_millis #刷新指數的總時間 indices.flush.total #索引刷新總數到磁盤 indices.flush.total_time_in_millis #將索引刷新到磁盤上的總時間 merges.current_docs #目前的合並。合並目前正在處理中 merges.total_docs #合並總數。合並總數的計數 merges.total_stopped_time_in_millis #合並花費的總時間。合並段的所有時間的聚合 ##節點 nodes.roles #比如masternode,datanode nodes.indices.docs #每個節點內存的文檔數 nodes.indices.store #節點耗用了多少物理存儲 nodes.indices.indexing #節點索引相關指標 nodes.indices.merges #包括了 Lucene 段合並相關的信息。它會告訴你目前在運行幾個合並,合並涉及的文檔數量,正在合並的段的總大小,以及在合並操作上消耗的總時間 nodes.indices.search #在活躍中的搜索( open_contexts )數量、查詢的總數量、以及自節點啟動以來在查詢上消耗的總時間 nodes.indices.fielddata #接近於 0。因為 fielddata 不是緩存,任何驅逐都消耗巨大,應該避免掉。如果你在這里看到驅逐數,你需要重新評估你的內存情況,fielddata 限制 nodes.indices.segments #展示這個節點目前正在服務中的 Lucene 段的數量 nodes.indices.memory #統計值展示了 Lucene 段自己用掉的內存大小。這里包括底層數據結構,比如倒排表,字典,和布隆過濾器等。 nodes.thread.pool #節點線程池相關指標 nodes.breaks #熔斷相關指標,有總熔斷以及查詢熔斷和fielddata熔斷等 ##機器 nodes.os.cpu.percent #CPU使用率 nodes.os.cpu.load_averager #負載 nodes.os.mem #內存使用相關指標 nodes.os.swap #Swap使用相關指標 nodes.process.open_filedescriptors #打開的文件描述符 nodes.fs #文件系統相關指標,比如IO,讀寫,磁盤存儲和目錄等 nodes.http.current_open #http連接當前打開數 網絡流出/流入字節數,tcp連接等 ##JVM&GC nodes.jvm.gc.collectors.young.collection_count #年輕代垃圾回收總數 nodes.jvm.gc.collectors.young.collection_time_in_millis #年輕代垃圾回收耗時 nodes.jvm.gc.collectors.old.collection_count #年老代垃圾回收總數 nodes.jvm.gc.collectors.old.collection_time_in_millis #年老代垃圾回收耗時 nodes.jvm.mem.heap_used_percent #當前JVM堆占比 nodes.jvm.mem.heap_committed_in_bytes #已提交的JVM堆量 nodes.jvm.threads #jvm線程相關指標 nodes.jvm.classes #jvm類加載相關指標 ##其他 正在運行的任務數,運行時間,任務類型,運行節點等 #/_cat/tasks 每個索引的狀態,health,主副分片,文檔數,存儲的大小等 #/_cat/indices 排隊的任務數量 #/_cat/pending_tasks 參考: https://blog.csdn.net/wuzhiwei549/article/details/83211715 https://www.elastic.co/guide/cn/elasticsearch/guide/current/_cluster_health.html https://blog.csdn.net/prestigeding/article/details/89815143