Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] [receiver/elasticsearch] switched to autogenerate status #21191

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions receiver/elasticsearchreceiver/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Elasticsearch Receiver

<!-- status autogenerated section -->
| 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
<!-- end autogenerated section -->

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
Expand All @@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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
3 changes: 1 addition & 2 deletions receiver/elasticsearchreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (

const (
typeStr = "elasticsearch"
stability = component.StabilityLevelBeta
defaultCollectionInterval = 10 * time.Second
defaultHTTPClientTimeout = 10 * time.Second
)
Expand All @@ -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.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions receiver/elasticsearchreceiver/metadata.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down