Listing indexes in your OpenSearch cluster is a basic operation that allows you to see all available indexes and their status. Follow this guide to learn how to list all indexes in your Logit.io hosted OpenSearch service.
Step 1: Access the OpenSearch Dashboard
Once logged in to Logit.io, navigate to the OpenSearch Dashboards through your main dashboard by choosing Launch Logs.
Step 2: Open the Dev Tools
Logit.io's OpenSearch Dashboards provide a Dev Tools feature, which is an integrated console for directly executing OpenSearch queries and commands.
In the OpenSearch Dashboards, locate and click on "Dev Tools" on the left-hand navigation bar.
You will be presented with a console where you can input and execute commands.
Step 3: List All Indexes
To list all indexes in your OpenSearch cluster, you can use the _cat/indices API, which provides a human-readable overview of index properties.
In the Dev Tools console, enter the following command to list all indexes:
GET /_cat/indices?v
Press Enter to execute the command.
The v parameter in the command asks for verbose output, meaning it will include headers in the output.
This command will display a list of all indexes along with essential details such as index names, the number of documents, and the size of the disk.
Understanding the Output
The output from the _cat/indices command provides several pieces of information for each index, including:
health: Indicates the health status of the index (green, yellow, or red).
status: Shows whether the index is open or closed.
index: The name of the index.
uuid: The unique identifier of the index.
pri: The number of primary shards.
rep: The number of replica shards.
docs.count: The number of documents in the index.
docs.deleted: The number of deleted documents in the index.
store.size: The total size taken by the index on disk.
pri.store.size: The size taken by primary shards on disk.
For more detailed analysis or operations on your indexes, consider using additional OpenSearch APIs or reaching out to a member of the Logit.io support team for further assistance.
What's next:
Learn more about ElastAlert rules: if you'd like to learn more about ElastAlert rules from the people that built it, check out their cheat sheet.
Read Logit.io's Introduction to alerting
Learn how to send alerts to Email from your Logit.io stacks.
Learn how to send alerts to PagerDuty from your Logit.io stacks.