The metrics route policy is using a metrics timer to capture the data. So the data is there in the json blob you posted.
https://github.com/apache/camel/blob/master/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRoutePolicy.java#L46 On Thu, Feb 26, 2015 at 12:43 AM, vivekt <vivek.tha...@gmail.com> wrote: > Hello Claus, I tested Jim's orginal Java class with 2.14.1, but still could > not get the metrics from MetricsRegistryService. > > When I invoke dumpStatisticsAsJson() , all the metrics are empty. > Here is the output > > "version" : "3.0.0", > "gauges" : { }, > "counters" : { }, > "histograms" : { }, > "meters" : { }, > "timers" : { > "camel-1:testroute.responses" : { > "count" : 3, > "max" : 25.073, > "mean" : 9.543666666666665, > "min" : 1.5679999999999998, > "p50" : 1.99, > "p75" : 25.073, > "p95" : 25.073, > "p98" : 25.073, > "p99" : 25.073, > "p999" : 25.073, > "stddev" : 13.450452272445464, > "m15_rate" : 0.558194480485237, > "m1_rate" : 0.20307925506404548, > "m5_rate" : 0.48311899441084233, > "mean_rate" : 0.042752986809164464, > "duration_units" : "milliseconds", > "rate_units" : "calls/second" > } > } > } > > My application uses blueprint and I want to expose the counters so that I > can access the metrics via Hawtio > > In blueprint.xml, I have declared the bean as > > <bean id="metricsRoutePolicyFactory" > class="org.apache.camel.component.metrics.routepolicy.MetricsRoutePolicyFactory"> > <property name="useJmx" value="true"/> > <property name="prettyPrint" value="true"/> > </bean> > > In Hawtio interface, I do see the Mbean service but it does not have any > counters in the output. > > Could you please let me know if the issue is fixed in 2.14.1? > Is there something that I am missing? > > Thanks, > > Vivek > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/camel-metrics-Component-tp5758627p5763182.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/