Skip to content

Commit 850df98

Browse files
committed
docs: adjust description template menu label
1 parent a1e87dd commit 850df98

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

.mintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
# Project documentation (non-mdx files)
55
AGENTS.md
66
README.md
7+
README_zh.md
78
README.en.md

docs.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@
448448
"group": "告警规则",
449449
"icon": "list-check",
450450
"pages": [
451-
"zh/monitors/alert-rules/description-template",
452451
"zh/monitors/alert-rules/prometheus",
453452
"zh/monitors/alert-rules/elasticsearch",
454453
"zh/monitors/alert-rules/loki",
@@ -457,7 +456,8 @@
457456
"zh/monitors/alert-rules/oracle",
458457
"zh/monitors/alert-rules/postgres",
459458
"zh/monitors/alert-rules/sls",
460-
"zh/monitors/alert-rules/victorialogs"
459+
"zh/monitors/alert-rules/victorialogs",
460+
"zh/monitors/alert-rules/description-template"
461461
]
462462
},
463463
{
@@ -1400,7 +1400,6 @@
14001400
"group": "Alert Rules",
14011401
"icon": "list-check",
14021402
"pages": [
1403-
"en/monitors/alert-rules/description-template",
14041403
"en/monitors/alert-rules/prometheus",
14051404
"en/monitors/alert-rules/elasticsearch",
14061405
"en/monitors/alert-rules/loki",
@@ -1409,7 +1408,8 @@
14091408
"en/monitors/alert-rules/oracle",
14101409
"en/monitors/alert-rules/postgres",
14111410
"en/monitors/alert-rules/sls",
1412-
"en/monitors/alert-rules/victorialogs"
1411+
"en/monitors/alert-rules/victorialogs",
1412+
"en/monitors/alert-rules/description-template"
14131413
]
14141414
},
14151415
{

en/monitors/alert-rules/description-template.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Alert Rule Description Templates"
2+
title: "Description Template"
33
description: "Configure Go Template variables, related query results, and Sprig functions for Monitors alert rule descriptions."
44
keywords: ["Description templates", "alert rules", "Go Template", "Sprig", "related queries"]
55
---
@@ -224,7 +224,7 @@ community_posts.comment_count
224224
| `contains substr text` | Checks whether `text` contains `substr`. | `{{ if contains "Unknown column" $msg }}...{{ end }}` |
225225
| `hasPrefix prefix text` | Checks prefix. | `{{ hasPrefix "prod-" $name }}` |
226226
| `hasSuffix suffix text` | Checks suffix. | `{{ hasSuffix ".log" $file }}` |
227-
| `regexMatch pattern text` | Regex match. | `{{ regexMatch "error|failed" $msg }}` |
227+
| `regexMatch pattern text` | Regex match. | `{{ regexMatch "error\|failed" $msg }}` |
228228
| `regexFind pattern text` | Returns the first full regex match. | `{{ regexFind "trace_id=[a-z0-9]+" $msg }}` |
229229
| `regexFindAll pattern text n` | Returns up to `n` full regex matches. Use `-1` for all. | `{{ regexFindAll "id=[0-9]+" $msg -1 }}` |
230230
| `regexReplaceAll pattern text repl` | Regex replacement. Argument order is `pattern`, `text`, `replacement`. | `{{ regexReplaceAll ".*id=([0-9]+).*" $msg "$1" }}` |

zh/monitors/alert-rules/description-template.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "告警规则 Description 模板"
2+
title: "备注模板"
33
description: "配置 Monitors 告警规则备注描述的 Go Template 变量、关联查询结果和 Sprig 函数。"
44
keywords: ["Description 模板", "告警规则", "备注描述", "Go Template", "Sprig", "关联查询"]
55
---
@@ -215,7 +215,7 @@ community_posts.comment_count
215215
| `contains substr text` | 判断 `text` 是否包含 `substr`| `{{ if contains "Unknown column" $msg }}...{{ end }}` |
216216
| `hasPrefix prefix text` | 判断前缀。 | `{{ hasPrefix "prod-" $name }}` |
217217
| `hasSuffix suffix text` | 判断后缀。 | `{{ hasSuffix ".log" $file }}` |
218-
| `regexMatch pattern text` | 正则匹配。 | `{{ regexMatch "error|failed" $msg }}` |
218+
| `regexMatch pattern text` | 正则匹配。 | `{{ regexMatch "error\|failed" $msg }}` |
219219
| `regexFind pattern text` | 返回第一个完整正则匹配。 | `{{ regexFind "trace_id=[a-z0-9]+" $msg }}` |
220220
| `regexFindAll pattern text n` | 返回最多 `n` 个完整正则匹配。`-1` 表示全部返回。 | `{{ regexFindAll "id=[0-9]+" $msg -1 }}` |
221221
| `regexReplaceAll pattern text repl` | 正则替换。参数顺序是 `pattern``text``replacement`| `{{ regexReplaceAll ".*id=([0-9]+).*" $msg "$1" }}` |

0 commit comments

Comments
 (0)