On Mon, Mar 25, 2013 at 5:44 PM, Henri Tremblay <henri.tremb...@gmail.com> wrote: > I'll guess your are talking about ExchangeSentEvent. Then the starting > point will be ExchangeSendingEvent? > > For what I remember, I tried that. I wasn't working either but a can try > again just to make sure. > > The Tracer and Backlogtracer doesn't seem to provide the metrics I want (or > any metrics at all). However, I can parse the log to do my own metrics. > That's pretty much what I'm doing right now. > > I tried hawt.io. It gives a nice view of the the routes but when looking at > the metrics, it's pretty much the same thing as JMX. > > camelwatch is better. I have a dashboard with load average and inflight. > Not exactly what I want but I could get to something with a bit of hacking. > > I must say I wasn't expecting it would be that complex to get my metrics. > I'm basically interested in a dashboard of my routes with: > - Mean processing time. 95%, 99% percentile > - Messages per seconds > - Be able to reset the statistics easily > - Current inflight > - Refresh automatically >
And btw there is monitoring tools such as - Nagios - The commercial ones from IBM / HP / et all - Hyperic - JBoss Operations Network - and many more as well The latter has Camel plugins (to be released as part of JBoss Fuse 6) so its ready to monitor your Camel apps. And there is some links to blogs/articles about monitoring Camel from our link collection at: http://camel.apache.org/articles > > > On 15 March 2013 15:26, Claus Ibsen <claus.ib...@gmail.com> wrote: > >> On Fri, Mar 15, 2013 at 3:20 PM, Henri Tremblay >> <henri.tremb...@gmail.com> wrote: >> > Ok. That's what I thought. It is still strange since technically it is >> two >> > routes (and the JMX does give me stats on both on them). >> > >> >> Its not strange, there is events like ExchangeSentToEndpoint you can >> use instead etc. >> See all the event classes we have in the events package. >> >> Also you may consider looking at tracer for fine grained tracing / >> metrics collection >> http://camel.apache.org/tracer >> >> And the new backlog tracer in Camel 2.11 >> http://camel.apache.org/backlogtracer.html >> >> > I'll look at the proposed tools and give you some feedback. >> > >> > Thanks! >> > Henri >> > >> > >> > On 15 March 2013 13:11, Claus Ibsen <claus.ib...@gmail.com> wrote: >> > >> >> On Fri, Mar 15, 2013 at 12:48 PM, Henri Tremblay >> >> <henri.tremb...@gmail.com> wrote: >> >> > Hi, >> >> > >> >> > I would like to use Camel with Perf4j. >> >> > >> >> > I know that Camel JMX already provide statistics but I would like to >> be >> >> > able to easily see at once all my routes performance and be able >> generate >> >> > nice graph. Perf4j allows me to do that quickly (you know another tool >> >> that >> >> > will do the same with Camel?) >> >> > >> >> >> >> Yes hawtio can monitor Camel apps. I suggest to take a look. >> >> In the upcoming 1.1 release there is going to be a new plugin for >> >> showing stats, us >> >> http://hawt.io/ >> >> >> >> And there is also a tool called CamelWatch >> >> http://sksamuel.github.com/camelwatch/ >> >> >> >> >> >> >> >> > My first try was to extend EventNotifierSupport and react >> >> > to ExchangeCreatedEvent and ExchangeCompletedEvent. Basically this: >> >> > >> >> > public void notify(EventObject event) throws Exception { >> >> > Exchange exchange = (Exchange) event.getSource(); >> >> > String tag = exchange.getFromRouteId() + "-" + >> >> > exchange.getFromEndpoint(); >> >> > if (event instanceof ExchangeCreatedEvent) { >> >> > StopWatch watch = new Slf4JStopWatch(tag); >> >> > exchange.setProperty(STOP_WATCH_KEY + tag, watch); >> >> > } else if (event instanceof ExchangeCompletedEvent) { >> >> > StopWatch watch = (StopWatch) >> >> exchange.removeProperty(STOP_WATCH_KEY >> >> > + tag); >> >> > watch.stop(); >> >> > } >> >> > } >> >> > >> >> > Of course it doesn't really work. There is no way to have the route >> id it >> >> > seems. Or at least I have strange result. My routes are: >> >> > >> >> > from("sql:...").setRouteId("a").to("direct-foo"); >> >> > from("direct:foo").setRouteId("b").to("http:..."); >> >> > >> >> > And instead of getting something like >> >> > Created a >> >> > Completed a >> >> > Created b >> >> > Completed b >> >> > >> >> > I receive something like >> >> > Created a-null >> >> > Created a-a >> >> > Completed a-a >> >> > Completed a-a >> >> > >> >> > Any idea why it behaves like this and what I can do? >> >> > >> >> > Thanks >> >> > Henri >> >> >> >> You should likely only react to created / completed events. And that >> >> is why you may get a null in the from route. >> >> And when you use the direct component its NOT creating a new Exchange >> >> but routing the existing exchange. >> >> And hence why you wont see events for creating / completed from route b. >> >> >> >> >> >> >> >> -- >> >> Claus Ibsen >> >> ----------------- >> >> Red Hat, Inc. >> >> FuseSource is now part of Red Hat >> >> Email: cib...@redhat.com >> >> Web: http://fusesource.com >> >> Twitter: davsclaus >> >> Blog: http://davsclaus.com >> >> Author of Camel in Action: http://www.manning.com/ibsen >> >> >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> FuseSource is now part of Red Hat >> Email: cib...@redhat.com >> Web: http://fusesource.com >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen