Add a default log alert

This commit is contained in:
Ian Fijolek
2020-02-18 00:47:43 +00:00
committed by Ian Fijolek
parent 8b0d3b65cf
commit 9c21880efa
4 changed files with 45 additions and 12 deletions
+13
View File
@@ -112,3 +112,16 @@ func (alert Alert) Send(notice AlertNotice) (outputStr string, err error) {
return outputStr, err
}
// NewLogAlert creates an alert that does basic logging using echo
func NewLogAlert() *Alert {
return &Alert{
Name: "log",
Command: CommandOrShell{
Command: []string{
"echo",
"{{.MonitorName}} check has failed {{.FailureCount}} times",
},
},
}
}