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

--

--

๐’๐š๐ค๐ž๐ญ ๐‰๐š๐ข๐ง
๐’๐š๐ค๐ž๐ญ ๐‰๐š๐ข๐ง

Written by ๐’๐š๐ค๐ž๐ญ ๐‰๐š๐ข๐ง

๐ƒ๐ž๐ฏ๐Ž๐ฉ๐ฌ/๐’๐‘๐„/๐‚๐ฅ๐จ๐ฎ๐ /๐ˆ๐ง๐Ÿ๐ซ๐š๐ฌ๐ญ๐ซ๐ฎ๐œ๐ญ๐ฎ๐ซ๐ž /๐’๐ฒ๐ฌ๐ญ๐ž๐ฆ ๐„๐ง๐ ๐ข๐ง๐ž๐ž๐ซ

No responses yet