I was stuck doing this. After reading some documentation and blogs I could monitor Camel routes using Hawtio.
- Spring Boot 2.3.4.RELEASE
- Camel 3.4.3
- Hawtio 2.10.1
Dependencies
For Spring Boot, it's not necessary if you already have conifgured the project.
Auto-detects camel routes in Spring Context and register Camel utilities
(like producer template, consumer template and the type converter) as beans.
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot</artifactId>
<version>${camel.version}</version>
</dependency>
To have support for auto-configuration from properties
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot-starter</artifactId>
<version>${camel.version}</version>
</dependency>
For manage routes using Jolokia as agent.
To allow camel routes been manage by jolokia
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-management</artifactId>
<version>${camel.version}</version>
</dependency>
To run jolokia and expose metrics over Http
<dependency>
<groupId>org.jolokia</groupId>
<artifactId>jolokia-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Properties
Expose Jolokia endpoint
management.endpoints.web.exposure.include=jolokia
For not to use the word "actuator" as part of the endpoint when exposing jolokia
management.endpoints.web.base-path=/
For configuring Jolokia endpoint path
management.endpoints.web.path-mapping.jolokia=medidas
For setting custom port
server.port=8778
Finally
Start the project
Start Hawtio
java -jar hawtio-app-2.10.1.jar
In web broser
http://localhost:8080/hawtio
Configure the connection, test the connection.
Connection Picture
- The last step is connect and automatically you will see camel routes