I want to display metrics (just a simple requests per second/minute counter) with grafana. I use graphite to collect the metrics.
When I use java to report the requests to graphite:
Graphite graphite = new Graphite(new InetSocketAddress("mygraphiteserver.com", 2003));
MetricRegistry registry = new MetricRegistry();
GraphiteReporter reporter = GraphiteReporter.forRegistry(registry)
.prefixedWith("mymetrics.requests")
.convertRatesTo(TimeUnit.SECONDS)
.convertDurationsTo(TimeUnit.MILLISECONDS)
.filter(MetricFilter.ALL)
.build(graphite);
reporter.start(1, TimeUnit.SECONDS);
Meter loginRequests = registry.meter(name("successful"));
loginRequests.mark();
reporter.report();
The problem is, that everything runs without any exception, but the Graphite server does not get any metrics. Any idea what is wrong her?
Furthermore, the name of this metric ("mymetrics.requests.successful") does not appear in the lists of metric series.
Thanks a lot in advance!
netcat(nc) to test if the connection to Graphite is working as expected. - dukebodyecho "<<my.series.name 42 `date +%s`" | nc <<mygraphiteserver>> 2003which works fine. - Andre Grunow