> On 1 Dec 2021, at 18:58, Roberto Camelk <[email protected]> wrote:
> 
> OK, thanks.
> 
> But, can I setup the JMX exported in a Camel-K integration?

It's a bit tricky but not impossible. You would need to replicate what we did 
before we moved to Quarkus as the runtime, that is:

Add the dependencies on camel-management and jmx_prometheus_javaagent:

https://github.com/apache/camel-k/blob/75cdfa0c4d71fe3022fdaff7d39585875509beb7/pkg/trait/prometheus.go#L93-L96

Mount the ConfigMap containing the Prometheus JMX exporter configuration:

https://github.com/apache/camel-k/blob/75cdfa0c4d71fe3022fdaff7d39585875509beb7/pkg/trait/prometheus.go#L99-L108

And finally add the Prometheus JMX exporter agent:

https://github.com/apache/camel-k/blob/75cdfa0c4d71fe3022fdaff7d39585875509beb7/pkg/trait/prometheus.go#L138

The later can possibly be done by using the options parameter of the jvm trait.

> On Wed, Dec 1, 2021 at 2:39 PM Antonin Stefanutti
> <[email protected]> wrote:
>> 
>> 
>> 
>> On 1 Dec 2021, at 18:08, Roberto Camelk 
>> <[email protected]<mailto:[email protected]>> wrote:
>> 
>> I found a prometheus yaml config, who's using some scrape definitions
>> and I need to find the correlated metrics in camel-k.
>> 
>> Here are the scrape patterns:
>> https://github.com/alainpham/app-archetypes/blob/1f559e84753525b087a503ecb2d97c26e108dee7/spring-boot-camel/src/main/resources/archetype-resources/src/main/fabric8-includes/prometheus-config.yml
>> 
>> They have some expressions like:
>> - pattern: 'org.apache.camel<context=([^,]+), type=context,
>> name=([^,]+)><>ExchangesCompleted'
>> 
>> I think this one is about the
>> "camel.context.exchanges.completed.total" listed here
>> https://camel.apache.org/camel-quarkus/2.5.x/reference/extensions/microprofile-metrics.html#_camel_route_metrics.
>> 
>> That file is used for the Prometheus JMX exporter and does not apply to the 
>> Camel Quarkus MicroProfile Metrics extension.
>> 
>> Can someone help me with this? How can I correlate this
>> "org.apache.camel..." to this default exposed metrics ids in
>> camel-quarkus-microprofile-metrics ?
>> 
>> The list of metrics registered is defined by the Camel Quarkus MicroProfile 
>> Metrics extension, and is documented here:
>> 
>> https://camel.apache.org/camel-quarkus/2.5.x/reference/extensions/microprofile-metrics.html
>> 
>> Then the names are mapped according to the MP Metrics specification:
>> 
>> https://download.eclipse.org/microprofile/microprofile-metrics-4.0/microprofile-metrics-spec-4.0.html
>> 
>> That is, a the "application" prefix, and the snake cased metric name.
>> 

Reply via email to