jmxtrans / embedded-jmxtrans

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

Sample war ready for deployment #76

Open aadamovich opened 10 years ago

aadamovich commented 10 years ago

It would be nice to have a simple WAR project (maybe even publishied to Maven Central) that can be published to any servlet container out of the box and automatically read configuration from the application server's working directory. I've noticed there is already an application that shows to add embedded-jmxtrans into existing application, but in case of many applications, it would be better to just have an indepedent app that can be deployed for container-wide metric collection.

cyrille-leclerc commented 10 years ago

Hi Andrey,

Did you look at jmxtrans-agent if you are interested in a solution that would monitor several apps?

aadamovich commented 10 years ago

Yes, I did. But the fact that it is dependency-less (for a good reason), makes it harder to reuse some of the useful writers e.g. Slf4J writer. Also to enable the agent I need a restart (it's not a big problem, but in my situation I have a couple of servers that I can't really restart too often).

I ended up creating a simple Gradle build that creates such a WAR which takes jmxtrans.json from the current directory and logs performance metrics through logback. So, now I can deploy this WAR to many of our Tomcat and WebLogic instances and configure queries and writers and also reuse the features of the logging framework to rotate performance log files as needed.

If you are interested I can share the project.

gehel commented 9 years ago

Hello @aadamovich ! Nice to see you here as well !

I'd be interested in having a look at your project, and possibly incorporating it in JmxTrans2.

aadamovich commented 9 years ago

Hi @gehel ! It is just a simple packaging of existing jars and configs, so, don't expect super smart things there :). Published the code here: https://github.com/aestasit/jmxtrans-embedded