Skip to content

Commit 52ba379

Browse files
authored
Update system-func.md to remove usage examples
Removed usage examples for the GetTimeDuration function from the documentation.
1 parent 18782d1 commit 52ba379

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

doc/readme/system-func.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -156,25 +156,8 @@ dimensions: {{.Dimensions}}
156156

157157
特别说明:`SplitString`函数
158158

159-
目前支持两种使用方式:
159+
### 5 `GetTimeDuration` 函数仅支持在PrometheusAlert的自定义模版中使用,该函数主要用于获取持续时间
160160

161-
- 使用默认时间字符串格式输出 `{{GetTime .Timestamp}}` ,如:
161+
用法示例:
162162

163-
```
164-
ALiYun {{.AlertState}}信息
165-
>**{{.AlertName}}**
166-
>告警级别: {{.TriggerLevel}}
167-
开始时间: {{.Timestamp}}
168-
故障主机: {{SplitString .Instance 0 -5}}
169-
------------详细信息--------------
170-
metricName: {{.MetricName}}
171-
expression: {{.Expression}}
172-
signature: {{.Signature}}
173-
metricProject: {{.MetricProject}}
174-
userId: {{.UserId}}
175-
namespace: {{.Namespace}}
176-
preTriggerLevel: {{.PreTriggerLevel}}
177-
ruleId: {{.RuleId}}
178-
dimensions: {{.Dimensions}}
179-
**当前值:{{.CurValue}}**
180-
```
163+
> <font color="info">持续时间:</font> {{GetTimeDuration $v.startsAt $v.endsAt}} //输出:持续时间: 15s

0 commit comments

Comments
 (0)