Skip to main content

alerts

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

Overview

Namealerts
TypeResource
Iddigitalocean.monitoring.alerts

Fields

NameDatatypeDescription
column_anon``

Methods

NameAccessible byRequired ParamsDescription
monitoring_get_alert_policySELECTalert_uuidTo retrieve a given alert policy, send a GET request to /v2/monitoring/alerts/{alert_uuid}
monitoring_list_alert_policySELECTReturns all alert policies that are configured for the given account. To List all alert policies, send a GET request to /v2/monitoring/alerts.
monitoring_create_alert_policyINSERTdata__alerts, data__compare, data__description, data__enabled, data__entities, data__tags, data__type, data__value, data__windowTo create a new alert, send a POST request to /v2/monitoring/alerts.
monitoring_delete_alert_policyDELETEalert_uuidTo delete an alert policy, send a DELETE request to /v2/monitoring/alerts/{alert_uuid}
monitoring_update_alert_policyEXECalert_uuid, data__alerts, data__compare, data__description, data__enabled, data__entities, data__tags, data__type, data__value, data__windowTo update en existing policy, send a PUT request to v2/monitoring/alerts/{alert_uuid}.

SELECT examples

Returns all alert policies that are configured for the given account. To List all alert policies, send a GET request to /v2/monitoring/alerts.

SELECT
column_anon
FROM digitalocean.monitoring.alerts
;

INSERT example

Use the following StackQL query and manifest file to create a new alerts resource.

/*+ create */
INSERT INTO digitalocean.monitoring.alerts (
data__alerts,
data__compare,
data__description,
data__enabled,
data__entities,
data__tags,
data__type,
data__value,
data__window
)
SELECT
'{{ alerts }}',
'{{ compare }}',
'{{ description }}',
'{{ enabled }}',
'{{ entities }}',
'{{ tags }}',
'{{ type }}',
'{{ value }}',
'{{ window }}'
;

DELETE example

Deletes the specified alerts resource.

/*+ delete */
DELETE FROM digitalocean.monitoring.alerts
WHERE alert_uuid = '{{ alert_uuid }}';