/** * Registers a HTTP Health Check with the Agent. * * @param checkId The Check ID to use. Must be unique for the Agent. * @param name The Check Name. * @param http Health check URL. * @param interval Health script run interval in seconds. * @param notes Human readable notes. Not used by Consul. */ public void registerCheck(String checkId, String name, URL http, long interval, String notes) { Check check = ImmutableCheck.builder() .id(checkId) .name(name) .http(http.toExternalForm()) .interval(String.format("%ss", interval)) .notes(Optional.ofNullable(notes)) .build(); registerCheck(check); }
http(httpOptional);
builder.http(json.http);