flashduty-knowledge-base 1.2.8 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/iife/en.js CHANGED
@@ -5089,9 +5089,9 @@ After the application is released, you can access it via mobile/PC client. First
5089
5089
  - Return to the escalation rule configuration page, refresh and reselect the group chat list
5090
5090
  - If still unable to get the group chat list, try uninstalling the Cool App from the group and repeat the above steps. If it still doesn't work, please contact customer or dedicated technical support
5091
5091
 
5092
- <img src="https://download.flashcat.cloud/flashduty/doc/en/ding/ding-18.png" alt="drawing" width="500"/>
5092
+ <img src="https://download.flashcat.cloud/flashduty/doc/en/dingtalk-install-1.png" alt="drawing" width="500"/>
5093
5093
 
5094
- <img src="https://download.flashcat.cloud/flashduty/doc/en/ding/ding-19.png" alt="drawing" width="500"/>
5094
+ <img src="https://download.flashcat.cloud/flashduty/doc/en/dingtalk-install-2.png" alt="drawing" width="500"/>
5095
5095
 
5096
5096
  4. **Dingtalk Custom Application API Call Limits:** [Dingtalk Documentation](https://open.dingtalk.com/document/orgapp/descriptions-about-adjusting-limit-and-frequency-of-api-calls?spm=ding_open_doc.document.0.0.6f6b21d9WtkxJI)
5097
5097
 
@@ -6475,7 +6475,7 @@ Feishu/Lark bot supports message cards, rich text, and plain text formats. The d
6475
6475
 
6476
6476
  1. Message Card
6477
6477
  msg_type is required, value should be interactive
6478
- \`\`\`
6478
+ \`\`\`json
6479
6479
  {
6480
6480
  "msg_type": "interactive",
6481
6481
  "card": {
@@ -6495,46 +6495,58 @@ msg_type is required, value should be interactive
6495
6495
  "fields": [{
6496
6496
  "text": {
6497
6497
  "tag": "lark_md",
6498
- "content": "**đŸĸ Channel:**{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}"
6498
+ "content": "**đŸĸ Channel: **{{.ChannelName}}"
6499
+ }
6500
+ },
6501
+ {
6502
+ "text": {
6503
+ "tag": "lark_md",
6504
+ "content": "**{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}âš ī¸{{else}}â„šī¸{{end}} Severity: **{{.IncidentSeverity}}"
6499
6505
  }
6500
6506
  },
6501
6507
  {
6502
6508
  "text": {
6503
6509
  "tag": "lark_md",
6504
- "content": "**{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}âš ī¸{{else}}â„šī¸{{end}} Severity:**{{.IncidentSeverity}}"
6510
+ "content": "**⏰ Triggered at: **{{date "2006-01-02 15:04:05" .StartTime}}"
6505
6511
  }
6506
6512
  },
6513
+ {{if gt .AlertCnt 1}}
6507
6514
  {
6508
6515
  "text": {
6509
6516
  "tag": "lark_md",
6510
- "content": "**⏰ Triggered at:**{{date "2006-01-02 15:04:05" .StartTime}}{{if gt .AlertCnt 1}}"
6517
+ "content": "**🔔 Grouped alerts: **{{.AlertCnt}}"
6511
6518
  }
6512
6519
  },
6520
+ {{end}}{{if .Labels.resource}}
6513
6521
  {
6522
+ "tag": "div",
6514
6523
  "text": {
6515
6524
  "tag": "lark_md",
6516
- "content": "**🔔 Grouped alerts:**{{.AlertCnt}} {{end}}{{if .Labels.resource}}"
6525
+ "content": {{printf "%q" (print "**📌 Resources: **" (joinAlertLabels . "resource" ","))}}
6517
6526
  }
6518
6527
  },
6528
+ {{end}}{{if .Description}}
6519
6529
  {
6520
6530
  "tag": "div",
6521
6531
  "text": {
6522
6532
  "tag": "lark_md",
6523
- "content": "**📌 Alert targets:**{{toHtml (joinAlertLabels . "resource" ",")}} {{end}}{{if .Description}}"
6533
+ "content": {{printf "%q" (print "**🔍 Description: **" .Description)}}
6524
6534
  }
6525
6535
  },
6536
+ {{end}}{{if gt (len .Responders) 0}}
6526
6537
  {
6527
6538
  "tag": "div",
6528
6539
  "text": {
6529
6540
  "tag": "lark_md",
6530
- "content": "**🔍 Description:**{{.Description}}{{end}}{{if gt (len .Responders) 0}}"
6541
+ "content": "**👨‍đŸ’ģ Responders: **{{range .Responders}}@{{.PersonName}} {{end}}"
6531
6542
  }
6532
6543
  },
6544
+ {{end}}
6533
6545
  {
6534
6546
  "tag": "div",
6535
6547
  "text": {
6536
6548
  "tag": "lark_md",
6537
- "content": "**👨‍đŸ’ģ Responders:**{{range .Responders}}@{{.PersonName}} {{end}}{{end}}"
6549
+ "content": ""
6538
6550
  }
6539
6551
  }
6540
6552
  ]
@@ -6557,20 +6569,41 @@ msg_type is required, value should be interactive
6557
6569
  "tag": "button",
6558
6570
  "text": {
6559
6571
  "tag": "plain_text",
6560
- "content": "Acknowledge"
6572
+ "content": "Ack"
6561
6573
  },
6562
6574
  "type": "primary",
6563
6575
  "url": "{{.DetailUrl}}?ack=1"
6564
6576
  }
6565
6577
  ]
6566
- }]
6578
+ }
6579
+ {{if or .IsFlapping .IsInStorm}},{{end}}
6580
+ {{if .IsFlapping}}
6581
+ {
6582
+ "tag": "div",
6583
+ "text": {
6584
+ "tag": "lark_md",
6585
+ "content": "🔴 The current incident status changes frequently, notifications will be muted for {{.Flapping.MuteMinutes}} minute(s), it is recommended to optimize the alerting strategy."
6586
+ }
6587
+ }
6588
+ {{end}}
6589
+ {{if and .IsFlapping .IsInStorm}},{{end}}
6590
+ {{if .IsInStorm}}
6591
+ {
6592
+ "tag": "div",
6593
+ "text": {
6594
+ "tag": "lark_md",
6595
+ "content": "🔴 The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm, please handle it urgently!"
6596
+ }
6597
+ }
6598
+ {{end}}
6599
+ ]
6567
6600
  }
6568
6601
  }
6569
6602
  \`\`\`
6570
6603
 
6571
6604
  2. Rich Text
6572
6605
  msg_type is required, value should be post
6573
- \`\`\`
6606
+ \`\`\`json
6574
6607
  {
6575
6608
  "msg_type": "post",
6576
6609
  "post": {
@@ -6582,78 +6615,77 @@ msg_type is required, value should be post
6582
6615
  "text": "đŸĸ "
6583
6616
  }, {
6584
6617
  "tag": "text",
6585
- "text": "Channelīŧš",
6586
- "text_type": "bold"
6618
+ "text": "Channel: ",
6619
+ "style": ["bold"]
6587
6620
  }, {
6588
6621
  "tag": "text",
6589
- "text": "{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}\\n"
6622
+ "text": "{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}"
6590
6623
  }],
6591
6624
  [{
6592
6625
  "tag": "text",
6593
- "text": "{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}âš ī¸{{else}}â„šī¸{{end}} "
6626
+ "text": "{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}âš ī¸{{else}}â„šī¸{{end}}"
6594
6627
  }, {
6595
6628
  "tag": "text",
6596
- "text": "Severityīŧš",
6597
- "text_type": "bold"
6629
+ "text": "Severity: ",
6630
+ "style": ["bold"]
6598
6631
  }, {
6599
6632
  "tag": "text",
6600
- "text": "{{.IncidentSeverity}}\\n",
6601
- "text_type": "{{if eq .IncidentSeverity "Critical"}}bold{{end}}"
6633
+ "text": "{{.IncidentSeverity}}"
6602
6634
  }],
6603
6635
  [{
6604
6636
  "tag": "text",
6605
6637
  "text": "⏰ "
6606
6638
  }, {
6607
6639
  "tag": "text",
6608
- "text": "Triggered atīŧš",
6609
- "text_type": "bold"
6640
+ "text": "Triggered at: ",
6641
+ "style": ["bold"]
6610
6642
  }, {
6611
6643
  "tag": "text",
6612
- "text": "{{date "2006-01-02 15:04:05" .StartTime}}\\n"
6644
+ "text": "{{date "2006-01-02 15:04:05" .StartTime}}"
6613
6645
  }],
6614
6646
  {{if gt .AlertCnt 1}}[{
6615
6647
  "tag": "text",
6616
6648
  "text": "🔔 "
6617
6649
  }, {
6618
6650
  "tag": "text",
6619
- "text": "Grouped alertsīŧš",
6620
- "text_type": "bold"
6651
+ "text": "Grouped alerts: ",
6652
+ "style": ["bold"]
6621
6653
  }, {
6622
6654
  "tag": "text",
6623
- "text": "{{.AlertCnt}}\\n"
6655
+ "text": "{{.AlertCnt}}"
6624
6656
  }],{{end}}
6625
6657
  {{if .Labels.resource}}[{
6626
6658
  "tag": "text",
6627
6659
  "text": "📋 "
6628
6660
  }, {
6629
6661
  "tag": "text",
6630
- "text": "Alert targetsīŧš",
6631
- "text_type": "bold"
6662
+ "text": "Resources: ",
6663
+ "style": ["bold"]
6632
6664
  }, {
6633
6665
  "tag": "text",
6634
- "text": "{{toHtml (joinAlertLabels . "resource" ", ")}}\\n"
6666
+ "text": {{printf "%q" (print (joinAlertLabels . "resource" ","))}}
6635
6667
  }],{{end}}
6636
6668
  {{if .Description}}[{
6637
6669
  "tag": "text",
6638
6670
  "text": "📝 "
6639
6671
  }, {
6640
6672
  "tag": "text",
6641
- "text": "Descriptionīŧš",
6642
- "text_type": "bold"
6673
+ "text": "Description: ",
6674
+ "style": ["bold"]
6643
6675
  }, {
6644
6676
  "tag": "text",
6645
- "text": "{{toHtml .Description}}\\n"
6677
+ "text": {{printf "%q" (print .Description)}}
6646
6678
  }],{{end}}
6647
6679
  {{if gt (len .Responders) 0}}[{
6648
6680
  "tag": "text",
6649
6681
  "text": "👨‍đŸ’ģ "
6650
6682
  }, {
6651
6683
  "tag": "text",
6652
- "text": "Respondersīŧš",
6653
- "text_type": "bold"
6684
+ "text": "Responders: ",
6685
+ "style": ["bold"]
6654
6686
  }, {
6655
6687
  "tag": "text",
6656
- "text": "{{range .Responders}}@{{.PersonName}} {{end}}\\n"
6688
+ "text": "{{range .Responders}}@{{.PersonName}} {{end}}"
6657
6689
  }],{{end}}
6658
6690
  [{
6659
6691
  "tag": "a",
@@ -6665,8 +6697,22 @@ msg_type is required, value should be post
6665
6697
  },{
6666
6698
  "tag": "a",
6667
6699
  "href": "{{.DetailUrl}}?ack=1",
6668
- "text": "Acknowledge"
6700
+ "text": "Ack"
6701
+ }]
6702
+ {{if or .IsFlapping .IsInStorm}},{{end}}
6703
+ {{if .IsFlapping}}
6704
+ [{
6705
+ "tag": "text",
6706
+ "text": "\\n 🔴 The incident triggers and recovers frequently, {{if .Flapping.MuteMinutes}}new notifications will be muted for {{.Flapping.MuteMinutes}} minute(s), {{end}}it is recommended to optimize the alerting strategy."
6707
+ }]
6708
+ {{end}}
6709
+ {{if and .IsFlapping .IsInStorm}},{{end}}
6710
+ {{if .IsInStorm}}
6711
+ [{
6712
+ "tag": "text",
6713
+ "text": "\\n 🔴 The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm, please handle it urgently!"
6669
6714
  }]
6715
+ {{end}}
6670
6716
  ]
6671
6717
  }
6672
6718
  }
@@ -6800,94 +6846,100 @@ Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}
6800
6846
  - If no custom content is set, the system default template will be used to display key information:
6801
6847
 
6802
6848
  \`\`\`json
6803
- {"head": {
6804
- "text": "{{fireReason .}}INC [#{{.Num}}] {{toHtml .Title}}",
6849
+ {
6850
+ "head": {
6851
+ "text": "{{fireReason .}}INC [#{{.Num}}] {{.Title}}",
6852
+ "style": {
6853
+ "bold": true,
6854
+ "italic": false,
6855
+ "color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
6856
+ }
6857
+ },
6858
+ "body": [
6859
+ {
6860
+ "type": "message",
6861
+ "text": {{printf "%q" (print "Channel: " .ChannelName)}},
6805
6862
  "style": {
6806
- "bold": true,
6863
+ "bold": false,
6864
+ "italic": false
6865
+ }
6866
+ },
6867
+ {
6868
+ "type": "message",
6869
+ "text": "Severity: {{.IncidentSeverity}}",
6870
+ "style": {
6871
+ "bold": false,
6807
6872
  "italic": false,
6808
- "color": "{{$s := serverityToColor .IncidentSeverity}}{{toHtml $s}}"
6873
+ "color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
6809
6874
  }
6810
6875
  },
6811
- "body": [
6812
- {
6813
- "type": "message",
6814
- "text": "Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}",
6815
- "style": {
6816
- "bold": false,
6817
- "italic": false
6818
- }
6819
- },
6820
- {
6821
- "type": "message",
6822
- "text": "Severity: {{.IncidentSeverity}}",
6823
- "style": {
6824
- "bold": false,
6825
- "italic": false,
6826
- "color": "{{$s := serverityToColor .IncidentSeverity}}{{toHtml $s}}"
6827
- }
6828
- },
6829
- {
6830
- "type": "message",
6831
- "text": "Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}",
6832
- "style": {
6833
- "bold": false,
6834
- "italic": false
6835
- }
6836
- },
6837
- {
6838
- "type": "message",
6839
- "text": "Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}",
6840
- "style": {
6841
- "bold": false,
6842
- "italic": false
6843
- }
6844
- },
6845
- {
6846
- "type": "message",
6847
- "text": "Alert targets: {{.Labels.resource}}{{end}}{{if .Description}}",
6848
- "style": {
6849
- "bold": false,
6850
- "italic": false
6851
- }
6852
- },
6853
- {
6876
+ {
6877
+ "type": "message",
6878
+ "text": "{{if .AlertCnt}}Grouped alerts: {{.AlertCnt}}{{end}}",
6879
+ "style": {
6880
+ "bold": false,
6881
+ "italic": false
6882
+ }
6883
+ },
6884
+ {{if .Labels.resource}}
6885
+ {
6854
6886
  "type": "message",
6855
- "text": "Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}",
6887
+ "text": {{printf "%q" (print "Resources: " (joinAlertLabels . "resource" ", "))}},
6856
6888
  "style": {
6857
6889
  "bold": false,
6858
6890
  "italic": false
6859
6891
  }
6860
- },
6861
- {
6892
+ },
6893
+ {{end}}{{if .Labels.body_text}}
6894
+ {
6862
6895
  "type": "message",
6863
- "text": "Responders: {{range .Responders}}@{{.PersonName}}{{end}}{{end}}",
6896
+ "text": {{printf "%q" (print "Description: " .Labels.body_text)}},
6864
6897
  "style": {
6865
6898
  "bold": false,
6866
6899
  "italic": false
6867
6900
  }
6868
- },
6869
- {
6870
- "type": "message",
6871
- "text": "View Details",
6872
- "link": "{{.DetailUrl}}{{if .IsFlapping}}"
6873
- },
6874
- {
6875
- "type": "message",
6876
- "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}}",
6877
- "style": {
6878
- "bold": true,
6879
- "italic": false
6880
- }
6881
- },
6882
- {
6901
+ },
6902
+ {{else if .Description}}
6903
+ {
6904
+ "type": "message",
6905
+ "text": {{printf "%q" (print "Description: " .Description)}},
6906
+ "style": {
6907
+ "bold": false,
6908
+ "italic": false
6909
+ }
6910
+ },
6911
+ {{end}}{{if gt (len .Responders) 0}}
6912
+ {
6913
+ "type": "message",
6914
+ "text": "Responders: {{range .Responders}}@{{.PersonName}}{{end}}",
6915
+ "style": {
6916
+ "bold": false,
6917
+ "italic": false
6918
+ }
6919
+ },
6920
+ {{end}}
6921
+ {
6883
6922
  "type": "message",
6884
- "text": "Note: The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm. Please handle with urgency!{{end}}",
6885
- "style": {
6886
- "bold": true,
6887
- "italic": false
6888
- }
6923
+ "text": "Details",
6924
+ "link": {{printf "%q" .DetailUrl}}
6925
+ },
6926
+ {
6927
+ "type": "message",
6928
+ "text": "{{if .IsFlapping}}🔴 The current incident status changes frequently, notifications will be muted for {{.Flapping.MuteMinutes}} minute(s), it is recommended to optimize the alerting strategy.{{end}}",
6929
+ "style": {
6930
+ "bold": true,
6931
+ "italic": false
6889
6932
  }
6890
- ]
6933
+ },
6934
+ {
6935
+ "type": "message",
6936
+ "text": "{{if .IsInStorm}}🔴 The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm, please handle it urgently!{{end}}",
6937
+ "style": {
6938
+ "bold": true,
6939
+ "italic": false
6940
+ }
6941
+ }
6942
+ ]
6891
6943
  }
6892
6944
  \`\`\`
6893
6945
  </div>