This commit is contained in:
Francesco Mangiacrapa 2024-10-18 16:50:07 +02:00
parent e7d6a2d707
commit 8cea8b9aea
2 changed files with 4 additions and 5 deletions

View File

@ -17,8 +17,7 @@ public class GeoportalHealthCheck implements HealthCheck {
@Override
public HealthCheckResponse call() {
log.info(GeoportalHealthCheck.class.getSimpleName() + " call");
HealthCheckResponse response = HealthCheckResponse.named(SERVICE_NAME).state(true)
.withData("serviceStatus", "healthy").build();
HealthCheckResponse response = HealthCheckResponse.named(SERVICE_NAME).state(true).build();
return response;
}

View File

@ -45,7 +45,7 @@ public class MongoHealthCheck implements HealthCheck {
int i = 1;
for (String coll : collections) {
log.info("adding collection: {}", coll);
buildHCRBuilder.withData("collection " + i, coll);
buildHCRBuilder.withData("collection_" + i, coll);
i++;
}
return buildHCRBuilder.build();
@ -57,7 +57,7 @@ public class MongoHealthCheck implements HealthCheck {
connection = mongo.getConnection();
buildHCRBuilder = appendMongoInfo(buildHCRBuilder, connection);
} catch (Exception e1) {
buildHCRBuilder.withData("hosts ", connection.getHosts() + "");
buildHCRBuilder.withData("hosts", connection.getHosts() + "");
}
}
@ -69,7 +69,7 @@ public class MongoHealthCheck implements HealthCheck {
private HealthCheckResponseBuilder appendMongoInfo(HealthCheckResponseBuilder buildHCRBuilder,
MongoConnection connection) {
buildHCRBuilder.withData("hosts ", connection.getHosts() + "");
buildHCRBuilder.withData("hosts", connection.getHosts() + "");
buildHCRBuilder.withData("db_name ", connection.getDatabase());
return buildHCRBuilder;
}