Kibana: Ingesting Monitoring Data

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

Checked on 2026-11-09 against Kibana 9.5.x. Tested with Elasticsearch 9.5.6 and Kibana 9.5.6 in the hands-on lab (trial licence): the EDOT Collector 9.5.6 wrote the Bookshelf traces and logs to the data streams named in the lab section, and the elasticapm connector produced the aggregated APM metric streams.

To do this by hand, follow Upload a File and Create a Data View.

Kibana draws nothing on its own: every Discover table, Lens chart, rule and SLO reads documents that something has already written to Elasticsearch. The ingest path therefore decides which fields exist, what they are called, whether metrics land in a time series data stream, and how much work every later page of this section needs. The choice is wider than it was in the ELK era, when the answer was always "Beats to Logstash to Elasticsearch": today the same data can arrive through the Elastic Distribution of OpenTelemetry (EDOT), through Elastic Agent managed from Fleet, through the old Beats, through Logstash, through the APM agents or directly from Prometheus. This page explains each path, what it produces and when to pick it, and then wires the Bookshelf lab to the one the kibana profile uses.

The vendor-neutral picture (instrumentation, collectors, buffering, back-pressure) is on Telemetry Collection Pipelines; this page does not repeat it and covers what is specific to Elastic. What the data looks like once stored is the subject of Data Streams, TSDS & Lifecycle, and how Kibana finds it of Data Views & Discover. Where the pieces sit in the stack is described in Architecture & the Elastic Stack. Raw document indexing, bulk requests and ingest pipelines are covered in Indexing, CRUD & Bulk and Ingest Pipelines & Processors and are not repeated.

The choices at a glance

The Elastic documentation for adding data splits the world in two. For general content (documents, web pages, files) you pick a tool by content type. For time series data (logs, metrics, traces) it recommends the simplest option that meets the need, which usually means Elastic Agent plus an Elastic integration, with Automatic Import to generate a custom integration when none exists. The paths below are the ones that matter for monitoring.

Path Best for What you run Notes

EDOT and OpenTelemetry

Hosts and applications that already use, or are about to adopt, OpenTelemetry; the default for new work.

EDOT SDKs (or any OpenTelemetry SDK) in the application and the EDOT Collector (built into Elastic Agent from 9.5).

Data is stored in OpenTelemetry-native data streams. Generally available.

Elastic Agent with Fleet and integrations

Ready-made collection for common systems (operating system, databases, web servers, cloud services) managed centrally.

One Elastic Agent per host, a Fleet Server, and an agent policy listing integrations.

Integrations often ship dashboards and ingest pipelines. Generally available.

Beats

Existing estates that already run Filebeat, Metricbeat and friends.

One lightweight shipper per data type, configured per host.

Still documented and generally available; not recommended as the starting point for a new deployment.

Logstash

Complex transformation, enrichment or fan-out that is awkward to do in an ingest pipeline.

A Logstash server with input, filter and output plugins.

Generally available. Adds a hop to operate.

APM agents and APM Server

Application tracing with Elastic’s classic agents.

An APM agent in the application and an APM Server to receive its data.

The APM page recommends EDOT for collecting application telemetry.

Prometheus remote write

An existing Prometheus (or Alloy) estate whose metrics you want to query in Kibana.

Nothing new: one remote_write entry pointing at Elasticsearch.

Generally available since 9.5 (preview in 9.4); remote write 1.0 only.

Source: Elastic: Ingest; the status of each path is taken from its own reference page, linked in the sections below.

flowchart TD Q{"What is the source?"} Q -->|"Application with an OpenTelemetry SDK"| E["EDOT Collector (Agent or Gateway mode)"] Q -->|"Host, database or cloud service"| A["Elastic Agent with an integration"] Q -->|"Prometheus already scrapes it"| P["Prometheus remote write"] Q -->|"Needs heavy transformation"| L["Logstash in front of Elasticsearch"] E --> ES[("Elasticsearch data streams")] A --> ES P --> ES L --> ES ES --> K["Kibana: Discover, Lens, dashboards, rules"]

The diagram is a starting heuristic, not a rule: one cluster commonly runs several of these paths at once, for example Elastic Agent for host metrics and the EDOT Collector for the application’s OTLP data.

EDOT and OpenTelemetry

EDOT is Elastic’s set of tested OpenTelemetry distributions: a customised OpenTelemetry Collector and language SDKs for Java, .NET, Node.js, PHP, Python, Android and iOS (EDOT Browser is a technical preview at the time of writing). Before 9.5 the EDOT Collector was a standalone product; from 9.5 the same capability is built into Elastic Agent, so one binary can run either classic integrations or OpenTelemetry pipelines. Generally available distributions get full support, while technical preview ones are best effort.

Where the data lands

In the default OTel-native mapping mode the Elasticsearch exporter writes to data streams named by signal and dataset: logs-*.otel-*, traces-*.otel-* and metrics-*.otel-*, with the default dataset generic and namespace default, for example metrics-generic.otel-default. Metrics use a time series index mode (see Data Streams, TSDS & Lifecycle). Resource attributes are stored under resource.attributes.* and, through passthrough fields that add no storage, are also reachable at the top level, so service.name and resource.attributes.service.name both work in a query; Kibana apps rely on that top-level alias. Setting the data_stream.dataset and data_stream.namespace attributes changes the target stream.

Retention is not automatic: the documentation states that there is no default retention period. Backing indices roll over at 50 GB or 30 days, but data is only deleted if a delete phase exists. On self-managed and Elastic Cloud Hosted the built-in logs, metrics and traces@lifecycle ILM policies apply and are customised through logs-otel@custom, metrics-otel@custom and traces-otel@custom; on Serverless you configure the data stream lifecycle instead.

Mapping modes: otel and ecs

The default standalone configuration uses two Elasticsearch exporters. elasticsearch/otel keeps OpenTelemetry names and semantics and is used for logs, SDK metrics and traces. elasticsearch/ecs writes host metrics in ECS format for compatibility with the Infrastructure UI. The elasticapm processor and connector must be in the pipeline for the APM applications to work, and are not in the upstream Collector Contrib distribution; the elasticinframetrics processor that converts to ECS system metrics has been deprecated since 9.2. The collector has two deployment shapes: Agent mode close to the data and Gateway mode as a central aggregation point; a self-managed Elasticsearch needs a Gateway for APM.

Reference: Default configuration of the EDOT Collector (standalone). The Collector configuration itself is shown, and explained line by line, on Telemetry Collection Pipelines.

The host quickstart

For a host, the Observability quickstart generates the commands in Kibana: open Add data, choose Host and then the OpenTelemetry option for logs and metrics, pick a platform and run the two commands shown. The first downloads and configures the agent with a sample otel.yml containing the endpoint and an API key; the second starts it. The page requires Linux or macOS, a user with the Admin role or higher and root privileges for the hostmetrics and filelog components. Logs are collected from the moment the agent starts and earlier lines are not backfilled, so start it before you create the interesting failure. Afterwards the Hosts page and Discover show the data.

Elastic Agent, Fleet and integrations

Elastic Agent is one agent per host that collects logs and metrics and can also pull data from remote services. Each agent has exactly one policy, which lists the integrations to run; Fleet is the Kibana UI and API that manages agents and policies, and an enrolled agent picks up a changed policy at its next check-in. A Fleet-managed agent is configured and upgraded centrally; a standalone agent is configured by a local file, which the documentation recommends only for advanced users. Fleet Server is the process agents talk to; on Serverless the hosted Fleet Server of Observability and Security projects is used and an on-premises one is unavailable.

An integration packages the collection of one system, usually with ingest pipelines that extract structured fields and often with dashboards and visualizations. Kibana downloads integration packages from the Elastic Package Registry, so the Kibana host needs network access to it (or an air-gapped setup). Installing an integration also creates its data streams and templates, which is why Fleet data is easy to authorize and to retain in different ways.

Fleet names data streams <type>-<dataset>-<namespace>: the type is logs, metrics, traces or synthetics, the dataset is defined by the integration, and the namespace is yours (an environment, a team) and inherits from the agent policy unless overridden. logs-nginx.access-prod is the documentation’s example. Because each data stream holds a subset of fields, indices stay small and can have their own rollover, retention and security. From 9.5 on the Elastic Stack, namespace-level templates and the ILM selector in the integration policy editor are available too.

For the Bookshelf host the relevant integration is System. The documentation says the Elastic OpenTelemetry Collector is the preferred way to collect system metrics and logs today and keeps the System integration walkthrough for Elastic Agent: add the integration, let Fleet create a policy, enroll the agent from the Add agent flyout and open the Hosts or Infrastructure inventory views. Choose it when you want the packaged ingest pipelines and field names that the classic infrastructure UIs expect, and when you prefer to manage hosts centrally from Kibana.

Beats

Beats are open source shippers that run on your servers and send data to Elasticsearch directly or through Logstash: Filebeat for files and journals, Metricbeat for metrics, Heartbeat for availability, Packetbeat for network traffic, Auditbeat for audit data and Winlogbeat for Windows event logs, all built on the libbeat library. The reference lists them as generally available on both Serverless and the Elastic Stack and states no end of support, but each Beat is configured per host and per data type, which is the maintenance burden Elastic Agent and Fleet were designed to remove. Keep Beats where they already work; for a new estate start from Elastic Agent or EDOT. The documentation itself does not frame this as a deprecation, so treat the advice as a recommendation about operations, not a removal.

Source: Elastic: Beats.

Logstash

Logstash is a data collection engine with real-time pipelining. A pipeline has input, filter and output plugins; it normalises events from many sources and sends them on, most often to Elasticsearch through the Elasticsearch output. Reach for it when the transformation, enrichment or routing is too much for an ingest pipeline or when one stream must feed several destinations. Its persistent queue (queue.type: persisted, queue.max_bytes defaulting to 1 GB per pipeline, local disk rather than NFS) absorbs bursts so a slow Elasticsearch does not lose events; see Buffering and Back-pressure.

To send to Serverless use the Elasticsearch output with an API key (user authentication is not supported), expect data stream lifecycle instead of ILM, and set the hosts port to 443 because the default is 9200.

APM

Elastic APM tracks response times for incoming requests, database queries, cache calls and outgoing HTTP calls, collects unhandled errors grouped by stack trace and gathers runtime metrics. For the data to arrive, the APM page recommends EDOT; to host everything yourself you run APM Server. In practice that means the application uses an EDOT SDK (or any OpenTelemetry SDK) and the EDOT Collector with the elasticapm components feeds the APM applications described in APM & Synthetics.

Prometheus remote write

If Prometheus (or Grafana Alloy) already scrapes the Bookshelf /actuator/prometheus endpoint, Elasticsearch can receive the same samples through a remote write endpoint at /_prometheus/api/v1/write, and Kibana can then query them with ES|QL or with native PromQL (see Querying with KQL, ES|QL & PromQL). The endpoint is generally available on Elastic Cloud Serverless and on the Elastic Stack since 9.5 (preview in 9.4); on Elastic Cloud Serverless and Hosted, Elastic recommends the Managed Prometheus Remote Write endpoint instead of the direct one.

The credential needs create_doc and auto_configure on the target data streams, which is expressed as a role descriptor:

{
  "indices": [
    {
      "names": ["metrics-*.prometheus-*", "exemplars-*.prometheus-*"],
      "privileges": ["create_doc", "auto_configure"]
    }
  ]
}

The client side is one entry in prometheus.yml; Alloy uses a prometheus.remote_write component with an Authorization header of ApiKey <key>:

remote_write:
  - url: "https://<es_endpoint>/_prometheus/metrics/bookshelf/api/v1/write"
    authorization:
      type: ApiKey
      credentials: <api_key>

The URL path chooses the data stream: /_prometheus/api/v1/write writes to metrics-generic.prometheus-default, and /_prometheus/metrics/{dataset}/api/v1/write to metrics-{dataset}.prometheus-default, so the example above writes to metrics-bookshelf.prometheus-default. The series labels data_stream_dataset and data_stream_namespace override the path (generally available since 9.5). The sample timestamp becomes @timestamp, each value is stored under metrics.<metric_name>, and every other label becomes a dimension under labels.<name> of a time series data stream.

The endpoint has limits that matter when you reason about alerts built on the data. Only remote write 1.0 is accepted and 2.0 requests are rejected. The metric type is not sent by remote write 1.0, so Elasticsearch infers it from the name: _total, _sum, _count and _bucket are counters and everything else is a gauge (override with a metrics-prometheus@custom component template). Native histograms are dropped silently while classic _bucket histograms work, NaN and infinite values are dropped, staleness markers are ignored, and series without a __name__ label are dropped. Exemplars are generally available on Serverless and planned for the Elastic Stack.

Field naming: ECS and OpenTelemetry names

The Elastic Common Schema (ECS) is an open specification of field names and Elasticsearch data types for event data, for example host.name, service.name, http.response.status_code and log.level; the reference documents ECS 9.5.0 and follows Semantic Versioning. It is permissive: data that does not map to ECS can add custom fields under your own names. Agent integrations and the ecs mapping mode write ECS names. The OTel-native mode keeps OpenTelemetry attribute names (for example http.request.method or http.response.status_code as emitted by the SDK, under attributes.*), and the passthrough aliases expose them at the top level.

The practical consequence for dashboards and alerts is that the same idea can have two spellings depending on the path. A panel written for ECS data (log.level) will not match OpenTelemetry log data (severity_text) and the other way round. Decide per space which family a dashboard targets, name data views accordingly, and check the real field list in Discover before writing a query.

Sending the Bookshelf telemetry through the EDOT Collector

In the kibana profile of the lab, Bookshelf exports traces and logs over OTLP to the EDOT Collector (the lab’s stand-in exports no OTLP metrics; a real Spring Boot service would add them), and the Collector writes them to Elasticsearch 9.5.6. On the application side only standard OpenTelemetry environment variables are needed, whichever SDK the build uses (EDOT Java is the Elastic distribution):

services:
  bookshelf:
    environment:
      OTEL_SERVICE_NAME: bookshelf
      OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-gateway:4318
      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
      OTEL_RESOURCE_ATTRIBUTES: deployment.environment.name=lab

Reference: OpenTelemetry: OTLP exporter configuration. The host name otel-gateway (a network alias of the Collector in the lab’s kibana profile and of Alloy in the other one) and the deployment.environment.name value are lab conventions; the Collector’s own pipeline, with the otlp receiver on 4317 and 4318 and the elasticsearch/otel exporter, is the one described in Telemetry Collection Pipelines. For how Spring Boot produces the metrics and traces, see Metrics & Observability and Logging.

Verify it in the lab

  1. Start the profile with docker compose --profile kibana up -d and wait until Kibana answers on port 5601.

  2. Start the load generator so that Bookshelf receives requests.

  3. In Kibana open Dev Tools and run GET _data_stream/*.otel-*. Expect logs-generic.otel-default and traces-generic.otel-default, and the aggregated APM metrics that the elasticapm connector of the Collector derives from the traces: metrics-service_summary.1m.otel-default, metrics-service_transaction.1m.otel-default and metrics-transaction.1m.otel-default. There is no metrics-generic.otel-default in the lab, because the stand-in exports no OTLP metrics.

  4. Run GET traces-generic.otel-default/_search?size=1 and check that a document carries resource.attributes.service.name with the value bookshelf.

  5. Open Discover (a data view for these streams is created in Data Views & Discover) and confirm that the service.name field offers the value bookshelf.

  6. Stop the Collector (docker compose stop edot-collector) and watch the newest @timestamp stop advancing; this is the no-data situation the alert pages exercise.

What can go wrong

  • No data and no error. The Collector exports to a wrong or unreachable endpoint, or the API key lacks write privileges on logs-*, metrics-* and traces-*; check the Collector log first, then the key.

  • Two spellings of one field. ECS and OpenTelemetry data in one data view produce half-empty charts; query one family or build a view per family.

  • Counters stored as gauges. On the Prometheus path the type is inferred from the name, so a custom counter that does not end in _total is a gauge and rate() over it fails or misleads.

  • Retention surprises. OTel data is never deleted without a delete phase; plan it with Storage, Retention and Cost.

  • Missing APM views. Without the elasticapm components the application data is stored but the APM applications stay empty.

  • Old backfill assumptions. Agents collect from startup onward; a failure that happened before the agent ran cannot be replayed.

In the books

Nadine Melachi’s practice guide (chapter 1 and the Metricbeat section) presents the stack as Beats and Logstash feeding Elasticsearch and Kibana, with Metricbeat collecting CPU, memory and disk usage per process, and Saurabh Chhajed’s Learning ELK Stack (chapters 1 and 2) builds a Logstash pipeline with grok filters and the Elasticsearch output, mentioning Kafka or Redis as buffers. Both were written for Elastic 7.x and earlier. Since then Elastic Agent with Fleet and integrations replaced per-host Beats management, OpenTelemetry through EDOT became the recommended collection path, data streams replaced daily indices in the output, and Prometheus samples can be written to Elasticsearch directly. Use the books for the ideas (shipper, pipeline, buffer, store, visualise) and this page for the current tools.

Where to go next