entities
Creates, updates, deletes, gets or lists an entities resource.
Overview
| Name | entities |
| Type | Resource |
| Id | azure.cloud_health.entities |
Fields
The following fields are returned by SELECT queries:
- get_signal_history
- get
- list_by_health_model
| Name | Datatype | Description |
|---|---|---|
entityName | string | Name of the entity. Required. |
history | array | Signal history data points. Required. |
signalName | string | Name of the signal. Required. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
alerts | object | Alert configuration for this entity. |
canvasPosition | object | Positioning of the entity on the model canvas. |
discoveredBy | string | Discovered by which discovery rule. If set, the entity cannot be deleted manually. |
displayName | string | Display name. |
healthObjective | number | Health objective as a percentage of time the entity should be healthy. |
healthState | string | Health state of this entity. Known values are: "Healthy", "Degraded", "Unhealthy", "Unknown", and "Deleted". (Healthy, Degraded, Unhealthy, Unknown, Deleted) |
icon | object | Visual icon definition. If not set, a default icon is used. |
impact | string | Impact of the entity in health state propagation. Known values are: "Standard", "Limited", and "Suppressed". (Standard, Limited, Suppressed) |
provisioningState | string | The status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Creating", and "Deleting". (Succeeded, Failed, Canceled, Creating, Deleting) |
signalGroups | object | Signal groups which are assigned to this entity. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Optional set of tags (key-value pairs). |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
alerts | object | Alert configuration for this entity. |
canvasPosition | object | Positioning of the entity on the model canvas. |
discoveredBy | string | Discovered by which discovery rule. If set, the entity cannot be deleted manually. |
displayName | string | Display name. |
healthObjective | number | Health objective as a percentage of time the entity should be healthy. |
healthState | string | Health state of this entity. Known values are: "Healthy", "Degraded", "Unhealthy", "Unknown", and "Deleted". (Healthy, Degraded, Unhealthy, Unknown, Deleted) |
icon | object | Visual icon definition. If not set, a default icon is used. |
impact | string | Impact of the entity in health state propagation. Known values are: "Standard", "Limited", and "Suppressed". (Standard, Limited, Suppressed) |
provisioningState | string | The status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Creating", and "Deleting". (Succeeded, Failed, Canceled, Creating, Deleting) |
signalGroups | object | Signal groups which are assigned to this entity. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Optional set of tags (key-value pairs). |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
entity_name | string | Name of the entity. Must be unique within a health model. Required. |
health_model_name | string | Name of health model resource. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
timestamp | string (date-time) | Timestamp to use for the operation. When specified, the version of the resource at this point in time is retrieved. If not specified, the latest version is used. Default value is None. |
SELECT examples
- get_signal_history
- get
- list_by_health_model
Retrieve the time series history for a signal on an entity.
SELECT
entityName,
history,
signalName
FROM azure.cloud_health.entities
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND health_model_name = '{{ health_model_name }}' -- required
AND entity_name = '{{ entity_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get a Entity.
SELECT
id,
name,
alerts,
canvasPosition,
discoveredBy,
displayName,
healthObjective,
healthState,
icon,
impact,
provisioningState,
signalGroups,
systemData,
tags,
type
FROM azure.cloud_health.entities
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND health_model_name = '{{ health_model_name }}' -- required
AND entity_name = '{{ entity_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List Entity resources by HealthModel.
SELECT
id,
name,
alerts,
canvasPosition,
discoveredBy,
displayName,
healthObjective,
healthState,
icon,
impact,
provisioningState,
signalGroups,
systemData,
tags,
type
FROM azure.cloud_health.entities
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND health_model_name = '{{ health_model_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND timestamp = '{{ timestamp }}'
;
INSERT examples
- create_or_update
- Manifest
Create a Entity.
INSERT INTO azure.cloud_health.entities (
properties,
resource_group_name,
health_model_name,
entity_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ health_model_name }}',
'{{ entity_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: entities
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the entities resource.
- name: health_model_name
value: "{{ health_model_name }}"
description: Required parameter for the entities resource.
- name: entity_name
value: "{{ entity_name }}"
description: Required parameter for the entities resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the entities resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
provisioningState: "{{ provisioningState }}"
displayName: "{{ displayName }}"
canvasPosition:
x: {{ x }}
y: {{ y }}
icon:
iconName: "{{ iconName }}"
customData: "{{ customData }}"
healthObjective: {{ healthObjective }}
impact: "{{ impact }}"
tags: "{{ tags }}"
signalGroups:
azureResource:
authenticationSetting: "{{ authenticationSetting }}"
azureResourceId: "{{ azureResourceId }}"
azureResourceKind: "{{ azureResourceKind }}"
signals:
- signalKind: "{{ signalKind }}"
name: "{{ name }}"
signalDefinitionName: "{{ signalDefinitionName }}"
status:
healthState: "{{ healthState }}"
value: {{ value }}
reportedAt: "{{ reportedAt }}"
error: "{{ error }}"
metricNamespace: "{{ metricNamespace }}"
metricName: "{{ metricName }}"
timeGrain: "{{ timeGrain }}"
aggregationType: "{{ aggregationType }}"
dimension: "{{ dimension }}"
dimensionFilter: "{{ dimensionFilter }}"
displayName: "{{ displayName }}"
refreshInterval: "{{ refreshInterval }}"
dataUnit: "{{ dataUnit }}"
evaluationRules:
degradedRule: "{{ degradedRule }}"
unhealthyRule: "{{ unhealthyRule }}"
azureLogAnalytics:
authenticationSetting: "{{ authenticationSetting }}"
logAnalyticsWorkspaceResourceId: "{{ logAnalyticsWorkspaceResourceId }}"
signals:
- signalKind: "{{ signalKind }}"
name: "{{ name }}"
signalDefinitionName: "{{ signalDefinitionName }}"
status:
healthState: "{{ healthState }}"
value: {{ value }}
reportedAt: "{{ reportedAt }}"
error: "{{ error }}"
queryText: "{{ queryText }}"
timeGrain: "{{ timeGrain }}"
valueColumnName: "{{ valueColumnName }}"
displayName: "{{ displayName }}"
refreshInterval: "{{ refreshInterval }}"
dataUnit: "{{ dataUnit }}"
evaluationRules:
degradedRule: "{{ degradedRule }}"
unhealthyRule: "{{ unhealthyRule }}"
azureMonitorWorkspace:
authenticationSetting: "{{ authenticationSetting }}"
azureMonitorWorkspaceResourceId: "{{ azureMonitorWorkspaceResourceId }}"
signals:
- signalKind: "{{ signalKind }}"
name: "{{ name }}"
signalDefinitionName: "{{ signalDefinitionName }}"
status:
healthState: "{{ healthState }}"
value: {{ value }}
reportedAt: "{{ reportedAt }}"
error: "{{ error }}"
queryText: "{{ queryText }}"
timeGrain: "{{ timeGrain }}"
displayName: "{{ displayName }}"
refreshInterval: "{{ refreshInterval }}"
dataUnit: "{{ dataUnit }}"
evaluationRules:
degradedRule: "{{ degradedRule }}"
unhealthyRule: "{{ unhealthyRule }}"
dependencies:
aggregationType: "{{ aggregationType }}"
degradedThreshold: {{ degradedThreshold }}
unhealthyThreshold: {{ unhealthyThreshold }}
unit: "{{ unit }}"
ignoreUnknown: {{ ignoreUnknown }}
external:
signals:
- signalKind: "{{ signalKind }}"
name: "{{ name }}"
signalDefinitionName: "{{ signalDefinitionName }}"
status:
healthState: "{{ healthState }}"
value: {{ value }}
reportedAt: "{{ reportedAt }}"
error: "{{ error }}"
evaluationRules:
degradedRule: "{{ degradedRule }}"
unhealthyRule: "{{ unhealthyRule }}"
discoveredBy: "{{ discoveredBy }}"
healthState: "{{ healthState }}"
alerts:
unhealthy:
severity: "{{ severity }}"
description: "{{ description }}"
actionGroupIds:
- "{{ actionGroupIds }}"
degraded:
severity: "{{ severity }}"
description: "{{ description }}"
actionGroupIds:
- "{{ actionGroupIds }}"
REPLACE examples
- create_or_update
Create a Entity.
REPLACE azure.cloud_health.entities
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND health_model_name = '{{ health_model_name }}' --required
AND entity_name = '{{ entity_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete a Entity.
DELETE FROM azure.cloud_health.entities
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND health_model_name = '{{ health_model_name }}' --required
AND entity_name = '{{ entity_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_history
- ingest_health_report
Retrieve the health state transition history for an entity.
EXEC azure.cloud_health.entities.get_history
@resource_group_name='{{ resource_group_name }}' --required,
@health_model_name='{{ health_model_name }}' --required,
@entity_name='{{ entity_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"startAt": "{{ startAt }}",
"endAt": "{{ endAt }}"
}'
;
Ingest a health report for a specific signal on an entity (the entity must already exist).
EXEC azure.cloud_health.entities.ingest_health_report
@resource_group_name='{{ resource_group_name }}' --required,
@health_model_name='{{ health_model_name }}' --required,
@entity_name='{{ entity_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"signalName": "{{ signalName }}",
"healthState": "{{ healthState }}",
"value": {{ value }},
"evaluationRules": "{{ evaluationRules }}",
"expiresInMinutes": {{ expiresInMinutes }},
"additionalContext": "{{ additionalContext }}"
}'
;