firing) and recoveries (resolved) to Flashduty On-call. Each alert rule on each monitored target maps to one Flashduty alert: it is created when the rule fires and closed automatically when it resolves.
In Flashduty On-call
Get the push URL in either of two ways.
Use a dedicated integration
- In the Flashduty console, select Channels and open a channel
- Select Settings → Integration data → Dedicated integration, then click Add an integration
- Select Apache HertzBeat and 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 Apache HertzBeat and enter an integration name
- Set the default route and pick a channel; you can add more rules under Routes after creation
- Click Save and copy the generated push URL
Configure HertzBeat
1
Add a notice receiver
- Log in to HertzBeat and go to Alerting → Notification → Notice Receiver → New Receiver
- Enter a receiver name and select WebHook as the Notice Type
- Paste the full Flashduty push URL into URL
- Click Send Alert Test Msg to check connectivity, then save
2
Add a notice policy
A new receiver gets no alerts by itself. Under Alerting → Notification → Notice Policy, click New Notice Policy to add a policy that selects the receiver and, if needed, the severities and labels to notify, then save.
3
Verify the lifecycle
Make an alert rule fire (for example, stop a monitored port) and confirm Flashduty receives an active alert. When the rule condition no longer holds, HertzBeat sends a
resolved notification and the Flashduty alert recovers automatically.Payload
HertzBeat POSTs the default template as JSON. One request can carry several alerts in
alerts, and Flashduty handles each one:
commonLabels and commonAnnotations are not read.
Alert Key
The HertzBeat payload carries no alert ID. Flashduty builds the Alert Key from
alertname, instance and defineid in alerts[].labels. In real HertzBeat 1.9.0 deliveries these three values were identical on trigger, repeated notification while firing, and recovery, so all three land on one Flashduty alert. Changing the severity, content or monitor name does not change the Alert Key.
A request without labels.alertname is rejected with a parameter error, because a recovery could not be tied to its alert. A missing instance or defineid counts as empty.
Status and severity
A request with any other
status, or an empty alerts, is rejected. In the default template commonLabels.severity is rewritten to decorated text (such as “Critical”), so it is not used for severity.
FAQ
What does Flashduty show after I click Send test message?
What does Flashduty show after I click Send test message?
The button sends a fixed firing request (rule name
CPU Usage Alert, instance 127.0.0.1, content starting with test send msg!). Flashduty returns HTTP 200 and opens a separate Info alert under its own Alert Key, so it never merges into a real alert. No recovery follows; close it by hand in the channel.Does a long-firing alert create duplicates?
Does a long-firing alert create duplicates?
No. HertzBeat resends
firing while the alert stays active. The Alert Key is the same, so Flashduty merges them into one alert.An availability alert did not close in Flashduty after the monitor came back?
An availability alert did not close in Flashduty after the monitor came back?
Flashduty recovers an alert only when HertzBeat sends
resolved. On HertzBeat 1.9.0 an availability alert recovers and sends resolved when the same target comes back up. If you edit the monitor’s host or port while the alert is firing, the alert’s instance label no longer matches any monitor, so the original alert stays firing and sends no resolved. Restore the original target, or close the alert in the HertzBeat alert center.Troubleshooting
- Flashduty receives no alerts: confirm the URL is the full push URL (with
integration_key), a notice policy exists, and the alert matches it - Flashduty returns a parameter error: confirm the body is the default HertzBeat template JSON,
statusisfiringorresolved, and every alert haslabels.alertname - An alert does not recover: confirm HertzBeat sent
resolvedand that itsalertname,instanceanddefineidequal those of the trigger