Monitored Hosts

Monitored Hosts

#340300

Description

This resource is used to return the health status of the monitored hosts. The returned specifics match that provided by the DCE System Health Status dashboard. See System Health Status.

You can also use this resource to override the health status of a monitored host. For example, to override a host to healthy (or unhealthy) for a specified time, health check monitoring for that host stops until the specified date/time has past. When you override the health status, the details is set to "Status Override Executed". After the specified date/time, regular monitoring rules for the host resumes.

Resource

/monitored-hosts

Supported Operations

Table: Monitored Hosts Supported Operations

Operation

HTTP Method

Input

Output

Description

Get Collection

GET /monitored-hosts

None

Monitored Host Collection of [id, name, href]

Common Operations and Sort By are not supported.

Example: Getting a Collection of Healthy Monitored Hosts from Cluster 1

Get Individual

GET /monitored-hosts/<id>

None

Monitored Hosts: Resource Elements

Retrieve the elements of the Monitored Host specified by id.

Example: Getting Health Status of an Individual Monitored Host

Modify Individual

PUT /monitored-hosts/<id>

status and/or status_timestamp

Monitored Hosts: Resource Elements

Override the host health status of the Monitored Host specified by id. Either both or one of the following can be specified:

  • status—to override the status to "HEALTHY" or "UNHEALTHY" (case insensitive). If any other value, an error is returned.
  • status_timestamp—to override the timestamp. If not specified, the current date/time is used (i.e. monitoring is resumed) and the status is assumed to be valid for right now. If a future date/time is specified, then this is the date/time until which the health status is considered valid (i.e. no monitoring performed for this host until this date/time is past). If a past date/time is specified, monitoring is resumed.

If the host belongs to more than one environment, the status and timestamp are updated across all groups.

Example: Modifying the Health Status of a Monitored Host

Resource Elements

Table: Monitored Hosts Resource Elements

Element

Type

Mod

Filter

Description

id, name, href

strings

 

F by name

See ID, Name and Self Reference (id, name, href).

health_status

string

M using status or status_timestamp

F using health_status to query on status or infrastructure_group_id

The health of the monitored host.

  • status—health status of the Monitored Host, either "HEALTHY" or "UNHEALTHY"
  • details—details of the health status. When you override the health status, the details is set to "Status Override Executed". When the status is "HEALTHY", the details is set to null.
  • status_timestamp—date/time of the health check in UTC. If the timestamp is in the past, then it is the date/time of the last health check update. If the timestamp is in the future, then this is the date/time until which the health status is considered valid (i.e. no checks required until this date/time has past).
  • infrastructure_groupid, name, href link to the containing Infrastructure Group where the Monitored Host is located

Examples

Example: Getting a Collection of Healthy Monitored Hosts from Cluster 1

The following example shows you how to retrieve a collection of monitored hosts that reside in Cluster 1 that are also healthy.

Example: Getting Health Status of an Individual Monitored Host

The following example shows you how to get the health status details of an individual monitored host. The response shows that the host is included in Cluster 1 and is unhealthy.

Example: Modifying the Health Status of a Monitored Host

The following example shows you how to modify the health status details of an individual monitored host. In this example, both the status and status_timestamp are updated, as specified.