How to Check Your Elasticsearch and KibanaVersion from the Command Line
If youโre storing data in Elasticsearch and Kibana youโre likely to encounter situations where you need to know what version of the product youโre running.
In this tutorial, youโll learn two simple ways to check your Elasticsearch and Kibana versions from the command line.
Prerequisites
Before you attempt to check your version of Elasticsearch a few key prerequisites need to be in place. The system requirements are minimal:
- Ensure that Elasticsearch is installed and running.
To check if Elasticsearch is running execute the following command in the terminal:
curl http://localhost:9200/_cluster/health?pretty
curl http://localhost:9200/_cluster/health?pretty
You should receive an output containing information about your instance of Elasticsearch. If you know that Elasticsearch is installed but you donโt receive the expected result, you may need to restart Elasticsearch on your machine.
Once youโve confirmed this, you need a basic familiarity with command line tools and curl
commands. If you havenโt had much experience with curl
functionality the underlying concept is simple: curl
allows you to use HTTP requests to communicate with a server. In this tutorial, weโll use curl
to communicate with Elasticsearch.
Check Version Options
OPTION 1: Check the Version using Curl from Command Line
There are two simple ways that you can use command-line operations to find out what version of Elasticsearch youโre running. The first method for checking your Elasticsearch version makes use of the curl
command. With Elasticsearch running, execute the curl
command shown below in your terminal to get information about your version of Elasticsearch:
curl -XGET 'http://localhost:9200'
Note: If the version number shown in your output is different from the version youโve installed, you may have more than one installation of Elasticsearch on your machine.
OPTION 2: Check the Version with elastic search and Kibana โversion
In addition to using the previous command, itโs also possible to find out the version number just by starting Elasticsearch and Kibana. When Elasticsearch and Kibana starts up it outputs the version number; however, it also outputs a lot of other information so it can be difficult to sort through the output to find it. You can cut through the clutter and get the version information directly by using the version flag when starting Elasticsearch and Kibana. The following example shows how to run the command on Linux. The specific command syntax will vary depending on your operating system:
whereis elasticsearch
The output, which includes information on our version, is shown below:
/usr/share/elasticsearch/bin/elasticsearch --version
Same for Kibana
whereis kibana
The output, which includes information on our version, is shown below:
/usr/share/kibana/bin/kibana --version
Again, you can easily see that the installed version of Elasticsearch is 8.3.2