Monitored Hosts
Monitored Hosts
#340300
Description
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 |
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 |
Override the host health status of the Monitored Host specified by id. Either both or one of the following can be specified:
If the host belongs to more than one environment, the status and timestamp are updated across all groups. |
Table: Monitored Hosts Resource Elements
Element |
Type |
Mod |
Filter |
Description |
---|---|---|---|---|
id, name, href |
strings |
|
F by name |
|
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.
|
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.

Request:
GET /monitored-hosts/?health_status=HEALTHY&infrastructure_group_id=1e212147-6669-4c60-be6e-616e7ba022f2
Response:
[
{
"id": "f9a20e24-ee01-4ead-b16f-c4071269a2c3",
"name": "host1",
"href": /monitored-hosts/f9a20e24-ee01-4ead-b16f-c4071269a2c3,
},
{
"id": "999ecf21-79cb-4cdb-a7bc-be8787c06d68",
"name": "host2",
"href": "/monitored-hosts/999ecf21-79cb-4cdb-a7bc-be8787c06d68"
},
// ... *SNIP* ...
]
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.

Request:
GET /monitored-hosts/23191b13-a2ee-4106-894f-5d0470c473b9
Response:
{
"id": "23191b13-a2ee-4106-894f-5d0470c473b9",
"name": "host1",
"href": "/monitored-hosts/23191b13-a2ee-4106-894f-5d0470c473b9"
"health_status": [
{
"status": "UNHEALTHY",
"details": "Total CPUs Overcommit:525.0:FAIL",
"status_timestamp": 1445616961000,
"infrastructure_group": {
"id": "1e212147-6669-4c60-be6e-616e7ba022f2",
"name": "Cluster 1",
"href": "/infrastructure-groups/1e212147-6669-4c60-be6e-616e7ba022f2"
}
}
]
}
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.

Request:
PUT /monitored-hosts/f9a20e24-ee01-4ead-b16f-c4071269a2c3
{
"status": "UNHEALTHY",
"status_timestamp": 1445620201000
}
Response:
{
"id": "f9a20e24-ee01-4ead-b16f-c4071269a2c3",
"name": "host1",
"href": "/monitored-hosts/f9a20e24-ee01-4ead-b16f-c4071269a2c3"
"health_status": [
{
"status": "UNHEALTHY",
"details": "Status Override Executed",
"status_timestamp": 1445620201000,
"infrastructure_group": {
"id": "1e212147-6669-4c60-be6e-616e7ba022f2",
"name": "Cluster 1",
"href": "/infrastructure-groups/1e212147-6669-4c60-be6e-616e7ba022f2"
}
}
]
}