Skip to main content

alert_definitions

Creates, updates, deletes, gets or lists an alert_definitions resource.

Overview

Namealert_definitions
TypeResource
Idlinode.monitor.alert_definitions

Fields

The following fields are returned by SELECT queries:

Returns the specified alert definition.

NameDatatypeDescription
idintegerThe unique identifier for the alert definition.
alert_channelsarrayThe alert channels set up for use with this alert. Run the List alert channels operation to see all of the available channels.
classstringThe plan type for the Managed Database cluster, either shared or dedicated. This only applies to a system alert for a service_type of dbaas (Managed Databases). For user alerts for dbaas, this is returned as null. (example: dedicated)
createdstring (date-time)When the alert definition was created. (example: 2025-03-20 01:42:11)
created_bystringFor a user alert definition, this is the user on your account that created it. For a system alert definition, this is returned as system. (example: system)
descriptionstringAn additional description for the alert definition. (example: Alert for my PostgreSQL database)
entity_idsarrayThe id for each individual entity from a service_type. Get this value by running the list operation for the appropriate entity. For example, if your entity is one of your PostgreSQL databases, run the List PostgreSQL Managed Databases operation and store the id for the appropriate database from the response. > 📘 > > The format type for an entity_id may vary, based on the Akamai Cloud service_type. For example, the dbaas service returns an integer value for an id, that you'd use for the entity_id, while other services may return a string for their id. With the Alerts operations, all of these formats are recognized as an entity_id, when you include them as a string.
has_more_resourcesbooleanWhether there are additional entity_ids associated with the alert for which the user doesn't have at least read-only access.
labelstringThe name of the alert definition. This is used for display purposes in Akamai Cloud Manager. (example: High Memory Usage Plan Dedicated)
rule_criteriaobjectDetails for the rules required to trigger the alert.
service_typestringThe identifier for the Akamai Cloud Computing service. Use this value to call out the service in other Monitor operations in the API. Currently, only the Managed Databases (dbaas) service is supported. (example: dbaas)
severityintegerThe severity of the alert. Supported values include 3 for info, 2 for low, 1 for medium, and 0 for severe.
statusstringThe current status of the alert. This can be either enabled, disabled, in progress, or failed. (example: enabled)
trigger_conditionsobjectThe conditions that need to be met to send a notification for the alert.
typestringThe type of alert. This can be either user for an alert specific to the current user, or system for one that applies to all users on your account. (example: system)
updatedstring (date-time)When the alert definition was last updated. This is the same as created if the alert definition hasn't been updated. (example: 2025-03-20 01:42:11)
updated_bystringFor a user alert definition, this is the user on your account that last updated it. For a system alert definition, this is returned as system. If it hasn't been updated, this value is the same as created_by. (example: system)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_alert_definitionselectBeta Returns a specific alert definition. Include the appropriate service_type and alert_id as path parameters.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - Currently, only the Managed Databases (dbaas) service type is supported. OAuth scopes.

<br /> monitor:read_only<br />

Learn more...

-

Learn more...
get_alert_definitions_for_service_typeselectBeta Returns all available alert definitions for a specific service type. Include the appropriate service_type as a path parameter.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - Currently, only the Managed Databases (dbaas) service type is supported. OAuth scopes.

<br /> monitor:read_only<br />

Learn more...

-

Learn more...
get_alert_definitionsselectBeta Returns all available alert definitions on your account.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - Filtering is supported for specific objects, labeled as Filterable. However, only the +and and +or operators are supported, and you can't nest filter operators. OAuth scopes.

<br /> monitor:read_only<br />

Learn more...

-

Learn more...
post_alert_definition_for_service_typeinsertdata__label, data__severity, data__rule_criteria, data__trigger_conditions, data__channel_idsBeta Create a new alert definition for a specific service type. Include the appropriate service_type as a path parameter. These are referred to as user alerts. You need read_only access to the scope for the selected service_type.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - Currently, only the Managed Databases (dbaas) service type is supported. OAuth scopes.

<br /> monitor:read_write<br />

Learn more...

-

Learn more...
put_alert_definitionreplaceBeta Update an existing alert definition. Include the appropriate service_type and alert_id as path parameters. You need read_only access to the scope for the selected service_type. Only include the objects in the request that you want to update. Leave any object out of the request to leave it set as is.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - Currently, only the Managed Databases (dbaas) service type is supported.

User alert definitions

When updating an alert definition you've created, you can change the status to enabled or disabled. You can also modify the label, description, severity, entity_ids, rule_criteria, trigger_conditions, and channel_ids objects. If updating the entity_ids, rule_criteria, or channel_ids list objects, these points apply:

- If you want to keep an existing item, you need to include it in the list.

- If you want to remove an existing item, leave it out of the list.

- To add a new item, include it in the list.

- You can't pass an empty list to remove all items. This doesn't apply to the entity_ids or dimension_filters (in rule_criteria) list objects, because they are optional, while all other list objects are required.

System alert definitions

These are the default alert definitions offered by Akamai. You can only edit the entity_ids list object for these alerts. All of the points above regarding editing a list object apply here, too. OAuth scopes.

<br /> monitor:read_write<br />

Learn more...

-

Learn more...
delete_alert_definitiondeleteBeta Delete a specific alert definition on your account. Include the appropriate service_type and alert_id as path parameters.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - You need read_only access to the scope for the target service_type.
>
> - An alert definition with a type of system can't be deleted.
>
> - Currently, only the Managed Databases (dbaas) service type is supported.

Learn more...

Learn more...

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

SELECT examples

Beta Returns a specific alert definition. Include the appropriate service_type and alert_id as path parameters.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - Currently, only the Managed Databases (dbaas) service type is supported. OAuth scopes.

<br /> monitor:read_only<br />

Learn more...

-

Learn more...

SELECT
id,
alert_channels,
class,
created,
created_by,
description,
entity_ids,
has_more_resources,
label,
rule_criteria,
service_type,
severity,
status,
trigger_conditions,
type,
updated,
updated_by
FROM linode.monitor.alert_definitions;

INSERT examples

Beta Create a new alert definition for a specific service type. Include the appropriate service_type as a path parameter. These are referred to as user alerts. You need read_only access to the scope for the selected service_type.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - Currently, only the Managed Databases (dbaas) service type is supported. OAuth scopes.

<br /> monitor:read_write<br />

Learn more...

-

Learn more...

INSERT INTO linode.monitor.alert_definitions (
data__channel_ids,
data__description,
data__entity_ids,
data__label,
data__rule_criteria,
data__severity,
data__trigger_conditions
)
SELECT
'{{ channel_ids }}' --required,
'{{ description }}',
'{{ entity_ids }}',
'{{ label }}' --required,
'{{ rule_criteria }}' --required,
{{ severity }} --required,
'{{ trigger_conditions }}' --required
RETURNING
id,
alert_channels,
class,
created,
created_by,
description,
entity_ids,
has_more_resources,
label,
rule_criteria,
service_type,
severity,
status,
trigger_conditions,
type,
updated,
updated_by
;

REPLACE examples

Beta Update an existing alert definition. Include the appropriate service_type and alert_id as path parameters. You need read_only access to the scope for the selected service_type. Only include the objects in the request that you want to update. Leave any object out of the request to leave it set as is.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - Currently, only the Managed Databases (dbaas) service type is supported.

User alert definitions

When updating an alert definition you've created, you can change the status to enabled or disabled. You can also modify the label, description, severity, entity_ids, rule_criteria, trigger_conditions, and channel_ids objects. If updating the entity_ids, rule_criteria, or channel_ids list objects, these points apply:

- If you want to keep an existing item, you need to include it in the list.

- If you want to remove an existing item, leave it out of the list.

- To add a new item, include it in the list.

- You can't pass an empty list to remove all items. This doesn't apply to the entity_ids or dimension_filters (in rule_criteria) list objects, because they are optional, while all other list objects are required.

System alert definitions

These are the default alert definitions offered by Akamai. You can only edit the entity_ids list object for these alerts. All of the points above regarding editing a list object apply here, too. OAuth scopes.

<br /> monitor:read_write<br />

Learn more...

-

Learn more...

REPLACE linode.monitor.alert_definitions
SET
data__channel_ids = '{{ channel_ids }}',
data__description = '{{ description }}',
data__entity_ids = '{{ entity_ids }}',
data__label = '{{ label }}',
data__rule_criteria = '{{ rule_criteria }}',
data__severity = {{ severity }},
data__status = '{{ status }}',
data__trigger_conditions = '{{ trigger_conditions }}'
WHERE

RETURNING
id,
alert_channels,
class,
created,
created_by,
description,
entity_ids,
has_more_resources,
label,
rule_criteria,
service_type,
severity,
status,
trigger_conditions,
type,
updated,
updated_by;

DELETE examples

Beta Delete a specific alert definition on your account. Include the appropriate service_type and alert_id as path parameters.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - You need read_only access to the scope for the target service_type.
>
> - An alert definition with a type of system can't be deleted.
>
> - Currently, only the Managed Databases (dbaas) service type is supported.

Learn more...

Learn more...

DELETE FROM linode.monitor.alert_definitions;