Skip to main content

Elasticsearch / OpenSearch ops

v0.1.9

Cluster + index introspection plus narrow mutators (cache_clear, force_merge, flush_synced, close_index). Auth via ELASTIC_USER + ELASTIC_PASSWORD env vars on the runner host. Does NOT include delete_index — too easy to misuse.

18 allowed by default 2 need approval by default 1 denied by default
Pack ID
elasticsearch
Vendor
emisar
OS
linux
Actions
21
Required binaries. Install these on the host before relying on the pack — an action that calls a missing one fails at run time.
curl

Install

emisar pack install fetches this pack, re-validates it, and verifies its content hash against the --hash below — the exact bytes this page was rendered against, so a tampered copy is rejected — before copying it into the runner's packs dir. The command reloads a running daemon itself; no manual restart.

on the runner host
sudo emisar pack install elasticsearch --hash sha256:db5a7460d8e6ba0b1a1fb12a587a18fc46ece72f900a4c44cb11697d36c49917

Actions 21 total

View on GitHub
  • es.cache_clear exec high

    POST /<index>/_cache/clear

    Clears caches (request, query, fielddata) on one index. Next queries pay the cold-cache cost.

    View source on GitHub
  • es.cat_aliases exec low

    GET /_cat/aliases

    List all aliases pointing to indices. Use to confirm an alias rotation worked.

    View source on GitHub
  • es.cat_indices exec low

    GET /_cat/indices

    List every index with its primary count, doc count, store size. Sorted by size descending.

    View source on GitHub
  • es.cat_nodes exec low

    GET /_cat/nodes

    List nodes with heap, RAM, CPU, load, role. Read-only.

    View source on GitHub
  • es.cat_recovery exec low

    GET /_cat/recovery

    List active shard recoveries (peer, snapshot). Use to monitor rebalance progress.

    View source on GitHub
  • es.cat_segments exec low

    GET /_cat/segments

    Show per-segment doc + bytes counts. Use to plan a force_merge.

    View source on GitHub
  • es.cat_shards exec low

    GET /_cat/shards

    List every shard with state (STARTED/UNASSIGNED/INITIALIZING/RELOCATING) and node. Sorted by store size.

    View source on GitHub
  • es.cat_thread_pool exec low

    GET /_cat/thread_pool

    Show per-node thread pool queue + rejection counts. Use to spot search/write thread saturation.

    View source on GitHub
  • es.close_index exec critical

    POST /<index>/_close

    Closes one index — it becomes unsearchable and unwritable, but stays on disk. Use to "archive" old logs without deleting. Reverse with /_open. **Closed indices count against shard limits in some versions.**

    View source on GitHub
  • es.cluster_allocation_explain exec low

    POST /_cluster/allocation/explain

    Explains why an unassigned shard hasn't been placed. The canonical "why is my cluster yellow?" answer.

    View source on GitHub
  • es.cluster_health exec low

    GET /_cluster/health

    Show cluster status (green/yellow/red), node count, shard counts. Read-only.

    View source on GitHub
  • es.cluster_settings exec low

    GET /_cluster/settings

    Returns persistent + transient cluster-level settings.

    View source on GitHub
  • es.flush_synced exec medium

    POST /<index>/_flush (flush index)

    Flushes the index — forces a Lucene commit so the translog is cleared, which speeds recovery if a shard later restarts. Plain flush; the synced-flush API (/_flush/synced, sync IDs) was deprecated in 7.6 and removed in ES 8.0 — a normal flush gives the same recovery benefit there.

    View source on GitHub
  • es.force_merge exec high

    POST /<index>/_forcemerge

    Merges segments down to `max_num_segments`. Expensive — heavy disk + CPU for the duration. Use on read-only indices (e.g., yesterday's logs) only.

    View source on GitHub
  • es.index_count exec low

    GET /<index>/_count

    Returns the document count for one index.

    View source on GitHub
  • es.index_mapping exec low

    GET /<index>/_mapping

    Returns the field mappings for one index.

    View source on GitHub
  • es.index_settings exec low

    GET /<index>/_settings

    Returns one index's settings.

    View source on GitHub
  • es.index_stats exec low

    GET /<index>/_stats

    Show index-level stats — docs, store, indexing/search rates, fielddata.

    View source on GitHub
  • es.pending_tasks exec low

    GET /_cluster/pending_tasks

    List pending master tasks. A growing queue here means the master can't keep up.

    View source on GitHub
  • es.snapshot_list exec low

    GET /_snapshot/<repo>/_all

    Lists snapshots in one repository.

    View source on GitHub
  • es.snapshot_status exec low

    GET /_snapshot/<repo>/<snap>/_status

    Returns the in-progress (or completed) status of one snapshot.

    View source on GitHub