Kibana: Stack Monitoring & AutoOps

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 Task Manager health request and the monitoring user request of the lab section ran; the Metricbeat services were not added to the lab.

Every alert in this section assumes that Elasticsearch and Kibana are healthy: the rules run as Task Manager tasks inside Kibana, and they read from Elasticsearch. When the cluster is out of heap, rejecting writes or out of disk, the Bookshelf alerts are late, wrong or silent at the very moment they matter. So the monitoring stack needs its own monitoring, and it should not depend on the cluster it watches. Elastic offers two products for that, Stack Monitoring and AutoOps, and this page explains both, which signals to alert on, and how to wire a lab. The Elasticsearch side of the same signals (the APIs behind them and what to do when they fire) is on Elasticsearch administration, monitoring and snapshots; this page does not repeat those commands.

Two products, one decision

Stack Monitoring collects logs and metrics from Elasticsearch nodes, Logstash nodes, Kibana instances, APM Server and Beats, stores them as ordinary documents in Elasticsearch and shows them in a Kibana app, with predefined alert rules. AutoOps is a separate tool that analyses hundreds of Elasticsearch metrics to diagnose issues, identify root causes and suggest resolution paths. It monitors only Elasticsearch, not the whole stack, and supports versions 7.17.x and later.

Elastic’s comparison page gives the following picture, summarised here without the full feature matrix.

Aspect AutoOps Stack Monitoring

Where the data lives

Stored and backed up by Elastic Cloud; no sizing needed

In your own cluster or a dedicated monitoring cluster; you provision storage

Default retention

10 days

6 days

Availability

Enabled automatically on Cloud Hosted and Serverless in supported regions; connect Cloud Enterprise, Kubernetes (ECK) and self-managed clusters through Cloud Connect

Cloud Hosted, ECE, ECK and self-managed; not available on Serverless

Access

Elastic Cloud UI only; needs an Elastic Cloud account

The Kibana UI, after setup

What it collects

Predefined Elasticsearch metrics only, no logs

Metrics, plus logs you can open in Discover

Problem handling

Correlates metrics, raises events, notifies and closes events when resolved; root-cause analysis and resolution guidance

Shows metrics over time and triggers predefined or custom alerts; no root-cause analysis

Notification targets

Seven connector types (including a simple e-mail option that needs no mail server)

All Kibana connector types (the page counts 27)

Stack components covered

Elasticsearch

Elasticsearch, Kibana, Logstash, Beats, APM Server, integration server, CCR, ML jobs, ingest pipelines

The recommendation on that page is practical. Keep Stack Monitoring when you run on premises or air-gapped, need to control retention, need monitoring of components beyond Elasticsearch, or sit in a region without AutoOps. Start with AutoOps when you want simpler monitoring of Cloud deployments, guidance and troubleshooting steps, efficient handling of many deployments, and cluster-specific notifications. The two can run together: AutoOps for diagnosis, Stack Monitoring for the Kibana-side data and Kibana-native rules.

Stack Monitoring architecture

Each monitored component has a persistent UUID, written to its path.data directory at startup; upgrading Kibana or Logstash without preserving the data directory assigns a new UUID, so the instance appears as a new one. Collectors, Elastic Agent or Metricbeat, ship the data directly to the monitoring cluster at a collection interval.

flowchart LR subgraph PROD["Production cluster (Bookshelf stack)"] ES["Elasticsearch nodes"] KB["Kibana"] end AG["Elastic Agent or Metricbeat: elasticsearch + kibana"] ES --> AG KB --> AG AG --> MON["Monitoring cluster: dedicated, needs an ingest node"] MON --> KM["Kibana on the monitoring cluster: Stack Monitoring app, rules"] KM --> CN["Connectors: e-mail, webhook"] ES -.->|"Cloud Connect, dedicated agent"| AO["AutoOps: Elastic Cloud"]

The production guidance is to send data to a dedicated monitoring cluster instead of through the production cluster: a production outage then cannot block access to the monitoring data, and with the appropriate licence one monitoring cluster can receive data from several production clusters. Version rules apply: the monitoring cluster and the monitored clusters should generally run the same stack version, a monitoring cluster cannot monitor clusters on newer versions, and it can monitor clusters on the latest release of the previous major version. On Cloud Hosted, ECE and ECK, Elastic installs and configures the monitoring agent for you; on self-managed you install and configure the collectors.

Collection methods

For self-managed Elasticsearch and Kibana, Elastic Agent is recommended: one agent handles logs and metrics and is managed centrally in Fleet. Metricbeat is an option for metrics, especially when you already run Beats, and Filebeat handles Elasticsearch logs. Logstash also recommends Elastic Agent. The legacy internal collection (the production cluster’s own exporters) is not recommended and users of it should migrate. Every Beat, APM Server and Elastic Agent has its own monitoring page.

Elastic Agent for Elasticsearch

  1. On the production cluster create a user with the remote_monitoring_collector built-in role.

  2. In Kibana open Integrations, select Elasticsearch, Add Elasticsearch, then Add integration only (skip agent installation).

  3. Under Metrics (Stack Monitoring) set hosts to the Elasticsearch URLs (default localhost:9200; use HTTPS when encryption is on). Under Advanced options enter the credentials of the user above.

  4. Choose the scope: cluster when each host entry is a single endpoint for the cluster, such as a load balancer; node (the default) when an agent runs on every node. The elected master supplies most metrics, so node adds load to master-eligible nodes and should not be used with dedicated master nodes.

  5. Pick an agent policy, then enrol an agent in Fleet if none runs on that host, and wait a minute or two for data.

Metricbeat for Elasticsearch and Kibana

The Metricbeat path is configuration files, which makes it the easier one to put in a lab compose file. For Elasticsearch, enable elasticsearch-xpack; for Kibana, enable kibana-xpack and switch off Kibana’s own collection.

# modules.d/elasticsearch-xpack.yml
- module: elasticsearch
  xpack.enabled: true
  period: 10s
  hosts: ["http://elasticsearch:9200"]
  username: "lab-monitor"
  password: "lab-monitor-password"
# modules.d/kibana-xpack.yml
- module: kibana
  metricsets:
    - stats
  period: 10s
  hosts: ["kibana:5601"]
  username: "lab-monitor"
  password: "lab-monitor-password"
  xpack.enabled: true

For Kibana also set monitoring.kibana.collection.enabled: false in kibana.yml (leave monitoring.enabled at its default), enable xpack.monitoring.collection.enabled on the production cluster (a persistent cluster setting works), and point output.elasticsearch in metricbeat.yml at the monitoring cluster with a user that has the remote_monitoring_agent role. Disable the system module if you do not want its data, because it does not appear on the Stack Monitoring page. With scope: node one instance is needed on every node or some metrics are missed; prefer one instance with scope: cluster behind a load-balancing endpoint. The monitoring cluster needs at least one ingest node, because the monitoring features use ingest pipelines.

Viewing the data

Open Stack Monitoring with the global search. If collection is off, Kibana offers to turn it on (with security enabled this needs the manage cluster privilege); with a separate monitoring cluster you do not need to. The page shows cluster alerts and a summary of metrics with Overview, Nodes, Indices and Instances drill-downs. Self-managed users need the monitoring_user and kibana_admin built-in roles on the monitoring cluster, and monitoring_user also needs read and read_cross_cluster on metrics-*, which may need a custom role. On Cloud Hosted and ECE, use the deployment’s Logs and metrics page and View. In the lab the elastic user sees the app; for a dedicated user assign those two roles (the role model is on Spaces, Roles & Privileges).

The out-of-the-box rules

The first time you open Stack Monitoring, Kibana asks permission to create the default rules. Delete or decline them and you can recreate them from Alerts and rules then Create default rules; to modify them use Enter setup mode on the Cluster overview page or the Rules management page. These are Classic rules of the Stack rule family (Rules & Stack Rule Types), so they can have connectors, snooze and maintenance windows like any other.

Rule What it checks Default condition Check interval Re-notify

CPU usage threshold

Elasticsearch nodes with consistently high CPU

85 percent or more, averaged over the last 5 minutes

1 minute

1 day

Disk usage threshold

Nodes nearing disk capacity

80 percent or more, averaged over the last 5 minutes

1 minute

1 day

JVM memory threshold

Nodes with high JVM memory use

85 percent or more, averaged over the last 5 minutes

1 minute

1 day

Missing monitoring data

Nodes that stop sending monitoring data

Missing for 15 minutes, looking back 1 day

1 minute

6 hours

Thread pool rejections (search and write)

Nodes with rejections

300 or more over the last 5 minutes

1 minute

1 day

CCR read exceptions

Read exceptions on cross-cluster replication

1 or more in the last hour

1 minute

6 hours

Large shard size

Average primary shard size on specified data views

55 GB or more over the last 5 minutes; default pattern matches everything

1 minute

12 hours

A group called cluster alerting fires when, within the last minute, cluster health is yellow or red; Elasticsearch, Kibana or Logstash versions in a cluster do not match; nodes were added or removed; or a licence is about to expire (the subscription expiration alert has severity by time left: 60 days informational, 30 low, 15 medium, 7 severe).

By default these rules notify only in Kibana (logs and the UI). For external notification create a connector (Slack, e-mail, PagerDuty, webhook) and add it under Actions on each rule; Cloud Hosted includes the Elastic-Cloud-SMTP e-mail connector with no extra setup. Caveats from the page: the old Watcher e-mail action setting monitoring.cluster_alerts.email_notifications.email_address no longer works, some action types need a subscription, trial licences skip the 60-day and 30-day licence alerts, and with a single master node the Elasticsearch nodes changed alert sends no notification during a master vacate, which a dedicated monitoring cluster avoids. In a Bookshelf lab with a single Elasticsearch node, expect the cluster to be yellow once any index has a replica, and decide deliberately whether the cluster-health rule should page.

Cluster signals worth alerting on

Alert on conditions that threaten users or the monitoring itself, not on every metric. The table maps the signals of the Elasticsearch administration page to what exists out of the box and what to add.

Signal Out of the box What to add

Heap pressure

JVM memory threshold (85 percent over 5 minutes)

Keep the default; investigate shard counts and aggregations before raising the threshold or the heap.

Thread-pool rejections

Search and write rejections (300 over 5 minutes)

Lower the threshold for the write pool if Bookshelf indexing matters more than search; a growing rejection count is back-pressure, not a bug.

Disk

Disk usage threshold (80 percent), large shard size rule

The 80 percent default fires before the allocation watermarks of the administration page, which is the intent: act while writes still succeed.

Unassigned shards

Cluster health yellow or red (cluster alerting)

Nothing for the count itself. An unassigned replica is yellow and an unassigned primary is red; when the rule fires, run the allocation explain call from the administration page.

Node loss

Nodes changed, missing monitoring data

Route the missing-data rule to a different channel than the cluster rules, because it also fires when the collector dies.

Kibana background work

None

A Task Manager health check (below).

The Task Manager health meta-alert

Classic rules, connectors and reporting all run as Task Manager tasks. If Task Manager falls behind, rules run late and nothing in the rules themselves says so. Each Kibana instance exposes /api/task_manager/_health (technical preview), which returns a status of OK, Warning or Error for the whole system and for each section, with the workload, runtime and capacity_estimation details. Reading it adds no load, so an external monitor can poll it. Alert on the root status, on the status of the task types you depend on (alerting, actions, reporting), on the runtime status for threshold breaches, and use the capacity estimation status for scaling plans, not as a prediction.

curl -s -u elastic:"$ELASTIC_PASSWORD" "http://localhost:5601/api/task_manager/_health" \
  | jq '{status, runtime: .stats.runtime.status, capacity: .stats.capacity_estimation.status}'

The runtime thresholds are configurable: xpack.task_manager.monitored_task_execution_thresholds sets the failure percentage for warn and error (defaults 80 and 90 percent), with a default and per task type overrides, so alerting tasks can use stricter values. Two limits matter. A connector task can report success even when the call failed, and the workload and runtime sections do not show that: check the event log for action failures. On Cloud Hosted and ECE deployments with dedicated background task nodes the endpoint is served by a UI node and does not reflect task execution. The alerting side of Task Manager (capacity, circuit breakers) is on Alerting Setup, Security & Scaling.

AutoOps in practice

AutoOps reports events: issues it detects, each with a title, description, impact message, severity (Critical, High, Medium or Low), status (open or closed), start and end times, affected nodes and indices, and a link back to the event. On Cloud Hosted and Serverless it is available by default; on ECE, ECK and self-managed clusters you connect through Cloud Connect, which needs Elasticsearch 7.17.x or later, a dedicated Elastic Agent for each cluster (ECK needs operator 3.3.0 or later), and outbound HTTPS on port 443 to api.elastic-cloud.com and the regional otel-auto-ops endpoint. A user API key with the privileges the wizard supplies, or a user with monitor, read_ilm and read_slm on the cluster and monitor and view_index_metadata on indices, authenticates the agent; analysis can take up to 30 minutes. AutoOps is free across subscription levels, data retention is currently 10 days, and an air-gapped, locally deployable version is Planned for a future release, so an air-gapped Bookshelf cluster stays on Stack Monitoring.

Notifications are configured only by Elastic Cloud organization owners, in two steps: connectors (e-mail with up to 40 recipients, PagerDuty, Slack, VictorOps, Opsgenie, Microsoft Teams and a custom webhook) and notification filters that select events, deployments and a delay; if AutoOps closes the event before the delay ends, nothing is sent. A Notifications report shows each notification as sent, muted, failed, connector not defined, or event closed before sending.

What can go wrong

  • Monitoring the cluster with itself: when the cluster fails, so do the dashboards and rules that would report it. Use a dedicated monitoring cluster, or at minimum an external check.

  • scope: node on dedicated master nodes, or an agent missing on some nodes, gives holes in the metrics.

  • A monitoring cluster without an ingest node cannot index monitoring data.

  • Rules notifying only in Kibana: the defaults page nobody until a connector is added.

  • A new UUID after a Kibana upgrade makes the instance look new and the old one look missing, which fires the missing-data rule.

  • Comparing retention: AutoOps keeps 10 days and Stack Monitoring 6 days by default; neither replaces your own metrics for capacity planning.

  • Treating the Task Manager capacity estimate as a forecast.

Verify it in the lab

The lab’s Elasticsearch has security enabled and a trial licence. The lab does not start a Metricbeat container or create a monitoring user, so the monitoring setup below is added to the kibana profile by hand, following the pages cited above; start the profile first (see Installation & Configuration).

  1. Create the collector user, which carries both monitoring roles because the lab uses one cluster for both sides.

    curl -s -u elastic:"$ELASTIC_PASSWORD" -X POST "http://localhost:9200/_security/user/lab-monitor" \
      -H 'Content-Type: application/json' \
      -d '{"password":"lab-monitor-password","roles":["remote_monitoring_collector","remote_monitoring_agent"]}'
  2. Add a Metricbeat service to the lab compose file with the two module files above mounted into modules.d, an output.elasticsearch pointing at http://elasticsearch:9200, and set monitoring.kibana.collection.enabled: false on Kibana. Enable xpack.monitoring.collection.enabled with PUT _cluster/settings. Self-monitoring in one cluster is for the lab only.

  3. Open Stack Monitoring: the cluster must appear with one node and the Kibana instance, and Alerts and rules must offer the default rules. Create them.

  4. Add a webhook connector to http://webhook-receiver:8080/kibana (see Connectors) as an action on the Missing monitoring data rule. Stop the Metricbeat container and wait for the rule: the webhook receiver must log the notification after the 15 minute condition.

  5. Run the Task Manager curl above and check that the root status is OK (it was on the lab, with runtime and capacity_estimation both OK). Lower the warning threshold of a task type in kibana.yml only in the lab, to see the status change.

In the books

Paro, Elasticsearch 7.0 Cookbook, chapter 9, covers controlling cluster health with the health API and monitoring segments, and Konda, Elasticsearch in Action, chapters 14 and 15, covers administration, heap settings, unassigned shards and allocation explain; both are about reading the cluster directly. Chhajed, Learning ELK Stack, shows the 2015 answer to monitoring, Marvel, and the separate Shield product for security. Marvel’s job is now done by Stack Monitoring, and Shield by the built-in security features. AutoOps, the Agent and Metricbeat monitoring paths, and Kibana’s Classic rules for monitoring are newer than all of them. Publisher pages are listed in the bibliography of the section index.