The Alert manager endpoints allow you to manage Cockpit's alerting services. Once you have enabled the Alert manager in your desired regions, you can create contact points and activate preconfigured alerts.
Get the Alert manager
Retrieve information about the Alert manager which is unique per Project and region. By default the Alert manager is disabled. The output returned displays a URL to access the Alert manager, and whether the Alert manager and managed alerts are enabled.
path Parameters
regionThe region you want to target
query Parameters
project_idProject ID of the requested Alert manager.
Get the Alert manager › Responses
alert_manager_urlAlert manager URL.
alert_manager_enabledThe Alert manager is enabled.
managed_alerts_enabledManaged alerts are enabled.
regionRegions where the Alert manager is enabled.
List contact points
Retrieve a list of contact points for the specified Project. The response lists all contact points and receivers created in Grafana or via the API.
path Parameters
regionThe region you want to target
query Parameters
project_idID of the Project containing the contact points to list.
pagePage number to return, from the paginated results.
page_sizeTotal count of contact points to return per page.
List contact points › Responses
total_countTotal count of contact points associated with the default receiver.
List of contact points associated with the default receiver.
has_additional_receiversIndicates whether the Alert manager has other receivers than the default one.
has_additional_contact_pointsIndicates whether there are unmanaged contact points on the default receiver.
Create a contact point
Contact points are email addresses associated with the default receiver, that the Alert manager sends alerts to. The source of the alerts are data sources within the same Project and region as the Alert manager. If you need to receive alerts for other receivers, you can create additional contact points and receivers in Grafana. Make sure that you select the Scaleway Alert manager.
path Parameters
regionThe region you want to target
Create a contact point › Request Body
project_idID of the Project to create the contact point in.
Email address of the contact point to create.
send_resolved_notificationsSend an email notification when an alert is marked as resolved.
Create a contact point › Responses
Email address to send alerts to.
regionRegion.
send_resolved_notificationsSend an email notification when an alert is marked as resolved.
Delete a contact point
Delete a contact point associated with the default receiver.
path Parameters
regionThe region you want to target
Delete a contact point › Request Body
project_idID of the Project containing the contact point to delete.
Email address of the contact point to delete.
Delete a contact point › Responses
Disable the Alert manager
Disabling the Alert manager deletes the contact points you have created and disables managed alerts in the specified Project and region.
path Parameters
regionThe region you want to target
Disable the Alert manager › Request Body
project_idID of the Project to disable the Alert manager in.
Disable the Alert manager › Responses
alert_manager_urlAlert manager URL.
alert_manager_enabledThe Alert manager is enabled.
managed_alerts_enabledManaged alerts are enabled.
regionRegions where the Alert manager is enabled.
Disable preconfigured alert rules
Disable alert rules from the list of available preconfigured rules.
path Parameters
regionThe region you want to target
Disable preconfigured alert rules › Request Body
project_idID of the Project.
rule_idsList of IDs of the rules to enable. If empty, disables all preconfigured rules. (UUID format)
Disable preconfigured alert rules › Responses
disabled_rule_idsList of IDs of the rules that were disabled. Only newly disabled rules are listed. Rules that were already disabled are not returned in the output. (UUID format)
Enable the Alert manager
Enabling the Alert manager allows you to enable managed alerts and create contact points in the specified Project and region, to be notified when your Scaleway resources may require your attention.
path Parameters
regionThe region you want to target
Enable the Alert manager › Request Body
project_idID of the Project to enable the Alert manager in.
Enable the Alert manager › Responses
alert_manager_urlAlert manager URL.
alert_manager_enabledThe Alert manager is enabled.
managed_alerts_enabledManaged alerts are enabled.
regionRegions where the Alert manager is enabled.
Enable preconfigured alert rules
Enable alert rules from the list of available preconfigured rules.
path Parameters
regionThe region you want to target
Enable preconfigured alert rules › Request Body
project_idID of the Project.
rule_idsList of IDs of the rules to enable. If empty, enables all preconfigured rules. (UUID format)
Enable preconfigured alert rules › Responses
enabled_rule_idsList of IDs of the rules that were enabled. Only newly enabled rules are listed. Rules that were already enabled are not returned in the output. (UUID format)
Disable managed alerts
Disable the sending of managed alerts for the specified Project.
path Parameters
regionThe region you want to target
Disable managed alerts › Responses
alert_manager_urlAlert manager URL.
alert_manager_enabledThe Alert manager is enabled.
managed_alerts_enabledManaged alerts are enabled.
regionRegions where the Alert manager is enabled.
Enable managed alerts
Enable the sending of managed alerts for the specified Project. Managed alerts are predefined alerts that apply to Scaleway resources integrated with Cockpit by default.
path Parameters
regionThe region you want to target
Enable managed alerts › Responses
alert_manager_urlAlert manager URL.
alert_manager_enabledThe Alert manager is enabled.
managed_alerts_enabledManaged alerts are enabled.
regionRegions where the Alert manager is enabled.
Trigger a test alert
List alerts
List preconfigured and/or custom alerts for the specified Project and data source.
path Parameters
regionThe region you want to target
query Parameters
project_idProject ID to filter for, only alerts from this Project will be returned.
rule_statusFilter alerts based on their activation status. Optional. Returns only alerts with the given activation status. If omitted, no alert filtering is applied. Other filters may still apply.
is_preconfiguredFilter alerts based on their types (preconfigured or custom). Optional. True returns only preconfigured alerts. False returns only custom alerts. If omitted, no filtering is applied on alert types. Other filters may still apply.
stateFilter alerts based on their state. Optional.
Valid values to filter on are inactive, pending and firing. If omitted, no filtering is applied on alert states. Other filters may still apply.
data_source_idFilter alerts from a specific data source. Optional. If omitted, only alerts from the default Scaleway metrics data source will be listed.
List alerts › Responses
total_countTotal count of alerts matching the request.
List of alerts matching the applied filters.
Get the number of enabled rules
Get a detailed count of enabled rules in the specified Project. Includes preconfigured and custom alerting and recording rules.
path Parameters
regionThe region you want to target
query Parameters
project_idID of the Project to retrieve the rule count for.
Get the number of enabled rules › Responses
Total count of rules grouped by data source.
preconfigured_rules_countTotal count of preconfigured rules.
custom_rules_countTotal count of custom rules.