Added health check url to MSB registration
[holmes/engine-management.git] / engine-d / src / main / java / org / onap / holmes / engine / EngineDActiveApp.java
index 19a9153..afaf755 100644 (file)
@@ -43,6 +43,7 @@ public class EngineDActiveApp extends IOCApplication<EngineDAppConfig> {
         new EngineDActiveApp().run(args);
     }
 
+    @Override
     public void run(EngineDAppConfig configuration, Environment environment) throws Exception {
         super.run(configuration, environment);
 
@@ -77,6 +78,10 @@ public class EngineDActiveApp extends IOCApplication<EngineDAppConfig> {
         Node node = new Node();
         node.setIp(serviceAddrInfo[0]);
         node.setPort(serviceAddrInfo[1]);
+        node.setCheckType("HTTP");
+        node.setCheckUrl(String.format("https://%s:%s/api/holmes-engine-mgmt/v1/healthcheck", serviceAddrInfo[0], serviceAddrInfo[1]));
+        node.setCheckTimeOut("60s");
+        node.setCheckInterval("60s");
         nodes.add(node);
         msinfo.setNodes(nodes);
         return msinfo;