Skip to content

Commit 3f5648d

Browse files
jorgelbgjaimeyh
authored andcommitted
fix: set the value of elasticsearch_clusterinfo_version_info to 1 (prometheus-community#728)
In the Prometheus ecosystem, info metrics (those with the `_info` suffix) usually have a value of 1. Although not enforced, this has become a standard pattern across Prometheus and several exporters (see `prometheus_build_info`). Signed-off-by: Jorge Luis Betancourt Gonzalez <[email protected]>
1 parent db1d0c8 commit 3f5648d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/clusterinfo/clusterinfo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func (r *Retriever) updateMetrics(res *Response) {
146146
res.Version.BuildHash,
147147
res.Version.Number.String(),
148148
res.Version.LuceneVersion.String(),
149-
)
149+
).Set(1.0)
150150
r.lastUpstreamSuccessTs.WithLabelValues(url).Set(float64(time.Now().Unix()))
151151
}
152152

0 commit comments

Comments
 (0)