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
- In the Flashduty console, go to Channels and open a channel
- Go to Settings → Integrations → Dedicated integrations and click Add an integration
- Select InfluxData and click Save
- 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
- In the Flashduty console, go to Integration Center → Alert Events
- Select InfluxData and enter an integration name
- Configure the default route and select a channel; you can add more rules under Routes after creation
- 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 Then run
flashduty.yaml:kapacitor define-topic-handler flashduty.yaml and use .topic('cpu-alerts') on the task’s alert() node.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 withlevelOK, and Flashduty closes the alert with the sameid. Do not use.noRecoveries()onalert(), or Kapacitor sends no recovery events. - The default
idis{{ .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: truefor a topic handler); the response is logged when the status is not 2xx.
Troubleshooting
- Flashduty returns
Invalid parameters: the push URL is incomplete,integration_keyis missing, or the integration type is not InfluxData level ... is not supported: thelevelin the body is notCRITICAL,WARNING,INFOorOK; 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
idas the trigger and that the task emits anOKevent - No alerts arrive: confirm the Kapacitor host can reach
api.flashcat.cloud