alerts
Creates, updates, deletes, gets or lists a alerts
resource.
Overview
Name | alerts |
Type | Resource |
Id | digitalocean.monitoring.alerts |
Fields
Name | Datatype | Description |
---|---|---|
column_anon | `` |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
monitoring_get_alert_policy | SELECT | alert_uuid | To retrieve a given alert policy, send a GET request to /v2/monitoring/alerts/{alert_uuid} |
monitoring_list_alert_policy | SELECT |
| Returns 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_policy | INSERT | data__alerts, data__compare, data__description, data__enabled, data__entities, data__tags, data__type, data__value, data__window | To create a new alert, send a POST request to /v2/monitoring/alerts . |
monitoring_delete_alert_policy | DELETE | alert_uuid | To delete an alert policy, send a DELETE request to /v2/monitoring/alerts/{alert_uuid} |
monitoring_update_alert_policy | EXEC | alert_uuid, data__alerts, data__compare, data__description, data__enabled, data__entities, data__tags, data__type, data__value, data__window | To 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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: alerts
props:
- name: data__alerts
value: string
- name: data__compare
value: string
- name: data__description
value: string
- name: data__enabled
value: string
- name: data__entities
value: string
- name: data__tags
value: string
- name: data__type
value: string
- name: data__value
value: string
- name: data__window
value: string
- name: alerts
props:
- name: email
value: array
- name: slack
value: array
props:
- name: channel
value: string
- name: url
value: string
- name: compare
value: string
- name: description
value: string
- name: enabled
value: boolean
- name: entities
value: array
- name: tags
value: array
- name: type
value: string
- name: value
value: number
- name: window
value: string
DELETE
example
Deletes the specified alerts
resource.
/*+ delete */
DELETE FROM digitalocean.monitoring.alerts
WHERE alert_uuid = '{{ alert_uuid }}';