Skip to main content

Configuring alerts in Insights

Insights allows you to configure alerts. Alerts monitor specified metrics and notify you when they reach a certain threshold. For example, you can configure an alert to notify you when a build of any of your apps exceeds 15 minutes or consumes more than a 1000 credits.

You can configure alerts for:

  • Builds

  • Tests

  • Credit usage

For each category, you can set alerts for any of the available metrics: Available metrics in Insights.

For each alert, you have to choose how to receive the notification. There are three options:

Creating a new alert

You can create a new alert at any time in Insights:

  1. Open Insights for your app.

  2. Go to the Create alert page. To do so, you have two options:

    • Select Alerts from the left menu and click on Create alert.

      create-alert-button.png
    • Click on the bell icon above any metric in Builds, Tests, or Credits.

      bell.png
  3. Choose a metric type and a specific metric within that type in the Metric type section.

    You can choose from three main types:

    metric-type.png
  4. Set filters in the Filters section.

    You can configure the alert to apply to every single app in the Workspace, or you can filter it to a specific app, a Pipeline, a Pipeline Stage, a Workflow, or even a Step. You can also filter for branches, stacks, and machine types.

    filters.png
  5. In the Threshold section, choose a threshold.

    The threshold is the value that needs to be exceeded for the alert to fire. The exact nature of it depends on the metric you chose: for example, if you chose credit usage, you can set an amount of credits consumed to trigger an alert.

    threshold.png
  6. Choose the time period for the selected metric in the Granularity menu.

    For example, you can configure an alert to notify you if the build failure rate for builds over the last month goes above 10%.

    When are notifications sent?

    Insights alerts send notifications based on the granularity setting:

    • Last one hour: after the data for the given hour is complete. If triggered, the notification will be sent out when the next hour started

      Last one day: after the data  for the given day (in UTC) is complete. If triggered, the notification will be sent out on the next day morning at 6:00am UTC.

      Last one week: after the data for the given week (in UTC) is complete. If triggered, the notification will be sent out on the next Monday at 6:00am UTC.

      Last one month: after the data for the given month (in UTC) is complete. If triggered, the notification will be sent out on the first day on the next month at 6:00am UTC.

  7. In the Notification section, name the alert in the Alert name field.

  8. In the Notification providers section, click Add new and choose between three notification providers from the dropdown menu:

    • Slack: Create an incoming webhook that posts into a selected channel and paste the webhook URL. To do so, you need to create a Slack app and enable incoming webhooks in the app: Sending messages using incoming webhooks.

    • Teams: Create an incoming webhook for a selected Teams channel and paste the webhook URL: Create incoming webhooks for Teams.

    • Email: Set a valid email address. The alert will send a notification to the address.

    slack-notif.png
  9. When you're ready, click Create to finish the alert.

Editing an existing alert

Once an alert is in place in Insights, you can modify it at any time from the Alerts page. You can change the threshold, the granularity (the time period the alert applies to), or modify the notification providers.

Metric type can't be changed

You can't modify the metric type that the alert monitors. For example, if the alert is monitoring build failure rate, you can't change it to monitor credit usage instead. Similarly, you can't change the filtering: if you were monitoring a specific app, you can't change the alert to monitor a different app instead.

If you need a similar alert for a different metric or with a different filter, duplicate the existing alert: Duplicating an existing alert.

To edit an alert:

  1. Open Insights for your app.

  2. On the left, select Alerts.

    alerts.png
  3. Select the alert you need and on the right, click the View alert button.

    existing-alert.png
  4. On the alert's page, click the ellipsis in the top right corner to open the context menu.

    edit-alert.png
  5. Select Edit alert.

  6. Modify the threshold, the granularity, or the notification provider.

  7. Click Save.

Duplicating an existing alert

You can duplicate any existing alert and then modify it during the alert creation process. This allows users to quickly create new alerts based on existing ones.

To duplicate an alert:

  1. Open Insights for your app.

  2. On the left, select Alerts.

    alerts.png
  3. Select the alert you need and on the right, click the View alert button.

    existing-alert.png
  4. On the alert's page, click the ellipsis in the top right corner to open the context menu.

    edit-alert.png
  5. Select Duplicate.

  6. The duplicate feature takes you to the Create alert page, with the existing alerts values already set. Make your changes and then click Create at the bottom of the page.