How to check the specific version of plugin is installed?

Is there a good way to check the specific version of plugin is installed?
(I'm writing Serverspec test to validate an ES cluster).

For now, I'm doing

$ bin/plugin list | grep ${plugin}

but it doesn't show version.

In addition, the plugin names seem to be converted into lower case in ES ver. 2.X.
(E.g.; "HQ" -> "hq").

Thanks in advance!

It seems this will make it into a future version


Starting from 5.x you can use bin/elasticsearch-plugin list --verbose. It prints something like:

Plugins directory: /pat/to/elasticsearch-5.0.0-alpha5-SNAPSHOT/plugins
- Plugin information:
Name: x-pack
Description: Elasticsearch Expanded Pack Plugin
Version: 5.0.0-alpha5
 * Classname: org.elasticsearch.xpack.XPackPlugin

Previous versions of the plugin manager do not show plugins versions, but you can use

GET /_cat/plugins
Honcho cloud-aws 2.3.5 j


GET /_nodes?filter_path=**,**.plugins.version
  "nodes" : {
    "zipfkEiMQcSl1gwAxpo9WQ" : {
      "plugins" : [ {
        "name" : "cloud-aws",
        "version" : "2.3.5"
      } ]
1 Like

Thanks guys!

Just to confirm, @Babadofar and @tanguy are talking about the same thing, bin/plugin --verbose option of ver. 5.x?

So then, in summary:

Ver. 5.x

Use output of bin/plugin --verbose (with plugin names downcased).

Ver 2.x

If Elasticsearch is running

Use Cat API GET /_cat/plugins (with plugin names downcased).

If Elasticsearch is not running

No way to get versions of plugins.

Ver 1.x or lower

Same as ver. 2.x, but without plugin names downcased.