List available configuration files through the API


(lleeoo) #1

I there a way to list the configuration files that exist in the Elasticsearch conf directory (usually /etc/elasticsearch) using only the Elasticsearch API?

For example, I would like to know if a specific configuration file for synonyms is available.

Thank you for your help.


(David Pilato) #2

No you can't.


(lleeoo) #3

Thank you. Do you have a suggestion as to what would be the lightest way to check resource availibility then? If possible, I would like to avoid the following:

1) Try creating an index with an analyzer that uses file X
2) Catch an error / No error --> decide if the file X exists
3) Delete the index

(David Pilato) #4

Why would you have a broken installation ?


(lleeoo) #5

My install is fine; my issue is with confirming that resource files are available.

I am working on a python package that provides mulitple analyzers, some of which require resources. If a user decides to use an analyzer that requires resources, I want to check that this file is available and create it if necessary. Using standard os functions like ls /etc/elasticsearch requires sudo permissions by default which I would rather avoid.


(David Pilato) #6

May be you can write a plugin which exposes a REST endpoint and check that on all nodes.

Not sure you need to do that though.

And I'm pretty sure you don't have to sudo to read the config file as elasticsearch user normally has access to it without needing to sudo).


(system) #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.