Merge pull request #1233 from prymitive/fix-log

fix(backend): move version logging to include upstream name
This commit is contained in:
Łukasz Mierzwa
2019-12-06 16:03:47 +00:00
committed by GitHub
2 changed files with 1 additions and 3 deletions

View File

@@ -80,6 +80,7 @@ func (am *Alertmanager) probeVersion() string {
if err != nil {
return fakeVersion
}
log.Infof("[%s] Upstream version: %s", am.Name, version)
if version == "0.17.0" || version == "0.18.0" {
log.Warningf("Alertmanager %s might return incomplete list of alert groups in the API, please upgrade to >=0.19.0, see https://github.com/prymitive/karma/issues/812", version)

View File

@@ -4,8 +4,6 @@ import (
"io"
"github.com/prometheus/common/expfmt"
log "github.com/sirupsen/logrus"
)
const (
@@ -29,7 +27,6 @@ func Detect(r io.Reader) (string, error) {
for _, l := range v.Label {
if l.GetName() == versionLabel {
version = l.GetValue()
log.Infof("Upstream version: %s", version)
break
}
}