model

package
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert template.Alert

type WebhookMessage

type WebhookMessage struct {
	// reference: https://prometheus.io/docs/alerting/latest/notifications/
	template.Data
	// @某人
	OpenIDs []string
	// 用于存储 AlertManager webhook 请求带来的数据,比如 query string
	Meta template.KV
	// 仅内置模板中使用,自定义模板中访问是空数组
	// 目前没有发现在 {{template defined_name .}} 后对其结果进行进一步处理的方式
	// 首先,通过模板,将每个 Alert 转为字符串,大段文本都在 content 字段,需要注意转义。
	FiringAlerts   []string
	ResolvedAlerts []string
	TitlePrefix    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL