In Flashduty On-call
You can obtain an integration push URL in either of the following ways.
Use a dedicated integration
- In the Flashduty console, select Channel and open a channel
- Select Configuration → Integrations → Private integration, then click Add an integration
- Select Mackerel, then click Save
- Open the generated integration card and copy the Push URL
Use a shared integration
- In the Flashduty console, select Integration Center → Alert Events
- Select Mackerel and enter an integration name
- Configure the default route and select a channel; after creation, add more rules under Route if needed
- Click Save and copy the generated Push URL
Configure Mackerel
1
Add a Webhook notification channel
- Sign in to Mackerel and click Channels in the left menu
- Create a notification channel and choose Webhook as its type
- Enter a channel name and paste the full Flashduty push URL into URL. The URL must include
integration_key - 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 - 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
- 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
- In Monitors, pick a monitor (for example, a host metric monitor) and temporarily lower its threshold so that it opens an alert
- Confirm that Flashduty receives an active alert
- 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 isworking(Mackerel does not send alert notifications for hosts instandby,maintenance, orpoweroff), 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