Hello,
We are building a data integration solution (kinda ETL) with Camel, and we
need to monitor the whole processing. Especially, some custom metrics such
as the total number of items to process, the number of items that were
already processed with a distinction between success and errors. The first
metric is already computed by some process (in fact, we use the File
component headers), the other ones could be known by querying the number of
completed exchanges.
I know that using JConsole, it is possible to retrieve the managed beans
attributes, but as we need to store those metrics in a database/log
files/web console, I was tempted to create a camel route to retrieve the
counters, with a quartz expression to trigger the metrics retrieval.
>From the documentation, it appears that the JMX Component only supports JMX
event notifications, which is not my use case.
Until now, I tried to programmatically retrieve the route counters that are
exposed by JMX, but with no success. Is it possible ? The
exchange.getContext().getRoute("route.monitoring.metrics.phase1").getRouteContext().getManagedInterceptStrategy()
is of type org.apache.camel.management.InstrumentationInterceptStrategy but
does not provide a getter on the inner registeredCounters variable
Or should I just use JMX to connect to the local JVM ? Could this be an
extension to the JMX Component ?
Thank you in advance
Regards,
--
Xavier