From b6072e67e590209f82584c5a5f6820f00422d090 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Wed, 29 Jun 2022 11:40:54 +0800 Subject: [PATCH 01/14] add address tag for es plugin --- inputs/elasticsearch/elasticsearch.go | 35 +++++++++++++++------------ pkg/jsonx/jsonflattener.go | 22 ++++++++--------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/inputs/elasticsearch/elasticsearch.go b/inputs/elasticsearch/elasticsearch.go index 7105403..cea082c 100644 --- a/inputs/elasticsearch/elasticsearch.go +++ b/inputs/elasticsearch/elasticsearch.go @@ -242,7 +242,7 @@ func (ins *Instance) gatherOnce(slist *list.SafeList) { // Gather node ID if info.nodeID, err = ins.gatherNodeID(s + "/_nodes/_local/name"); err != nil { - slist.PushFront(inputs.NewSample("up", 0, ins.Labels)) + slist.PushFront(inputs.NewSample("up", 0, map[string]string{"address": s}, ins.Labels)) log.Println("E! failed to gather node id:", err) return } @@ -250,12 +250,12 @@ func (ins *Instance) gatherOnce(slist *list.SafeList) { // get cat/master information here so NodeStats can determine // whether this node is the Master if info.masterID, err = ins.getCatMaster(s + "/_cat/master"); err != nil { - slist.PushFront(inputs.NewSample("up", 0, ins.Labels)) + slist.PushFront(inputs.NewSample("up", 0, map[string]string{"address": s}, ins.Labels)) log.Println("E! failed to get cat master:", err) return } - slist.PushFront(inputs.NewSample("up", 1, ins.Labels)) + slist.PushFront(inputs.NewSample("up", 1, map[string]string{"address": s}, ins.Labels)) ins.serverInfoMutex.Lock() ins.serverInfo[s] = info ins.serverInfoMutex.Unlock() @@ -273,7 +273,7 @@ func (ins *Instance) gatherOnce(slist *list.SafeList) { url := ins.nodeStatsURL(s) // Always gather node stats - if err := ins.gatherNodeStats(url, slist); err != nil { + if err := ins.gatherNodeStats(url, s, slist); err != nil { log.Println("E! failed to gather node stats:", err) return } @@ -283,14 +283,14 @@ func (ins *Instance) gatherOnce(slist *list.SafeList) { if ins.ClusterHealthLevel != "" { url = url + "?level=" + ins.ClusterHealthLevel } - if err := ins.gatherClusterHealth(url, slist); err != nil { + if err := ins.gatherClusterHealth(url, s, slist); err != nil { log.Println("E! failed to gather cluster health:", err) return } } if ins.ClusterStats && (ins.serverInfo[s].isMaster() || !ins.Local) { - if err := ins.gatherClusterStats(s+"/_cluster/stats", slist); err != nil { + if err := ins.gatherClusterStats(s+"/_cluster/stats", s, slist); err != nil { log.Println("E! failed to gather cluster stats:", err) return } @@ -475,16 +475,17 @@ func (ins *Instance) categorizeIndices(indices map[string]indexStat) map[string] return categorizedIndexNames } -func (ins *Instance) gatherClusterStats(url string, slist *list.SafeList) error { +func (ins *Instance) gatherClusterStats(url string, address string, slist *list.SafeList) error { clusterStats := &clusterStats{} if err := ins.gatherJSONData(url, clusterStats); err != nil { return err } tags := map[string]string{ - "node_name": clusterStats.NodeName, - "cluster_name": clusterStats.ClusterName, + // "node_name": clusterStats.NodeName, // "status": clusterStats.Status, + "cluster_name": clusterStats.ClusterName, + "address": address, } stats := map[string]interface{}{ @@ -508,12 +509,14 @@ func (ins *Instance) gatherClusterStats(url string, slist *list.SafeList) error return nil } -func (ins *Instance) gatherClusterHealth(url string, slist *list.SafeList) error { +func (ins *Instance) gatherClusterHealth(url string, address string, slist *list.SafeList) error { healthStats := &clusterHealth{} if err := ins.gatherJSONData(url, healthStats); err != nil { return err } + addrTag := map[string]string{"address": address} + clusterFields := map[string]interface{}{ "cluster_health_active_primary_shards": healthStats.ActivePrimaryShards, "cluster_health_active_shards": healthStats.ActiveShards, @@ -531,7 +534,7 @@ func (ins *Instance) gatherClusterHealth(url string, slist *list.SafeList) error "cluster_health_unassigned_shards": healthStats.UnassignedShards, } - inputs.PushSamples(slist, clusterFields, map[string]string{"name": healthStats.ClusterName}, ins.Labels) + inputs.PushSamples(slist, clusterFields, map[string]string{"cluster_name": healthStats.ClusterName}, addrTag, ins.Labels) for name, health := range healthStats.Indices { indexFields := map[string]interface{}{ @@ -544,13 +547,13 @@ func (ins *Instance) gatherClusterHealth(url string, slist *list.SafeList) error "cluster_health_indices_status_code": mapHealthStatusToCode(health.Status), "cluster_health_indices_unassigned_shards": health.UnassignedShards, } - inputs.PushSamples(slist, indexFields, map[string]string{"index": name, "name": healthStats.ClusterName}, ins.Labels) + inputs.PushSamples(slist, indexFields, map[string]string{"index": name, "name": healthStats.ClusterName}, addrTag, ins.Labels) } return nil } -func (ins *Instance) gatherNodeStats(url string, slist *list.SafeList) error { +func (ins *Instance) gatherNodeStats(url string, address string, slist *list.SafeList) error { nodeStats := &struct { ClusterName string `json:"cluster_name"` Nodes map[string]*nodeStat `json:"nodes"` @@ -560,6 +563,8 @@ func (ins *Instance) gatherNodeStats(url string, slist *list.SafeList) error { return err } + addrTag := map[string]string{"address": address} + for id, n := range nodeStats.Nodes { // sort.Strings(n.Roles) tags := map[string]string{ @@ -571,7 +576,7 @@ func (ins *Instance) gatherNodeStats(url string, slist *list.SafeList) error { } for k, v := range n.Attributes { - slist.PushFront(inputs.NewSample("node_attribute_"+k, v, tags, ins.Labels)) + slist.PushFront(inputs.NewSample("node_attribute_"+k, v, tags, addrTag, ins.Labels)) } stats := map[string]interface{}{ @@ -600,7 +605,7 @@ func (ins *Instance) gatherNodeStats(url string, slist *list.SafeList) error { } for key, val := range f.Fields { - slist.PushFront(inputs.NewSample(p+"_"+key, val, tags, ins.Labels)) + slist.PushFront(inputs.NewSample(p+"_"+key, val, tags, addrTag, ins.Labels)) } } } diff --git a/pkg/jsonx/jsonflattener.go b/pkg/jsonx/jsonflattener.go index eb4e7fa..fb1ec77 100644 --- a/pkg/jsonx/jsonflattener.go +++ b/pkg/jsonx/jsonflattener.go @@ -2,7 +2,6 @@ package jsonx import ( "fmt" - "strconv" ) type JSONFlattener struct { @@ -45,16 +44,17 @@ func (f *JSONFlattener) FullFlattenJSON( } } case []interface{}: - for i, v := range t { - fieldkey := strconv.Itoa(i) - if fieldname != "" { - fieldkey = fieldname + "_" + fieldkey - } - err := f.FullFlattenJSON(fieldkey, v, convertString, convertBool) - if err != nil { - return err - } - } + // for i, v := range t { + // fieldkey := strconv.Itoa(i) + // if fieldname != "" { + // fieldkey = fieldname + "_" + fieldkey + // } + // err := f.FullFlattenJSON(fieldkey, v, convertString, convertBool) + // if err != nil { + // return err + // } + // } + return nil case float64: f.Fields[fieldname] = t case string: From 9112e403acf1ab098cc375c1a1c92c5ed54450bf Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Wed, 29 Jun 2022 11:47:23 +0800 Subject: [PATCH 02/14] modify default settings of plugin es --- conf/input.elasticsearch/elasticsearch.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/input.elasticsearch/elasticsearch.toml b/conf/input.elasticsearch/elasticsearch.toml index cfb097b..75b7719 100644 --- a/conf/input.elasticsearch/elasticsearch.toml +++ b/conf/input.elasticsearch/elasticsearch.toml @@ -23,20 +23,20 @@ http_timeout = "5s" local = true ## Set cluster_health to true when you want to obtain cluster health stats -cluster_health = false +cluster_health = true ## Adjust cluster_health_level when you want to obtain detailed health stats ## The options are ## - indices (default) ## - cluster -# cluster_health_level = "indices" +cluster_health_level = "cluster" ## Set cluster_stats to true when you want to obtain cluster stats. -cluster_stats = false +cluster_stats = true ## Indices to collect; can be one or more indices names or _all ## Use of wildcards is allowed. Use a wildcard at the end to retrieve index names that end with a changing value, like a date. -indices_include = ["_all"] +indices_include = [] ## One of "shards", "cluster", "indices" ## Currently only "shards" is implemented @@ -45,7 +45,7 @@ indices_level = "shards" ## node_stats is a list of sub-stats that you want to have gathered. Valid options ## are "indices", "os", "process", "jvm", "thread_pool", "fs", "transport", "http", ## "breaker". Per default, all stats are gathered. -# node_stats = ["jvm", "http"] +node_stats = ["jvm"] ## HTTP Basic Authentication username and password. username = "elastic" @@ -63,4 +63,4 @@ password = "password" ## Each 'indices_include' entry ending with a wildcard (*) or glob matching pattern will group together all indices that match it, and ## sort them by the date or number after the wildcard. Metrics then are gathered for only the 'num_most_recent_indices' amount of most ## recent indices. -# num_most_recent_indices = 0 \ No newline at end of file +num_most_recent_indices = 1 \ No newline at end of file From 84d205f714866a296b92a44c0885e6810832f696 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Wed, 29 Jun 2022 12:26:22 +0800 Subject: [PATCH 03/14] refactor es plugin --- conf/input.elasticsearch/elasticsearch.toml | 7 +++--- inputs/elasticsearch/elasticsearch.go | 24 +++++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/conf/input.elasticsearch/elasticsearch.toml b/conf/input.elasticsearch/elasticsearch.toml index 75b7719..3b1e328 100644 --- a/conf/input.elasticsearch/elasticsearch.toml +++ b/conf/input.elasticsearch/elasticsearch.toml @@ -36,11 +36,10 @@ cluster_stats = true ## Indices to collect; can be one or more indices names or _all ## Use of wildcards is allowed. Use a wildcard at the end to retrieve index names that end with a changing value, like a date. -indices_include = [] +# indices_include = ["zipkin*"] -## One of "shards", "cluster", "indices" -## Currently only "shards" is implemented -indices_level = "shards" +## use "shards" or blank string for indices level +indices_level = "" ## node_stats is a list of sub-stats that you want to have gathered. Valid options ## are "indices", "os", "process", "jvm", "thread_pool", "fs", "transport", "http", diff --git a/inputs/elasticsearch/elasticsearch.go b/inputs/elasticsearch/elasticsearch.go index cea082c..9605393 100644 --- a/inputs/elasticsearch/elasticsearch.go +++ b/inputs/elasticsearch/elasticsearch.go @@ -298,12 +298,12 @@ func (ins *Instance) gatherOnce(slist *list.SafeList) { if len(ins.IndicesInclude) > 0 && (ins.serverInfo[s].isMaster() || !ins.Local) { if ins.IndicesLevel != "shards" { - if err := ins.gatherIndicesStats(s+"/"+strings.Join(ins.IndicesInclude, ",")+"/_stats", slist); err != nil { + if err := ins.gatherIndicesStats(s+"/"+strings.Join(ins.IndicesInclude, ",")+"/_stats", s, slist); err != nil { log.Println("E! failed to gather indices stats:", err) return } } else { - if err := ins.gatherIndicesStats(s+"/"+strings.Join(ins.IndicesInclude, ",")+"/_stats?level=shards", slist); err != nil { + if err := ins.gatherIndicesStats(s+"/"+strings.Join(ins.IndicesInclude, ",")+"/_stats?level=shards", s, slist); err != nil { log.Println("E! failed to gather indices stats:", err) return } @@ -315,7 +315,7 @@ func (ins *Instance) gatherOnce(slist *list.SafeList) { wg.Wait() } -func (ins *Instance) gatherIndicesStats(url string, slist *list.SafeList) error { +func (ins *Instance) gatherIndicesStats(url string, address string, slist *list.SafeList) error { indicesStats := &struct { Shards map[string]interface{} `json:"_shards"` All map[string]interface{} `json:"_all"` @@ -326,9 +326,11 @@ func (ins *Instance) gatherIndicesStats(url string, slist *list.SafeList) error return err } + addrTag := map[string]string{"address": address} + // Total Shards Stats for k, v := range indicesStats.Shards { - slist.PushFront(inputs.NewSample("indices_stats_shards_total_"+k, v, ins.Labels)) + slist.PushFront(inputs.NewSample("indices_stats_shards_total_"+k, v, addrTag, ins.Labels)) } // All Stats @@ -340,16 +342,16 @@ func (ins *Instance) gatherIndicesStats(url string, slist *list.SafeList) error return err } for key, val := range jsonParser.Fields { - slist.PushFront(inputs.NewSample("indices_stats_"+m+"_"+key, val, map[string]string{"index_name": "_all"}, ins.Labels)) + slist.PushFront(inputs.NewSample("indices_stats_"+m+"_"+key, val, map[string]string{"index_name": "_all"}, addrTag, ins.Labels)) } } // Gather stats for each index. - return ins.gatherIndividualIndicesStats(indicesStats.Indices, slist) + return ins.gatherIndividualIndicesStats(indicesStats.Indices, addrTag, slist) } // gatherSortedIndicesStats gathers stats for all indices in no particular order. -func (ins *Instance) gatherIndividualIndicesStats(indices map[string]indexStat, slist *list.SafeList) error { +func (ins *Instance) gatherIndividualIndicesStats(indices map[string]indexStat, addrTag map[string]string, slist *list.SafeList) error { // Sort indices into buckets based on their configured prefix, if any matches. categorizedIndexNames := ins.categorizeIndices(indices) for _, matchingIndices := range categorizedIndexNames { @@ -369,7 +371,7 @@ func (ins *Instance) gatherIndividualIndicesStats(indices map[string]indexStat, for i := indicesCount - 1; i >= indicesCount-indicesToTrackCount; i-- { indexName := matchingIndices[i] - err := ins.gatherSingleIndexStats(indexName, indices[indexName], slist) + err := ins.gatherSingleIndexStats(indexName, indices[indexName], addrTag, slist) if err != nil { return err } @@ -379,7 +381,7 @@ func (ins *Instance) gatherIndividualIndicesStats(indices map[string]indexStat, return nil } -func (ins *Instance) gatherSingleIndexStats(name string, index indexStat, slist *list.SafeList) error { +func (ins *Instance) gatherSingleIndexStats(name string, index indexStat, addrTag map[string]string, slist *list.SafeList) error { indexTag := map[string]string{"index_name": name} stats := map[string]interface{}{ "primaries": index.Primaries, @@ -393,7 +395,7 @@ func (ins *Instance) gatherSingleIndexStats(name string, index indexStat, slist return err } for key, val := range f.Fields { - slist.PushFront(inputs.NewSample("indices_stats_"+m+"_"+key, val, indexTag, ins.Labels)) + slist.PushFront(inputs.NewSample("indices_stats_"+m+"_"+key, val, indexTag, addrTag, ins.Labels)) } } @@ -436,7 +438,7 @@ func (ins *Instance) gatherSingleIndexStats(name string, index indexStat, slist } for key, val := range flattened.Fields { - slist.PushFront(inputs.NewSample("indices_stats_shards_"+key, val, shardTags, ins.Labels)) + slist.PushFront(inputs.NewSample("indices_stats_shards_"+key, val, shardTags, addrTag, ins.Labels)) } } } From 0a8d35ca0d7e0c28532770ccaea8ef4f11009f5a Mon Sep 17 00:00:00 2001 From: kongfei Date: Wed, 29 Jun 2022 14:21:03 +0800 Subject: [PATCH 04/14] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d266052..2ec77f0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Categraf ![Release](https://github.com/flashcatcloud/categraf/workflows/Release/badge.svg) -[![Powered By Wine](https://img.shields.io/badge/Powered%20By-Flashcat-red)](https://flashcat.cloud/) +[![Powered By Flashcat](https://img.shields.io/badge/Powered%20By-Flashcat-red)](https://flashcat.cloud/) Categraf is a monitoring agent for nightingale / prometheus / m3db / victoriametrics / thanos / influxdb / tdengine. From 04fe1eb704b52d76fa990a9ccad23065e19b262e Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Wed, 29 Jun 2022 19:42:43 +0800 Subject: [PATCH 05/14] add breaker for node_stats --- conf/input.elasticsearch/elasticsearch.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/input.elasticsearch/elasticsearch.toml b/conf/input.elasticsearch/elasticsearch.toml index 3b1e328..6cbd55b 100644 --- a/conf/input.elasticsearch/elasticsearch.toml +++ b/conf/input.elasticsearch/elasticsearch.toml @@ -44,7 +44,7 @@ indices_level = "" ## node_stats is a list of sub-stats that you want to have gathered. Valid options ## are "indices", "os", "process", "jvm", "thread_pool", "fs", "transport", "http", ## "breaker". Per default, all stats are gathered. -node_stats = ["jvm"] +node_stats = ["jvm", "breaker"] ## HTTP Basic Authentication username and password. username = "elastic" From e9918290b0cd1f1c3dd66d7041679564cbe06985 Mon Sep 17 00:00:00 2001 From: lishijiang <342872472@qq.com> Date: Thu, 30 Jun 2022 09:46:16 +0800 Subject: [PATCH 06/14] clickhouse table add hostname column --- house/house.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/house/house.go b/house/house.go index 0150897..48ff150 100644 --- a/house/house.go +++ b/house/house.go @@ -125,6 +125,7 @@ func (mh *MetricsHouseType) post(conn driver.Conn, series []*types.Sample) error e.Timestamp, //会自动转换时间格式 e.Timestamp, //会自动转换时间格式 e.Metric, + config.Config.GetHostname(), convertTags(e), e.Value, ) @@ -147,6 +148,7 @@ CREATE TABLE IF NOT EXISTS %s ( event_time DateTime , event_date Date , metric LowCardinality(String) + , hostname LowCardinality(String) , tags String , value Float64 ) ENGINE = MergeTree From efdbf5c5e6ffe97184f4168365b1a24c5f2b1b8b Mon Sep 17 00:00:00 2001 From: kongfei Date: Thu, 30 Jun 2022 10:29:05 +0800 Subject: [PATCH 07/14] [fix] name_prefix invalid to prometheus sample --- parser/prometheus/parser.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/parser/prometheus/parser.go b/parser/prometheus/parser.go index 5e83a38..e443acf 100644 --- a/parser/prometheus/parser.go +++ b/parser/prometheus/parser.go @@ -3,6 +3,7 @@ package prometheus import ( "bufio" "bytes" + "flashcat.cloud/categraf/pkg/conv" "fmt" "io" "math" @@ -83,8 +84,7 @@ func (p *Parser) Parse(buf []byte, slist *list.SafeList) error { } else if mf.GetType() == dto.MetricType_HISTOGRAM { p.handleHistogram(m, tags, metricName, slist) } else { - fields := getNameAndValue(m, metricName) - inputs.PushSamples(slist, fields, tags) + p.handleSample(m, tags, metricName, slist) } } } @@ -113,6 +113,17 @@ func (p *Parser) handleHistogram(m *dto.Metric, tags map[string]string, metricNa } } +func (p *Parser) handleSample(m *dto.Metric, tags map[string]string, metricName string, slist *list.SafeList) { + fields := getNameAndValue(m, metricName) + for metric, value := range fields { + floatValue, err := conv.ToFloat64(value) + if err != nil { + continue + } + slist.PushFront(inputs.NewSample(prom.BuildMetric(p.NamePrefix, metric, ""), floatValue, tags)) + } +} + // Get labels from metric func (p *Parser) makeLabels(m *dto.Metric) map[string]string { result := map[string]string{} From fe549740ae6a06af08675da1c91fd6b6661942f4 Mon Sep 17 00:00:00 2001 From: kongfei Date: Thu, 30 Jun 2022 10:53:07 +0800 Subject: [PATCH 08/14] [fix] name_prefix invalid to prometheus sample --- inputs/inputs.go | 6 +----- parser/prometheus/parser.go | 7 +------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/inputs/inputs.go b/inputs/inputs.go index 29187c0..1b700e1 100644 --- a/inputs/inputs.go +++ b/inputs/inputs.go @@ -64,10 +64,6 @@ func NewSamples(fields map[string]interface{}, labels ...map[string]string) []*t func PushSamples(slist *list.SafeList, fields map[string]interface{}, labels ...map[string]string) { for metric, value := range fields { - floatValue, err := conv.ToFloat64(value) - if err != nil { - continue - } - slist.PushFront(NewSample(metric, floatValue, labels...)) + slist.PushFront(NewSample(metric, value, labels...)) } } diff --git a/parser/prometheus/parser.go b/parser/prometheus/parser.go index e443acf..2512ecd 100644 --- a/parser/prometheus/parser.go +++ b/parser/prometheus/parser.go @@ -3,7 +3,6 @@ package prometheus import ( "bufio" "bytes" - "flashcat.cloud/categraf/pkg/conv" "fmt" "io" "math" @@ -116,11 +115,7 @@ func (p *Parser) handleHistogram(m *dto.Metric, tags map[string]string, metricNa func (p *Parser) handleSample(m *dto.Metric, tags map[string]string, metricName string, slist *list.SafeList) { fields := getNameAndValue(m, metricName) for metric, value := range fields { - floatValue, err := conv.ToFloat64(value) - if err != nil { - continue - } - slist.PushFront(inputs.NewSample(prom.BuildMetric(p.NamePrefix, metric, ""), floatValue, tags)) + slist.PushFront(inputs.NewSample(prom.BuildMetric(p.NamePrefix, metric, ""), value, tags)) } } From a5872ea7979b51a8da143aff44b58b56fcfad9a2 Mon Sep 17 00:00:00 2001 From: kongfei Date: Thu, 30 Jun 2022 11:02:14 +0800 Subject: [PATCH 09/14] more detail name for prom parser method --- parser/prometheus/parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/prometheus/parser.go b/parser/prometheus/parser.go index 2512ecd..12b6fb2 100644 --- a/parser/prometheus/parser.go +++ b/parser/prometheus/parser.go @@ -83,7 +83,7 @@ func (p *Parser) Parse(buf []byte, slist *list.SafeList) error { } else if mf.GetType() == dto.MetricType_HISTOGRAM { p.handleHistogram(m, tags, metricName, slist) } else { - p.handleSample(m, tags, metricName, slist) + p.handleGaugeCounter(m, tags, metricName, slist) } } } @@ -112,7 +112,7 @@ func (p *Parser) handleHistogram(m *dto.Metric, tags map[string]string, metricNa } } -func (p *Parser) handleSample(m *dto.Metric, tags map[string]string, metricName string, slist *list.SafeList) { +func (p *Parser) handleGaugeCounter(m *dto.Metric, tags map[string]string, metricName string, slist *list.SafeList) { fields := getNameAndValue(m, metricName) for metric, value := range fields { slist.PushFront(inputs.NewSample(prom.BuildMetric(p.NamePrefix, metric, ""), value, tags)) From 60c5054c136826b2508ed4169467894aa266378d Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Thu, 30 Jun 2022 17:37:49 +0800 Subject: [PATCH 10/14] modify default settings of es plugin --- conf/input.elasticsearch/elasticsearch.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/input.elasticsearch/elasticsearch.toml b/conf/input.elasticsearch/elasticsearch.toml index 6cbd55b..ef8a60a 100644 --- a/conf/input.elasticsearch/elasticsearch.toml +++ b/conf/input.elasticsearch/elasticsearch.toml @@ -44,7 +44,7 @@ indices_level = "" ## node_stats is a list of sub-stats that you want to have gathered. Valid options ## are "indices", "os", "process", "jvm", "thread_pool", "fs", "transport", "http", ## "breaker". Per default, all stats are gathered. -node_stats = ["jvm", "breaker"] +node_stats = ["jvm", "breaker", "process", "os", "fs", "indices"] ## HTTP Basic Authentication username and password. username = "elastic" From 3a1a9fa0ddbac337905312ba05924eb4a1c43f58 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Thu, 30 Jun 2022 18:27:51 +0800 Subject: [PATCH 11/14] add switch dashboard.json --- inputs/switch_legacy/README.md | 4 + inputs/switch_legacy/dashboard.json | 143 ++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 inputs/switch_legacy/dashboard.json diff --git a/inputs/switch_legacy/README.md b/inputs/switch_legacy/README.md index 84e19d4..cfab03e 100644 --- a/inputs/switch_legacy/README.md +++ b/inputs/switch_legacy/README.md @@ -36,3 +36,7 @@ ips = [ ## 自定义 oid `[[instances.customs]]` 部分可以配置多个,表示自定义 oid,默认情况下,该插件采集的都是设备各个网口的监控数据以及CPU和内存的使用率,如果要采集别的 oid,就需要使用这个自定义功能 + +## 监控大盘 + +社区有小伙伴帮忙做了一个监控大盘,就在该 README 同级目录下,大家可以导入夜莺使用 \ No newline at end of file diff --git a/inputs/switch_legacy/dashboard.json b/inputs/switch_legacy/dashboard.json new file mode 100644 index 0000000..7374331 --- /dev/null +++ b/inputs/switch_legacy/dashboard.json @@ -0,0 +1,143 @@ +{ + "name": "通用交换机", + "tags": "", + "configs": { + "var": [ + { + "name": "IP", + "definition": "label_values(switch_legacy_cpu_util,ip)", + "multi": false + } + ], + "panels": [ + { + "targets": [ + { + "refId": "A", + "expr": "switch_legacy_cpu_util{ip=\"$IP\"}", + "legend": "cpu_util" + } + ], + "name": "CPU", + "options": { + "tooltip": { + "mode": "all", + "sort": "none" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "percent" + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 11, + "x": 1, + "y": 0, + "i": "23220dc3-ab9a-40f9-b1d3-135bb3bbb734", + "isResizable": true + }, + "id": "23220dc3-ab9a-40f9-b1d3-135bb3bbb734" + }, + { + "targets": [ + { + "refId": "A", + "expr": "switch_legacy_mem_util{ip=\"$IP\"}", + "legend": "mem_util" + } + ], + "name": "内存", + "options": { + "tooltip": { + "mode": "all", + "sort": "none" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "percent" + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 11, + "x": 12, + "y": 0, + "i": "7f36ea1c-fd51-43bf-93ab-2787d630c530", + "isResizable": true + }, + "id": "7f36ea1c-fd51-43bf-93ab-2787d630c530" + }, + { + "targets": [ + { + "refId": "A", + "expr": "switch_legacy_if_in{ip=\"$IP\"}", + "legend": "入流量" + }, + { + "expr": "switch_legacy_if_out{ip=\"$IP\"}", + "refId": "B", + "legend": "出流量" + } + ], + "name": "端口流量", + "options": { + "tooltip": { + "mode": "all", + "sort": "none" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bitsIEC" + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 22, + "x": 1, + "y": 4, + "i": "3d0263b1-e79e-45bd-9bea-380892fca44f", + "isResizable": true + }, + "id": "3d0263b1-e79e-45bd-9bea-380892fca44f" + } + ], + "version": "2.0.0" + } +} \ No newline at end of file From 2d1366c497ae93c9673f81abfc18b4732bcb9601 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Fri, 1 Jul 2022 12:26:10 +0800 Subject: [PATCH 12/14] update switch dashboard --- inputs/switch_legacy/dashboard.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/inputs/switch_legacy/dashboard.json b/inputs/switch_legacy/dashboard.json index 7374331..907b40a 100644 --- a/inputs/switch_legacy/dashboard.json +++ b/inputs/switch_legacy/dashboard.json @@ -5,8 +5,12 @@ "var": [ { "name": "IP", - "definition": "label_values(switch_legacy_cpu_util,ip)", + "definition": "label_values(switch_legacy_if_in,ip)", "multi": false + }, + { + "definition": "label_values(switch_legacy_if_in,ifname)", + "name": "Interface" } ], "panels": [ @@ -114,9 +118,7 @@ "legend": { "displayMode": "hidden" }, - "standardOptions": { - "util": "bitsIEC" - }, + "standardOptions": {}, "thresholds": {} }, "custom": { @@ -132,10 +134,10 @@ "w": 22, "x": 1, "y": 4, - "i": "3d0263b1-e79e-45bd-9bea-380892fca44f", + "i": "eec57d38-9a9f-4530-a0b5-e524d867759d", "isResizable": true }, - "id": "3d0263b1-e79e-45bd-9bea-380892fca44f" + "id": "eec57d38-9a9f-4530-a0b5-e524d867759d" } ], "version": "2.0.0" From 9c55edd53904e63cfdd87908d360adea4795bc6c Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Fri, 1 Jul 2022 14:04:05 +0800 Subject: [PATCH 13/14] add es dashboard.json --- inputs/elasticsearch/README.md | 12 + inputs/elasticsearch/dashboard.json | 1841 +++++++++++++++++++++++++++ 2 files changed, 1853 insertions(+) create mode 100644 inputs/elasticsearch/dashboard.json diff --git a/inputs/elasticsearch/README.md b/inputs/elasticsearch/README.md index f5b2996..ccf46d2 100644 --- a/inputs/elasticsearch/README.md +++ b/inputs/elasticsearch/README.md @@ -1,2 +1,14 @@ # elasticsearch +forked from telegraf/elasticsearch + +## 改动 + +- 不再处理json中的数组类型 +- 修改一些不合法的metric名称 +- 配置去掉cluster_stats_only_from_master +- 调整默认配置,不采集每个索引的监控数据,nodestats不采集http数据 + +## 监控大盘 + +在该 README 文件同级目录下的 dashboard.json 可以直接导入夜莺使用 \ No newline at end of file diff --git a/inputs/elasticsearch/dashboard.json b/inputs/elasticsearch/dashboard.json new file mode 100644 index 0000000..5ce7fb8 --- /dev/null +++ b/inputs/elasticsearch/dashboard.json @@ -0,0 +1,1841 @@ +{ + "name": "ElasticSearch by Categraf", + "tags": "", + "configs": { + "var": [ + { + "type": "query", + "name": "cluster", + "definition": "label_values(elasticsearch_up, cluster)" + }, + { + "type": "query", + "name": "node_host", + "definition": "label_values(elasticsearch_jvm_uptime_in_millis{cluster=\"$cluster\"}, node_host)", + "multi": true, + "allOption": true + } + ], + "panels": [ + { + "targets": [ + { + "refId": "A", + "expr": "min(elasticsearch_cluster_health_status_code{cluster=\"$cluster\"})" + } + ], + "name": "Cluster Status", + "custom": { + "textMode": "valueAndName", + "colorMode": "background", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "valueMappings": [ + { + "type": "special", + "match": { + "special": 0 + }, + "result": { + "text": "N/A" + } + }, + { + "type": "special", + "match": { + "special": 1 + }, + "result": { + "color": "#417505", + "text": "Green" + } + }, + { + "type": "special", + "match": { + "special": 2 + }, + "result": { + "color": "#f5a623", + "text": "Yellow" + } + }, + { + "type": "special", + "match": { + "special": 3 + }, + "result": { + "color": "#d0021b", + "text": "Red" + } + } + ], + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 0, + "y": 0, + "i": "f70f4198-dec2-40c0-97d9-6986c7001e73", + "isResizable": true + }, + "id": "f70f4198-dec2-40c0-97d9-6986c7001e73" + }, + { + "targets": [ + { + "refId": "A", + "expr": "min(elasticsearch_cluster_health_number_of_nodes{cluster=\"$cluster\"})" + } + ], + "name": "Nodes", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 4, + "y": 0, + "i": "7dafe232-ee30-479b-a2f1-e1064572c154", + "isResizable": true + }, + "id": "7dafe232-ee30-479b-a2f1-e1064572c154" + }, + { + "targets": [ + { + "refId": "A", + "expr": "min(elasticsearch_cluster_health_number_of_data_nodes{cluster=\"$cluster\"})" + } + ], + "name": "Data Nodes", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 8, + "y": 0, + "i": "c6953ef5-3e29-44dc-bf9e-74905934e9df", + "isResizable": true + }, + "id": "447fb784-a7e4-41cf-820f-6086837590e6" + }, + { + "targets": [ + { + "refId": "A", + "expr": "max(elasticsearch_process_cpu_percent{cluster=\"$cluster\", node_host=~\"$node_host\"})" + } + ], + "name": "CPU Util Percent", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "valueMappings": [ + { + "type": "range", + "match": { + "to": 50 + }, + "result": { + "color": "#417505" + } + }, + { + "type": "range", + "match": { + "from": 50, + "to": 80 + }, + "result": { + "color": "#f5a623" + } + }, + { + "type": "range", + "match": { + "from": 80 + }, + "result": { + "color": "#d0021b" + } + } + ], + "standardOptions": { + "util": "percent" + } + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 12, + "y": 0, + "i": "e6cf29e7-bb5d-4c8f-8aa6-67a63fc325c7", + "isResizable": true + }, + "id": "f0375f72-4ca1-474f-81e9-ce6b64f22204" + }, + { + "targets": [ + { + "refId": "A", + "expr": "max(elasticsearch_jvm_mem_heap_used_percent{cluster=\"$cluster\", node_host=~\"$node_host\"})" + } + ], + "name": "JVM Heap Util Percent", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "valueMappings": [ + { + "type": "range", + "match": { + "to": 50 + }, + "result": { + "color": "#417505" + } + }, + { + "type": "range", + "match": { + "from": 50, + "to": 80 + }, + "result": { + "color": "#f5a623" + } + }, + { + "type": "range", + "match": { + "from": 80 + }, + "result": { + "color": "#d0021b" + } + } + ], + "standardOptions": { + "util": "percent" + } + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 16, + "y": 0, + "i": "34ae1975-6acb-48a7-adce-1d67b7c581ec", + "isResizable": true + }, + "id": "288ee5f1-b484-43f5-86bf-5b81c01b3c2c" + }, + { + "targets": [ + { + "refId": "A", + "expr": "max(elasticsearch_cluster_health_number_of_pending_tasks{cluster=\"$cluster\"})" + } + ], + "name": "Pending Tasks", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "valueMappings": [ + { + "type": "range", + "match": { + "to": 1 + }, + "result": { + "color": "#417505" + } + }, + { + "type": "range", + "match": { + "from": 1 + }, + "result": { + "color": "#d0021b" + } + } + ], + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 20, + "y": 0, + "i": "01c403f3-c3b0-4910-84df-a50d4968bcd6", + "isResizable": true + }, + "id": "4dd345c1-2bc1-474e-83b1-153be10a5b5b" + }, + { + "type": "row", + "id": "b398d46e-7345-4cc9-90b4-918cbd1e8d1f", + "name": "Breakers", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 3, + "i": "b398d46e-7345-4cc9-90b4-918cbd1e8d1f", + "isResizable": false + }, + "panels": [] + }, + { + "targets": [ + { + "refId": "A", + "expr": "sum({__name__=~\"elasticsearch_breakers_.+_tripped\", cluster=\"$cluster\", node_host=~\"$node_host\"}) by (node_host)", + "legend": "" + } + ], + "name": "Tripped for breakers", + "options": { + "tooltip": { + "mode": "all", + "sort": "none" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.04, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 4, + "i": "15882e6f-0585-4035-bfb6-71cb9caaa0a8", + "isResizable": true + }, + "id": "15882e6f-0585-4035-bfb6-71cb9caaa0a8" + }, + { + "targets": [ + { + "refId": "A", + "expr": "{__name__=~\"elasticsearch_breakers_.+_size_in_bytes\", cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legend": "{{__name__}} {{node_host}}" + } + ], + "name": "Estimated size in bytes of breaker", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.04, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 12, + "y": 4, + "i": "d05d16d0-022d-49f8-9b55-2388c4cbb2b1", + "isResizable": true + }, + "id": "8adbc8e4-f630-4a25-98e3-ee03dec92011" + }, + { + "type": "row", + "id": "2aadd697-3bed-4f70-bc74-4bc801ef7d1d", + "name": "Shards", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 8, + "i": "2aadd697-3bed-4f70-bc74-4bc801ef7d1d", + "isResizable": false + }, + "panels": [] + }, + { + "targets": [ + { + "refId": "A", + "expr": "max(elasticsearch_cluster_health_active_shards{cluster=\"$cluster\"})" + } + ], + "name": "Active shards", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 0, + "y": 9, + "i": "7aec074e-1672-4dbb-8529-28292f9a4221", + "isResizable": true + }, + "id": "7aec074e-1672-4dbb-8529-28292f9a4221" + }, + { + "targets": [ + { + "refId": "A", + "expr": "max(elasticsearch_cluster_health_active_primary_shards{cluster=\"$cluster\"})" + } + ], + "name": "Active primary shards", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 4, + "y": 9, + "i": "fe82bb33-7b8d-4909-adda-64a4121f29fd", + "isResizable": true + }, + "id": "f138daa7-b98f-4575-89e3-42363a8102c9" + }, + { + "targets": [ + { + "refId": "A", + "expr": "max(elasticsearch_cluster_health_initializing_shards{cluster=\"$cluster\"})" + } + ], + "name": "Initializing shards", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 8, + "y": 9, + "i": "de2c46fd-dcfd-43a3-847b-9fd1320dfaa7", + "isResizable": true + }, + "id": "7412543a-dba5-4624-96ff-11e30b7e8ff4" + }, + { + "targets": [ + { + "refId": "A", + "expr": "max(elasticsearch_cluster_health_relocating_shards{cluster=\"$cluster\"})" + } + ], + "name": "Relocating shards", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 12, + "y": 9, + "i": "4403206d-a491-4564-9f61-db25a6beb356", + "isResizable": true + }, + "id": "2f26f24f-2a79-4552-b79d-60b41fa3aee6" + }, + { + "targets": [ + { + "refId": "A", + "expr": "max(elasticsearch_cluster_health_delayed_unassigned_shards{cluster=\"$cluster\"})" + } + ], + "name": "Delayed Unassigned shards", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 16, + "y": 9, + "i": "e24c847a-5704-4b7c-861e-75dd4e4b59d8", + "isResizable": true + }, + "id": "394a83cc-f4e1-467e-83fa-b77d2c2be907" + }, + { + "targets": [ + { + "refId": "A", + "expr": "max(elasticsearch_cluster_health_unassigned_shards{cluster=\"$cluster\"})" + } + ], + "name": "Unassigned shards", + "custom": { + "textMode": "valueAndName", + "colorMode": "value", + "calc": "lastNotNull", + "colSpan": 1, + "textSize": {} + }, + "options": { + "standardOptions": {} + }, + "version": "2.0.0", + "type": "stat", + "layout": { + "h": 3, + "w": 4, + "x": 20, + "y": 9, + "i": "d82314d5-028c-41fb-a79f-34699d56d17a", + "isResizable": true + }, + "id": "720b9719-5c37-44d9-bce8-539308afa6ae" + }, + { + "type": "row", + "id": "a1bc2be7-723b-4fe4-b217-bfdd8248559e", + "name": "JVM", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 12, + "i": "a1bc2be7-723b-4fe4-b217-bfdd8248559e", + "isResizable": false + }, + "panels": [] + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_jvm_gc_collectors_old_collection_count{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legend": "old gc {{node_host}}" + }, + { + "expr": "irate(elasticsearch_jvm_gc_collectors_young_collection_count{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "refId": "B", + "legend": "young gc {{node_host}}" + } + ], + "name": "GC counts / second", + "options": { + "tooltip": { + "mode": "all", + "sort": "none" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 13, + "i": "ee0c56e0-8f8e-4cbe-ac41-de2afad7b75a", + "isResizable": true + }, + "id": "ee0c56e0-8f8e-4cbe-ac41-de2afad7b75a" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_jvm_gc_collectors_old_collection_time_in_millis{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legend": "old gc {{node_host}}" + }, + { + "expr": "irate(elasticsearch_jvm_gc_collectors_young_collection_time_in_millis{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "refId": "B", + "legend": "young gc {{node_host}}" + } + ], + "name": "GC time in millis", + "options": { + "tooltip": { + "mode": "all", + "sort": "none" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 12, + "y": 13, + "i": "4f21ebfc-b51c-469b-b149-479966750920", + "isResizable": true + }, + "id": "5c361278-8a94-4b16-afdd-e6def804b9ff" + }, + { + "targets": [ + { + "refId": "A", + "expr": "{__name__=~\"elasticsearch_jvm_mem_pools_.*\", cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legend": "{{__name__}} {{node_name}}" + } + ], + "name": "Mem pools", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bytesIEC", + "decimals": 1 + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 17, + "i": "5105f1dc-26cb-4818-a04d-90f2e5803da2", + "isResizable": true + }, + "id": "ff81d109-79e5-4909-8765-857a75cebf17" + }, + { + "targets": [ + { + "refId": "A", + "expr": "{__name__=~\"elasticsearch_jvm_mem_.+_committed_in_bytes\", cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legend": "{{__name__}} {{node_name}}" + } + ], + "name": "Committed Bytes", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bytesIEC", + "decimals": 1 + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 12, + "y": 17, + "i": "14f655ac-9c1c-40fa-bfef-158cc8601ead", + "isResizable": true + }, + "id": "a0096936-3790-40a1-b2ad-d7805945b948" + }, + { + "type": "row", + "id": "e1d04a8c-81ee-4949-87de-3b70bc637584", + "name": "Translog", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 21, + "i": "e1d04a8c-81ee-4949-87de-3b70bc637584", + "isResizable": false + }, + "panels": [] + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_indices_translog_operations{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Total translog operations", + "options": { + "tooltip": { + "mode": "all", + "sort": "none" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 22, + "i": "45aafb11-c694-4686-89ab-685068f91560", + "isResizable": true + }, + "id": "45aafb11-c694-4686-89ab-685068f91560" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_indices_translog_size_in_bytes{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Total translog size in bytes", + "options": { + "tooltip": { + "mode": "all", + "sort": "none" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bytesIEC", + "decimals": 1 + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 12, + "y": 22, + "i": "56806f8a-525a-4ab4-a9d3-c83559ae4828", + "isResizable": true + }, + "id": "09ca6329-8eec-4a61-b19e-9bbeea2b9712" + }, + { + "type": "row", + "id": "d9694c3f-9a14-4bde-9427-88531b0ea3a6", + "name": "Disk and Network", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 26, + "i": "d9694c3f-9a14-4bde-9427-88531b0ea3a6", + "isResizable": false + }, + "panels": [] + }, + { + "targets": [ + { + "refId": "A", + "expr": "1-(elasticsearch_fs_total_available_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"}/elasticsearch_fs_total_total_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"})", + "legend": "{{node_host}}" + } + ], + "name": "Disk usage %", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "percentUnit" + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 27, + "i": "6c0d9b3c-dda5-4da9-825e-33f650dbb008", + "isResizable": true + }, + "id": "6c0d9b3c-dda5-4da9-825e-33f650dbb008" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_transport_tx_size_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}: sent" + }, + { + "expr": "-irate(elasticsearch_transport_rx_size_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "refId": "B", + "legend": "{{node_host}}: received" + } + ], + "name": "Network usage", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 12, + "y": 27, + "i": "4f7ce5a7-2771-4cbf-a569-b1a90b070b93", + "isResizable": true + }, + "id": "4f7ce5a7-2771-4cbf-a569-b1a90b070b93" + }, + { + "type": "row", + "id": "292b6c24-5471-4eeb-9d65-1a1e7a684fe3", + "name": "Documents", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 31, + "i": "292b6c24-5471-4eeb-9d65-1a1e7a684fe3", + "isResizable": false + }, + "panels": [] + }, + { + "targets": [ + { + "refId": "A", + "expr": "elasticsearch_indices_docs_count{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legend": "{{node_host}}" + } + ], + "name": "Documents count on node", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 32, + "i": "e98839c4-e3f3-4e6e-be3a-c44b70e6072c", + "isResizable": true + }, + "id": "e98839c4-e3f3-4e6e-be3a-c44b70e6072c" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_indices_indexing_index_total{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Documents indexed rate", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 12, + "y": 32, + "i": "45c4e3d9-90f1-41bd-8169-1d8c0a921ba9", + "isResizable": true + }, + "id": "45c4e3d9-90f1-41bd-8169-1d8c0a921ba9" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_indices_docs_deleted{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Documents deleted rate", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 36, + "i": "3b2a922d-4423-4845-8cfc-95970f3300d6", + "isResizable": true + }, + "id": "3b2a922d-4423-4845-8cfc-95970f3300d6" + }, + { + "targets": [ + { + "refId": "A", + "expr": "rate(elasticsearch_indices_merges_total_docs{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Documents merged rate", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 6, + "x": 12, + "y": 36, + "i": "764fbcf7-3056-41ef-b62a-51813a6c315f", + "isResizable": true + }, + "id": "764fbcf7-3056-41ef-b62a-51813a6c315f" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_indices_merges_total_size_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Documents merged bytes", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bytesIEC", + "decimals": 1 + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 6, + "x": 18, + "y": 36, + "i": "97b5d900-e91e-4e0e-8184-f508a3433bc6", + "isResizable": true + }, + "id": "7cc04ae4-946d-4837-9ea9-764a7cc2eecd" + }, + { + "type": "row", + "id": "a0545cbd-6df5-4845-90e0-88a710f738ba", + "name": "Times", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 40, + "i": "a0545cbd-6df5-4845-90e0-88a710f738ba", + "isResizable": false + }, + "panels": [] + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_indices_search_query_time_in_millis{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Query time(Unit: ms)", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 41, + "i": "ad0445b0-8539-440d-bbf4-712450132a7a", + "isResizable": true + }, + "id": "ad0445b0-8539-440d-bbf4-712450132a7a" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_indices_indexing_index_time_in_millis{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Indexing time(Unit: ms)", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 12, + "y": 41, + "i": "2af98dc1-f24e-4c7b-bd2c-723224facc5d", + "isResizable": true + }, + "id": "c3cf6c57-c4ce-4bc2-a150-df32c4951144" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_indices_merges_total_time_in_millis{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Merging time(Unit: ms)", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 45, + "i": "553c7da8-2d83-4ea0-a6ef-b064a5101633", + "isResizable": true + }, + "id": "022db454-70ba-49f5-8c11-f89b76d145cb" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate(elasticsearch_indices_indexing_throttle_time_in_millis{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Indexing throttle time(Unit: ms)", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 12, + "y": 45, + "i": "51056e8d-6dc8-4c7f-91e9-9c24c056462d", + "isResizable": true + }, + "id": "f20bad4f-656c-428a-a1cf-aafb7d92137c" + }, + { + "type": "row", + "id": "2c56fb7a-85a0-4396-a317-6754d761cff2", + "name": "Thread Pool", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 49, + "i": "2c56fb7a-85a0-4396-a317-6754d761cff2", + "isResizable": false + }, + "panels": [] + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate\n(label_replace({__name__=~\"elasticsearch_thread_pool_(.*)_rejected\", cluster=\"$cluster\", node_host=~\"$node_host\"}, \"type\", \"$1\", \"__name__\", \"elasticsearch_thread_pool_(.*)_rejected\")[5m:])", + "legend": "{{node_host}}: {{type}}" + } + ], + "name": "Thread Pool operations rejected", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 6, + "x": 0, + "y": 50, + "i": "cefafeb9-fc8a-4c73-92b3-648cd6f08b11", + "isResizable": true + }, + "id": "cefafeb9-fc8a-4c73-92b3-648cd6f08b11" + }, + { + "targets": [ + { + "refId": "A", + "expr": "label_replace({__name__=~\"elasticsearch_thread_pool_(.*)_active\", cluster=\"$cluster\", node_host=~\"$node_host\"}, \"type\", \"$1\", \"__name__\", \"elasticsearch_thread_pool_(.*)_active\")", + "legend": "{{node_host}}: {{type}}" + } + ], + "name": "Thread Pool threads active", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 6, + "x": 6, + "y": 50, + "i": "793e98e7-2729-4106-940c-ecccff1d4b89", + "isResizable": true + }, + "id": "0ab67903-16ea-4001-b784-ae04d8b815c0" + }, + { + "targets": [ + { + "refId": "A", + "expr": "label_replace({__name__=~\"elasticsearch_thread_pool_(.*)_queue\", cluster=\"$cluster\", node_host=~\"$node_host\"}, \"type\", \"$1\", \"__name__\", \"elasticsearch_thread_pool_(.*)_queue\")", + "legend": "{{node_host}}: {{type}}" + } + ], + "name": "Thread Pool threads queued", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 6, + "x": 12, + "y": 50, + "i": "9a14c86a-86af-4464-ac82-41f621ce7166", + "isResizable": true + }, + "id": "bb5dc07d-673b-4e2d-b44c-441acfa7c27b" + }, + { + "targets": [ + { + "refId": "A", + "expr": "irate\n(label_replace({__name__=~\"elasticsearch_thread_pool_(.*)_completed\", cluster=\"$cluster\", node_host=~\"$node_host\"}, \"type\", \"$1\", \"__name__\", \"elasticsearch_thread_pool_(.*)_completed\")[5m:])", + "legend": "{{node_host}}: {{type}}" + } + ], + "name": "Thread Pool operations completed", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 6, + "x": 18, + "y": 50, + "i": "d5f42ea7-bdb5-44da-9ba6-7c0f09ba7c71", + "isResizable": true + }, + "id": "4cac1498-c141-483f-97c6-e1177317a2ea" + }, + { + "type": "row", + "id": "a5c3b529-c329-4a66-aab0-6caebba8be96", + "name": "Caches", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 54, + "i": "a5c3b529-c329-4a66-aab0-6caebba8be96", + "isResizable": false + }, + "panels": [] + }, + { + "targets": [ + { + "refId": "A", + "expr": "elasticsearch_indices_fielddata_memory_size_in_bytes{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legend": "{{node_host}}" + } + ], + "name": "Field data memory size", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bytesIEC", + "decimals": 0 + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 4, + "x": 0, + "y": 55, + "i": "5247f393-a934-4d9e-be0f-40b177d2be80", + "isResizable": true + }, + "id": "5247f393-a934-4d9e-be0f-40b177d2be80" + }, + { + "targets": [ + { + "refId": "A", + "expr": "rate(elasticsearch_indices_fielddata_evictions{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Field data evictions", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bytesIEC", + "decimals": 0 + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 4, + "x": 4, + "y": 55, + "i": "c33fceb6-df37-483e-ba53-4ffa5f5e5456", + "isResizable": true + }, + "id": "b87c56f7-4e50-4d15-8bcd-1218fee879d9" + }, + { + "targets": [ + { + "refId": "A", + "expr": "elasticsearch_indices_query_cache_memory_size_in_bytes{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legend": "{{node_host}}" + } + ], + "name": "Query cache size", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bytesIEC", + "decimals": 0 + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 4, + "x": 8, + "y": 55, + "i": "445484f4-32d3-4569-af8d-76790d0aa56b", + "isResizable": true + }, + "id": "ae2d0a7a-b6cd-4fd5-99d4-3c4289b8b5a8" + }, + { + "targets": [ + { + "refId": "A", + "expr": "rate(elasticsearch_indices_query_cache_evictions{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Query cache evictions", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bytesIEC", + "decimals": 0 + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 4, + "x": 12, + "y": 55, + "i": "ce9aa255-9d5b-44ed-9071-85e9d95675ec", + "isResizable": true + }, + "id": "78e4badc-8d51-4aa6-81c5-d1c9183810a2" + }, + { + "targets": [ + { + "refId": "A", + "expr": "rate(elasticsearch_indices_request_cache_evictions{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legend": "{{node_host}}" + } + ], + "name": "Request cache evictions", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": { + "util": "bytesIEC", + "decimals": 0 + }, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 8, + "x": 16, + "y": 55, + "i": "b8b2604c-d84f-426f-b033-af9035a9e80d", + "isResizable": true + }, + "id": "296b43f1-2f33-492a-bce8-6f0fde1e7b52" + }, + { + "type": "row", + "id": "d3161bf5-27a7-4552-a7d6-7b2b7d46b611", + "name": "Segments", + "collapsed": true, + "layout": { + "h": 1, + "w": 24, + "x": 0, + "y": 59, + "i": "d3161bf5-27a7-4552-a7d6-7b2b7d46b611", + "isResizable": false + } + }, + { + "targets": [ + { + "refId": "A", + "expr": "elasticsearch_indices_segments_count{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legend": "{{node_host}}" + } + ], + "name": "Count of index segments", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 0, + "y": 60, + "i": "1537acaa-d5ce-48c5-b740-26fd543eb120", + "isResizable": true + }, + "id": "1537acaa-d5ce-48c5-b740-26fd543eb120" + }, + { + "targets": [ + { + "refId": "A", + "expr": "elasticsearch_indices_segments_memory_in_bytes{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legend": "{{node_host}}" + } + ], + "name": "Current memory size of segments in bytes", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "hidden" + }, + "standardOptions": {}, + "thresholds": {} + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "fillOpacity": 0.5, + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 4, + "w": 12, + "x": 12, + "y": 60, + "i": "9c8efed6-7ced-4805-87e0-3da3b18d2989", + "isResizable": true + }, + "id": "a1c34fa4-4549-41a6-8d31-d25e7d860106" + } + ], + "version": "2.0.0" + } +} \ No newline at end of file From fc8666e9883e07a668fbbc2275e91cbde110e9d6 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Fri, 1 Jul 2022 16:16:06 +0800 Subject: [PATCH 14/14] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ec77f0..c20660b 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Click on the links to see the README of each plugin. - [ ] rocketmq - [ ] activemq - [ ] kafka -- [ ] elasticsearch +- [x] [elasticsearch](inputs/elasticsearch) - [x] windows - [ ] mssql - [ ] iis