grails-melody-plugin
grails-melody-plugin copied to clipboard
Spring boot actuator management port not working as expected
Grails version : 3.3.0
build.gradle
compile('org.grails.plugins:grails-melody-plugin:1.70.0') {
exclude group: 'net.bull.javamelody', module: 'javamelody-core'
}
compile 'net.bull.javamelody:javamelody-core:1.83.0'
provided "org.springframework.boot:spring-boot-starter-actuator"
application.groovy
server.port=8080
management.port=8088
management.security.enabled=false
management.ssl.enabled=false
javamelody.log=true
application.yml
endpoints:
enabled: true
jmx:
enabled: true
unique-names: true
javamelody:
sql-transform-pattern: \d+
jmx-expose-enabled: true
management-endpoint-monitoring-enabled: true
monitoring-path: "/actuator/monitoring"
management:
endpoints:
web:
exposure:
include: "*"
context-path: "/actuator"
try with and without context-path and monitoring path, the /monitoring endpoint works as expected but is always served on 8080 port... The actuator is actually working as expected too. Any help ?
First, you are using grails-melody-plugin 1.70.0, but the latest release of the plugin is currently 1.80.0 (see https://github.com/javamelody/grails-melody-plugin#grails-melody-plugin).
Then, it seems to me that you have tried to apply the javamelody-spring-boot-starter doc for management port. This doc involves indeed:
- the actuator and the management port (
spring-boot-starter-actuator
and management.server.port) - the endpoint (
management.endpoints.web.exposure.include
andmanagement-endpoint-monitoring-enabled
)
For information, this doc is for the management port in the javamelody-spring-boot-starter. For example, management-endpoint-monitoring-enabled
is for the MonitoringEndpoint
at https://github.com/javamelody/javamelody/blob/master/javamelody-spring-boot-starter/src/main/java/net/bull/javamelody/JavaMelodyAutoConfiguration.java#L177
So, this feature, of the javamelody-spring-boot-starter, is not currently available like this in the grails-melody-plugin.