In Flashduty
You can obtain an integration push URL through either of these two methods:
Using Dedicated Integration
Choose this method when you don’t need to route alert events to different channels. It’s simpler and recommended.Using Shared Integration
Choose this method when you need to route alerts to different channels based on the alert event’s payload information.In ElastAlert 2
Configure ElastAlert 2 Alerts
Follow the ElastAlert Flashduty push configuration document- Create or edit the alert rule file, for example
rules/elastalert2_alert.yaml. - Fill in the
flashdutyalert type in thealertfield. - Fill in the integrated
integration keyin theflashduty_integration_keyfield. - The
flashduty_titleandflashduty_event_statusare required fields, and other fields can be filled in as needed. For the field definitions, please refer to the following table.
| Field | Required | Type | Definition |
|---|---|---|---|
| title | 是 | string | The alert title, it cannot exceed 512 characters. |
| event_status | 是 | string | The alert status. Enum values (capitalized): Critical:severe, Warning:warning, Info:reminder, Ok:recovery. When specified as Ok, it means automatic recovery of the alert. |
| alert_key | 否 | string | The alert identifier, used to update or automatically recover existing alerts. You can customize this value, but it cannot exceed 255 characters. You can also rely on the system to automatically generate this value, which will be returned in the response. If you report a recovery event, this value must exist. |
| description | 否 | string | The alert description |
| check | 否 | string | The alert check item |
| resource | 否 | string | The alert resource |
| service | 否 | string | The alert service name |
| metric | 否 | string | The alert metric name |
| group | 否 | string | The alert group |
| cluster | 否 | string | The alert cluster |
| app | 否 | string | The alert application |
| env | 否 | string | The alert environment |
- Restart ElastAlert and wait for the alert to trigger.