Skip to content

Commit 4577a55

Browse files
committed
Set actuator to port 9090 + ensure proper configuration of prom endpoint
1 parent 41e1f07 commit 4577a55

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,15 @@ private static void setDefaultProperties(SpringApplication app) {
210210
// ====================
211211

212212
// disable all supported exporters by default
213-
properties.put("management.metrics.export.prometheus.enabled", "false");
214-
properties.put("management.metrics.export.influx .enabled", "false");
215213
// Note: if we upgrade to Spring Boot 2.4.0 we can use properties.put("management.metrics.export.defaults.enabled", "false");
214+
properties.put("management.metrics.export.prometheus.enabled", "false");
215+
properties.put("management.metrics.export.influx.enabled", "false");
216+
// set actuator to port 9090 (can be overwritten)
217+
properties.put("management.server.port", "9090");
218+
// enable prometheus endpoint by default (but not the exporter)
219+
properties.put("management.endpoint.prometheus.enabled", "true");
220+
// include prometheus and health endpoint in exposure
221+
properties.put("management.endpoints.web.exposure.include", "health,prometheus");
216222

217223
// ====================
218224

@@ -225,7 +231,7 @@ private static void setDefaultProperties(SpringApplication app) {
225231
properties.put("management.health.ldap.enabled", false);
226232
// disable default redis health endpoint since it's managed by redisSession
227233
properties.put("management.health.redis.enabled", "false");
228-
// enable Kubernetes porobes
234+
// enable Kubernetes probes
229235
properties.put("management.endpoint.health.probes.enabled", true);
230236

231237
// ====================

0 commit comments

Comments
 (0)