jmxtrans / embedded-jmxtrans

In process JMX metrics exporter.
MIT License
82 stars 37 forks source link

Retrieve configuration from a key value store #119

Closed golorins closed 8 years ago

golorins commented 8 years ago

This PR introduces the ability to retrieve configuration excerpts from a remote key value store. A very simple interface is defined and an implementation based on Etcd is supplied. The enhancement is very smoothly integrated into the present configuration mechanism. I have modified the ConfigurationParser class enabling it to recognize urls like etcd://127.0.0.1:4001/query or etcd://[ipaddr1:port1, ipaddr:port2,...]:/path to address a cluster.

I have initially experimented with the etcd4j client but it consumed too much resources when active (more than 20 threads during refresh). Since I think that an embedded-jmxtrans should be almost invisible I have implemented e simplified read only etcd client.

The ultimate goal of this PR is to enable the central management of the jmxtrans configuration of a lot of application servers running on virtual machines or docker containers. To do this I have created a very small "agent" webapp https://github.com/golorins/embedded-jmxtrans-war which uses this feature to implement a simple but powerful configuration scheme. If you like this PR have a look at it, and let me know what you think

cyrille-leclerc commented 8 years ago

Many thanks @golorins, looks great!

Please don't forget to add a paragraph in the documentation.

golorins commented 8 years ago

You're welcome .

I added a brief explanation of the new feature to the pages "Spring Integration" and "Plain Java Servlet Integration". Hope that's ok.

On Fri, Mar 11, 2016 at 7:03 PM, Cyrille Le Clerc notifications@github.com wrote:

Many thanks @golorins https://github.com/golorins, looks great!

Please don't forget to add a paragraph in the documentation.

— Reply to this email directly or view it on GitHub https://github.com/jmxtrans/embedded-jmxtrans/pull/119#issuecomment-195480388 .