updated
This commit is contained in:
parent
e7d6a2d707
commit
8cea8b9aea
|
@ -17,8 +17,7 @@ public class GeoportalHealthCheck implements HealthCheck {
|
||||||
@Override
|
@Override
|
||||||
public HealthCheckResponse call() {
|
public HealthCheckResponse call() {
|
||||||
log.info(GeoportalHealthCheck.class.getSimpleName() + " call");
|
log.info(GeoportalHealthCheck.class.getSimpleName() + " call");
|
||||||
HealthCheckResponse response = HealthCheckResponse.named(SERVICE_NAME).state(true)
|
HealthCheckResponse response = HealthCheckResponse.named(SERVICE_NAME).state(true).build();
|
||||||
.withData("serviceStatus", "healthy").build();
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class MongoHealthCheck implements HealthCheck {
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for (String coll : collections) {
|
for (String coll : collections) {
|
||||||
log.info("adding collection: {}", coll);
|
log.info("adding collection: {}", coll);
|
||||||
buildHCRBuilder.withData("collection " + i, coll);
|
buildHCRBuilder.withData("collection_" + i, coll);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
return buildHCRBuilder.build();
|
return buildHCRBuilder.build();
|
||||||
|
@ -57,7 +57,7 @@ public class MongoHealthCheck implements HealthCheck {
|
||||||
connection = mongo.getConnection();
|
connection = mongo.getConnection();
|
||||||
buildHCRBuilder = appendMongoInfo(buildHCRBuilder, connection);
|
buildHCRBuilder = appendMongoInfo(buildHCRBuilder, connection);
|
||||||
} catch (Exception e1) {
|
} 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,
|
private HealthCheckResponseBuilder appendMongoInfo(HealthCheckResponseBuilder buildHCRBuilder,
|
||||||
MongoConnection connection) {
|
MongoConnection connection) {
|
||||||
buildHCRBuilder.withData("hosts ", connection.getHosts() + "");
|
buildHCRBuilder.withData("hosts", connection.getHosts() + "");
|
||||||
buildHCRBuilder.withData("db_name ", connection.getDatabase());
|
buildHCRBuilder.withData("db_name ", connection.getDatabase());
|
||||||
return buildHCRBuilder;
|
return buildHCRBuilder;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue