You've already forked nginx_exporter
mirror of
https://github.com/nginxinc/nginx-prometheus-exporter.git
synced 2025-08-08 05:02:04 +03:00
Add const labels to upMetric
This commit is contained in:
committed by
Dean Coakley
parent
39585bd443
commit
6a9964bcce
@@ -11,11 +11,12 @@ func newGlobalMetric(namespace string, metricName string, docString string, cons
|
||||
return prometheus.NewDesc(namespace+"_"+metricName, docString, nil, constLabels)
|
||||
}
|
||||
|
||||
func newUpMetric(namespace string) prometheus.Gauge {
|
||||
func newUpMetric(namespace string, constLabels map[string]string) prometheus.Gauge {
|
||||
return prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
Namespace: namespace,
|
||||
Name: "up",
|
||||
Help: "Status of the last metric scrape",
|
||||
Namespace: namespace,
|
||||
Name: "up",
|
||||
Help: "Status of the last metric scrape",
|
||||
ConstLabels: constLabels,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user