Add a default log alert

This commit is contained in:
Ian Fijolek
2020-02-18 00:47:43 +00:00
parent a7d1b8ab74
commit 65342fe0dd
2 changed files with 18 additions and 0 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",
},
},
}
}