Skip to content
Snippets Groups Projects
Commit 1451ea73 authored by Jan Grewe's avatar Jan Grewe
Browse files

Add 'host' label to all metrics

parent 75be769c
Branches
No related tags found
No related merge requests found
......@@ -93,47 +93,49 @@ func NewExporter(uri string) *Exporter {
prometheus.BuildFQName(namespace, "", "up"),
"Is the Nexenta API reachable",
nil,
nil),
prometheus.Labels{"host":*apiHost},
),
scrapeFailures: prometheus.NewCounter(prometheus.CounterOpts{
Namespace: namespace,
Name: "exporter_scrape_failures_total",
Help: "Number of errors while scraping the Nexenta API",
ConstLabels: prometheus.Labels{"host":*apiHost},
}),
volumeOnline: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "volume", "online"),
"Status of volume.",
[]string{"volume"},
nil,
prometheus.Labels{"host":*apiHost},
),
jbodStatus: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "jbod", "status"),
"Status of JBOD.",
[]string{"jbod"},
nil,
prometheus.Labels{"host":*apiHost},
),
jbodTemp: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "jbod", "temp"),
"Temperature of JBOD.",
[]string{"jbod", "name", "state"},
nil,
prometheus.Labels{"host":*apiHost},
),
jbodVoltage: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "jbod", "voltage"),
"Voltage of JBOD.",
[]string{"jbod", "name", "state"},
nil,
prometheus.Labels{"host":*apiHost},
),
jbodSlotStatus: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "jbod", "slot_status"),
"Status of JBOD slot.",
[]string{"jbod", "slot", "state"},
nil,
prometheus.Labels{"host":*apiHost},
),
licenseDaysLeft: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "license", "days_left"),
"License days left.",
nil,
nil,
prometheus.Labels{"host":*apiHost},
),
client: &http.Client{
Transport: &http.Transport{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment