Skip to main content

resource_endpoint_health

Creates, updates, deletes, gets or lists a resource_endpoint_health resource.

Overview

Nameresource_endpoint_health
TypeResource
Idazure.iot_hub.resource_endpoint_health

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
endpointIdstringId of the endpoint
healthStatusstringHealth statuses have following meanings. The 'healthy' status shows that the endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint will be updated to healthy when IoT Hub has established an eventually consistent state of health. The 'dead' status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that the IoT Hub has not established a connection with the endpoint. No messages have been delivered to or rejected from this endpoint
lastKnownErrorstringLast error obtained when a message failed to be delivered to iot hub
lastKnownErrorTimestring (date-time-rfc1123)Time at which the last known error occurred
lastSendAttemptTimestring (date-time-rfc1123)Last time iot hub tried to send a message to the endpoint
lastSuccessfulSendAttemptTimestring (date-time-rfc1123)Last time iot hub successfully sent a message to the endpoint

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, iotHubNameapi-versionGet the health for routing endpoints.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
iotHubNamestring
resourceGroupNamestring
subscriptionIdstringThe subscription identifier.
api-versionstringThe version of the API.

SELECT examples

Get the health for routing endpoints.

SELECT
endpointId,
healthStatus,
lastKnownError,
lastKnownErrorTime,
lastSendAttemptTime,
lastSuccessfulSendAttemptTime
FROM azure.iot_hub.resource_endpoint_health
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND iotHubName = '{{ iotHubName }}' -- required
AND api-version = '{{ api-version }}'
;