redis-stat icon indicating copy to clipboard operation
redis-stat copied to clipboard

Consider supporting custom ssl certificates configuration for elasticsearch client

Open erichs opened this issue 9 years ago • 2 comments

It would be really great to support the transport_options hash parameter for the Elasticsearch::Client initialization, to specify a custom SSL cert for https:// urls.

See this section of the Elasticsearch README for example usage.

Not sure what your preferred method of passing this configuration data into the redis-stat server is, @junegunn.

It feels like adding another CLI flag for this option would be clunky, and you don't have any precedent for a config file. What are your thoughts here?

I'd be happy to help with a PR, or could fork if you think this change isn't generally useful.

Thanks for such a great tool!

erichs avatar Jul 16 '15 19:07 erichs

Hi, actually adding support for ElasticSearch was not my idea, and due to my lack of good understanding of ES, the feature has not been systematically tested and I'm not really sure if the current implementation follows the best practice. So if you have any feedback on the part, feel free to let me know.

So anyway, looks like we have three options:

  1. Another CLI flag
    1. We're current packing stuff into a single --es flag, adding another doesn't really feel nice
    2. Short-sighted if we're going to have to add more of such flags
  2. Environment variable (e.g. ES_CA_PATH)
    1. Easier to implement, and to extend in the future
    2. It's the first env var ever used, so it's inconsistent
  3. External config file
    1. The ultimate solution
    2. Most likely overkill

junegunn avatar Jul 17 '15 01:07 junegunn

Of those options, an ENV var gets my vote!

erichs avatar Jul 20 '15 14:07 erichs