Include goversion in build_info metric

This commit is contained in:
Julius Volz 2016-04-08 14:24:16 +02:00
parent 3292c278fe
commit 6ea6f8eba9

View File

@ -43,11 +43,11 @@ func init() {
buildInfo := prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "alertmanager_build_info",
Help: "A metric with a constant '1' value labeled by version, revision, and branch from which Alertmanager was built.",
Help: "A metric with a constant '1' value labeled by version, revision, branch, and goversion from which Alertmanager was built.",
},
[]string{"version", "revision", "branch"},
[]string{"version", "revision", "branch", "goversion"},
)
buildInfo.WithLabelValues(Version, Revision, Branch).Set(1)
buildInfo.WithLabelValues(Version, Revision, Branch, GoVersion).Set(1)
prometheus.MustRegister(buildInfo)
}