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
  • 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

Templates

When Are Templates Used?#


The system uses templates to render Incident when assigning incidents, which may occur in the following scenarios:
1.
Manually create and assign an incident
2.
When an alert event is reported, the system automatically generates an incident and assigns it according to the matched escalation rule
3.
After an incident is created, manually change the assignment (reassign)
4.
System automatically escalates according to escalation rule settings
5.
When reopening a closed incident, reassign according to previous settings
We use Golang template syntax template/html to parse data, enabling you to accomplish any complex rendering requirements.
For documentation, please refer to here, supporting logical conditions, loops, pipelines, and common functions;
We've incorporated the open-source library sprig, which includes hundreds of common functions that you can directly call in templates;
If you wish to introduce more functions, feel free to submit a merge request

How to Configure Notification Templates?#


Configure Notification Templates#

The system uses the default template when notifying incidents, which cannot be modified. If you need to customize the notification content, you should create a custom template.
1.
Enter the Templates page, click the Create Custom Template button or Copy Default Template, and enter the editing page.
2.
In the editing page, you can edit the content according to the notification channel used, and reference the content in the template can refer to [What Variables Can I Reference?](#What Variables Can I Reference?)
3.
After editing, click the Save button to save the template.

Use Notification Templates#

1.
Enter the Channel -> Escalation Rules page, click the Edit button, and enter the editing page.
2.
In the strategy configuration section, you can select the template to use which template for notification, and select the notification template to use.
3.
Other configurations can refer to Escalation Rules Configuration.
4.
After configuration, click the Save button to save the escalation policy.

What Variables Can I Reference?#


Variable Reference Examples:
Complete Variable List (Direct Reference):
FieldTypeRequiredDescription
IDstringYesIncident ID
TitlestringYesIncident title
DescriptionstringYesIncident description, can be empty
DetailUrlstringYesIncident detail page URL
NumstringYesShort incident identifier, for easy visual recognition, may be duplicate
IncidentSeveritystringYesSeverity level, enum values: Critical, Warning, Info
IncidentStatusstringYesIncident status, enum values: Critical, Warning, Info, Ok
ProgressstringYesProcessing progress, enum values: Triggered, Processing, Closed
StartTimeint64YesTrigger time, Unix timestamp in seconds
LastTimeint64NoLatest event time, latest incorporated event time in associated alerts, Unix timestamp in seconds, default 0
EndTimeint64NoRecovery time, when all associated alerts recover, the incident will automatically recover and close. Unix timestamp in seconds, default 0
SnoozedBeforeint64NoSnooze end time, Unix timestamp in seconds, default 0
AckTimeint64NoFirst acknowledgment time, Unix timestamp in seconds, default 0
CloseTimeint64NoClose time, end_time is incident recovery time, close_time is processing progress close time. Incident automatically closes upon recovery, manual closure doesn't affect recovery. Unix timestamp in seconds, default 0
CreatorPersonNoCreator information, not present when automatically generated by system
CloserPersonNoCloser information, not present when incident recovers automatically
AssignedToAssignmentNoAssignment configuration
Responders[]ResponderNoResponder list, initialized based on assignment configuration, also includes records if non-assigned personnel acknowledge the incident
ChannelIDint64NoChannel ID, value is 0 when manually creating global incident
ChannelNamestringNoChannel name
GroupMethodstringNoGrouping method, enum values: n: no grouping, p: rule-based grouping, i: intelligent grouping
Labelsmap[string]stringNoLabel key-value pairs, both Key and Value are strings. No information when manually created, contains first alert's label information when automatically created
AlertCntint64YesNumber of associated alerts
Alerts[]AlertNoAssociated alert details, no information when manually created
FireTypestringNoNotification type, enum values: fire: notify, refire: loop notification
IsFlappingboolNoWhether in flapping state, i.e., frequent occurrence and recovery, related to convergence configuration
ImpactstringNoIncident impact, filled after incident closure
RootCausestringNoRoot cause, filled after incident closure
ResolutionstringNoResolution, filled after incident closure
Person (Indirect Reference):
FieldTypeRequiredDescription
person_idint64YesPerson ID
person_namestringYesPerson name
emailstringYesEmail address
Assignment (Indirect Reference):
FieldTypeRequiredDescription
PersonIDs[]stringNoPerson ID list, exists only when assigning by person
EscalateRuleIDstringNoEscalation rule ID, exists only when assigning by rule
EscalateRuleNamestringNoEscalation rule name
LayerIdxstringNoAssignment level, corresponds to escalation rule level index, starts from 0
TypestringYesAssignment type, enum values: assign: assign, reassign: reassign, escalate: escalation assign, reopen: reopen assign
Responder (Indirect Reference):
FieldTypeRequiredDescription
PersonIDint64YesPerson ID
PersonNamestringYesPerson name
EmailstringYesEmail address
AssignedAtint64YesAssignment time, Unix timestamp in seconds, default 0
AcknowledgedAtint64NoAcknowledgment time, Unix timestamp in seconds, default 0
Alert (Indirect Reference):
FieldTypeRequiredDescription
TitlestringYesAlert title
DescriptionstringYesAlert description, can be empty
AlertSeveritystringYesSeverity level, enum values: Critical, Warning, Info
AlertStatusstringYesAlert status, enum values: Critical, Warning, Info, Ok
ProgressstringYesProcessing progress, enum values: Triggered, Processing, Closed
StartTimeint64YesTrigger time, Unix timestamp in seconds
EndTimeint64NoRecovery time, Unix timestamp in seconds, default 0
CloseTimeint64NoClose time, EndTime is alert recovery time, CloseTime is processing progress close time. Alert automatically closes upon recovery, manual closure doesn't affect alert recovery. Unix timestamp in seconds, default 0
Labelsmap[string]stringNoLabel key-value pairs, both Key and Value are strings

Common Questions#


1.
How do I know what label information is available in Labels?
Manually created incidents have no labels
Automatically created incidents have labels, matching the first incorporated alert's labels. Go to the Incidents page, find an incident and view its details to see all label information
2.
Why is the default template used when I configured custom template rendering?
When creating a custom template, the system uses mock data to render the template to check for syntax errors
Mock data has limited coverage and may not match some logic branches in your template during actual operation
If rendering fails, the system will use the default template as a fallback to ensure message delivery
When unsure if a referenced variable exists, it's recommended to use logical conditions to avoid rendering errors, e.g., for the resource label:
3.
Why are characters like ">" escaped in incident titles?
4.
Time variables are timestamps, how do I convert time formats?
5.
How to reference external variables inside a for loop?
6.
How do I extract field values with "." in names, like "obj.instance" in labels?
7.
How do I extract and deduplicate label information from incident-associated alerts?
8.
How do I iterate and print labels?
9.
How do I extract information from JSON fields?
jsonGet function helps extract values from JSON format data using path
Target data for jsonGet function must be valid JSON
Basic usage: {{jsonGet .Labels.xxx "yyy"}}, where xxx must be valid JSON and yyy is a valid extraction path
For JSON path syntax, refer to gjson.dev, where you can input target data and extraction path for real-time preview
10.
如何使用逻辑与、或等条件进行内容显示判断?
# Supported functions
- Use `and` function for logical AND judgment
- Use `or` function for logical OR judgment
- Use `not` function for logical NOT judgment
- Use `eq` function for logical equal judgment
- Use `ne` function for logical not equal judgment
- Use `gt` function for logical greater than judgment
- Use `ge` function for logical greater than or equal judgment
- Use `lt` function for logical less than judgment
- Use `le` function for logical less than or equal judgment

# Example usage
# Use and function for logical AND judgment

{{if and (eq .Labels.resource "cpu") (eq .Labels.metric "cpu_usage")}}
  {{.Labels.resource}} CPU usage exceeds 80%
{{end}}

# Use or function for logical OR judgment
{{if or (eq .Labels.resource "cpu") (eq .Labels.metric "cpu_usage")}}
  {{.Labels.resource}} CPU usage exceeds 80%
{{end}}  

# Use not function for logical NOT judgment
{{if not (eq .Labels.metric "cpu_usage")}}
  {{.Labels.metric}} is not CPU usage
{{end}}
11.
How do I find more functions and their usage examples?
Function list: https://github.com/flashcatcloud/sprig/blob/master/functions.go#L97
Usage examples: Check corresponding _test.go files, e.g., date function test cases at https://github.com/flashcatcloud/sprig/blob/master/date_test.go
Below are specific instructions for each notification channel.

Feishu/Lark App#


You need to configure Integration Center-Instant Message-Feishu integration first to send message cards. If custom content is not set, the system default template will be used, rendering all label information:
As shown below:
drawing
If you want to display only key label information, you can refer to the code segment below:
We've listed some common labels, you can add or remove as needed
In Feishu app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely

Dingtalk App#


You need to configure Integration Center-Instant Message-Dingtalk integration first to send message cards. If custom content is not set, the system default template will be used, rendering all label information:
As shown below:
drawing
If you want to display only key label information, you can refer to the code segment below:
We've listed some common labels, you can add or remove as needed
In Dingtalk app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely

WeCom App#


You need to configure Integration Center-Instant Message-WeCom integration first to send message cards. If custom content is not set, the system default template will be used, rendering only common label information:
We've listed some common labels, you can add or remove as needed
In WeCom app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely
As shown below:
drawing
Note: WeCom limits card length. In the template rendering area, you can render no more than 8 lines of content. Content beyond 8 lines will be hidden

Slack App#


You need to configure Integration Center-Instant Message-Slack integration first to send message cards. If custom content is not set, the system default template will be used, rendering only common label information:
As shown below:
drawing
If you want to display only key label information, you can refer to the code segment below:
We've listed some common labels, you can add or remove as needed
Messages can be around 15000 characters long, content beyond this will be truncated
In Slack app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely

Microsoft Teams App#


You need to configure Integration Center-Instant Message-Microsoft Teams integration first to send message cards. If custom content is not set, the system default template will be used, rendering only common label information:
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
{{range $k, $v := .Labels}}
{{if not (in $k "resource" "body_text" "body_text_with_table")}}**{{$k}}** : {{toHtml $v}}{{end}}{{end}}
As shown below:
drawing
If you want to display only key label information, you can refer to the code segment below:
We've listed some common labels, you can add or remove as needed
Messages can be around 28KB in size, content beyond this will result in an error
In Microsoft Teams app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely
{{if (index .Labels "resource")}}**resource**:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
{{if (index .Labels "metric")}}**metric**:{{index .Labels "metric"}}{{end}}
{{if (index .Labels "prom_ql")}}**prom_ql**:{{toHtml (index .Labels "prom_ql")}}{{end}}
{{if (index .Labels "trigger_value")}}**trigger_value**:{{index .Labels "trigger_value"}}{{end}}
{{if (index .Labels "host_ql")}}**host_ql**:{{index .Labels "host_ql"}}{{end}}
{{if (index .Labels "region")}}**region**:{{index .Labels "region"}}{{end}}
{{if (index .Labels "cluster")}}**cluster**:{{index .Labels "cluster"}}{{end}}
{{if (index .Labels "business")}}**business**:{{index .Labels "business"}}{{end}}
{{if (index .Labels "service")}}**service**:{{index .Labels "service"}}{{end}}
{{if (index .Labels "env")}}**env**:{{index .Labels "env"}}{{end}}
{{if (index .Labels "type")}}**type**:{{index .Labels "type"}}{{end}}
{{if (index .Labels "topic")}}**topic**:{{index .Labels "topic"}}{{end}}
{{if (index .Labels "cpu")}}**cpu**:{{index .Labels "cpu"}}{{end}}
{{if (index .Labels "device")}}**device**:{{index .Labels "device"}}{{end}}
{{if (index .Labels "path")}}**path**:{{index .Labels "path"}}{{end}}
{{if (index .Labels "fstype")}}**fstype**:{{index .Labels "fstype"}}{{end}}
{{if (index .Labels "name")}}**name**:{{index .Labels "name"}}{{end}}
{{if (index .Labels "mode")}}**mode**:{{index .Labels "mode"}}{{end}}
{{if (index .Labels "runbook_url")}}**runbook_url**:{{index .Labels "runbook_url"}}{{end}}

Feishu/Lark Bot#


Feishu/Lark bot supports message cards, rich text, and plain text formats. The default template is in message card format.
The msg_type field is required for message cards and rich text, otherwise it will be sent as plain text format
The maximum message length is 4000 bytes, content exceeding this limit will be truncated
If no custom content is set, the system default template will be used to display key information:
1.
Message Card
msg_type is required, value should be interactive
{
  "msg_type": "interactive",
  "card": {
    "config": {
      "wide_screen_mode": true,
      "enable_forward": true
    },
    "header": {
      "template": "{{if eq .IncidentSeverity "Critical"}}red{{else if eq .IncidentSeverity "Warning"}}orange{{else}}yellow{{end}}",
      "title": {
        "content": "{{fireReason .}}INC #{{.Num}} {{toHtml .Title}}",
        "tag": "plain_text"
      }
    },
    "elements": [{
      "tag": "div",
      "fields": [{
          "text": {
            "tag": "lark_md",
            "content": "**🏢 Channel:**{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}"
          }
        },
        {
          "text": {
            "tag": "lark_md",
            "content": "**{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}⚠️{{else}}ℹ️{{end}} Severity:**{{.IncidentSeverity}}"
          }
        },
        {
          "text": {
            "tag": "lark_md",
            "content": "**⏰ Triggered at:**{{date "2006-01-02 15:04:05" .StartTime}}{{if gt .AlertCnt 1}}"
          }
        },
        {
          "text": {
            "tag": "lark_md",
            "content": "**🔔 Grouped alerts:**{{.AlertCnt}} {{end}}{{if .Labels.resource}}"
          }
        },
        {
          "tag": "div",
          "text": {
            "tag": "lark_md",
            "content": "**📌 Alert targets:**{{toHtml (joinAlertLabels . "resource" ",")}} {{end}}{{if .Description}}"
          }
        },
        {
          "tag": "div",
          "text": {
            "tag": "lark_md",
            "content": "**🔍 Description:**{{.Description}}{{end}}{{if gt (len .Responders) 0}}"
          }
        },
        {
          "tag": "div",
          "text": {
            "tag": "lark_md",
            "content": "**👨‍💻 Responders:**{{range .Responders}}@{{.PersonName}} {{end}}{{end}}"
          }
        }
      ]
    },
    {
      "tag": "hr"
    },
    {
      "tag": "action",
      "actions": [{
          "tag": "button",
          "text": {
            "tag": "plain_text",
            "content": "Details"
          },
          "type": "primary",
          "url": "{{.DetailUrl}}"
        },
        {
          "tag": "button",
          "text": {
            "tag": "plain_text",
            "content": "Acknowledge"
          },
          "type": "primary",
          "url": "{{.DetailUrl}}?ack=1"
        }
      ]
    }]
  }
}
2.
Rich Text
msg_type is required, value should be post
{
    "msg_type": "post",
    "post": {
        "zh_cn": {
            "title": "{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}⚠️{{else}}ℹ️{{end}} {{fireReason .}}INC #{{.Num}} {{toHtml .Title}}",
            "content": [
                [{
                    "tag": "text",
                    "text": "🏢 "
                }, {
                    "tag": "text",
                    "text": "Channel:",
                    "text_type": "bold"
                }, {
                    "tag": "text",
                    "text": "{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}\n"
                }],
                [{
                    "tag": "text",
                    "text": "{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}⚠️{{else}}ℹ️{{end}} "
                }, {
                    "tag": "text",
                    "text": "Severity:",
                    "text_type": "bold"
                }, {
                    "tag": "text",
                    "text": "{{.IncidentSeverity}}\n",
                    "text_type": "{{if eq .IncidentSeverity "Critical"}}bold{{end}}"
                }],
                [{
                    "tag": "text",
                    "text": "⏰ "
                }, {
                    "tag": "text",
                    "text": "Triggered at:",
                    "text_type": "bold"
                }, {
                    "tag": "text",
                    "text": "{{date "2006-01-02 15:04:05" .StartTime}}\n"
                }],
                {{if gt .AlertCnt 1}}[{
                    "tag": "text",
                    "text": "🔔 "
                }, {
                    "tag": "text",
                    "text": "Grouped alerts:",
                    "text_type": "bold"
                }, {
                    "tag": "text",
                    "text": "{{.AlertCnt}}\n"
                }],{{end}}
                {{if .Labels.resource}}[{
                    "tag": "text",
                    "text": "📋 "
                }, {
                    "tag": "text",
                    "text": "Alert targets:",
                    "text_type": "bold"
                }, {
                    "tag": "text",
                    "text": "{{toHtml (joinAlertLabels . "resource" ", ")}}\n"
                }],{{end}}
                {{if .Description}}[{
                    "tag": "text",
                    "text": "📝 "
                }, {
                    "tag": "text",
                    "text": "Description:",
                    "text_type": "bold"
                }, {
                    "tag": "text",
                    "text": "{{toHtml .Description}}\n"
                }],{{end}}
                {{if gt (len .Responders) 0}}[{
                    "tag": "text",
                    "text": "👨‍💻 "
                }, {
                    "tag": "text",
                    "text": "Responders:",
                    "text_type": "bold"
                }, {
                    "tag": "text",
                    "text": "{{range .Responders}}@{{.PersonName}} {{end}}\n"
                }],{{end}}
                [{
                    "tag": "a",
                    "href": "{{.DetailUrl}}",
                    "text": "Details"
                },{
                    "tag": "text",
                    "text": "  "
                },{
                    "tag": "a",
                    "href": "{{.DetailUrl}}?ack=1",
                    "text": "Acknowledge"
                }]
            ]
        }
    }
}
3.
Plain Text
{{fireReason .}}INC #{{.Num}} {{toHtml .Title}}
-----
Channel:{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}
Severity:{{.IncidentSeverity}}
Triggered at:{{date "2006-01-02 15:04:05" .StartTime}}
Duration:{{ago .StartTime}}{{if gt .AlertCnt 1}}
Grouped alerts:{{.AlertCnt}}{{end}}{{if .Labels.resource}}
Alert targets:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}{{if .Description}}
Description:{{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
Responders:{{range .Responders}}@{{.PersonName}} {{end}}{{end}}
<br/>Details:{{.DetailUrl}}

Dingtalk Bot#


Dingtalk bot only supports sending Markdown messages (syntax restrictions).
The maximum message length is 4000 bytes, content exceeding this limit will be truncated
If the text contains <br/>, when rendering, the system will first remove empty lines, then replace <br/> with line breaks
If no custom content is set, the system default template will be used to display key information:
{{fireReason .}}INC [#{{.Num}}]({{.DetailUrl}}) {{toHtml .Title}}

---
- Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}
- Severity: {{$s := colorSeverity .IncidentSeverity}}{{toHtml $s}}
- Triggered at: {{date "2006-01-02 15:04:05" .StartTime}}
- Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}
- Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}
- Alert targets: {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}{{if .Description}}
- Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
- Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}
---
<br/>[Details]({{.DetailUrl}})|[Acknowledge]({{.DetailUrl}}?ack=1)

WeCom Bot#


WeCom bot only supports sending Markdown messages (syntax restrictions).
The maximum message length is 4000 bytes, content exceeding this limit will be truncated
If the text contains <br/>, when rendering, the system will first remove empty lines, then replace <br/> with line breaks
If no custom content is set, the system default template will be used to display key information:
{{fireReason .}}**INC [#{{.Num}}]({{.DetailUrl}}) {{toHtml .Title}}**
> Channel: <font color="warning">{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}</font>
> Severity: <font color="warning">{{.IncidentSeverity}}</font>
> Triggered at: {{date "2006-01-02 15:04:05" .StartTime}}
> Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}
> Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}
> Alert targets: {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}{{if .Description}}
> Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
> Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}
<br/>[Details]({{.DetailUrl}})|[Acknowledge]({{.DetailUrl}}?ack=1)

Telegram Bot#


Configure a Telegram service address accessible in mainland China
The maximum message length is 4096 characters, content exceeding this limit will not be sent
If the text contains <br/>, when rendering, the system will first remove empty lines, then replace <br/> with line breaks
If no custom content is set, the system default template will be used to display key information:
{{fireReason .}}INC [#{{.Num}}]({{.DetailUrl}}) {{toHtml .Title}}
-----
Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}
Severity: {{.IncidentSeverity}}
Triggered at: {{date "2006-01-02 15:04:05" .StartTime}}
Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}
Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}
Alert targets: {{toHtml (joinAlertLabels . "resource" ", ")}}({{.Labels.resource}}){{end}}{{if .Description}}
Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}

<br/>[Details]({{.DetailUrl}})|[Acknowledge]({{.DetailUrl}}?ack=1)

Slack Bot#


Messages can be approximately 15000 characters long, content exceeding this limit will be truncated
If the text contains <br/>, when rendering, the system will first remove empty lines, then replace <br/> with line breaks
If no custom content is set, the system default template will be used to display key information:
{{fireReason .}}INC <{{.DetailUrl}}|#{{.Num}}> {{toHtml .Title}}
-----
Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}
Severity: {{.IncidentSeverity}}
Triggered at: {{date "2006-01-02 15:04:05" .StartTime}}
Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}
Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}
Alert targets: {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}{{if .Description}}
Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}
-----
<br/><{{.DetailUrl}}|Details>|<{{.DetailUrl}}?ack=1|Acknowledge>

Zoom Bot#


Messages can be approximately 4000 characters long, content exceeding this limit will be truncated
If the text contains <br/>, when rendering, the system will first remove empty lines, then replace <br/> with line breaks
Message format follows Zoom message format. The current bot application doesn't support Markdown. For other formats, please refer to the official documentation: https://developers.zoom.us/docs/team-chat-apps/customizing-messages/
If no custom content is set, the system default template will be used to display key information:
{"head": {
    "text": "{{fireReason .}}INC [#{{.Num}}] {{toHtml .Title}}",
    "style": {
      "bold": true,
      "italic": false,
      "color": "{{$s := serverityToColor .IncidentSeverity}}{{toHtml $s}}"
    }
  },
  "body": [
    {
      "type": "message",
      "text": "Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}",
      "style": {
        "bold": false,
        "italic": false
      }
    },
    {
      "type": "message",
      "text": "Severity: {{.IncidentSeverity}}",
      "style": {
        "bold": false,
        "italic": false,
        "color": "{{$s := serverityToColor .IncidentSeverity}}{{toHtml $s}}"
      }
    },
    {
      "type": "message",
      "text": "Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}",
      "style": {
        "bold": false,
        "italic": false
      }
    },
    {
      "type": "message",
      "text": "Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}",
      "style": {
        "bold": false,
        "italic": false
      }
    },
    {
        "type": "message",
        "text": "Alert targets: {{.Labels.resource}}{{end}}{{if .Description}}",
        "style": {
          "bold": false,
          "italic": false
        }
      },
    {
      "type": "message",
      "text": "Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}",
      "style": {
        "bold": false,
        "italic": false
      }
    },
    {
      "type": "message",
      "text": "Responders: {{range .Responders}}@{{.PersonName}}{{end}}{{end}}",
      "style": {
        "bold": false,
        "italic": false
      }
    },
    {
        "type": "message",
        "text": "View Details",
        "link": "{{.DetailUrl}}{{if .IsFlapping}}"
    },
    {
      "type": "message",
      "text": "Note: The current incident status is changing frequently. Notifications will be suppressed for {{.Flapping.MuteMinutes}} minutes. Please optimize your alert policy.{{end}}{{if .IsInStorm}}",
      "style": {
        "bold": true,
        "italic": false
      }
    },
    {
      "type": "message",
      "text": "Note: The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm. Please handle with urgency!{{end}}",
      "style": {
        "bold": true,
        "italic": false
      }
    }
  ]
}

SMS#


If no custom content is set, the system default template will be used for notifications:

Email#


If no custom content is set, the system default template will be used for notifications:
As shown in the image below:
drawing

添加官方技术支持微信

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

微信扫码交流
上一页
Schedules
下一页
Service Calendars
Built with