Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring boot actuator management port not working as expected #73

Open
hefberk opened this issue May 22, 2020 · 1 comment
Open

Spring boot actuator management port not working as expected #73

hefberk opened this issue May 22, 2020 · 1 comment

Comments

@hefberk
Copy link

hefberk commented May 22, 2020

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 ?

@evernat
Copy link
Member

evernat commented May 23, 2020

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:

  1. the actuator and the management port (spring-boot-starter-actuator and management.server.port)
  2. the endpoint (management.endpoints.web.exposure.include and management-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants