Documentation ¶
Index ¶
- Constants
- Variables
- func Filter(alerts map[int64][]Record, maxCount map[int64]int) map[string][]common.Ready2Send
- func InitDb()
- func RecoverSender(SendClass map[string]map[[2]int64]*common.Ready2Send, now string)
- func Send2Hook(content []common.Ready2Send, sendTime string, t string, url string)
- func SendAll(method string, from string, param map[string]string, ...)
- func SendRecover(url string, from string, param map[string]string, content []common.Ready2Send, ...)
- func Sender(SendClass map[string][]common.Ready2Send, now string)
- func UpdateMaintainlist()
- type Record
- type RecoverRecord
Constants ¶
View Source
const DbDriverName = "mysql"
Variables ¶
View Source
var InitialData = []string{"ALTER TABLE alert ADD UNIQUE INDEX ruleid_labels_firedat(`rule_id`, `labels`(255),`fired_at`);", `INSERT INTO users ( name, password ) VALUES ('admin', 'e10adc3949ba59abbe56e057f20f883e');`}
Functions ¶
func RecoverSender ¶
func RecoverSender(SendClass map[string]map[[2]int64]*common.Ready2Send, now string)
send recovery message if alert recovered.
func SendRecover ¶
func Sender ¶
func Sender(SendClass map[string][]common.Ready2Send, now string)
send alert if rule is triggered.
func UpdateMaintainlist ¶
func UpdateMaintainlist()
Types ¶
Click to show internal directories.
Click to hide internal directories.