feat: Removed email alert settings
Chart Release / chart (push) Successful in 10s
Server Deploy / deploy (push) Successful in 5m15s

This commit is contained in:
2026-08-03 14:40:15 +01:00
parent 6881d92d0a
commit 1f08e90009
9 changed files with 123 additions and 168 deletions
+15 -1
View File
@@ -7,6 +7,10 @@ import (
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/models"
)
// TypeServer marks an event whose subject is a managed server rather than a
// monitor check. MonitorName carries the hostname in that case.
const TypeServer = "server"
type Event struct {
MonitorName string
Type string
@@ -21,7 +25,17 @@ func (e Event) title() string {
if e.NewStatus == models.StatusDown {
verb = "is DOWN"
}
s := fmt.Sprintf("[Vantage] %s (%s) %s", e.MonitorName, e.Type, verb)
var s string
if e.Type == TypeServer {
if e.NewStatus == models.StatusDown {
verb = "went offline"
} else {
verb = "is back online"
}
s = fmt.Sprintf("[Vantage] Server %s %s", e.MonitorName, verb)
} else {
s = fmt.Sprintf("[Vantage] %s (%s) %s", e.MonitorName, e.Type, verb)
}
if e.Message != "" {
s += ": " + e.Message
}