You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Rajith Muditha Attapattu <ra...@gmail.com> on 2016/08/15 15:30:08 UTC

Camel Context Metrics

Hey All,

I'm aware of the hawt.io plugin that connects to a Camel Context and
pulls info via JMX.

For performance reasons, we are looking at how an application (that
contains one or more Camel Context) wants to push route metrics to an
external source. We have several of those apps, which is why
connecting to all of them via a hawtio console want scale well.

Whats the best way to gather the metrics at the application level?

(After which it will be sent to an external source like elastic search)


1. Access the info from JMX (programatically)


2. Implement some sort of Listener interface to get notified.


I prefer the latter, but the former is fine as well.

-- 
Regards,

Rajith Muditha Attapattu

Re: Camel Context Metrics

Posted by Rajith Muditha Attapattu <ra...@gmail.com>.
Thanks Sashika!
Much appreciated.

On Tue, Aug 16, 2016 at 11:27 AM, Sashika <sa...@gmail.com> wrote:
> In addition to what Vitalii mentioned you can use control bus to obtain
> route stats in a more EIP friendly manner. This is also a good way the
> application to access the stats as you requested in your question.
>
> On Aug 16, 2016 20:32, "Rajith Muditha Attapattu" <ra...@gmail.com>
> wrote:
>
>> Thanks Vitalii
>>
>> On Tue, Aug 16, 2016 at 10:16 AM, Vitalii Tymchyshyn <vi...@tym.im> wrote:
>> > Just a note. If you are in same JVM and has CamelContext objects ready,
>> you
>> > can always access stats data
>> > with org.apache.camel.CamelContext#getManagedCamelContext. You don't
>> need
>> > JMX to do this.
>> >
>> > Best regards, Vitalii Tymchyshyn
>> >
>> > Пн, 15 серп. 2016 о 11:30 Rajith Muditha Attapattu <ra...@gmail.com>
>> > пише:
>> >
>> >> Hey All,
>> >>
>> >> I'm aware of the hawt.io plugin that connects to a Camel Context and
>> >> pulls info via JMX.
>> >>
>> >> For performance reasons, we are looking at how an application (that
>> >> contains one or more Camel Context) wants to push route metrics to an
>> >> external source. We have several of those apps, which is why
>> >> connecting to all of them via a hawtio console want scale well.
>> >>
>> >> Whats the best way to gather the metrics at the application level?
>> >>
>> >> (After which it will be sent to an external source like elastic search)
>> >>
>> >>
>> >> 1. Access the info from JMX (programatically)
>> >>
>> >>
>> >> 2. Implement some sort of Listener interface to get notified.
>> >>
>> >>
>> >> I prefer the latter, but the former is fine as well.
>> >>
>> >> --
>> >> Regards,
>> >>
>> >> Rajith Muditha Attapattu
>> >>
>>
>>
>>
>> --
>> Regards,
>>
>> Rajith Muditha Attapattu
>>



-- 
Regards,

Rajith Muditha Attapattu

Re: Camel Context Metrics

Posted by Sashika <sa...@gmail.com>.
In addition to what Vitalii mentioned you can use control bus to obtain
route stats in a more EIP friendly manner. This is also a good way the
application to access the stats as you requested in your question.

On Aug 16, 2016 20:32, "Rajith Muditha Attapattu" <ra...@gmail.com>
wrote:

> Thanks Vitalii
>
> On Tue, Aug 16, 2016 at 10:16 AM, Vitalii Tymchyshyn <vi...@tym.im> wrote:
> > Just a note. If you are in same JVM and has CamelContext objects ready,
> you
> > can always access stats data
> > with org.apache.camel.CamelContext#getManagedCamelContext. You don't
> need
> > JMX to do this.
> >
> > Best regards, Vitalii Tymchyshyn
> >
> > Пн, 15 серп. 2016 о 11:30 Rajith Muditha Attapattu <ra...@gmail.com>
> > пише:
> >
> >> Hey All,
> >>
> >> I'm aware of the hawt.io plugin that connects to a Camel Context and
> >> pulls info via JMX.
> >>
> >> For performance reasons, we are looking at how an application (that
> >> contains one or more Camel Context) wants to push route metrics to an
> >> external source. We have several of those apps, which is why
> >> connecting to all of them via a hawtio console want scale well.
> >>
> >> Whats the best way to gather the metrics at the application level?
> >>
> >> (After which it will be sent to an external source like elastic search)
> >>
> >>
> >> 1. Access the info from JMX (programatically)
> >>
> >>
> >> 2. Implement some sort of Listener interface to get notified.
> >>
> >>
> >> I prefer the latter, but the former is fine as well.
> >>
> >> --
> >> Regards,
> >>
> >> Rajith Muditha Attapattu
> >>
>
>
>
> --
> Regards,
>
> Rajith Muditha Attapattu
>

Re: Camel Context Metrics

Posted by Rajith Muditha Attapattu <ra...@gmail.com>.
Thanks Vitalii

On Tue, Aug 16, 2016 at 10:16 AM, Vitalii Tymchyshyn <vi...@tym.im> wrote:
> Just a note. If you are in same JVM and has CamelContext objects ready, you
> can always access stats data
> with org.apache.camel.CamelContext#getManagedCamelContext. You don't need
> JMX to do this.
>
> Best regards, Vitalii Tymchyshyn
>
> Пн, 15 серп. 2016 о 11:30 Rajith Muditha Attapattu <ra...@gmail.com>
> пише:
>
>> Hey All,
>>
>> I'm aware of the hawt.io plugin that connects to a Camel Context and
>> pulls info via JMX.
>>
>> For performance reasons, we are looking at how an application (that
>> contains one or more Camel Context) wants to push route metrics to an
>> external source. We have several of those apps, which is why
>> connecting to all of them via a hawtio console want scale well.
>>
>> Whats the best way to gather the metrics at the application level?
>>
>> (After which it will be sent to an external source like elastic search)
>>
>>
>> 1. Access the info from JMX (programatically)
>>
>>
>> 2. Implement some sort of Listener interface to get notified.
>>
>>
>> I prefer the latter, but the former is fine as well.
>>
>> --
>> Regards,
>>
>> Rajith Muditha Attapattu
>>



-- 
Regards,

Rajith Muditha Attapattu

Re: Camel Context Metrics

Posted by Vitalii Tymchyshyn <vi...@tym.im>.
Just a note. If you are in same JVM and has CamelContext objects ready, you
can always access stats data
with org.apache.camel.CamelContext#getManagedCamelContext. You don't need
JMX to do this.

Best regards, Vitalii Tymchyshyn

Пн, 15 серп. 2016 о 11:30 Rajith Muditha Attapattu <ra...@gmail.com>
пише:

> Hey All,
>
> I'm aware of the hawt.io plugin that connects to a Camel Context and
> pulls info via JMX.
>
> For performance reasons, we are looking at how an application (that
> contains one or more Camel Context) wants to push route metrics to an
> external source. We have several of those apps, which is why
> connecting to all of them via a hawtio console want scale well.
>
> Whats the best way to gather the metrics at the application level?
>
> (After which it will be sent to an external source like elastic search)
>
>
> 1. Access the info from JMX (programatically)
>
>
> 2. Implement some sort of Listener interface to get notified.
>
>
> I prefer the latter, but the former is fine as well.
>
> --
> Regards,
>
> Rajith Muditha Attapattu
>

Re: Camel Context Metrics

Posted by Rajith Muditha Attapattu <ra...@gmail.com>.
Thanks Mark.
I'm using CDI, unfortunately this option is out.

On Mon, Aug 15, 2016 at 12:12 PM, Mark Nuttall <mk...@gmail.com> wrote:
> Another way - if you are using Spring, Spring Boot has exporters built in
> to export metrics.
>
> On Mon, Aug 15, 2016 at 12:02 PM, Rajith Muditha Attapattu <
> rajith77@gmail.com> wrote:
>
>> Thank you James!
>>
>> On Mon, Aug 15, 2016 at 11:35 AM, James Strachan
>> <ja...@gmail.com> wrote:
>> > Prometheus is an awesome way to collect metrics from containers, JVMs,
>> > Camel contexts and other processes:
>> > https://prometheus.io/
>> >
>> > We use it in fabric8 (http://fabric8.io/) to collect metrics from docker
>> > containers, kubernetes and any JVM which contains JMX or Camel.
>> >
>> > Adding Agent Bond to any JVM enables it for Jolokia management/operations
>> > and Prometheus monitoring:
>> > https://github.com/fabric8io/agent-bond
>> >
>> > (we do this by default to any project created in fabric8)
>> >
>> > We then get a Camel dashboard for all containers running Camel OOTB. To
>> see
>> > an example check out (13:10) in this video: https://vimeo.com/173353537
>> >
>> > On 15 August 2016 at 16:30, Rajith Muditha Attapattu <rajith77@gmail.com
>> >
>> > wrote:
>> >
>> >> Hey All,
>> >>
>> >> I'm aware of the hawt.io plugin that connects to a Camel Context and
>> >> pulls info via JMX.
>> >>
>> >> For performance reasons, we are looking at how an application (that
>> >> contains one or more Camel Context) wants to push route metrics to an
>> >> external source. We have several of those apps, which is why
>> >> connecting to all of them via a hawtio console want scale well.
>> >>
>> >> Whats the best way to gather the metrics at the application level?
>> >>
>> >> (After which it will be sent to an external source like elastic search)
>> >>
>> >>
>> >> 1. Access the info from JMX (programatically)
>> >>
>> >>
>> >> 2. Implement some sort of Listener interface to get notified.
>> >>
>> >>
>> >> I prefer the latter, but the former is fine as well.
>> >>
>> >> --
>> >> Regards,
>> >>
>> >> Rajith Muditha Attapattu
>> >>
>> >
>> >
>> >
>> > --
>> > James
>> > -------
>> > Red Hat
>> >
>> > Twitter: @jstrachan
>> > Email: james.strachan@gmail.com
>> > Blog: https://medium.com/@jstrachan/
>> >
>> > fabric8: http://fabric8.io/
>> > open source microservices platform
>>
>>
>>
>> --
>> Regards,
>>
>> Rajith Muditha Attapattu
>>



-- 
Regards,

Rajith Muditha Attapattu

Re: Camel Context Metrics

Posted by Mark Nuttall <mk...@gmail.com>.
Another way - if you are using Spring, Spring Boot has exporters built in
to export metrics.

On Mon, Aug 15, 2016 at 12:02 PM, Rajith Muditha Attapattu <
rajith77@gmail.com> wrote:

> Thank you James!
>
> On Mon, Aug 15, 2016 at 11:35 AM, James Strachan
> <ja...@gmail.com> wrote:
> > Prometheus is an awesome way to collect metrics from containers, JVMs,
> > Camel contexts and other processes:
> > https://prometheus.io/
> >
> > We use it in fabric8 (http://fabric8.io/) to collect metrics from docker
> > containers, kubernetes and any JVM which contains JMX or Camel.
> >
> > Adding Agent Bond to any JVM enables it for Jolokia management/operations
> > and Prometheus monitoring:
> > https://github.com/fabric8io/agent-bond
> >
> > (we do this by default to any project created in fabric8)
> >
> > We then get a Camel dashboard for all containers running Camel OOTB. To
> see
> > an example check out (13:10) in this video: https://vimeo.com/173353537
> >
> > On 15 August 2016 at 16:30, Rajith Muditha Attapattu <rajith77@gmail.com
> >
> > wrote:
> >
> >> Hey All,
> >>
> >> I'm aware of the hawt.io plugin that connects to a Camel Context and
> >> pulls info via JMX.
> >>
> >> For performance reasons, we are looking at how an application (that
> >> contains one or more Camel Context) wants to push route metrics to an
> >> external source. We have several of those apps, which is why
> >> connecting to all of them via a hawtio console want scale well.
> >>
> >> Whats the best way to gather the metrics at the application level?
> >>
> >> (After which it will be sent to an external source like elastic search)
> >>
> >>
> >> 1. Access the info from JMX (programatically)
> >>
> >>
> >> 2. Implement some sort of Listener interface to get notified.
> >>
> >>
> >> I prefer the latter, but the former is fine as well.
> >>
> >> --
> >> Regards,
> >>
> >> Rajith Muditha Attapattu
> >>
> >
> >
> >
> > --
> > James
> > -------
> > Red Hat
> >
> > Twitter: @jstrachan
> > Email: james.strachan@gmail.com
> > Blog: https://medium.com/@jstrachan/
> >
> > fabric8: http://fabric8.io/
> > open source microservices platform
>
>
>
> --
> Regards,
>
> Rajith Muditha Attapattu
>

Re: Camel Context Metrics

Posted by Rajith Muditha Attapattu <ra...@gmail.com>.
Thank you James!

On Mon, Aug 15, 2016 at 11:35 AM, James Strachan
<ja...@gmail.com> wrote:
> Prometheus is an awesome way to collect metrics from containers, JVMs,
> Camel contexts and other processes:
> https://prometheus.io/
>
> We use it in fabric8 (http://fabric8.io/) to collect metrics from docker
> containers, kubernetes and any JVM which contains JMX or Camel.
>
> Adding Agent Bond to any JVM enables it for Jolokia management/operations
> and Prometheus monitoring:
> https://github.com/fabric8io/agent-bond
>
> (we do this by default to any project created in fabric8)
>
> We then get a Camel dashboard for all containers running Camel OOTB. To see
> an example check out (13:10) in this video: https://vimeo.com/173353537
>
> On 15 August 2016 at 16:30, Rajith Muditha Attapattu <ra...@gmail.com>
> wrote:
>
>> Hey All,
>>
>> I'm aware of the hawt.io plugin that connects to a Camel Context and
>> pulls info via JMX.
>>
>> For performance reasons, we are looking at how an application (that
>> contains one or more Camel Context) wants to push route metrics to an
>> external source. We have several of those apps, which is why
>> connecting to all of them via a hawtio console want scale well.
>>
>> Whats the best way to gather the metrics at the application level?
>>
>> (After which it will be sent to an external source like elastic search)
>>
>>
>> 1. Access the info from JMX (programatically)
>>
>>
>> 2. Implement some sort of Listener interface to get notified.
>>
>>
>> I prefer the latter, but the former is fine as well.
>>
>> --
>> Regards,
>>
>> Rajith Muditha Attapattu
>>
>
>
>
> --
> James
> -------
> Red Hat
>
> Twitter: @jstrachan
> Email: james.strachan@gmail.com
> Blog: https://medium.com/@jstrachan/
>
> fabric8: http://fabric8.io/
> open source microservices platform



-- 
Regards,

Rajith Muditha Attapattu

Re: Camel Context Metrics

Posted by James Strachan <ja...@gmail.com>.
Prometheus is an awesome way to collect metrics from containers, JVMs,
Camel contexts and other processes:
https://prometheus.io/

We use it in fabric8 (http://fabric8.io/) to collect metrics from docker
containers, kubernetes and any JVM which contains JMX or Camel.

Adding Agent Bond to any JVM enables it for Jolokia management/operations
and Prometheus monitoring:
https://github.com/fabric8io/agent-bond

(we do this by default to any project created in fabric8)

We then get a Camel dashboard for all containers running Camel OOTB. To see
an example check out (13:10) in this video: https://vimeo.com/173353537

On 15 August 2016 at 16:30, Rajith Muditha Attapattu <ra...@gmail.com>
wrote:

> Hey All,
>
> I'm aware of the hawt.io plugin that connects to a Camel Context and
> pulls info via JMX.
>
> For performance reasons, we are looking at how an application (that
> contains one or more Camel Context) wants to push route metrics to an
> external source. We have several of those apps, which is why
> connecting to all of them via a hawtio console want scale well.
>
> Whats the best way to gather the metrics at the application level?
>
> (After which it will be sent to an external source like elastic search)
>
>
> 1. Access the info from JMX (programatically)
>
>
> 2. Implement some sort of Listener interface to get notified.
>
>
> I prefer the latter, but the former is fine as well.
>
> --
> Regards,
>
> Rajith Muditha Attapattu
>



-- 
James
-------
Red Hat

Twitter: @jstrachan
Email: james.strachan@gmail.com
Blog: https://medium.com/@jstrachan/

fabric8: http://fabric8.io/
open source microservices platform