Skip to main content

In Flashduty

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 an integration
  3. Select EMQX 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 EMQX 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 EMQX

EMQX Cloud (hosted service) and self-hosted EMQX are integrated differently. Choose the steps that match your deployment.

EMQX Cloud (Hosted service)

EMQX Cloud provides a built-in Flashduty alert integration type:
  1. Log in to the EMQX Cloud console, enter your deployment, and go to Alerts → Alert Integrations
  2. Click + New under Webhook integration and select FlashDuty as the type
  3. Paste the Flashduty integration push URL into the URL field
  4. Click Confirm to save. You can then click Test to send a sample alert and verify that Flashduty receives it
Once configured, EMQX Cloud pushes alerts to the push URL with POST requests, carrying four labels: deployment_id, level, message, and region.

Self-hosted EMQX

For self-hosted EMQX, forward system alarm events to the push URL through the rule engine.
The rule engine supports the $events/sys/alarm_activated and $events/sys/alarm_deactivated system alarm events starting from EMQX 5.8.5. Make sure your EMQX version is 5.8.5 or later.
The quick Webhook setup on the EMQX Dashboard Monitoring → Alarms page pushes EMQX’s native alarm format, which does not match the event format required by Flashduty. Follow the steps below to customize the request body through the rule engine.
Step 1: Create a rule for alarm activation
  1. Log in to the EMQX Dashboard, go to Integration → Rules, and click Create Rule
  2. Enter the following statement in the SQL editor to match system alarm activation events:
  3. Add an HTTP Server action:
    • Set the connector URL to the Flashduty integration push URL (with the integration_key parameter)
    • Select POST as the request method
    • Fill in the request body with the following template, which converts alarm fields into the Flashduty standard alert event format:
    The ${name}, ${message}, and ${node} variables in the template are replaced with the field values output by the rule SQL.
  4. Save the rule
Step 2: Create a rule for alarm deactivationCreate another rule following Step 1, with the SQL statement matching alarm deactivation events:
Use the same request body template as Step 1, but set event_status to Ok, so the corresponding alert in Flashduty is automatically recovered when the alarm is deactivated.

Severity mapping

EMQX Cloud (hosted service): EMQX Cloud automatically maps alert levels as follows:Self-hosted EMQX: The alert severity is determined by the event_status field in the rule’s request body template. In the examples above, alarm activation pushes Critical and alarm deactivation pushes Ok. You can change the activation severity to Warning or Info in the template. Valid values of event_status are Critical, Warning, Info, and Ok.

FAQ