Skip to main content
Kapacitor’s post event handler sends every alert event as JSON by HTTP POST to a URL. The body is Kapacitor’s alert data (id, message, details, time, duration, level, data, previousLevel, recoverable), and the Flashduty InfluxData integration parses this format, so no separate Kapacitor integration is needed: create an InfluxData integration in Flashduty and paste its push URL into Kapacitor.

In Flashduty On-call


Get an integration push URL in either of the two ways below. Choose the InfluxData integration type in both.

Use a dedicated integration

  1. In the Flashduty console, go to Channels and open a channel
  2. Go to Settings → Integrations → Dedicated integrations and click Add an integration
  3. Select InfluxData and click Save
  4. Open the generated integration card and copy the Push URL, in the form https://api.flashcat.cloud/event/push/alert/influxdata?integration_key=<integration key>

Use a shared integration

  1. In the Flashduty console, go to Integration Center → Alert Events
  2. Select InfluxData and enter an integration name
  3. Configure the default route and select a channel; you can add more rules under Routes after creation
  4. Click Save and copy the generated Push URL

Configure in Kapacitor


Use any one of the three ways below. Always enter the full push URL, including ?integration_key=....
1

Put the URL in the TICKscript

Add post to the alert() node:
2

Or use an endpoint from kapacitor.conf

Define an [[httppost]] in kapacitor.conf and refer to it by name, so the integration key is not written into every script:
3

Or use a topic handler

When several tasks send alerts to one topic, define the handler once. Handler file flashduty.yaml:
Then run kapacitor define-topic-handler flashduty.yaml and use .topic('cpu-alerts') on the task’s alert() node.
Adding a post handler in the Chronograf 1.x Alert Rule Builder uses this same Kapacitor handler; see the InfluxData integration for those steps.

Field mapping


For any other level, Flashduty rejects the event with level ... is not supported.

Recovery and deduplication


  • When the level returns to OK, Kapacitor sends an event with level OK, and Flashduty closes the alert with the same id. Do not use .noRecoveries() on alert(), or Kapacitor sends no recovery events.
  • The default id is {{ .Name }}:{{ .Group }} (measurement name and group). If you set a custom .id(), make sure the trigger and the recovery of one object use the same value.
  • To see Flashduty’s error in the Kapacitor log, add .captureResponse() to .post() (capture-response: true for a topic handler); the response is logged when the status is not 2xx.

Troubleshooting


  • Flashduty returns Invalid parameters: the push URL is incomplete, integration_key is missing, or the integration type is not InfluxData
  • level ... is not supported: the level in the body is not CRITICAL, WARNING, INFO or OK; make sure the original Kapacitor alert data is sent, not a forwarded or rewritten body
  • An alert does not recover: confirm the recovery event has the same id as the trigger and that the task emits an OK event
  • No alerts arrive: confirm the Kapacitor host can reach api.flashcat.cloud