Update an alert definition

Beta Update an existing alert definition. You need read_only access to the OAuth 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.

When updating an alert definition you've created, you can change the status to enabled or disabled. You can also modify the label, description, and severity. You can't update a scope, but you can update its applicable entity_ids or regions, as well as its rule_criteria, trigger_conditions, and channel_ids objects. If updating the rule_criteria, channel_ids, entity_ids, or regions fields, 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, regions, or dimension_filters (in rule_criteria) list objects, because they are optional, while all other list objects are required.

Permissions and scopes

To call this operation, you need permissions, based on the model you're using:

  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: monitor:read_write

CLI

linode-cli alerts definition-update dbaas 457 \ --status disabled \ --label Read-Write Channel (old)

Learn more

Path Params
string
enum
required

Enum Call the v4beta URL for operations still only in beta.

Allowed:
string
required

The 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.

integer
required

The unique identifier assigned to the alert definition. Run the List alert definitions operation and store the id for the applicable one.

Body Params
Responses

Response body
object
alert_channels
array of objects

Read-only The notification channels set up for use with this alert. Run the List notification channels operation to see all of the available channels.

alert_channels
object
integer

The unique identifier for this notification channel.

string

The name of the channel, used to display it in Akamai Cloud Manager.

string
enum

The type of notification used with the channel. For a user alert definition, only email is supported.

email

url

The URL for the channel that ends in the channel's id.

string | null
enum

Read-only The 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). When the type of the alert definition is user, this is returned as null.

shared dedicated

date-time

Read-only When the alert definition was created.

string

Read-only For a user alert definition, this is the user on your account that created it. For a system alert definition, this is returned as system.

string

An additional description for the alert definition.

entity_ids
array of strings

The 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. You also need read_only access to the OAuth scope for the service_type for each of the entity_ids.

📘

  • This only applies if scope for the alert definition is set to entity_id. For any other scope setting, this appears as an empty array.

  • 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.

entity_ids
boolean

Read-only Whether there are additional entity_ids associated with the alert for which the user doesn't have at least read-only access.

integer

Filterable The unique identifier for the alert definition.

string

Filterable The name of the alert definition. This is used for display purposes in Akamai Cloud Manager.

regions
array of strings

The Akamai Cloud Computing data centers that host resources for a specific service_type. Run the List regions operation and review the monitors.alerts array. If the desired service type is listed, this region is supported for use in an alert.

📘

This only applies if scope is set to region. For any other scope setting, this appears as an empty array.

regions
rule_criteria
object

Details for the rules required to trigger the alert.

rules
array of objects

The individual rules that make up the alert definition.

rules
object
string
enum

The aggregation function applied to the metric. Available values are avg, sum, min, and max.

avg sum min max

dimension_filters
array of objects

Individual objects that define dimension filters for the rule.

dimension_filters
object
string

The name of the dimension to be used in the filter.

string

The name of the dimension filter. Used for display purposes.

string
enum

The operator to apply to the dimension filter value. Set to eq for equal, neq for not equal, startswith, endswith, or in for a comma-separated list of entries.

eq neq startswith endswith in

string

The value to compare the dimension_label against.

string

The name of the individual rule. This is used for display purposes in Akamai Cloud Manager.

string

The metric to query.

string
enum

The operator to apply to the metric. Available values are eq for equal, gt for greater than, lt for less than, gte for greater than or equal, and lte for less than or equal.

eq gt lt gte

float

The predefined value or condition that triggers an alert when met or exceeded. For example, for avg(cpu_usage) > 80, the threshold is 80.

string
enum

Read-only The unit of the metric. This can be values like percent for percentage or GB for gigabyte.

number byte second percent bit_per_second millisecond KB MB GB

string
enum

The classification of the alert definition, describing where it applies. Available values include:

  • entity. Sets an alert for specific service_type entities, based on their unique id value. For example, you could set this value and include the entity_ids array populated with the id values assigned to one or more of your Managed Databases.

  • region. Sets an alert for all of the service_type entities in the specified Akamai Cloud Computing data centers. For example, you could set this value and include the regions array populated with the data centers that house the Managed Databases you want to use the alert.

  • account. Sets an alert for all of the specified service_type entities on your account.

📘

Currently, alerts are available for limited services (serviceType), in specific regions. Talk to your account manager or reach out to our sales team for more information.

account entity region

string

Read-only The identifier for the Akamai Cloud Computing service. Use this value to call out the service in other Monitor operations in the API.

integer
enum

The severity of the alert. Supported values include 3 for info, 2 for low, 1 for medium, and 0 for severe.

0 1 2 3

string
enum

Read-only The current status of the alert definition. This can be enabled, disabled, provisioning for a definition that the API is processing after creation, enabling, for a definition that the API is changing from disabled, or disabling for a definition that the API is changing from enabled.

enabling enabled disabling disabled failed provisioning

trigger_conditions
object

The conditions that need to be met to send a notification for the alert.

string
enum

Signifies the logical operation applied when multiple metrics are set for an alert definition. For example, if you wanted to apply both cpu_usage > 90 and memory_usage > 80, ALL is the criteria_condition. Currently, only ALL is supported.

ALL

integer
enum

The time period over which data is collected before evaluating whether the alert definition's threshold has been met or exceeded. Supported values include 300, 900, 1800, or 3600 seconds.

300 900 1800 3600

integer
enum

The frequency at which the metric is checked for a change in state. For example, with cpu_usage set as your metric and this set to 300, your cpu_usage is checked every 5 minutes for some change in its state. Supported values include 300, 900, 1800, or 3600 seconds.

300 900 1800 3600

integer

The minimum number of consecutive polling_interval_seconds periods that the threshold needs to be breached to trigger the alert.

string
enum

Filterable, Read-only 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

date-time

Read-only When the alert definition was last updated. This is the same as created if the alert definition hasn't been updated.

string

Read-only For 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.

Language
Credentials