Hi Setup a shared metrics registry with the name metricRegistry, then its shared.
If using java, then SimpleRegistry map = new SimpleRegistry(); map.put("metricsRegistry, new MetricRegistry()); CamelContext context = new DefaultCamelContext(map); On Sat, Feb 28, 2015 at 8:28 AM, vivekt <vivek.tha...@gmail.com> wrote: > I am using metrics component of type counter in camel route. I do see the > counters and their values reported in the logs every 1 minute, but I want to > access these values via jmx so that I can push them to our dashboard. > > Here is the chunk of log file... > > 2015-02-26 17:23:49,948 | INFO | eporter-thread-1 | MetricsComponent > | 99 - org.apache.camel.camel-metrics - 2.14.1 | type=COUNTER, > name=message.good.counts, count=4 > 2015-02-26 17:23:49,948 | INFO | eporter-thread-1 | MetricsComponent > | 99 - org.apache.camel.camel-metrics - 2.14.1 | type=COUNTER, > name=message.incoming.counts, count=4 > > I was hoping that since I am using MetricsRoutePolicy in my > blueprintContext, these counters (and their values) will be reported and are > accessible via MBean : MetricRegistryService. When I invoke the operation > dumpStatisticsAsJson(), only timer metrics has values in json, and no > counters are listed. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/camel-metrics-Component-tp5758627p5763280.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/