Custom Actions
title: "Custom Actions"
description: "Introduction to Flashduty Custom Actions."
date: "2024-11-20T10:00:00+08:00"
url: "https://developer-en.flashcat.cloud/en/flashduty/webhook/custom-action"
Configuring incident custom actions allows you to quickly call external interfaces during incident investigation, enabling incident auto-healing, information enrichment, and any other custom operations.
I. Creating Actions
- Log in to the FlashDuty Console and go to [Integration Center - Webhook]
- Click to add a Custom Action integration
- Configure the action name, which will appear as a button in incident details
- Configure channels - you can configure multiple channels, but each channel can have at most three custom actions
- Configure Endpoint and custom Headers
- Save to complete
II. Push Description
Request Method
POST, Content-Type:"application/json"
Request Payload:
[Detailed payload structure omitted for brevity - identical to the Chinese version]
Response
HTTP status code 200 indicates successful push.
Request Example
[Example code omitted for brevity - identical to the Chinese version]
III. Use Cases
Restart Host
When host memory or CPU is maxed out, trigger host restart scripts to quickly complete host restart.
Information Enrichment
When an incident occurs, callback to your service to retrieve Tracing, Logging, topology and other information based on alert details, actively call FlashDuty Open API to update incident information, such as adding labels or setting custom fields to assist troubleshooting.
Rollback Changes
When an incident occurs, if determined to be caused by changes, directly trigger callback to your deployment platform to initiate rollback process, accelerating incident recovery.
Update Status Page
When confirmed that an incident affects online services, trigger external status page updates to promptly notify your customers or upstream/downstream dependencies.
IV. Common Questions
Is there a response timeout for the service?
- The service must respond within 1 second, otherwise it will be considered as a failed response
Trusted IP whitelist for push sources?
- 47.94.95.118, 123.56.8.183, 47.94.193.81, 1.13.19.96
- May be updated in the future, please check periodically