Spring-Boot actuator exposes many useful metrics at /metrics
such as uptime, memory usage, GC count.
Only a subset of these are sent to Graphite when using the Dropwizard Metrics integration. In specific, only the counters and gauges
Is there any way to get these other metrics to be published to graphite?
The documentation suggests that it should be possible:
Users of the Dropwizard ‘Metrics’ library will find that Spring Boot metrics are automatically published to com.codahale.metrics.MetricRegistry
System Metrics created by Spring boot are not reported automatically because MetricsRegistry does not know anything about those Metrics.
You should register those metrics manually when your application boots up.
I have defined
Gauge
, not all the system metrics should be added as gauge. e.g. the Counter should be used to capture count values.If you don't want to use Spring boot. Use can include
metrics-jvm
out of the box to capture JVM level metrics.