Skip to main content
Use a Mackerel Webhook notification channel to send Mackerel alerts to Flashduty On-call. Each Mackerel alert maps to one Flashduty alert: it triggers when the alert opens, updates when its status changes between Warning and Critical, and recovers when the alert closes.

In Flashduty On-call


You can obtain an integration push URL in either of the following ways.

Use a dedicated integration

  1. In the Flashduty console, select Channel and open a channel
  2. Select Configuration → Integrations → Private integration, then click Add an integration
  3. Select Mackerel, then click Save
  4. Open the generated integration card and copy the Push URL

Use a shared integration

  1. In the Flashduty console, select Integration Center → Alert Events
  2. Select Mackerel and enter an integration name
  3. Configure the default route and select a channel; after creation, add more rules under Route if needed
  4. Click Save and copy the generated Push URL

Configure Mackerel


1

Add a Webhook notification channel

  1. Sign in to Mackerel and click Channels in the left menu
  2. Create a notification channel and choose Webhook as its type
  3. Enter a channel name and paste the full Flashduty push URL into URL. The URL must include integration_key
  4. Under the events to notify, select only the alert (alert) event. Alert group, host status, host registration, host retirement, and monitor change events do not create alerts; Flashduty acknowledges them and returns success
  5. The graph image option (Include graph image) is on by default and adds a graph link to the alert labels; clear it if you don’t need the link
  6. Save the channel
2

Add the channel to a notification group

A new channel is added to the default notification group, which receives every notification in the organization. To send only some services or monitors to Flashduty, create a notification group on the Channels page, select those services and monitors, add the channel to that group, and remove it from the default notification group.
3

Verify

  1. In Monitors, pick a monitor (for example, a host metric monitor) and temporarily lower its threshold so that it opens an alert
  2. Confirm that Flashduty receives an active alert
  3. Restore the threshold. After Mackerel closes the alert, confirm that the Flashduty alert recovers. You can also click Close alert on the Mackerel alert page to close it manually; Flashduty recovers the alert in the same way

Alert Key


Flashduty uses the Mackerel alert’s alert.id as the Alert Key. A Mackerel alert keeps the same ID from the moment it opens, through status changes, until it closes, so these notifications merge into one Flashduty alert. When the same monitor fires again after its alert closed, Mackerel creates a new alert ID and Flashduty creates a new alert. Changes to the monitor name, message, metric value, or host status do not change the Alert Key. Alert notifications without alert.id are rejected.

Status and severity


Mackerel ranks Unknown at the same level as Critical, so Flashduty maps it to Critical. Closing an alert manually, deleting its monitor, retiring its host, or deleting its service all close the alert (alert.isOpen is false), and Flashduty recovers the alert.

Labels


The alert message and the monitor memo are written to the alert description.

Troubleshooting


  • Flashduty returns a parameter error: Make sure the URL is complete and includes integration_key
  • No alerts arrive: Make sure the channel subscribes to the alert (alert) event, the channel’s notification group includes the monitor, the host status is working (Mackerel does not send alert notifications for hosts in standby, maintenance, or poweroff), and the monitor’s notifications are not muted
  • Only Critical alerts arrive: The notification group has Critical only turned on, so Warning alerts are not sent
  • The channel shows as suspended: Mackerel suspends a channel after its notifications keep failing for a period of time. Fix the push URL, then click the warning icon next to the channel to unsuspend it
  • Restricting source IPs: See the Mackerel FAQ entry on the source IP addresses of notifications
For more on the payload fields, see Mackerel Webhook.