RousselTMLEARNING

Article · Elasticsearch: from discovery to expertise

OpenTelemetry metrics

1. Sources #

Hosts, Kubernetes, applications.

Receivers #

hostmetrics, kubeletstats, applications, Collector, Elasticsearch.
receivers:
  hostmetrics:
    collection_interval: 30s
    scrapers: { cpu: {}, memory: {}, load: {}, filesystem: {}, network: {} }
  kubeletstats:
    auth_type: serviceAccount
    endpoint: https://${env:K8S_NODE_NAME}:10250
    insecure_skip_verify: true
processors:
  resourcedetection: { detectors: [env, system] }

2. Types and temporality #

What changes storage.

Metric types #

TypeExampleNote
Gaugesystem.memory.utilizationinstantaneous value
Sum (counter)http.server.request.countcumulative or delta
Histogramhttp.server.request.durationstored as a histogram, percentiles computed

Temporality #

Elasticsearch stores cumulative counters as well as deltas; for rate calculations, prefer a consistent temporality per source. The cumulativetodelta processor converts when needed.

Good to know: OTel metrics are written to TSDS (time series data streams): compact storage, indexed dimensions, and downsampling for long retention.

3. Querying and alerting #

ES|QL, dashboards, rules.

Queries #

FROM metrics-*.otel-*
| WHERE metrics.system.cpu.utilization IS NOT NULL
| STATS cpu = AVG(metrics.system.cpu.utilization) BY host = resource.attributes.host.name, BUCKET(@timestamp, 5 minutes)
| SORT cpu DESC
Good practice: Limit attribute cardinality (no user ID or full URL as a dimension): each combination creates a time series.
Depending on the version: exact field names (metrics.*) depend on the exporter version and mapping mode: check them in Discover before building dashboards.

📄 OpenTelemetry metrics in Elasticsearch →

My progress

  • ⏱ Estimated time : ≈ 4 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

4.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Course Glossary

RBAC (Role-Based Access Control)

An access control method where permissions are assigned to specific roles (e.g., admin, reader) rather than directly to individual users.

Authentication

The process of verifying the identity of a user or system (e.g., login/password, tokens, biometrics).

Authorization

The process that occurs after authentication to determine if the entity has the necessary rights and privileges to access a resource.

API Key

A unique alphanumeric code used to identify, authenticate, and authorize access to an Application Programming Interface (API).

Architecture

The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.

Repository

A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...

Elasticsearch

A distributed, RESTful search and analytics engine capable of addressing a growing number of use cases, built on Apache Lucene.

Recommended Articles

OpenTelemetry and Elasticsearch: compatibility and architecture

Send OpenTelemetry to Elasticsearch: Collector and elasticsearch exporter, managed OTLP endpoint,...

Ingesting OpenTelemetry logs into Elasticsearch

Collect and structure logs with the OpenTelemetry Collector (filelog receiver, operators, transfo...

OpenTelemetry traces in Elasticsearch and Kibana APM

Instrument applications with OpenTelemetry or EDOT SDKs, send traces to Elasticsearch, get Kibana...

Standalone Elastic Agent, Logstash and Kafka outputs, and OpenTelemetry (EDOT)

Write a standalone configuration, ship to Logstash or Kafka, and use Elastic Agent as an OpenTele...

OpenTelemetry metrics: instruments, temporality, histograms and exemplars

Master the metric signal: MeterProvider, synchronous and asynchronous instruments (Counter, UpDow...

OpenTelemetry and Dynatrace: OTLP, collector and instrumentation

Integrate OpenTelemetry with Dynatrace: OTLP endpoint and tokens, Dynatrace OTel Collector, trace...

OpenTelemetry (OTel) best practices: the guide to modern observability

Master OpenTelemetry with our expert advice: implementing the Collector, following semantic conve...

Elastic Observability: logs, infrastructure, APM and synthetics

Elastic Observability features: log exploration, infrastructure inventory with Elastic Agent and ...

Elastic Agent on Kubernetes

Deploy Elastic Agent on Kubernetes: Fleet-managed DaemonSet, Kubernetes integration, kube-state-m...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!