HttpCheck

consul4s.model.agent.HttpCheck
final case class HttpCheck(Name: String, HTTP: String, TLSSkipVerify: Boolean, Interval: String, Timeout: String, Header: Option[Map[String, List[String]]], Method: Option[String], Body: Option[String], ID: Option[String], ServiceID: Option[String], Status: CheckStatus, Notes: Option[String], SuccessBeforePassing: Int, FailuresBeforeCritical: Int, DeregisterCriticalServiceAfter: Option[String]) extends Check

Value parameters

Body
  • - Specifies a timeout for outgoing connections in the case of a Script, HTTP, TCP, or gRPC check. Can be specified in the form of "10s" or "5m" (i.e., 10 seconds or 5 minutes, respectively).
DeregisterCriticalServiceAfter
  • Specifies that checks associated with a service should deregister after this time. This is specified as a time duration with suffix like "10m". If a check is in the critical state for more than this configured value, then its associated service (and all of its associated checks) will automatically be deregistered. The minimum timeout is 1 minute, and the process that reaps critical services runs every 30 seconds, so it may take slightly longer than the configured timeout to trigger the deregistration. This should generally be configured with a timeout that's much, much longer than any expected recoverable outage for the given service.
HTTP
  • Specifies an HTTP check to perform a GET request against the value of HTTP (expected to be a URL) every Interval. If the response is any 2xx code, the check is passing. If the response is 429 Too Many Requests, the check is warning. Otherwise, the check is critical. HTTP checks also support SSL. By default, a valid SSL certificate is expected. Certificate verification can be controlled using the TLSSkipVerify.
Header
  • Specifies a body that should be sent with HTTP checks.
ID
  • Specifies a unique ID for this check on the node. This defaults to the "Name" parameter, but it may be necessary to provide an ID for uniqueness.
Interval
  • Specifies a different HTTP method to be used for an HTTP check. When no value is specified, GET is used.
Method
  • Specifies the frequency at which to run this check. This is required for HTTP and TCP checks.
Name
  • Specifies the name of the check.
Notes
  • Specifies arbitrary information for humans. This is not used by Consul internally.
ServiceID
  • Specifies the ID of a service to associate the registered check with an existing service provided by the agent.
Status
  • Specifies the initial status of the health check.
TLSSkipVerify
  • Specifies if the certificate for an HTTPS check should not be verified.
Timeout
  • Specifies a set of headers that should be set for HTTP checks. Each header can have multiple values.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Check
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product