diff --git a/prometheus/main.go b/prometheus/main.go index 707ae79..77ce15b 100644 --- a/prometheus/main.go +++ b/prometheus/main.go @@ -2,6 +2,7 @@ package prometheus import ( "fmt" + "strings" "net/http" @@ -30,8 +31,8 @@ func init() { } contentTag := request.Status - if len(request.Alerts.Firing) > 0 { - contentTag += ":" + len(request.Alerts.Firing) + if len(request.Alerts.Firing()) > 0 { + contentTag += ":" + len(request.Alerts.Firing()) } content := fmt.Sprintf("[%s] %s", contentTag, strings.Join(request.CommonAnnotations.Values()," "))