小编osh*_*rko的帖子

SpringBoot 禁用执行器根

我正在使用 springboot 并且我正在使用执行器和普罗米修斯公开指标。我想公开“信息”、“健康”、“指标”、“普罗米修斯”、“关机”等等。但即使我在应用程序属性中指定,我看到的是即使是根“/actuator”也暴露了。

我想禁用根执行器并且只有我之前说的 5 个成员。

有没有办法不只公开 /actuator 端点?我也试过在应用程序属性中这样做:

management.endpoints.web.exposure.exclude=actuator
Run Code Online (Sandbox Code Playgroud)

这是暴露的执行器的列表:

{
"_links": {
"self": {
"href": "http://localhost:9002/actuator",
"templated": false
},
"health-component-instance": {
"href": "http://localhost:9002/actuator/health/{component}/{instance}",
"templated": true
},
"health-component": {
"href": "http://localhost:9002/actuator/health/{component}",
"templated": true
},
"health": {
"href": "http://localhost:9002/actuator/health",
"templated": false
},
"shutdown": {
"href": "http://localhost:9002/actuator/shutdown",
"templated": false
},
"info": {
"href": "http://localhost:9002/actuator/info",
"templated": false
},
"prometheus": {
"href": "http://localhost:9002/actuator/prometheus",
"templated": false
},
"metrics-requiredMetricName": {
"href": "http://localhost:9002/actuator/metrics/{requiredMetricName}",
"templated": true
},
"metrics": {
"href": "http://localhost:9002/actuator/metrics",
"templated": false
}
}
}
Run Code Online (Sandbox Code Playgroud)

java spring openshift spring-boot prometheus

3
推荐指数
1
解决办法
3093
查看次数

标签 统计

java ×1

openshift ×1

prometheus ×1

spring ×1

spring-boot ×1