Skip to content
Cloudflare Docs

Enable Notifications

Magic Transit customers can configure Magic Tunnel health alerts to receive email, webhook, and PagerDuty notifications when the percentage of successful health checks for a Magic Tunnel drops below the selected service-level objective (SLO).

Magic Tunnel health alerts will monitor the health check success rate of each Magic Tunnel included in the alert that has actively transferred customer traffic (excluding health check traffic) over the past six hours. Customers can define an SLO threshold for the percentage of health checks that must be successful for each Magic Tunnel. If the number of successful health checks for the Magic Tunnel(s) included in the alert drops below the SLO threshold, then an alert will fire.

Alert data

If a Magic Tunnel health alert is fired, customers can expect the following data in the email, webhook, and PagerDuty notification:

  • Cloudflare account name
  • Cloudflare account ID
  • Alert type
  • Tunnel name
  • Tunnel ID
  • Tunnel status
  • Alert SLO
  • Timestamp

Set up Magic Tunnel health alerts

  1. Log in to your Cloudflare dashboard, and select your account.
  2. Select Notifications > Add.
  3. From the Product drop-down menu, select Magic Transit.
  4. Select Magic Tunnel Health Check Alert > Select to add a notification. You can add alerts by tunnel or by data center (beta).

Alert by tunnel

  1. Select Alert by tunnel.
  2. Enter a name and description for the notification.
  3. Add webhooks or an email address for the person who should receive the notification, and select Next.
  4. Select the Alert Sensitivity Level threshold from the dropdown menu. The threshold is predefined to Medium (98.0). There are options available between Minimum (95.0) and Maximum (99.9). Refer to Magic Tunnel health check calculation for more information on this topic.
  5. From the Alert interval drop-down menu, set the minimum amount of time that must pass before a duplicate alert is sent to you. Options range from five minutes to seven days.
  6. Enable Set as default alert for any new tunnels created in the future if you want the alert sensitivity level you chose to be automatically applied to all new tunnels you create.
  7. Select Next.
  8. Choose the tunnels you want to receive alerts for, and select Next.
  9. Review the details of your alert. If you are happy with them, select Create alert.

Alert by data center (beta)

  1. Select Alert by data center.
  2. Enter a name and description for the notification.
  3. Add webhooks or an email address for the person who should receive the notification, and select Next.
  4. Select the Alert Sensitivity Level threshold from the dropdown menu. The threshold is predefined to Medium (98.0). There are options available between Minimum (95.0) and Maximum (99.9). Refer to Magic Tunnel health check calculation for more information on this topic.
  5. From the Alert interval drop-down menu, set the minimum amount of time that must pass before a duplicate alert is sent to you. Options range from five minutes to seven days.
  6. Choose the data centers you want to receive alerts for, and select Next.
  7. Select the on-ramps for that data center you want to receive alerts for, and select Next.
  8. Review the details of your alert. If you are happy with them, select Create alert.

Test SLOs

To test whether a specific alert sensitivity level works for your use case:

  1. Create an alert with a specific sensitivity level for a tunnel with active traffic within the past six hours. If you are not sure of what tunnels to choose, refer to Network Analytics to learn how you can view real-time and historical data about your network.
  2. Disable the tunnel you are testing, so there is 100% health check failure.
  3. The time it takes for Cloudflare to send you an alert will depend on the sensitivity you chose for your alerts.

Other notifications

Cloudflare also recommends that you enable the following account notifications for your Magic Transit service:

  • Layer 3/4 DDoS Attack Alert
  • Route Leak Detection Alert (to detect BGP Hijacks)
  • (Optional) Advanced Layer 3/4 DDoS Attack Alert
  • (Optional) Cloudflare status - Maintenance Notification (in case you want to be alerted regarding maintenance in specific Cloudflare data centers).

Refer to Cloudflare Notifications for more information on how to enable these notifications.