This module adds a view of the javamelody monitoring for each registered application in SpringBootAdmin v1 (SBA). Based on this PR by dvtoever.
- Add the module to your classpath in the pom.xml of your SBA server:
<!-- https://github.com/javamelody/spring-boot-admin-server-ui-javamelody -->
<dependency>
<groupId>net.bull.javamelody</groupId>
<artifactId>spring-boot-admin-server-ui-javamelody</artifactId>
<version>1.5.7.0</version>
</dependency>
<dependency>
<groupId>net.bull.javamelody</groupId>
<artifactId>javamelody-core</artifactId>
<version>1.72.0</version>
</dependency>
- Optionally add parameters for the SBA server in your application.yml or application.properties file. Available parameters are: storage-directory, resolution-seconds, warning-threshold-millis, severe-threshold-millis, graphite-address, influxdb-url, cloudwatch-namespace, datadog-api-key, statsd-address, admin-emails, mail-session, mail-periods. For example in application.yml:
javamelody:
collectserver.enabled: true
init-parameters:
storage-directory: /tmp/javamelody
- Make sure each application that is registered with SBA has javamelody client support enabled and can be reached at the default endpoint
/monitoring
, with the javamelody client in the pom.xml of your applications:
<!-- https://github.com/javamelody/javamelody/wiki/SpringBootStarter -->
<dependency>
<groupId>net.bull.javamelody</groupId>
<artifactId>javamelody-spring-boot-starter</artifactId>
<version>1.72.0</version>
</dependency>
- Optionally add parameters for the monitored application(s) in the application.yml or application.properties file(s). Main available parameters are: allowed-addr-pattern, url-exclude-pattern, http-transform-pattern, sql-transform-pattern, jpa-transform-pattern, spring-transform-pattern, error-transform-pattern, log-transform-pattern, job-transform-pattern, jsp-transform-pattern, log, rum-enabled, sampling-seconds, maven-repositories. For example in application.yml (allowed-addr-pattern is recommended in order to restrict access to the monitoring page to the SBA server and to forbid access to anyone else):
spring.boot.admin:
url: http://192.168.1.1:8080
javamelody:
# Enable JavaMelody auto-configuration (optional, default: true)
enabled: true
# Enable monitoring of Spring services and controllers (optional, default: true)
spring-monitoring-enabled: true
init-parameters:
# restrict access to the monitoring page to the SBA server of ip address 192.168.1.1
allowed-addr-pattern: 192\.168\.1\.1
# log http requests
#log: true
# to exclude images, css, fonts and js urls from the monitoring:
#url-exclude-pattern: (/webjars/.*|/css/.*|/images/.*|/fonts/.*|/js/.*)
# to aggregate digits in http requests
#http-transform-pattern: \d+
License ASL
This JavaMelody module is not currently compatible with Spring Boot Admin 2. Volunteers are welcome. But the JavaMelody Spring Boot Starter is compatible with Spring Boot 2.