Skip to navigationSkip to main contentSkip to footerScaleway Docs HomepageAsk our AI
Ask our AI

How to configure Audit Trail custom alerts

Audit Trail Alerting Management lets you proactively monitor the actions performed on your Scaleway resources. You can enable a set of preconfigured alerts or configure custom alerts based on your security and monitoring needs so Audit Trail notifies you of abnormal or sensitive behavior. This page explains how to set custom alerts.

Before you start

To complete the following actions, you must have:

Note

Events related to global products which are not region-specific (such as IAM, Account, or Edge Services activities) are considered FR-PAR (Paris) events.

Configure a custom alert

Note

After creating an alert, you can edit only the name and description of the alert.

  1. In the Scaleway console (External link) side menu, go to Monitoring > Audit Trail.

  2. Click the Region dropdown and select the region for which you want to create alerts.

  3. Click the Alerts tab, then select Custom.

  4. Click Create alert. The alert creation wizard opens.

  5. Add a name and description for the alert.

  6. Set a severity (e.g., info, error, warning).

  7. Define a rule for the alert, using the visual builder or the code editor. The steps here assume that you are using the visual builder (for details on the code editor, see Use the code editor and CEL expressions):

    1. Select the type of event that you want to be alerted on (e.g., an event related to a product (Product name), an action (Method name), and so on).
    2. Select a function (is or is not).
    3. Select an event value from the dropdown (e.g., Instance, CreateAPIKey) or type a value in the freeform field.

    For example, you can set up an alert that triggers when users are deleted.

  8. If your alert requires multiple rules, click + Add to add another rule.

  9. Configure the condition that triggers the alert:

    1. Occurrence — Enter the number of times the condition must be met to trigger the alert. Example: Enter 5 to trigger an alert when 5 or more users are deleted.

    2. Timeframe — Enter the time window used to evaluate occurrences. Example: Enter 10 to evaluate user deletion events within a 10-minute window.

  10. Click Test alert to check if:

    • the syntax of your alert configuration is valid
    • there are currently any active events that match the alert rule you defined
  11. Once your configuration syntax is valid, click Create custom alert. The Overview page of your alert opens, showing the details of your new active alert.

Use the code editor and CEL expressions

If you wish to define a custom alert by writing the alert expression yourself, use the code editor. The code editor uses the Common Expression Language (CEL), which lets you define the events that trigger an alert.

Note

Changing from the code editor to the visual builder while creating a rule discards all details already defined for the rule.

Example CEL expression for an alert that is triggered when delete operations are executed from a specific IP address:

(methodName.startsWith("Delete") && sourceIp == "192.0.2.1")

Your alert expression is made up of:

  • event types
  • operators and/or functions
  • event values
Event typesOperators / Functions
The following event types are supported:

- method_name
- principal_id
- product_name
- project_id
- resource_id
- service_name
- source_ip
- status
Operators and functions can include the following:

- Equality and inequality operators (defined for all types): ==, !=
Examples: method_name == "GetKey", status != 200

- Comparison operators (only for integers): <=, <, >, >=
Example: status > 400

- Logical AND operator: &&
Example: method_name == "GetKey" && status != 200

- String functions (only for strings): contains, matches, startsWith, endsWith
Example: method_name.contains("Delete"), source_ip.matches("127.0.*.1")

Enable or disable a custom alert

You can enable or disable an existing custom alert in the following ways:

  • from the Overview page of the custom alert
  • from the Alert tab listing all your custom alerts (use this option to batch enable/disable multiple alerts at the same time)
Note

Charges apply even when a custom alert is disabled. In order no to be billed for a custom alert, you have to delete the alert.

To enable or disable an existing alert from its Overview page, follow these steps:

  1. In the Scaleway console (External link) side menu, go to Monitoring > Audit Trail.
  2. Click the Region dropdown and select the region where the alert has been created.
  3. Click the Alerts tab, then click Custom.
  4. Click more icon next to the alert that you want to enable/disable and select More info. The Overview page of the alert opens.
  5. Go to the Manage alert section and use the toggle to enable or disable your alert.

To enable or disable one or more existing alerts, use the Alert tab listing all your custom alerts:

  1. In the Scaleway console (External link) side menu, go to Monitoring > Audit Trail.
  2. Click the Region dropdown and select the region where the alert has been created.
  3. Click the Alerts tab, then click Custom.
  4. Check or uncheck Enabled to enable or disable your alert(s).
  5. Click Save changes at the bottom of the page to apply your configuration. A dialog box appears, confirming the action you are about to take. Click Save changes again.

Duplicate a custom alert to another region

  1. In the Scaleway console (External link) side menu, go to Monitoring > Audit Trail.
  2. Click the Region dropdown and select the region where the alert has been created.
  3. Click the Alerts tab, then click Custom.
  4. Click more icon next to the alert that you want to enable/disable and select Duplicate to other region(s). A dialog box opens.
  5. Review the details of the alert, select the Destination region, and click Duplicate.

Delete a custom alert

  1. In the Scaleway console (External link) side menu, go to Monitoring > Audit Trail.
  2. Click the Region dropdown and select the region where the alert has been created.
  3. Click the Alerts tab, then click Custom.
  4. Click more icon next to the alert that you want to delete and select Delete. A dialog box opens.
  5. Type DELETE and click Delete alert to confirm the deletion of your alert.
Tip

You can also delete an alert from the Settings tab of the alert.

Configure email address to receive notifications

The Alerting Management feature is linked to the notification manager. The email address set in the notification manager is where you will receive notifications when alerts are triggered.

For details on how to configure email addresses and notifications, see the related notification manager documentation.

Important

Because Audit Trail alerts are classified as Security notifications, ensure you set the email address(es) to subscribe to the Security notification type.

Email notifications contain:

  • details of the alert, such as:
    • name of the alert
    • time when the alert was triggered
    • behavior detected
    • severity
  • recommended actions to help you with investigation and mitigation steps
  • a link to check the Audit Trail page in the console
Still need help?

Create a support ticket
No Results