diff --git a/README.md b/README.md index 3c999701ce5f5de9f6c75e1af6f7713fef0e4500..9da41a585bc1cead647bf7100fe704d26995e980 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,13 @@ Flag | Env Var | Default Metric | Type | Description --- | --- | --- `nexenta_up` | gauge | Is the Nexenta API reachable (0/1) -`nexenta_scrape_failures_total` | counter |Number of errors while scraping the Nexenta API +`nexenta_scrape_failures_total` | counter | Number of errors while scraping the Nexenta API `nexenta_jbod_status` | gauge | Status of JBOD (0/1) `nexenta_jbod_temp` | gauge | Temperature of JBOD (°C) `nexenta_jbod_voltage` | gauge | Voltage of JBOD (Volts) `nexenta_jbod_slot_status` | gauge | Status of JBOD slot (0/1) `nexenta_license_days_left` | gauge | License days left `nexenta_volume_status` | gauge | Is the volume online (0/1) +`nexenta_volume_lun_errors` | count | Number of errors of a volume LUN `nexenta_volume_lun_status` | gauge | Is the volume LUN online (or available, if spare)(0/1) diff --git a/main.go b/main.go index d9687aa5535fd70059cdba13a422f124dc2e90be..9c9a6b1344f66b570c6050b4a8dd7601d966bfa2 100644 --- a/main.go +++ b/main.go @@ -143,7 +143,7 @@ func NewExporter(uri string) *Exporter { ), volumeLunErrors: prometheus.NewDesc( prometheus.BuildFQName(namespace, "volume", "lun_errors"), - "Count of volume LUN errors.", + "Number of volume LUN errors.", []string{"volume", "lun", "read", "write", "checksum"}, prometheus.Labels{"host":*apiHost}, ), @@ -282,7 +282,7 @@ func (e *Exporter) getVolumeLuns(ch chan<- prometheus.Metric, volume string) err volumeLunStatus = 1 } } - ch <- prometheus.MustNewConstMetric(e.volumeLunErrors, prometheus.GaugeValue, volumeLunErrors, + ch <- prometheus.MustNewConstMetric(e.volumeLunErrors, prometheus.CounterValue, volumeLunErrors, volume, lun, data[1], data[2], data[3]) ch <- prometheus.MustNewConstMetric(e.volumeLunStatus, prometheus.GaugeValue, volumeLunStatus, volume, lun, data[0], data[5])