Instrumenting a 3rd party app

23 views
Skip to first unread message

Andy Chambers

unread,
Mar 20, 2017, 9:16:46 PM3/20/17
to metrics-user
Hi folks,

I'm still pretty new to metrics/monitoring and java so this might be a dumb question but is it possible to
instrument a 3rd party java app (e.g. zookeeper) with any/all of the jvm metrics sets without modifying
the code of the 3rd party app? Seems like jmx *might* make this possible but I'm aware of the
recommendation about not using jmx.

I get that apps should push not poll their metrics but is the case described above a good use-case for
poll? If not, what would you do instead to monitor apps for which you can't modify the code?

Cheers,
Andy

Vladimir Kroz

unread,
Mar 21, 2017, 8:04:17 PM3/21/17
to metrics-user
Andy, 

Metrics library is intended to help developers in producing metrics in application they develop. There is no use for instrumenting 3rd party application. Given that said however, you're looking to the right direction -- there are number of standard or semi-standard ways to instrument 3rd party apps. As for Zookeeper specifically there are number of ways available to instrument and monitor:
1) JMX (as you correctly noticed)
2) 4-letter commands
3) Zookeeper log files
4) Numerous tools which based on above-mentioned methods.

Best,
Vlad
Reply all
Reply to author
Forward
0 new messages