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
idintegerFilterable The 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. (shared, dedicated) (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. 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.
labelstringFilterable The 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. (example: dbaas)
severityintegerThe severity of the alert. Supported values include 3 for info, 2 for low, 1 for medium, and 0 for severe. (0, 1, 2, 3)
statusstringFilterable The current status of the alert. This can be either enabled, disabled, in progress, or failed. (enabled, disabled, in progress, failed) (example: enabled)
trigger_conditionsobjectThe conditions that need to be met to send a notification for the alert.
typestringFilterable The 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. (user, system) (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
getselectserviceType, alertIdBeta Returns a specific alert definition.

> 📘
>
> This operation is beta. Call it using the v4beta path in its URL. OAuth scopes.

<br /> monitor:read_only<br />

Learn more...

-

Learn more...
list_by_service_typeselectserviceTypeBeta Returns all available alert definitions for a specific service type.

> 📘
>
> This operation is beta. Call it using the v4beta path in its URL. OAuth scopes.

<br /> monitor:read_only<br />

Learn more...

-

Learn more...
listselectBeta 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...
createinsertserviceType, label, severity, rule_criteria, trigger_conditions, channel_idsBeta Create a new alert definition for a specific service type. Akamai refers to these as user alerts. You need read_only access to the scope for the selected serviceType. Check out this workflow for the basics on set up of a destination and a stream to gather logs.

> 📘
>
> This operation is beta. Call it using the v4beta path in its URL. OAuth scopes.

<br /> monitor:read_write<br />

Learn more...

-

Learn more...
updatereplaceserviceType, alertIdBeta Update an existing alert definition. You need read_only access to the scope for the selected serviceType. 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.

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...
deletedeleteserviceType, alertIdBeta Delete a specific alert definition on your account.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - You need read_only access to the scope for the target serviceType.
>
> - An alert definition with a type of system can't be deleted.

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
alertIdstringThe unique identifier assigned to the alert definition. Run the List alert definitions operation and store the id for the applicable alert definition.
serviceTypestringThe Akamai Cloud Computing service being monitored. To see your currently supported services, run the List supported service types operation and store the appropriate service_type.

SELECT examples

Beta Returns a specific alert definition.

> 📘
>
> This operation is beta. Call it using the v4beta path in its URL. 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
WHERE serviceType = '{{ serviceType }}' -- required
AND alertId = '{{ alertId }}' -- required
;

INSERT examples

Beta Create a new alert definition for a specific service type. Akamai refers to these as user alerts. You need read_only access to the scope for the selected serviceType. Check out this workflow for the basics on set up of a destination and a stream to gather logs.

> 📘
>
> This operation is beta. Call it using the v4beta path in its URL. OAuth scopes.

<br /> monitor:read_write<br />

Learn more...

-

Learn more...

INSERT INTO linode.monitor.alert_definitions (
channel_ids,
description,
entity_ids,
label,
rule_criteria,
severity,
trigger_conditions,
serviceType
)
SELECT
'{{ channel_ids }}' /* required */,
'{{ description }}',
'{{ entity_ids }}',
'{{ label }}' /* required */,
'{{ rule_criteria }}' /* required */,
{{ severity }} /* required */,
'{{ trigger_conditions }}' /* required */,
'{{ serviceType }}'
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. You need read_only access to the scope for the selected serviceType. 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.

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
channel_ids = '{{ channel_ids }}',
description = '{{ description }}',
entity_ids = '{{ entity_ids }}',
label = '{{ label }}',
rule_criteria = '{{ rule_criteria }}',
severity = {{ severity }},
status = '{{ status }}',
trigger_conditions = '{{ trigger_conditions }}'
WHERE
serviceType = '{{ serviceType }}' --required
AND alertId = '{{ alertId }}' --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;

DELETE examples

Beta Delete a specific alert definition on your account.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - You need read_only access to the scope for the target serviceType.
>
> - An alert definition with a type of system can't be deleted.

Learn more...

Learn more...

DELETE FROM linode.monitor.alert_definitions
WHERE serviceType = '{{ serviceType }}' --required
AND alertId = '{{ alertId }}' --required
;