Flashduty Docs
中文EnglishRoadmapAPI官网控制台
中文EnglishRoadmapAPI官网控制台
  1. Configure On-call
  • 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
      • Other
        • Link Integration
  • 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. Configure On-call

Filters

Filter conditions in Flashduty are used to match different alerts, incidents, or events. Through filter conditions, we can screen specific objects for further operations. This article introduces the design and configuration methods of filter conditions.

Where Are Filters Used?#


Filter conditions are applied in the following scenarios:
1.
Escalation Rules: Multiple escalation rules can be created within the same channel, each with different filter conditions. You can set different responders for different incidents.
2.
Silence Rules: Set filter conditions to match specific incidents, and matched incidents will be silenced.
3.
Inhibit Rules: Set filter conditions to match both newly triggered incidents and existing active incidents. When new incidents meet the conditions, they will be inhibited.
4.
Alert Grouping: Alert grouping supports default grouping dimensions, but when you need fine-grained control, you can set filter conditions to match specific alerts and set new grouping dimensions for these incidents.
5.
Routing Rules: When using alert integration in the integration center, you can set global routing matching rules. Use different filter conditions to match different alerts and route them to specific channels.
6.
Label Enhancement: Set filter conditions to match specific alerts, and generate labels according to rules for alerts that meet the conditions.

How to Configure Filters?#


Rule Design#

Flashduty has abstracted the entire filter condition system, aiming to achieve minimal configuration while meeting most scenario requirements.
The overall judgment logic is divided into multiple groups of conditions:
Conditions within a group have an and relationship, meaning all conditions must match for the group to match.
Groups have an or relationship with each other, meaning if any group matches, the overall condition matches.
Each condition consists of a field, operator (oper), and target values. There are only two types of operators:
Match: There can be multiple values, and if any value matches, the condition is satisfied.
Not Match: There can be multiple values, and if none of the values match, the condition is satisfied.
提示
The target values in conditions are all strings. They support multiple matching methods including exact, regex, wildcard, CIDR matching, and numeric comparison.
drawing
As shown above, we have two groups of conditions, each with two conditions and multiple matching values. If the severity is "Critical" or "Warning" AND the check label equals "Binlog Sync Delay", the overall condition is satisfied. Alternatively, if the check label contains any of "cpu", "io", or "disk" AND the value label is greater than 90, the overall condition is also satisfied. We can also describe the filter conditions with an intuitive expression:
( severity == Critical|Warning && labels.check == Binlog Sync Delay )
or
( labels.check == /cpu/|/io/|/disk/ && labels.value == num:gt:90 )

Regex Filtering#

When a value string is prefixed and suffixed with /, the entire value will be treated as a regex. The target value must match this regex to be considered a match.
Example:
labels.check: /down/, matches when the check label contains "down".
提示
Flashduty uses the RE2 regex standard platform-wide. Some Perl syntax may not work. You can use AI Chatbot to generate expressions and verify them at RE2 Playground.

Wildcard Filtering#

When a value string contains * or ? without / prefix/suffix, it will be treated as a wildcard. Currently, only * and ? are supported, where * matches zero or more characters, and ? matches any single character. The target value must match this wildcard string to be considered a match.
Example:
labels.check: down*, matches when the check label starts with "down".
提示
You can use * to check if a field Exists or NotExists.
If a field matches *, it means the field must exist. If a field does not match *, it means the field must not exist.

CIDR Matching#

When a value is prefixed with cidr, the entire value will be treated as an IP range.
Example:
labels.host: cidr:10.0.0.206/24, matches when the IP label is within the "10.0.0.206/24" range.

Numeric Comparison#

When a value is prefixed with num:[gt|ge|lt|le]:, it will be treated as a numeric comparison. The comparison rules are:
gt: greater than
ge: greater than or equal to
lt: less than
le: less than or equal to
Example:
labels.value: num:ge:90, matches when the value label is greater than or equal to 90.

Exact Value Filtering#

When a value doesn't match any of the above formats, it will be treated as an exact match. Only when the strings are exactly equal will it be considered a match.

FAQ#


Why doesn't the system suggest available labels?
Flashduty receives large amounts of data, and to ensure system stability, it only searches for and deduplicates labels from up to 500 alert events within the past 24 hours. Therefore, the available labels may change dynamically, and no labels may be available if there's no new data in the past 24 hours.
In this case, you can manually enter labels.
My regex passes offline validation, why doesn't it match in the system?
Flashduty uses the RE2 regex standard platform-wide. Some Perl syntax may not work. You can use AI Chatbot to generate expressions and verify them at RE2 Playground.

添加官方技术支持微信

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

微信扫码交流
修改于 2024-11-25 08:25:45
上一页
Silence and Inhibition
下一页
Notification Bots
Built with