What are java libraries for collecting/storing/presenting application metrics/statistics?

I can recommend this Java library by Yammer: https://github.com/dropwizard/metrics It offers a nice API to have counters, timings, histograms etc. And it can automatically collect interesting data from servlets by instrumenting them and from the JVM (memory etc).

We store the data then in Graphite: http://graphite.wikidot.com/

Graphite stores the data in a fixed sized database similar to RRD, and can generate charts and dashboards.


RRD4J

Sounds like RRD4J (Apache license) is exactly what you're looking for.
It is a Java implementation of the well established RRDtool. It is built to collect data over time in a Round Robin Database (RRD). Old data is typically archived in RRA archives where the time scale is less fine grained, leading to more space efficient storage.

While I have no direct experience with RRD4J, we have successfully been using RRDTool and Cacti for many years, for health monitoring in our data center. Since RRD is the industry standard when it comes to monitoring, I would definitely recommend you take a look at RRD4J.


I know its been a while since this question has been asked but I think its not a bad idea to keep the answers up to date.

Spring Boot 2 now uses https://micrometer.io - that should be a good starting point for collecting metrics in Java applications these days. It's not responsible for storing or presenting them, but offers integration for frameworks to do so.

Tags:

Java