Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add _cat/plugins endpoint #4824

Closed
dadoonet opened this issue Jan 21, 2014 · 9 comments
Closed

Add _cat/plugins endpoint #4824

dadoonet opened this issue Jan 21, 2014 · 9 comments

Comments

@dadoonet
Copy link
Member

If we want to have a full picture of plugins running in a cluster, we need to add a _cat/plugins endpoint.

Response could look like:

% curl es2:9200/_cat/plugins?v
node component                        version   type url                                   desc
es1  mapper-attachments               1.7.0       j                                        Adds the attachment type allowing to parse difference attachment formats
es1  lang-javascript                  1.4.0       j                                        JavaScript plugin allowing to add javascript scripting support
es1  analysis-smartcn                 1.9.0       j                                        Smart Chinese analysis support
es1  marvel                           1.1.0      j/s http://localhost:9200/_plugins/marvel Elasticsearch Management & Monitoring
es1  kopf                             0.5.3       s  http://localhost:9200/_plugins/kopf   kopf - simple web administration tool for ElasticSearch
es2  mapper-attachments               2.0.0.RC1   j                                        Adds the attachment type allowing to parse difference attachment formats
es2  lang-javascript                  2.0.0.RC1   j                                        JavaScript plugin allowing to add javascript scripting support
es2  analysis-smartcn                 2.0.0.RC1   j                                        Smart Chinese analysis support
@uboness
Copy link
Contributor

uboness commented Jan 21, 2014

personally I'd much rather have this as part of the _cat/nodes api... a la:

% curl es2:9200/_cat/nodes?v&h=jvmVersion,esVersion,pluginVersion
name        ip              jvmVersion      esVersion   pluginVersion
Kurt Wagner 10.20.100.185   1.6.0_65-b14    1.0.0.RC1   elasticsearch-mapper-attachment:0.90.1

the pluginVersion column holds a comma separated list of plugins and their versions

@karmi
Copy link
Contributor

karmi commented Jan 21, 2014

@uboness But what if you have many plugins on the node? That would be a very long line... The component | version table would work better in this case I think...

@uboness
Copy link
Contributor

uboness commented Jan 21, 2014

The more I think about it the more I realize that it would make sense to separate the plugin info and the node info... Also discussed it with Boaz and the general feeling is that the es/jvm versions belong to the nodes API, and for the plugins we can have a dedicated API... (Which can potential return the mete data info as well.. Eg description)

On Tue, Jan 21, 2014 at 3:02 PM, Karel Minarik notifications@github.com
wrote:

@uboness But what if you have many plugins on the node? That would be a very long line... The component | version table would work better in this case I think...

Reply to this email directly or view it on GitHub:
#4824 (comment)

@drewr
Copy link
Contributor

drewr commented Jan 21, 2014

👍 for _cat/versions since it will require multiple lines per node...

@uboness
Copy link
Contributor

uboness commented Jan 21, 2014

I'm more for _cat/plugins

@dadoonet
Copy link
Member Author

I think it could be nice to have a full overview of all versions (nodes, jvm and plugins).
Naming it plugins could appear as restrictive. But to be honest, both are fine to me.

If we restrict on plugins, I can add more columns, such as:

  • site (boolean): is a site plugin?
  • jvm (boolean): is a JVM plugin?
  • url (String): if site, endpoint

WDYT?

@uboness
Copy link
Contributor

uboness commented Jan 21, 2014

I don't think, from a user perspective, that the user wants to know information about version.. .they want to know information about nodes (and jvm/es versions are part of that info)... if they want to know versions of plugins.. .it comes from the perspective of knowing information about plugins... hence the dedicated _cat/plugins api... this IMO feels more natural and fits nicely with the rest of the _cat APIs

and yeah... having a _cat/plugins endpoint enables you to provide the different metadata over the plugins, like site, desc, url, etc...

dadoonet added a commit to dadoonet/elasticsearch that referenced this issue Mar 14, 2014
If we want to have a full picture of versions running in a cluster, we need to add a `_cat/plugins` endpoint.

Response could look like:

```sh
% curl es2:9200/_cat/plugins?v
node component                        version   type url                                   desc
es1  mapper-attachments               1.7.0       j                                        Adds the attachment type allowing to parse difference attachment formats
es1  lang-javascript                  1.4.0       j                                        JavaScript plugin allowing to add javascript scripting support
es1  analysis-smartcn                 1.9.0       j                                        Smart Chinese analysis support
es1  marvel                           1.1.0      j/s http://localhost:9200/_plugins/marvel Elasticsearch Management & Monitoring
es1  kopf                             0.5.3       s  http://localhost:9200/_plugins/kopf   kopf - simple web administration tool for ElasticSearch
es2  mapper-attachments               2.0.0.RC1   j                                        Adds the attachment type allowing to parse difference attachment formats
es2  lang-javascript                  2.0.0.RC1   j                                        JavaScript plugin allowing to add javascript scripting support
es2  analysis-smartcn                 2.0.0.RC1   j                                        Smart Chinese analysis support
```

Closes elastic#4824.
@dadoonet
Copy link
Member Author

@drewr Could you have a look please at my PR. I did rebase on master, added some new columns and update doc.

@javanna How can I test it as I don't know how I can add a plugin to the REST test runner. May be we can not really test it automatically?

@drewr
Copy link
Contributor

drewr commented Mar 14, 2014

Looks good!

dadoonet added a commit that referenced this issue Mar 16, 2014
If we want to have a full picture of versions running in a cluster, we need to add a `_cat/plugins` endpoint.

Response could look like:

```sh
% curl es2:9200/_cat/plugins?v
node component                        version   type url                                   desc
es1  mapper-attachments               1.7.0       j                                        Adds the attachment type allowing to parse difference attachment formats
es1  lang-javascript                  1.4.0       j                                        JavaScript plugin allowing to add javascript scripting support
es1  analysis-smartcn                 1.9.0       j                                        Smart Chinese analysis support
es1  marvel                           1.1.0      j/s http://localhost:9200/_plugins/marvel Elasticsearch Management & Monitoring
es1  kopf                             0.5.3       s  http://localhost:9200/_plugins/kopf   kopf - simple web administration tool for ElasticSearch
es2  mapper-attachments               2.0.0.RC1   j                                        Adds the attachment type allowing to parse difference attachment formats
es2  lang-javascript                  2.0.0.RC1   j                                        JavaScript plugin allowing to add javascript scripting support
es2  analysis-smartcn                 2.0.0.RC1   j                                        Smart Chinese analysis support
```

Closes #4824.
dadoonet referenced this issue Apr 9, 2014
Reproducible using ES 1.1.0.

`/_cat/plugins` works fine when no plugins are installed.

But once a plugin is installed (eg. latest marvel), it throws an exception indicating that the resulting table constructed has 7 fields in the header row but not enough fields in the data rows to make it a valid table.

```
{
  "status" : 500,
  "error" : "ElasticsearchIllegalStateException[mismatch on number of cells 6 in a row compared to header 7]"
}
```

This issue has been introduced when we removed `isolation` feature in 1.1 branch. See c34d8bd.

Closes #5715
@clintongormley clintongormley added the :Data Management/CAT APIs Text APIs behind /_cat label Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants