From 490d7fdfe4632525c226fbd6c418c5cc6a18d7e5 Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Mon, 17 Jun 2019 15:18:45 +0200 Subject: [PATCH] Update main.go --- prometheus/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()," "))