【发布时间】:2018-11-07 13:46:20
【问题描述】:
我正在使用 springboot,并且我正在使用执行器和 prometheus 公开指标。我想公开“信息”、“健康”、“指标”、“普罗米修斯”、“关机”等等。但即使我在应用程序属性中指定,我看到的是即使根“/执行器”也被暴露了。
我想禁用根执行器,并且只有我之前所说的 5 个成员。
有没有办法不只暴露 /actuator 端点?我也尝试过这样的应用程序属性:
management.endpoints.web.exposure.exclude=actuator
那是暴露的执行器列表:
{
"_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
}
}
}
【问题讨论】:
-
不,因为
/actuator是所有其他执行器的主要入口点。
标签: java spring spring-boot openshift prometheus