Skip to content

Commit

Permalink
feat: add new es exporter (#858)
Browse files Browse the repository at this point in the history
Signed-off-by: xmh1011 <1197843839@qq.com>
  • Loading branch information
xmh1011 authored Mar 28, 2024
1 parent 9c27fdb commit a59ef21
Show file tree
Hide file tree
Showing 78 changed files with 21,387 additions and 569 deletions.
68 changes: 55 additions & 13 deletions conf/input.elasticsearch/elasticsearch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,30 @@
# append some labels to metrics
# labels = { cluster="cloud-n9e-es" }

# either /_nodes/stats or /_nodes/_local/stats depending on this setting
local = false

## specify a list of one or more Elasticsearch servers
# servers = ["http://localhost:9200"]
servers = []

## HTTP Basic Authentication username and password.
username = "elastic"
password = "password"

## API key for authentication
# api_key = "your_api_key"

## Timeout for HTTP requests to the elastic search server(s)
http_timeout = "10s"

# either /_nodes/stats or /_nodes/_local/stats depending on this setting
local = false
## all_nodes If true, query stats for all nodes in the cluster, rather than just the node we connect to.
all_nodes = true

## 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", "process", "os", "fs", "indices", "thread_pool", "transport"]

## Set cluster_health to true when you want to obtain cluster health stats
cluster_health = true
Expand All @@ -27,7 +42,7 @@ cluster_health = true
## The options are
## - indices (default)
## - cluster
cluster_health_level = "cluster"
cluster_health_level = "indices"

## Set cluster_stats to true when you want to obtain cluster stats.
cluster_stats = true
Expand All @@ -36,17 +51,44 @@ cluster_stats = true
## 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 = ["zipkin*"]

## use "shards" or blank string for indices level
indices_level = ""
## Exclude indices from the list of indices to collect. If true, query stats for all indices in the cluster.
export_indices = false

## 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", "process", "os", "fs", "indices", "thread_pool", "transport"]
## Export indices settings. If true, query settings stats for all indices in the cluster.
export_indices_settings = false

## HTTP Basic Authentication username and password.
username = "elastic"
password = "password"
## Export indices mappings. If true, query mappings stats for all indices in the cluster.
export_indices_mappings = false

## Export indices aliases. If true, query aliases stats for all indices in the cluster.
export_indices_aliases = false

## Export index lifecycle politics for indices in the cluster.
export_ilm = false

## If true, query stats for all indices in the cluster, including shard-level stats (implies `es.indices=true`).
export_shards = false

## If true, query stats for SLM.
export_slm = false

## If true, query stats for data streams.
export_data_stream = false

## If true, query stats for snapshots.
export_snapshots = false

## Export cluster settings. If true, query settings stats for the cluster.
export_cluster_settings = false

# Cluster info update interval for the cluster label (default: 5m)
cluster_info_interval = "5m"

# Region for AWS elasticsearch
# aws_region = ""

# Role ARN of an IAM role to assume.
# aws_role_arn = ""

## Optional TLS Config
# use_tls = false
Expand All @@ -60,4 +102,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 = 1
num_most_recent_indices = 1
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ require (
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tjfoc/gmsm v1.3.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
golang.org/x/arch v0.3.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
Expand All @@ -122,6 +123,7 @@ require (
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible
github.com/NVIDIA/go-dcgm v0.0.0-20240118201113-3385e277e49f
github.com/NVIDIA/go-nvml v0.12.0-2
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/alibabacloud-go/cms-20190101/v8 v8.0.0
github.com/alibabacloud-go/cms-export-20211101/v2 v2.0.0
github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.0
Expand All @@ -135,6 +137,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/sts v1.18.3
github.com/beevik/ntp v1.3.1
github.com/bits-and-blooms/bitset v1.13.0
github.com/blang/semver/v4 v4.0.0
github.com/bmatcuk/doublestar/v3 v3.0.0
github.com/coreos/go-systemd/v22 v22.5.0
github.com/dennwc/btrfs v0.0.0-20230312211831-a1f570bd01a1
Expand Down Expand Up @@ -260,7 +263,7 @@ require (
github.com/hashicorp/nomad/api v0.0.0-20221102143410-8a95f1239005 // indirect
github.com/hashicorp/serf v0.9.7 // indirect
github.com/hetznercloud/hcloud-go v1.35.3 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/imdario/mergo v0.3.12
github.com/ionos-cloud/sdk-go/v6 v6.1.3 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ github.com/Shopify/sarama v1.36.0/go.mod h1:9glG3eX83tgVYJ5aVtrjVUnEsOPqQIBGx1BW
github.com/Shopify/toxiproxy/v2 v2.4.0 h1:O1e4Jfvr/hefNTNu+8VtdEG5lSeamJRo4aKhMOKNM64=
github.com/Shopify/toxiproxy/v2 v2.4.0/go.mod h1:3ilnjng821bkozDRxNoo64oI/DKqM+rOyJzb564+bvg=
github.com/alecthomas/go-thrift v0.0.0-20170109061633-7914173639b2/go.mod h1:CxCgO+NdpMdi9SsTlGbc0W+/UNxO3I0AabOEJZ3w61w=
github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY=
github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE=
github.com/alecthomas/kong v0.2.1/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI=
github.com/alecthomas/participle v0.4.1 h1:P2PJWzwrSpuCWXKnzqvw0b0phSfH1kJo4p2HvLynVsI=
github.com/alecthomas/participle v0.4.1/go.mod h1:T8u4bQOSMwrkTWOSyt8/jSFPEnRtd0FKFMjVfYBlqPs=
Expand Down Expand Up @@ -193,6 +195,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE=
github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/bmatcuk/doublestar/v3 v3.0.0 h1:TQtVPlDnAYwcrVNB2JiGuMc++H5qzWZd9PhkNo5WyHI=
github.com/bmatcuk/doublestar/v3 v3.0.0/go.mod h1:6PcTVMw80pCY1RVuoqu3V++99uQB3vsSYKPTd8AWA0k=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
Expand Down Expand Up @@ -1063,6 +1067,8 @@ github.com/xdg/scram v1.0.5 h1:TuS0RFmt5Is5qm9Tm2SoD89OPqe4IRiFtyFY4iwWXsw=
github.com/xdg/scram v1.0.5/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
github.com/xdg/stringprep v1.0.3 h1:cmL5Enob4W83ti/ZHuZLuKD/xqJfus4fVPwE+/BDm+4=
github.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
Expand Down
Loading

0 comments on commit a59ef21

Please sign in to comment.