Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问最新的包如何自定义模板? #102

Open
smarterallen opened this issue Jun 2, 2020 · 2 comments
Open

请问最新的包如何自定义模板? #102

smarterallen opened this issue Jun 2, 2020 · 2 comments

Comments

@smarterallen
Copy link

例如下面的格式:
【告警】-- Prometheus 故障信息
【告警简述】:Instance 192.168.44.129:9100 停止工作
【告警时间】:2020-06-01 18:40:23
【告警级别】:灾难
【告警信息】:192.168.44.129:9100 :node这个主机不在线 (当前值:0)
【告警主机】:192.168.44.129

@shizy123
Copy link

shizy123 commented Jun 3, 2020

【告警】:{{ range .Labels.SortedPairs }}
【告警简述】: {{ .Annotations.summary }}
【告警级别】: {{ .Labels.severity | upper }}
【告警信息】:{{ .Annotations.description }}
【告警主机】 {{ .Annotations.hosts }}
大概思路是这样的,你要从新制作镜像,这样配合你的prometheus-rules.yaml一起做。

@smarterallen
Copy link
Author

base64.StdEncoding.EncodeToString 请问版主如何规避base64带来的坑? 我看见源码是没有做任何处理,封装好的包并没有异常。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants