Elastic Healthcheck Commands

The elastic subcommand in Accelo Healthcheck helps you diagnose and manage Elasticsearch-related issues. It provides commonly used Elasticsearch diagnostic and maintenance operations through a single, secure command interface.

To view all available subcommands and flags, run:

Bash
Copy

Available Subcommands

  • alias
  • cluster-health
  • cluster-settings
  • delete
  • health-report
  • shard-count

Default Behavior

By default, the following command lists all Elasticsearch indices for the specified environment:

Bash
Copy

Commonly Used Flags

FlagDescription
-d <hostname/ip>Specifies a custom Elasticsearch host if it is running on a different server
-i <index-name/regex>Filters one or more indices by name or regular expression
-wDisplays output in a wide format
-p <port>Specifies a non-default Elasticsearch port

Sample Output: List Indices

Bash
Copy

Example output:

Bash
Copy

Commands

Alias

Retrieves alias information for one or more indices.

Command:

Bash
Copy

Sample output:

Bash
Copy

Cluster Health

Retrieves the health status of the Elasticsearch cluster.

Command:

Bash
Copy

Sample output:

Bash
Copy

Cluster Settings

Retrieves cluster-wide persistent and transient settings.

Command:

Bash
Copy

Sample output:

Bash
Copy

Delete Index

Deletes one or more indices from the Elasticsearch cluster.

Bash
Copy

To delete multiple indices, give -m flag, when -m is used -i flag can be used as regex and multiple indices can be deleted.

Sample output:

Bash
Copy

Health Report

Retrieves a detailed health report for the Elasticsearch cluster.

Command:

Bash
Copy

Shard Count

Updates the number of shards configured for the Elasticsearch cluster.

Command:

Bash
Copy

Sample output:

Bash
Copy

After updating the shard count, use the cluster-settings command to verify the change.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard