-
Notifications
You must be signed in to change notification settings - Fork 37
Added hot configuration reloading for Spring #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
jmxtrans project » embedded-jmxtrans #96 SUCCESS |
continue to loop until the configuration is fixed.
|
jmxtrans project » embedded-jmxtrans #97 SUCCESS |
|
jmxtrans project » embedded-jmxtrans #98 SUCCESS |
|
Thanks @iliuta, I'll merge it this week. Cyrille |
|
Thank you Cyrille. Everything is all right with my pull request? Do you need further information? |
|
Hello @iliuta, can you please explain me how to you integrate this daemon thread with the shutdown procedure? I can't see how you stop this thread. Cyrille |
|
Hi Cyrille, just to understand your question, do we really need to integrate this thread in a shutdown procedure? Since it is a daemon thread, it will not prevent the JVM to exit and it will be terminated anyway with no harm at the end. Am I missing some point here? Anyway, I could easily interrupt this thread in the destroy method of EmbeddedJmxTransFactory to allow it to stop but it will make the code a little bit more complicated (not too much however). Do you want me to do this? |
|
Hello @iliuta, yes we need to stop this thread during Using Cyrille |
|
Hello Cyrille, |
|
jmxtrans project » embedded-jmxtrans #99 SUCCESS |
Added hot configuration reloading for Spring
|
Hi @iliuta. I'm waiting for the Pull Request jmxtrans/jmxtrans.github.io#2 to be integrated before moving forward. We lost the XSD files on www.jmxtrans.org. |
|
I slightly changed the contribution
I cut the release 1.0.14, I should soon be available in Maven Central Repo. https://github.com/jmxtrans/embedded-jmxtrans/releases/tag/embedded-jmxtrans-1.0.14 |
|
Great! Now I can push my stuff into production. |
|
Thanks Adrian, Can you share with us the kind of OutputWriter you use? Graphite? Cyrille |
|
I'm using GraphiteWriter to export general metrics (jvm and Tomcat) with Jmxtrans embedded into a distinct war deployed in every Tomcat on the platform. Application maintainers can provide extra jmxtrans.json files to export their application specific metrics in addition to the provided configuration file. I had some problems with GraphiteWriter and wildcard expressions. If the subset of metrics covered by the wildcard is too large, some of them will not be sent to Graphite. It is however quite hard to reproduce that and I did not investigate further. The workaround was to provide some finer queries. Of course, a StatsdWriter would have been nicer but GraphiteWriter is okay for now. Maybe one day I will write one from the model of main Jmxtrans project ... |
Hi,
This is a proposal for hot configuration reloading for Spring.
It is based on a thread created by EmbeddedJmxTransFactory, which scans every X seconds (configurable) the last modification date of every configuration json file.
If the last update date is greater than the last saved value, then:
A new attribute has been defined in jmxtrans-1.0.xsd, configuration-scan-period.
It corresponds to the new configurationScanPeriod attribute of EmbeddedJmxTransFactory. The new attribute is parsed and populated into EmbeddedJmxTransFactory by EmbeddedJmxTransBeanDefinitionParser.
If configuration-scan-period is 0 (default), then the hot configuration reloading is disabled (thread not created and started).
Regards,
Adrian