Skip to main content
Push Logease (rizhiyi) alert events to Flashduty through a custom alarm plugin.

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.
  1. In the Flashduty console, select Channel and open a channel
  2. Select Configuration → Integrations → Private integration, then click Add integration
  3. Select Logease integration and click Save to generate a card
  4. 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.
  1. In the Flashduty console, go to Integration Center → Alert Events
  2. Select Logease integration:
    • Integration Name: Define a name for this integration
  3. Configure the default route and select a channel. You can add more rules under Routing after creation
  4. Click Save and copy the generated Push URL

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:

FAQ