Update main.go

This commit is contained in:
Martin/Geno 2019-06-17 15:18:45 +02:00
parent fc346be614
commit 490d7fdfe4
1 changed files with 3 additions and 2 deletions

View File

@ -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()," "))