In Flashduty On-call
You can get the integration push URL in either of the following ways.Use a dedicated integration
Choose this option if all alerts go to one channel. It’s the simpler setup.View dedicated integration setup steps
View dedicated integration setup steps
- In the Flashduty console, select Channel and open a channel
- Select Configuration → Integrations → Private integration, then click Add integration
- Select Logease integration and click Save to generate a card
- Open the generated integration card and copy the Push URL
Use a shared integration
Choose this option if you need to route alerts to different channels based on the alert payload.In Logease
Logease alerts can be delivered through email, syslog, alert forwarding, or custom alarm plugins. The JSON structure pushed by alert forwarding is a fixed Logease format that does not match the event format required by Flashduty. Therefore, use a custom alarm plugin (a Python script) to convert alerts into the standard format before pushing them to Flashduty.1
Write the Logease alarm plugin script
Where: A local file
FlashdutyWebhook.py on the Logease hostThe script content is as follows; replace
push_url with your Flashduty integration push URL:2
Upload the alarm plugin
Where: Logease › Monitoring › Others › Alarm PluginsUpload the script file from the previous step.
3
Reference the plugin in monitoring items
Where: Logease › Monitoring › the monitoring item to connect to Flashduty › Add Alarm MethodSelect the uploaded plugin and save. Logease also supports Manager plugins (for the platform’s own monitoring) and Soar plugins (for playbooks); they are written in the same way as the example above and can be extended as needed.
4
Trigger an alarm and confirm Flashduty receives the event
Where: Logease › Monitoring › the monitoring itemThe plugin is triggered by real alarms, so wait for the monitoring item to raise one. When the alarm recovers,
is_alert_recovery is true and the plugin pushes an Ok event, which recovers the corresponding alert in Flashduty. After a few seconds, go back to Flashduty. If the integration shows a Latest event time, the setup works; if nothing arrives, check the plugin run log, see the FAQ below.The events pushed by the plugin must follow the Flashduty standard alert event format:
event_status is required (one of Critical, Warning, Info, Ok), title_rule is the alert title, alert_key is used to update or automatically recover alerts, and labels carries alert labels. For the full field reference, see Standard Alert Event.Status and severity
The mapping from Logease alert levels to Flashduty severities is defined by
LEVEL_MAP in the plugin script. The example above uses the following mapping, which you can adjust as needed: