Elasticsearch Commands - Manage & Monitor Your Cluster

Access essential Elasticsearch commands for managing and monitoring your cluster. Learn how to check status, restart services, and verify versions with our quick reference guide.

Elasticsearch Commands

Elasticsearch is a powerful, distributed, RESTful search and analytics engine. Managing and monitoring its health and status is crucial for any application relying on it. This section provides essential command-line interface (CLI) commands to help you efficiently interact with your Elasticsearch and Kibana instances.

Check Elasticsearch Service Status

Understanding the current operational state of your Elasticsearch cluster is the first step in troubleshooting or monitoring. Use the following commands to check if the Elasticsearch service is running.

sudo service elasticsearch status -l

Restart Elasticsearch and Kibana Services

When updates are applied or issues arise, restarting services is often necessary. These commands allow you to gracefully restart Elasticsearch and its accompanying visualization tool, Kibana.

sudo service kibana restart           // Restart kibana
sudo service elasticsearch restart    // Restart elasticsearch
brew services elasticsearch-full restart // For macOS users with Homebrew

Verify Elasticsearch and Kibana Versions

Ensuring you are running the expected versions of Elasticsearch and Kibana is important for compatibility and security. Use these commands to check the installed versions.

sudo /usr/share/elasticsearch/bin/elasticsearch --version // Check ElasticSearch version
sudo /usr/share/kibana/bin/kibana --version               // Check kibana version

External Resources