Pro plan from £5 per endpoint per month · see pricing
Secronyx
In the next releaseLinuxmacOS

Elasticsearch and OpenSearch

See why a cluster is yellow or red, which shards are unassigned and what blocks them, how the nodes' heap, CPU and disk compare with the watermarks, and what the master is busy with, through read-only monitor requests. This plugin is in the next Secronyx release; the current download does not include it yet.

What it answers

Questions an on-call engineer asks, which an AI client can answer with this plugin.

  • Is the cluster green, yellow or red, and how many shards are unassigned?
  • Which shards are unassigned, and which allocation rule keeps them so?
  • Which node is short of heap or disk, and which node is the master?
  • Which disk watermarks are in effect, and are they why an index went read-only?
  • What is waiting for the master, and for how long?
  • Which threads are using the CPU on a slow node?

What it returns

Each of the plugin's read-only tools, described in words.

  • Elasticsearch or OpenSearch cluster health in one row - status (green, yellow or red), nodes, active, relocating, initializing, unassigned and delayed shards and pending tasks
  • Elasticsearch or OpenSearch nodes with their roles, the elected master, version, heap and RAM use, CPU, load averages, disk use and free bytes, and uptime
  • Elasticsearch or OpenSearch shards not assigned to any node - index, shard, primary or replica, the reason (INDEX_CREATED, NODE_LEFT, ALLOCATION_FAILED, ...), since when and failed attempts
  • Why Elasticsearch or OpenSearch cannot allocate the first unassigned shard it finds - the shard, its reason, whether it can be allocated and each node's deciding rules (same shard, disk, filters)
  • Elasticsearch or OpenSearch cluster changes waiting for the master - each task's priority, source (create-index, put-mapping, shard-started, ...), whether it runs and how long it has waited
  • The busiest threads on an Elasticsearch or OpenSearch node as text - the CPU, wait or block share of each thread over half a second with its stack, from the nodes hot threads API
  • The disk-based shard allocation settings Elasticsearch or OpenSearch uses - whether the disk threshold is on, and the low, high and flood-stage watermarks from transient, persistent or defaults

At a glance

Plugin
elasticsearch 1.0.0
Publisher
levantar
Platforms
Linux, macOS

Tested on

  • Elasticsearch 8.15.5 and OpenSearch 2.17.1 on Linux (Ubuntu 24.04, Docker), test lab and CI runner
  • Elasticsearch 8.15.5 on macOS 15 (official archive, Intel), test lab; on macOS (arm64), CI runner

How it logs in

Without an explicit choice, install tries the methods that need no secret first, in this order.

  • An API key
  • A user name and password
  • A client certificate
  • No login (a local endpoint)

The least-privilege login

The setup file in the pack. secronyx plugin setup elasticsearch prints it; an administrator applies it by hand.

#!/bin/sh # The least-privilege login for the elasticsearch plugin on Elasticsearch # 8 with security on. Run it with {{user}} and {{password}} replaced, as a # user with manage_security (elastic), against any node: # ES_URL the node's HTTP listener (default http://localhost:9200; # https://... with --cacert for a TLS listener) # ES_ADMIN the admin login for curl -u, user or user:password (default # elastic, which makes curl ask for the password) # The new password is on the command line while it runs. # # The role grants the cluster privilege monitor, which every tool needs # (health, cat nodes, cluster state, allocation explain, pending tasks, # hot threads, cluster settings), and the index privilege monitor on every # index, for index statistics. Neither reads a document or changes # anything. For an API key instead of a password, create the key with the # same role descriptor and install with --auth api-key: # POST /_security/api_key # {"name": "secronyx", "role_descriptors": {"secronyx_monitor": # {"cluster": ["monitor"], "indices": [{"names": ["*"], "privileges": ["monitor"]}]}}} # and pass the "encoded" value as the secret. # # OpenSearch with the security plugin: create a role with # cluster_permissions [cluster_monitor] and index_permissions # [{index_patterns: ["*"], allowed_actions: ["indices_monitor"]}], and map # the user to it (PUT _plugins/_security/api/roles/secronyx_monitor, # internalusers/{{user}} and rolesmapping/secronyx_monitor). Leave the user # out of the default own_index mapping. OpenSearch with security off # needs no login: install with --auth none. set -eu url=${ES_URL:-http://localhost:9200} es() { curl -fsS -u "${ES_ADMIN:-elastic}" -H 'Content-Type: application/json' -X PUT "$url$1" -d "$2" echo } es /_security/role/secronyx_monitor '{"cluster":["monitor"],"indices":[{"names":["*"],"privileges":["monitor"]}]}' es '/_security/user/{{user}}' '{"password":"{{password}}","roles":["secronyx_monitor"]}'

See it run

Terminal recording from the test lab: elasticsearch-linux-harness
A real run on the shared test lab.
Terminal recording from the test lab: elasticsearch-macos-harness
A real run on the shared test lab.

Read-only, in layers

Every request is a GET or HEAD to the endpoint the operator configured, on a path fixed in the signed pack. Redirects are not followed, and requests known to change state are refused.

These controls narrow what the plugin can do; none of them is a guarantee on its own. An administrator can still accept a more powerful login on purpose (audited and shown in status), root or Administrator on the host can replace the agent, and the plugin can read whatever its login can see.