Flashduty Docs
中文EnglishRoadmapAPI官网控制台
中文EnglishRoadmapAPI官网控制台
  1. Advanced Features
  • Introduction
  • On-call
    • Getting Started
      • Quick start
      • FAQ
      • Product Comparison
    • Incidents
      • What is an Incident
      • View Incidents
      • Handle Incidents
      • Escalations and Assignments
      • Custom Fields
      • Custom Actions
      • Alert Noise Reduction
      • Past Incidents
      • Outlier Incidents
    • Configure On-call
      • Channels
      • Integrate Alerts
      • Alert Noise Reduction
      • Escalation Rules
      • Label Enrichment
      • Schedules
      • Templates
      • Service Calendars
      • Preferences
      • Alert Routing
      • Silence and Inhibition
      • Filters
      • Notification Bots
      • Alert Pipeline
    • Advanced Features
      • Referencing Variables
      • Dynamic Assignment
      • Insights
    • Integrations
      • Alerts integration
        • Standard Alert Integration
        • Email Integration
        • Nightingale/FlashCat Integration
        • Prometheus Integration
        • Grafana Integration
        • Zabbix Integration
        • Uptime Kuma Integration
        • Alibaba Cloud ARMS Integration
        • Alibaba Cloud Monitor CM Event Integration
        • Alibaba Cloud Monitor CM Metrics Integration
        • Alibaba Cloud SLS Integration
        • AWS CloudWatch Integration
        • Azure Monitor Integration
        • Baidu Cloud BCM Integration
        • Huawei Cloud CES Integration
        • Influxdata Integration
        • Open Falcon Integration
        • PagerDuty Integration
        • Tencent BlueKing Integration
        • Tencent Cloud CLS Integration
        • Tencent Cloud Monitor CM Integration
        • Tencent Cloud EventBridge
        • OceanBase Integration
        • Graylog Integration
        • Skywalking Integration
        • Sentry Integration
        • Jiankongbao Integration
        • AWS EventBridge Integration
        • Dynatrace Integration
        • Huawei Cloud LTS Integration
        • GCP Integration
        • Splunk Alert Events Integration
        • AppDynamics Alert Integration
        • SolarWinds Alert Events Integration
        • Volcengine CM Alert Events Integration
        • Volcengine CM Event Center Integration
        • Volcengine TLS Integration
        • OpManager Integration
        • Meraki Integration
        • Keep Integration
        • ElastAlert2 Alert Integration
        • StateCloud Alert Events
        • Guance Alert Events
        • Zilliz Alert Events
        • Huawei Cloud APM Alerts
        • zstack integration
      • Change integration
        • Standard Change Event
        • Jira Issue Events
      • IM integration
        • Feishu (Lark) Integration Guide
        • Dingtalk Integration
        • WeCom Integration
        • Slack Integration
        • Microsoft Teams Integration
      • Single Sign-On
        • Authing Integration
        • Keycloak Guide
        • OpenLDAP Guide
      • Webhooks
        • Alert webhook
        • Incident webhook
        • Costom action
  • RUM
    • Getting Started
      • Introduction
      • Quick start
      • FAQ
    • Applications
      • Applications
      • SDK Integration
      • Advanced Configuration
      • Analysis Dashboard
    • Performance Monitoring
      • Overview
      • Metrics
      • Performance Analysis
      • Performance Optimize
    • Error Tracking
      • Overview
      • Error Reporting
      • Issues
      • Source Mapping
      • Error Grouping
      • Issue States
      • Issue Alerting
    • Others
      • Terminology
      • Data Collection
      • Data Security
  • Platform
    • Teams and Members
    • Permissions
    • Single Sign-On
  • Terms
    • Terms of Service
    • User Agreement/Privary Policy
    • SLA
    • Data Security
  1. Advanced Features

Dynamic Assignment

Implement label-based dynamic alert assignment and integrate with your custom systems.

Use Cases


Alert responders are maintained in the source monitoring system and frequently updated, requiring timely synchronization with Flashduty.

Case 1:

Customer A has a custom big data task system where internal staff can create various data batch processing tasks. Each task can be configured with primary and secondary responders. When a batch processing task fails, the system prioritizes notifying the primary responder. If the alert remains unresolved after 30 minutes, it escalates to the secondary responder.

Case 2:

Customer B uses Zabbix for host monitoring and has set a responder tag for each host. They want alerts for a host to notify the corresponding responder based on this tag.

Case 3:

Customer C has a custom monitoring system with multiple alert policies, each configured to notify a specific WeCom group. The customer wants to migrate incident response to Flashduty while maintaining the original policy-to-WeCom group relationships and dynamically notify WeCom groups based on these relationships.

Implementation


Add specific labels or query parameters to override Flashduty's assignment targets for dynamic assignment.

Parameter format:

  • Replace Responders:
    • Parameter Name: Must match regex: ^layer_person_reset_(\d)_emails$, level number starts from 0. E.g., layer_person_reset_0_emails represents replacing responders in level 1 of the escalation rule.
    • Parameter Value: Responder email addresses, multiple addresses separated by ",". E.g., zhangsan@flashcat.cloud,lisi@flashcat.cloud will replace responders with Zhang San and Li Si.
    • Parameter Location: Query parameter or label value. E.g., set in N9E alert or automatically generate through label enhancement.
  • Replace Team:
    • Parameter Name: Must match regex: ^layer_person_reset_(\d)_team_names$, level number starts from 0. E.g., layer_person_reset_0_team_names represents replacing team in level 1 of the escalation rule.
    • Parameter Value: Team name, multiple teams separated by ",". E.g., A ,B , replace team with A and B.
    • Parameter Location: Query parameter or label value. E.g., set in N9E alert or automatically generate through label enhancement.
  • Replace WeCom Group Bot:
    • Parameter Name: Must match regex: ^layer_webhook_reset_(\d)_wecoms$, level number starts from 0. E.g., layer_webhook_reset_0_wecoms represents replacing WeCom group bot in level 1 of the escalation rule.
    • Parameter Value: Target group bot token, multiple tokens separated by ",". E.g., bbb025a0-e2e8-4b79-939d-82c91a275b06 will replace the group bot with the corresponding bot for this token.
    • Parameter Location: Query parameter or label value. E.g., set in N9E alert or automatically generate through label enhancement.
  • Replace DingTalk Group Bot:
    • Parameter Name: Must match regex: ^layer_webhook_reset_(\d)_dingtalks$, level number starts from 0. E.g., layer_webhook_reset_0_dingtalks represents replacing DingTalk group bot in level 1 of the escalation rule.
    • Parameter Value: Target group bot token, multiple tokens separated by ",". E.g., bbb025a0-e2e8-4b79-939d-82c91a275b06 will replace the group bot with the corresponding bot for this token.
    • Parameter Location: Query parameter or label value. E.g., set in N9E alert or automatically generate through label enhancement.
  • Replace Feishu Group Bot:
    • Parameter Name: Must match regex: ^layer_webhook_reset_(\d)_feishus$, level number starts from 0. E.g., layer_webhook_reset_0_feishus represents replacing Feishu group bot in level 1 of the escalation rule.
    • Parameter Value: Target group bot token, multiple tokens separated by ",". E.g., bbb025a0-e2e8-4b79-939d-82c91a275b06 will replace the group bot with the corresponding bot for this token.
    • Parameter Location: Query parameter or label value. E.g., set in N9E alert or automatically generate through label enhancement.

提示

When an incident triggers, Flashduty matches existing escalation rules. After matching a rule, it follows the levels for assignment or escalation. If the above parameters are set, the system automatically replaces the responders or group channels.

In the matched escalation rule, only the responders and group targets are changed while other settings remain unchanged, effectively acting as a template escalation rule.

Push Examples


Set Template Escalation Rule

Configure an escalation rule for the channel. As shown below, this channel has only one assignment level, with Flashcat as the responder and a WeCom group with token ending in 5b96.

Set Alert Labels

Using custom alert event integration as an example, we'll push a sample alert to the target channel. We set the layer_person_reset_0_emails label to replace level one responders with guoyuhang and yushuangyu. We also set layer_webhook_reset_0_wecoms label to replace level one WeCom group token with one ending in d9c0.

Request content:

curl --location --request POST 'https://api.flashcat.cloud/event/push/alert/standard?integration_key=your-integration-key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "event_status": "Warning",
    "alert_key": "lasdfl2xzasd0262",
    "description": "cpu idle lower than 20%",
    "title_rule": "$cluster::$resource::$check",
    "labels": {
        "service": "engine",
        "cluster":"nj",
        "resource":"es.nj.01",
        "check":"cpu.idle<20%",
        "metric":"node_cpu_seconds_total",
        "layer_person_reset_0_emails": "guoyuhang@flashcat.cloud,yushuangyu@flashcat.cloud",
        "layer_webhook_reset_0_wecoms":"90dbb66b-af39-4235-956c-636a9c1ed9c0"
    }
}'

View Incident Assignment Timeline

As shown below, the target incident triggered and was assigned normally. Both the responders and target group were replaced as expected.

FAQ


What if my monitoring system doesn't have these labels?
  1. If your system supports adding labels actively, such as Prometheus or N9E, we recommend adding specific labels directly in the alert policy.
  2. If your system already has relevant labels but with different formats or names, for example, if your hosts have team labels and you need to find corresponding responders based on teams, you can use the label enhancement feature to generate responder-related labels from team labels. For details, please refer to Configure Label Enhancement.

添加官方技术支持微信

在这里,获得使用上的任何帮助,快速上手FlashDuty

微信扫码交流
上一页
Referencing Variables
下一页
Insights
Built with