I have a spring-boot - dropwizard hello world application. The following is a print-screen from jvisualvm of the application ...
This is also what I can see from http://localhost:8080/metrics in a browser:
{
"mem" : 467911,
"mem.free" : 306671,
"processors" : 8,
"instance.uptime" : 5639045,
"uptime" : 5643416,
"systemload.average" : -1.0,
"heap.committed" : 409088,
"heap.init" : 262144,
"heap.used" : 102416,
"heap" : 3706880,
"nonheap.committed" : 60184,
"nonheap.init" : 2496,
"nonheap.used" : 58823,
"nonheap" : 0,
"threads.peak" : 40,
"threads.daemon" : 28,
"threads.totalStarted" : 63,
"threads" : 31,
"classes" : 7965,
"classes.loaded" : 7965,
"classes.unloaded" : 0,
"gc.ps_scavenge.count" : 14,
"gc.ps_scavenge.time" : 224,
"gc.ps_marksweep.count" : 2,
"gc.ps_marksweep.time" : 75,
"com.example.SimpleServiceDelegate.sayHello.snapshot.98thPercentile" : 0,
"com.example.SimpleServiceDelegate.doSomething.exceptions.count" : 0,
"com.example.SimpleServiceDelegate.doSomething.snapshot.999thPercentile" : 0,
"com.example.SimpleServiceDelegate.doSomething.exceptions.oneMinuteRate" : 0.0,
"gauge.response.star-star.favicon.ico" : 26.0,
"com.example.SimpleServiceDelegate.sayHello.exceptions.oneMinuteRate" : 0.0,
"com.example.SimpleServiceDelegate.doSomething.snapshot.min" : 0,
"com.example.SimpleServiceDelegate.sayHello.exceptions.fiveMinuteRate" : 0.0,
"com.example.SimpleServiceDelegate.doSomething.snapshot.95thPercentile" : 0,
"com.example.SimpleServiceDelegate.sayHello.oneMinuteRate" : 0.0,
"com.example.SimpleServiceDelegate.doSomething.snapshot.98thPercentile" : 0,
"com.example.SimpleServiceDelegate.doSomething.snapshot.median" : 0,
"gauge.response.metrics.name" : 0.0,
"com.example.SimpleServiceDelegate.sayHello.snapshot.75thPercentile" : 0,
"counter.status.404.star-star" : 2,
"gauge.response.metrics" : 1.0,
"com.example.SimpleServiceDelegate.sayHello.snapshot.median" : 0,
"com.example.SimpleServiceDelegate.sayHello.fifteenMinuteRate" : 0.0,
"com.example.SimpleServiceDelegate.sayHello.exceptions.count" : 0,
"com.example.SimpleServiceDelegate.doSomething.snapshot.mean" : 0,
"com.example.SimpleServiceDelegate.doSomething.meanRate" : 0.0,
"com.example.SimpleServiceDelegate.sayHello.snapshot.min" : 0,
"com.example.SimpleServiceDelegate.sayHello.exceptions.meanRate" : 0.0,
"com.example.SimpleServiceDelegate.sayHello.exceptions.fifteenMinuteRate" : 0.0,
"counter.status.200.star-star.favicon.ico" : 1,
"com.example.SimpleServiceDelegate.doSomething.snapshot.max" : 0,
"com.example.SimpleServiceDelegate.sayHello.count" : 0,
"com.example.SimpleServiceDelegate.sayHello.snapshot.stdDev" : 0,
"com.example.SimpleServiceDelegate.sayHello.fiveMinuteRate" : 0.0,
"counter.status.200.metrics" : 2405,
"com.example.SimpleServiceDelegate.doSomething.snapshot.75thPercentile" : 0,
"counter.status.404.metrics.name" : 3268,
"com.example.SimpleServiceDelegate.doSomething.fifteenMinuteRate" : 0.0,
"com.example.SimpleServiceDelegate.sayHello.snapshot.max" : 0,
"com.example.SimpleServiceDelegate.doSomething.exceptions.meanRate" : 0.0,
"com.example.SimpleServiceDelegate.sayHello.snapshot.95thPercentile" : 0,
"com.example.SimpleServiceDelegate.sayHello.snapshot.999thPercentile" : 0,
"com.example.SimpleServiceDelegate.doSomething.count" : 0,
"com.example.SimpleServiceDelegate.sayHello.snapshot.mean" : 0,
"gauge.response.star-star" : 1.0,
"com.example.SimpleServiceDelegate.doSomething.oneMinuteRate" : 0.0,
"com.example.SimpleServiceDelegate.doSomething.snapshot.99thPercentile" : 0,
"com.example.SimpleServiceDelegate.doSomething.fiveMinuteRate" : 0.0,
"com.example.SimpleServiceDelegate.sayHello.snapshot.99thPercentile" : 0,
"com.example.SimpleServiceDelegate.sayHello.meanRate" : 0.0,
"com.example.SimpleServiceDelegate.doSomething.exceptions.fiveMinuteRate" : 0.0,
"com.example.SimpleServiceDelegate.doSomething.exceptions.fifteenMinuteRate" : 0.0,
"com.example.SimpleServiceDelegate.doSomething.snapshot.stdDev" : 0,
"httpsessions.max" : -1,
"httpsessions.active" : 0
}
My metricbeat.yml includes this configuration:
#----------------------------- Dropwizard Module -----------------------------
- module: dropwizard
metricsets: ["collector"]
period: 2s
hosts: ["localhost:8080"]
metrics_path: /metrics/metrics
namespace: example
enabled: true
With this configuration I can't get any data from the application. Since there is no description for metrics_path
and namespace
in elastic's website, I tested many things for these two parameters but with no success for example when I use
metrics_path: /metrics/com/example/SimpleServiceDelegate/doSomething/Count
namespace: example
I get HTTP error 404 in collector: 404
in error.message
field with no useful hint from DEBUG level logs.
Any help will be appreciated.