# Class HealthMonitor

Active health monitoring is a technique that uses synthetic transactions executed at periodic intervals to determine the condition of a node. One of the advantages of active health monitoring is that it does not require active transactions to be processed by the load balancer to determine whether or not a node is suitable for handling traffic. Active health monitoring is not applied by default and must be enabled per load balancer.

The active health monitor can use one of three types of probes:

- connect
- HTTP
- HTTPS

These probes are executed at configured intervals; in the event of a failure, the node status changes to OFFLINE and the node will not receive traffic. If, after running a subsequent test, the probe detects that the node has recovered, then the node's status is changed to ONLINE and it is capable of servicing requests.

  OpenCloud\Common\Base
  OpenCloud\Common\Resource\BaseResource
  OpenCloud\Common\Resource\PersistentResource
  OpenCloud\LoadBalancer\Resource\AbstractResource
  OpenCloud\LoadBalancer\Resource\NonIdUriResource
  OpenCloud\LoadBalancer\Resource\HealthMonitor

Namespace: OpenCloud\LoadBalancer\Resource
Located at OpenCloud/LoadBalancer/Resource/HealthMonitor.php

Methods summary
`public Guzzle\Http\Message\Response` | # `create( array $params = array() )` Create a new resource Create a new resource #### Parameters $params `array` $params #### Returns `Guzzle\Http\Message\Response` #### Overrides `OpenCloud\Common\Resource\PersistentResource::create()`

Methods inherited from OpenCloud\LoadBalancer\Resource\NonIdUriResource
`refresh()`

Methods inherited from OpenCloud\LoadBalancer\Resource\AbstractResource
`createJson(), refreshFromParent(), updateJson()`

Methods inherited from OpenCloud\Common\Resource\PersistentResource
`checkExtension(), delete(), getAlias(), noCreate(), noDelete(), noUpdate(), refreshFromLocationUrl(), update(), waitFor()`

Methods inherited from OpenCloud\Common\Resource\BaseResource
`__construct(), findLink(), getClient(), getMetadata(), getParent(), getService(), getUrl(), jsonCollectionElement(), jsonCollectionName(), jsonName(), parseResponse(), primaryKeyField(), resourceName(), setMetadata(), setParent(), setService()`

Methods inherited from OpenCloud\Common\Base
`__call(), checkJsonError(), generateUuid(), getInstance(), getJsonHeader(), getLogger(), getProperty(), makeResourceIteratorOptions(), populate(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()`

Properties summary
`public string` | $type | `` | # Type of the health monitor. Can either be "connect", "HTTP" or "HTTPS" Type of the health monitor. Can either be "connect", "HTTP" or "HTTPS"
`public integer` | $delay | `` | # The minimum number of seconds to wait before executing the health monitor. Must be a number between 1 and 3600. The minimum number of seconds to wait before executing the health monitor. Must be a number between 1 and 3600.
`public integer` | $timeout | `` | # Maximum number of seconds to wait for a connection to be established before timing out. Must be a number between 1 and 300. Maximum number of seconds to wait for a connection to be established before timing out. Must be a number between 1 and 300.
`public integer` | $attemptsBeforeDeactivation | `` | # Number of permissible monitor failures before removing a node from rotation. Must be a number between 1 and 10. Number of permissible monitor failures before removing a node from rotation. Must be a number between 1 and 10.
`public string` | $bodyRegex | `` | # A regular expression that will be used to evaluate the contents of the body of the response. A regular expression that will be used to evaluate the contents of the body of the response.
`public string` | $hostHeader | `` | # The name of a host for which the health monitors will check. The name of a host for which the health monitors will check.
`public string` | $path | `` | # The HTTP path that will be used in the sample request. The HTTP path that will be used in the sample request.
`public string` | $statusRegex | `` | # A regular expression that will be used to evaluate the HTTP status code returned in the response. A regular expression that will be used to evaluate the HTTP status code returned in the response.
`protected static string` | $json_name | `'healthMonitor'` | #
`protected static string` | $url_resource | `'healthmonitor'` | #
`protected array` | $createKeys | `array( 'type', 'delay', 'timeout', 'attemptsBeforeDeactivation', 'bodyRegex', 'hostHeader', 'path', 'statusRegex' )` | #

Properties inherited from OpenCloud\Common\Resource\BaseResource
`$metadata, $parent, $service`

Properties inherited from OpenCloud\Common\Base
`$aliases`