Skip to content

Commit c25e994

Browse files
committed
feat: standard alert add images
1 parent 214d434 commit c25e994

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.0 Standard Alert Integration.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ Field|Required|Type|Description
8282
| alert_key | No | string | Alert identifier, used to update or automatically recover existing alerts.<br><br>You can customize this value, but it cannot exceed `255` characters. You can also rely on system auto-generation, this value will be returned in the response.<br><br>If you're reporting a recovery event, this value must exist.
8383
| description | No | string | Alert description, no more than `2048` characters, will be truncated if exceeded.
8484
| labels | No | map | Alert label collection, key is the label name, value is the label value:<br><br>1. Both key and value of labels are string type, case-sensitive.<br>2. Label key should not exceed `128` characters, following Prometheus label naming conventions. Value should not exceed `2048` characters, will be truncated if exceeded.<br>3. Maximum of `50` labels. See `Label Content Reference` in [Best Practices](#best-practices).<br><br>Example: "resource": "171.26.23.22", "check": "api latency > 500ms"
85+
| images | No | [][image](#image) | Array of images, used for image display in frontend or Feishu/DingTalk application notifications.The system merged/overwritten based on alt, for the same alt (including empty strings), only one is retained
86+
87+
#### image Structure <span id="image"></span>
88+
89+
Field|Required|Type|Description
90+
:-:|:-:|:-:|:---
91+
| alt | No | string | Image alternative text, limit 128 characters, truncated if exceeded.
92+
| src | Yes | string | Image source, value: http/https URL or image_key returned by [Image Upload API](https://developer.flashcat.cloud/api-344943718). Limit 256 characters, discarded if exceeded
93+
| href | No | string | Hyperlink reference path, limit 256 characters, truncated if exceeded
8594

8695
</div>
8796

flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1.0 标准告警事件集成指引.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ POST, Content-Type:"application/json"
8686
| alert_key | 否 | string | 告警标识,用于对已经存在的告警进行更新或自动恢复。<br><br>您可以自定义此值,但不可超过`255`个字符。您也可以依赖系统自动生成,该值会在响应中返回。<br><br>如果您上报的是恢复事件,则此值必须存在。
8787
| description | 否 | string | 告警描述,不超过`2048`个字符,超出后将自动截断。
8888
| labels | 否 | map | 告警标签集合,key 为标签名称,value 为标签值:<br><br>1. 标签的 key 和 value 均为 string 类型,区分大小写。<br>2. 标签的 key 不要超过`128`个字符,遵循Prometheus标签命名规范。value 不超过`2048`个字符,超出后将自动截断。<br>3. 至多传入`50`个标签。`标签内容参考`[最佳实践](#最佳实践)。<br><br>示例:"resource": "171.26.23.22", "check": "api latency > 500ms"
89+
| images | 否 | [][image](#image) | 图片数组,可用于前端或飞书和钉钉应用通知的图片展示。系统根据 alt 进行合并覆盖,相同(包括空字符)的alt只保留一条
90+
91+
#### image 结构体 <span id="image"></span>
92+
93+
字段|必含|类型|释义
94+
:-:|:-:|:-:|:---
95+
| alt | 否 | string | 图片的替代文本, 长度限制 128 字符,超长截断。
96+
| src | 是 | string | 图片来源,值:http/https 开头的图片链接地址 或 [图片上传接口](https://developer.flashcat.cloud/api-344943718)返回的image_key,长度限制 256 字符,超长会被丢弃
97+
| href | 否 | string | 超链接引用路径,长度限制 256 字符,超长截断
8998

9099
</div>
91100

0 commit comments

Comments
 (0)