Elasticsearch / OpenSearch
Common parts of every card (states, backoff, Unit and ExecReload, Test config, manual commands) are described in Monitor window.
| Detected by | systemd units elasticsearch, opensearch or binaries elasticsearch, opensearch |
| Read every | 60 s while the Monitor window shows the tab |
| Active probe | yes, off by default |
| Test config | none |
| Manual commands | 3 |
What the card reads and shows
Section titled “What the card reads and shows”Elasticsearch / OpenSearch: running nodes with their heap, the closed list of settings of elasticsearch.yml / opensearch.yml, heap of jvm.options, disks of path.data against the allocation watermarks, the version; with the active probe the cluster as the node sees it: health (green/yellow/red only from a fresh, complete answer), unassigned shards and why, nodes, indices (counts by default, names only on request in the card), heap and disk of the local node.
Passive: on the host the probe finds java processes in /proc whose argv has the main class org.elasticsearch.bootstrap.Elasticsearch or org.opensearch.bootstrap.OpenSearch (real and effective uid in {root, this account, elasticsearch, opensearch}, the PID namespace with the NSpid fallback, a trusted exe). A Java command line carries -D… properties with any values, so only -Xms/-Xmx, -Des.path.home|conf (paths) and listed -E settings leave the host (elasticsearch/argv.awk). The configuration directory (of the process, else ES_PATH_CONF of the unit, else /etc/elasticsearch, /etc/opensearch) is read by elasticsearch/reader.sh under one GNU timeout: the YAML through config.awk (closed list of keys, fail closed on YAML it does not understand), jvm.options(.d) through jvm.awk (heap only), df of path.data; versions from the names of the jars in lib/ (nothing is run). elasticsearch.keystore and opensearch-security/ are never read.
Active (off by default): GET only, with curl (trusted, env -i, --noproxy '*' --proto =http --max-redirs 0, GNU timeout) to 127.0.0.1 or [::1] on the HTTP port held by the verified process (the socket inode among its open files), and only with security explicitly off in a configuration file read to the end: KryoDesk has no credentials for Elasticsearch, and a request without them on a secured node is an authentication failed entry in its log. Answers go through jq with a closed list of fields; errors only as the HTTP code and error.type.
Active probe
Section titled “Active probe”Runs: GET only, with curl (trusted, not setuid, under env -i and GNU timeout 7, --noproxy '*' --proto =http --max-redirs 0 --max-time 5) to 127.0.0.1 or [::1] on the HTTP port held by the verified node process (its socket among the process’s open files, so root or the node’s account), and only when a configuration file read to the end turns security off (xpack.security.enabled: false, or OpenSearch without its security plugin): KryoDesk has no credentials and never tries any. Paths: /, /_cluster/health, /_cat/shards (only with unassigned shards: state and reason, no index names), /_cat/nodes, /_cat/indices (not above 5000 active shards), /_nodes/_local/stats/jvm,fs,os, /_cluster/settings (disk watermarks and max_headroom); answers go through jq with a closed list of fields; index names stay in the card’s memory
Traces on the host: up to 7 HTTP requests per probe (every 60 s) with the header X-Opaque-Id: kryodesk-monitor: they show in the slow log and the task list when slow, in the HTTP request tracer (http.tracer) and in an audit log when one is on; with security on nothing is sent. /_cat/indices gathers the statistics of every shard from every node (a cost on a large cluster): it is not asked above 5000 active shards. Reading /proc: also the command line of the parent java process (the Elasticsearch 8 launcher) for -E settings; the environment of processes is never read (Docker settings given as environment variables stay unknown)
Test config
Section titled “Test config”None: Elasticsearch and OpenSearch have no test of the configuration alone: they check elasticsearch.yml / opensearch.yml only while starting (a bad setting stops the node; the reason is in its log and the unit’s journal).
Manual commands
Section titled “Manual commands”KryoDesk shows these with Copy / Paste to terminal and never runs them.
| Label | Command | What it does |
|---|---|---|
| Start-up log of the last hour | journalctl -u <unit> --since -1h --no-pager |
a setting Elasticsearch / OpenSearch does not accept stops the node while it starts; the reason is in the unit’s journal (and in the node’s log under path.logs) |
| Cluster health with a password | curl --cacert <ca_path> -u <user> <url> |
asks the node as <user>: curl asks for the password in the terminal (KryoDesk does not see it); the CA is <ca_path> (Elasticsearch 8 writes certs/http_ca.crt at first start); a wrong password is an authentication failure in the node’s log |
| Cluster health | curl -sS <url> |
asks the node on this host over plain HTTP (security is off in its configuration) |