How to get elastic search host in my plugin

(graylog) #1

im working on a plugin

how can i access elasticsearch_hosts in my plugin

getElasticHost() method in ElasticConfig class seams not working

(Jochen) #2

What are you trying to accomplish?

(graylog) #3

i want to use elastchosts which are defined in .conf file

(Jochen) #4

You can inject the JestClient, also see


(graylog) #5

from this i will get jestClient but i need hosts “localhost:9200” im not trying to connect to elastic but i need host for some reason


(Jochen) #6

Take a look at JestClientProvider for an example how to inject Elasticsearch-related configuration settings.

(system) closed #7

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