Hey 

I think I got it to work with following configs in camel-context.

But I have one more question here. Is there a way to get the complete data
as json dump by configuring the metrics reporter in this camel-context file?

*<?xml version="1.0" encoding="UTF-8"?>


<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
           xmlns:ctx="http://www.springframework.org/schema/context";
           xmlns:metrics="http://www.ryantenney.com/schema/metrics";
        xsi:schemaLocation="
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
       http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
       http://www.ryantenney.com/schema/metrics
       http://www.ryantenney.com/schema/metrics/metrics-3.0.xsd";>

        <ctx:property-placeholder location="classpath:appConfigs.groovy" />
    <camelContext xmlns="http://camel.apache.org/schema/spring";>
        <propertyPlaceholder id="placeholder"
location="classpath:appConfigs.groovy" />
        <routeBuilder ref="RoutesWithProcessors"/>
                <routeBuilder ref="VMMVendorIntegrationRoute"/>
        </camelContext>

        
        <bean id="RoutesWithProcessors"
class="com.groovy.routes.RoutesWithProcessors"/>
        <bean id="VMMVendorIntegrationRoute"
class="com.groovy.routes.VMMVendorIntegrationRoute"/>
    
        <bean id="CustomLogic" class="com.groovy.processors.CustomLogicImpl"/>
    
        <bean id="metricsRoutePolicyFactory"
class="org.apache.camel.component.metrics.routepolicy.MetricsRoutePolicyFactory">
        <property name="metricsRegistry" ref="metricRegistry"/>
        <property name="prettyPrint" value="false"/>
        <property name="jmxDomain" value="org.apache.camel.metrics"/>
        <property name="useJmx" value="true"/>
    </bean>
    
    <metrics:metric-registry id="metricRegistry"/>
    <metrics:annotation-driven metric-registry="metricRegistry" />
    <metrics:reporter type="console" metric-registry="metricRegistry"
period="15s" />
    <metrics:reporter type="slf4j" metric-registry="metricRegistry"
period="100ms" logger="com.foo.bar" marker="foobar" rate-unit="MINUTES"
duration-unit="MICROSECONDS" />
   
    <metrics:register metric-registry="metricRegistry">
        <bean metrics:name="jvm.gc"
class="com.codahale.metrics.jvm.GarbageCollectorMetricSet" />
        <bean metrics:name="jvm.memory"
class="com.codahale.metrics.jvm.MemoryUsageGaugeSet" />
        <bean metrics:name="jvm.thread-states"
class="com.codahale.metrics.jvm.ThreadStatesGaugeSet" />
        <bean metrics:name="jvm.fd.usage"
class="com.codahale.metrics.jvm.FileDescriptorRatioGauge" />
    </metrics:register>
</beans>*



-----
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & 
Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Metrics-over-Spring-metrics-tp5773518p5773523.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to