1. Create Action
- Login to Flashduty console, go to Integration Center - Webhook
- Click to add Custom Action integration
- Configure Action Name—this name will appear as a button in incident details
- Configure Channels—you can configure multiple, but each channel can have at most three Custom Actions
- Configure Endpoint and custom Headers
- Save to complete
2. Push Description
Request Method
POST, Content-Type:“application/json”
Request Payload:
| Field | Type | Required | Description |
|---|---|---|---|
| event_time | int64 | Yes | Event timestamp in milliseconds |
| event_type | string | Yes | Event type, fixed value i_custom |
| event_id | string | Yes | Event ID, the same event may retry multiple times due to timeout, receiver needs to deduplicate |
| person | Person | No | Operator, only exists for human actions |
| incident | Incident | Yes | Incident details |
| Field | Type | Required | Description |
|---|---|---|---|
| person_id | int64 | Yes | Person ID |
| person_name | string | Yes | Person name |
| string | Yes | Email address |
| Field | Type | Required | Description |
|---|---|---|---|
| person_id | int64 | Yes | Person ID |
| person_name | string | Yes | Person name |
| string | Yes | Email address | |
| assigned_at | int64 | No | Assignment time |
| acknowledged_at | int64 | No | Acknowledgment time |
| Field | Type | Required | Description |
|---|---|---|---|
| incident_id | string | Yes | Incident ID |
| title | string | Yes | Incident title |
| description | string | No | Incident description |
| impact | string | No | Incident impact |
| root_cause | string | No | Incident root cause |
| resolution | string | No | Incident resolution |
| incident_severity | string | Yes | Severity, enum: Critical, Warning, Info |
| incident_status | string | Yes | Incident status, enum: Critical, Warning, Info, Ok |
| progress | string | Yes | Progress, enum: Triggered, Processing, Closed |
| created_at | int64 | Yes | Created time |
| updated_at | int64 | Yes | Updated time |
| start_time | int64 | Yes | Trigger time, Unix seconds timestamp |
| last_time | int64 | No | Latest event time, latest event push time in associated alerts, Unix seconds timestamp, default 0 |
| end_time | int64 | No | Recovery time, incident auto-recovers when all associated alerts recover, Unix seconds timestamp, default 0 |
| ack_time | int64 | No | First acknowledgment time, incident can be acknowledged by multiple people, this is the earliest acknowledgment time. Unix seconds timestamp, default 0 |
| close_time | int64 | No | Close time, end_time represents incident recovery time, close_time represents progress close time, incident closes when recovered, closing doesn’t affect recovery. Unix seconds timestamp, default 0 |
| snoozed_before | int64 | No | Snooze deadline |
| labels | map[string]string | No | Label KV, both Key and Value are strings. Not present for manual creation, for auto creation it’s the labels of the first grouped alert |
| fields | map[string]interface | No | Custom field KV, Key is string, Value can be any type depending on field type |
| creator | Person | No | Creator info, only exists for manually created incidents |
| closer | Person | No | Closer info, only exists for manually closed incidents |
| responders | []Responder | No | Responders list |
| alerts | Alert | No | Associated alerts |
| alert_cnt | int64 | No | Associated alert count |
| channel_id | int64 | No | Channel ID, 0 means not belonging to any channel |
| channel_name | string | No | Channel name |
| detail_url | string | Yes | Detail URL |
| group_method | string | No | Grouping method, enum: n: no grouping, p: rule-based grouping, i: intelligent grouping |
| Field | Type | Required | Description |
|---|---|---|---|
| alert_id | string | Yes | Alert ID |
| data_source_id | int64 | Yes | Integration ID |
| title | string | Yes | Alert title |
| description | string | No | Alert description |
| alert_key | string | Yes | Alert association key |
| alert_severity | string | Yes | Severity, enum: Critical, Warning, Info |
| alert_status | string | Yes | Alert status, enum: Critical, Warning, Info, Ok |
| progress | string | Yes | Progress, enum: Triggered, Closed |
| created_at | int64 | Yes | Created time |
| updated_at | int64 | Yes | Updated time |
| start_time | int64 | Yes | First trigger time (time of first event received by platform), Unix seconds timestamp |
| last_time | int64 | Yes | Latest event time (time of latest event received by platform), Unix seconds timestamp |
| end_time | int64 | No | Alert recovery time (time platform last received end-type event), Unix seconds timestamp, default 0 |
| close_time | int64 | No | Close time, different from end_time, this is progress close, doesn’t mean alert truly recovered. Unix seconds timestamp, default 0 |
| labels | map[string]string | No | Label KV, both Key and Value are strings |
Request Response
HTTP status code 200 indicates successful push.Request Example
3. Use Cases
Restart Host
When host memory or CPU is maxed out, trigger a host restart script to quickly complete the restart.Information Enrichment
When an incident occurs, callback to your service to retrieve Tracing, Logging, topology and other information based on alert details, then proactively 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 it’s determined to be caused by a change, directly trigger a callback to your deployment platform to start the rollback process and accelerate incident recovery.Update Status Page
When an incident is confirmed to impact production services, trigger external status page updates to promptly notify your customers or upstream/downstream parties.4. FAQ
-
Is there a response timeout?
- Service needs to return response within 1 second; exceeding 1 second is considered a failure
- Will pushes continue after failure?
- context deadline exceeded (excluding awaiting headers)
- i/o timeout
- eof
- Trusted IP whitelist for push source?
- May be updated in the future, please check regularly