I have a Java application that needs to collect and report a large number of metrics/operational measurements/statistics (different words for different people - I'll just use metrics) about various entities. Metrics can be one of:
'Entities' can be physical devices (a computer, a switch, a modem) but are most often logical entities (Communication channel 4567, User 123456, interface to service A). Additionally, some of these logical entities are static in that they are known ahead of time and don't change during the life of the application, and others may be transient (communcation channel 4567 may only exist for some time, and then is deleted).
I'm looking for libraries to help solve 2 problems:
Note/Requirements:
In the past, my company has attempted a couple of 'home-grown' solutions for this need. Basically the data is shoved into a database in some inconsistent fashion, and the client pulls the data out and is able to chart a single value over a fixed period of time using either home grown or 3rd party charting packages. Frankly, all of our solutions have sucked. Some of the problems I hope a 3rd party solution could fix would be:
Sorry for the long description. Thanks for your help.
Metrics is a Java library which provides measuring instruments for Java applications. It has several modules, and in this article, we will elaborate metrics-core module, metrics-healthchecks module, metrics-servlets module, and metrics-servlet module, and sketch out the rest, for your reference.
Metrics is a Java library which gives you unparalleled insight into what your code does in production. Metrics provides a powerful toolkit of ways to measure the behavior of critical components in your production environment.
Micrometer is a simple application metrics facade for the JVM. It has become the defacto standard in the Java ecosystem and is integrated into SpringBoot. Read more on Micrometer at micrometer.io. Instana supports Micrometer without any additional configuration.
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.
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.
You can try Stagemonitor https://github.com/stagemonitor/stagemonitor
It can be paired with elasticsearch/graphite/influxdb for timeseries data storage.
and you can use Grafana to visualise metrics and it can connect to many different databases like elasticsearch, influxdb, prometheus, mysql.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With