jmxtrans/embedded-jmxtrans

Automatic code execution when a jvm metric crosses threshold

shahamit opened this issue · 2 comments

Hello,

I am looking out for ways to write code that could be executed when certain jvm metric crosses its configured threshold value. For e.g. If the cpu usage crosses a configured threshold value say 90% I want to take frequent thread dumps that could then be used for root cause analysis.

For this I was thinking of extending the configured output writer (for e.g. graphiteWriter) and executing custom code to parse the metric value and perform custom action (in this case take thread dumps).
But there is one problem - This metric needs to be monitored more frequently then others. i.e. every 2 secs we check if the cpu crosses 90% if so take thread dumps and send the metric to graphite. If not do not take any action.

Is there a way to configure embedded jmxtrans to send a jvm metric more frequently than others?

Thanks!

Please ask on our support forum https://groups.google.com/forum/#!forum/jmxtrans .

I have a solution in mind.

Don't forget to mention that you refer to the embedded-jmxtrans version.