diff --git a/receiver/elasticsearchreceiver/README.md b/receiver/elasticsearchreceiver/README.md index b74d6db0f2a1..ad837ddd7d02 100644 --- a/receiver/elasticsearchreceiver/README.md +++ b/receiver/elasticsearchreceiver/README.md @@ -1,11 +1,16 @@ # Elasticsearch Receiver + | Status | | | ------------------------ |-----------| -| Stability | [beta] | +| Stability | [beta] | | Supported pipeline types | metrics | | Distributions | [contrib] | +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + This receiver queries the Elasticsearch [node stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html), [cluster health](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html) and [index stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html) endpoints in order to scrape metrics from a running elasticsearch cluster. ## Prerequisites @@ -18,6 +23,7 @@ See the [Elasticsearch docs](https://www.elastic.co/guide/en/elasticsearch/refer ## Configuration The following settings are optional: + - `metrics` (default: see `DefaultMetricsSettings` [here](./internal/metadata/generated_metrics.go): Allows enabling and disabling specific metrics from being collected in this receiver. - `nodes` (default: `["_all"]`): Allows specifying node filters that define which nodes are scraped for node-level and cluster-level metrics. See [the Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/cluster.html#cluster-nodes) for allowed filters. If this option is left explicitly empty, then no node-level metrics will be scraped and cluster-level metrics will scrape only metrics related to cluster's health. - `skip_cluster_metrics` (default: `false`): If true, cluster-level metrics will not be scraped. @@ -49,6 +55,7 @@ The full list of settings exposed for this receiver are documented [here](./conf ## Metrics The following metric are available with versions: + - `elasticsearch.indexing_pressure.memory.limit` >= [7.10](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/release-notes-7.10.0.html) - `elasticsearch.node.shards.data_set.size` >= [7.13](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/release-notes-7.13.0.html) - `elasticsearch.cluster.state_update.count` >= [7.16.0](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/release-notes-7.16.0.html) @@ -69,5 +76,3 @@ This feature gate will eventually be enabled by default, and eventually the old to give users time to migrate to the new implementation. The target release for this featuregate to be enabled by default is 0.69.0. -[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/elasticsearchreceiver/factory.go b/receiver/elasticsearchreceiver/factory.go index 95644145e06b..59978b60d944 100644 --- a/receiver/elasticsearchreceiver/factory.go +++ b/receiver/elasticsearchreceiver/factory.go @@ -30,7 +30,6 @@ import ( const ( typeStr = "elasticsearch" - stability = component.StabilityLevelBeta defaultCollectionInterval = 10 * time.Second defaultHTTPClientTimeout = 10 * time.Second ) @@ -40,7 +39,7 @@ func NewFactory() receiver.Factory { return receiver.NewFactory( typeStr, createDefaultConfig, - receiver.WithMetrics(createMetricsReceiver, stability)) + receiver.WithMetrics(createMetricsReceiver, metadata.Stability)) } // createDefaultConfig creates the default elasticsearchreceiver config. diff --git a/receiver/elasticsearchreceiver/internal/metadata/generated_status.go b/receiver/elasticsearchreceiver/internal/metadata/generated_status.go new file mode 100644 index 000000000000..ccc21e99f23b --- /dev/null +++ b/receiver/elasticsearchreceiver/internal/metadata/generated_status.go @@ -0,0 +1,12 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +const ( + Type = "elasticsearchreceiver" + Stability = component.StabilityLevelBeta +) diff --git a/receiver/elasticsearchreceiver/metadata.yaml b/receiver/elasticsearchreceiver/metadata.yaml index c2c88e4dd62c..ddeb5073a80b 100644 --- a/receiver/elasticsearchreceiver/metadata.yaml +++ b/receiver/elasticsearchreceiver/metadata.yaml @@ -1,5 +1,11 @@ type: elasticsearchreceiver +status: + class: receiver + stability: beta + pipelines: [metrics] + distributions: [contrib] + resource_attributes: elasticsearch.cluster.name: description: The name of the elasticsearch cluster.