Elasticsearch plugin custom settings

Hi,

I wish to create an Elasticsearch plugin, this plugin requires some settings to be stored and to be mutable. I have found in some threads using the onModule() function. But this does not seem to exist in the 6.2 plugin.

Could someone provide me with more information about how to add settings to cluster / make them mutable, or even better provide me with an example?

Thanks!

Not sure if this is what you want but look at

And

Hi David,

This looks helpful, but I don't see / understand how these settings will become mutable?

A basic example is foo.bar.baz.enabled = true

I want to be able to set this flag to false. I don't see anywhere in your code where you allow for such a thing?

Thanks!

Take a look at the example custom settings plugin. In particular, you want a Setting object created with the Property.Dynamic. You will also most likely want to have your plugin depend on the ClusterService, and call clusterService.getClusterSettings().addSettingsUpdateConsumer to get notified when the setting changes (assuming the setting is cluster wide).

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