/** * Registers a Health Check with the Agent. * * @param checkId The Check ID to use. Must be unique for the Agent. * @param name The Check Name. * @param script Health script for Consul to use. * @param interval Health script run interval in seconds. * @param notes Human readable notes. Not used by Consul. */ public void registerCheckWithNotes(String checkId, String name, String script, long interval, @SuppressWarnings("SameParameterValue") String notes) { Check check = new Check(); check.setId(checkId); check.setName(name); check.setScript(script); check.setInterval(String.format("%ss", interval)); check.setNotes(notes); registerCheck(check); }
/** * Registers a Health Check with the Agent. * * @param checkId The Check ID to use. Must be unique for the Agent. * @param name The Check Name. * @param ttl Time to live for the Consul dead man's switch. * @param notes Human readable notes. Not used by Consul. */ public void registerCheck(String checkId, String name, long ttl, @SuppressWarnings("SameParameterValue") String notes) { Check check = new Check(); check.setId(checkId); check.setName(name); check.setTtl(String.format("%ss", ttl)); check.setNotes(notes); registerCheck(check); }
/** * Registers a Health Check with the Agent. * * @param checkId The Check ID to use. Must be unique for the Agent. * @param name The Check Name. * @param script Health script for Consul to use. * @param interval Health script run interval in seconds. * @param notes Human readable notes. Not used by Consul. */ public void registerCheckWithNotes(String checkId, String name, String script, long interval, @SuppressWarnings("SameParameterValue") String notes) { Check check = new Check(); check.setId(checkId); check.setName(name); check.setScript(script); check.setInterval(String.format("%ss", interval)); check.setNotes(notes); registerCheck(check); }
/** * Registers a Health Check with the Agent. * * @param checkId The Check ID to use. Must be unique for the Agent. * @param name The Check Name. * @param ttl Time to live for the Consul dead man's switch. * @param notes Human readable notes. Not used by Consul. */ public void registerCheck(String checkId, String name, long ttl, @SuppressWarnings("SameParameterValue") String notes) { Check check = new Check(); check.setId(checkId); check.setName(name); check.setTtl(String.format("%ss", ttl)); check.setNotes(notes); registerCheck(check); }