Skip to content

Commit

Permalink
Merge pull request #6 from simonpasquier/refactor
Browse files Browse the repository at this point in the history
Add metrics about the exporter + rework some metrics
  • Loading branch information
czerwonk authored Jun 20, 2019
2 parents c94c02d + 69b2438 commit a2fc594
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 81 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
language: go
go:
- "1.11"
- "1.x"
env:
GO111MODULE: "on"
install: true
script: go build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ovirt_exporter
[![Build Status](https://travis-ci.org/czerwonk/ovirt_exporter.svg)](https://travis-ci.org/czerwonk/ovirt_exporter)
[![Docker Build Statu](https://img.shields.io/docker/build/czerwonk/ovirt_exporter.svg)](https://hub.docker.com/r/czerwonk/ovirt_exporter/builds)
[![Docker Build Status](https://img.shields.io/docker/build/czerwonk/ovirt_exporter.svg)](https://hub.docker.com/r/czerwonk/ovirt_exporter/builds)
[![Go Report Card](https://goreportcard.com/badge/github.com/czerwonk/ovirt_exporter)](https://goreportcard.com/report/github.com/czerwonk/ovirt_exporter)

Exporter for oVirt engine metrics to use with https://prometheus.io/
Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module github.com/czerwonk/ovirt_exporter

require (
github.com/czerwonk/ovirt_api v0.0.0-20180321161247-63e3f014686c
github.com/prometheus/client_golang v0.9.3
github.com/prometheus/common v0.4.0
github.com/stretchr/testify v1.3.0 // indirect
github.com/prometheus/client_golang v0.9.4
github.com/prometheus/common v0.4.1
)
24 changes: 9 additions & 15 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,55 +1,50 @@
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/czerwonk/ovirt_api v0.0.0-20180321161247-63e3f014686c h1:INAycqte6XKVd7dMxU2P2PJ+pVBRxh/nbBNz5sFVL64=
github.com/czerwonk/ovirt_api v0.0.0-20180321161247-63e3f014686c/go.mod h1:+VghUdfYUdNtcqhe9JJrnZUvrHKw/QEEJxshWnRecso=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
github.com/prometheus/client_golang v0.9.4 h1:Y8E/JaaPbmFSW2V81Ab/d8yZFYQQGbni1b1jPcG9Y6A=
github.com/prometheus/client_golang v0.9.4/go.mod h1:oCXIBxdI62A4cR6aTRJCgetEjecSIYzOEaeAn4iYEpM=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
Expand All @@ -61,7 +56,6 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5 h1:mzjBh+S5frKOsOBobWIMAbXavqjmgO17k/2puhcFR94=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
Expand Down
36 changes: 16 additions & 20 deletions host/host_collector.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package host

import (
"sync"

"fmt"
"sync"

"github.com/czerwonk/ovirt_api/api"
"github.com/czerwonk/ovirt_exporter/cluster"
Expand Down Expand Up @@ -32,21 +31,22 @@ func init() {
cpuCoresDesc = prometheus.NewDesc(prefix+"cpu_cores", "Number of CPU cores assigned", labelNames, nil)
cpuSocketsDesc = prometheus.NewDesc(prefix+"cpu_sockets", "Number of sockets", labelNames, nil)
cpuThreadsDesc = prometheus.NewDesc(prefix+"cpu_threads", "Number of threads", labelNames, nil)
cpuSpeedDesc = prometheus.NewDesc(prefix+"cpu_speed", "CPU speed in MHz", labelNames, nil)
cpuSpeedDesc = prometheus.NewDesc(prefix+"cpu_speed_hertz", "CPU speed in hertz", labelNames, nil)
memoryDesc = prometheus.NewDesc(prefix+"memory_installed_bytes", "Memory installed in bytes", labelNames, nil)
}

// HostCollector collects host statistics from oVirt
type HostCollector struct {
client *api.Client
metrics []prometheus.Metric
collectNetwork bool
mutex sync.Mutex
client *api.Client
collectDuration prometheus.Observer
metrics []prometheus.Metric
collectNetwork bool
mutex sync.Mutex
}

// NewCollector creates a new collector
func NewCollector(client *api.Client, collectNetwork bool) prometheus.Collector {
return &HostCollector{client: client, collectNetwork: collectNetwork}
func NewCollector(client *api.Client, collectNetwork bool, collectDuration prometheus.Observer) prometheus.Collector {
return &HostCollector{client: client, collectNetwork: collectNetwork, collectDuration: collectDuration}
}

// Collect implements Prometheus Collector interface
Expand Down Expand Up @@ -76,6 +76,9 @@ func (c *HostCollector) getMetrics() []prometheus.Metric {
}

func (c *HostCollector) retrieveMetrics() {
timer := prometheus.NewTimer(c.collectDuration)
defer timer.ObserveDuration()

h := Hosts{}
err := c.client.GetAndParse("hosts", &h)
if err != nil {
Expand All @@ -91,20 +94,13 @@ func (c *HostCollector) retrieveMetrics() {
go c.collectForHost(h, ch, wg)
}

done := make(chan bool)
go func() {
wg.Wait()
done <- true
close(ch)
}()

for {
select {
case m := <-ch:
c.metrics = append(c.metrics, m)

case <-done:
return
}
for m := range ch {
c.metrics = append(c.metrics, m)
}
}

Expand Down Expand Up @@ -132,7 +128,7 @@ func (c *HostCollector) collectCPUMetrics(host *Host, ch chan prometheus.Metric,
ch <- metric.MustCreate(cpuCoresDesc, float64(topo.Cores), l)
ch <- metric.MustCreate(cpuThreadsDesc, float64(topo.Threads), l)
ch <- metric.MustCreate(cpuSocketsDesc, float64(topo.Sockets), l)
ch <- metric.MustCreate(cpuSpeedDesc, float64(host.CPU.Speed), l)
ch <- metric.MustCreate(cpuSpeedDesc, float64(host.CPU.Speed*1e6), l)
}

func (c *HostCollector) addMetric(desc *prometheus.Desc, v float64, labelValues []string) {
Expand Down
34 changes: 27 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ var (
withSnapshots = flag.Bool("with-snapshots", true, "Collect snapshot metrics (can be time consuming in some cases)")
withNetwork = flag.Bool("with-network", true, "Collect network metrics (can be time consuming in some cases)")
debug = flag.Bool("debug", false, "Show verbose output (e.g. body of each response received from API)")

collectorDuration = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Name: "ovirt_collectors_duration",
Help: "Histogram of latencies for metric collectors.",
Buckets: []float64{.1, .2, .4, 1, 3, 8, 20, 60},
},
[]string{"collector"},
)
)

func init() {
Expand Down Expand Up @@ -79,8 +88,13 @@ func startServer() {
}
defer client.Close()

reg := prometheus.NewRegistry()
reg.MustRegister(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}))
reg.MustRegister(prometheus.NewGoCollector())
reg.MustRegister(collectorDuration)

http.HandleFunc(*metricsPath, func(w http.ResponseWriter, r *http.Request) {
handleMetricsRequest(w, r, client)
handleMetricsRequest(w, r, client, reg)
})

log.Infof("Listening for %s on %s", *metricsPath, *listenAddress)
Expand Down Expand Up @@ -112,13 +126,19 @@ func connectAPI() (*api.Client, error) {
return client, err
}

func handleMetricsRequest(w http.ResponseWriter, r *http.Request, client *api.Client) {
func handleMetricsRequest(w http.ResponseWriter, r *http.Request, client *api.Client, appReg *prometheus.Registry) {
reg := prometheus.NewRegistry()
reg.MustRegister(vm.NewCollector(client, *withSnapshots, *withNetwork))
reg.MustRegister(host.NewCollector(client, *withNetwork))
reg.MustRegister(storagedomain.NewCollector(client))
reg.MustRegister(vm.NewCollector(client, *withSnapshots, *withNetwork, collectorDuration.WithLabelValues("vm")))
reg.MustRegister(host.NewCollector(client, *withNetwork, collectorDuration.WithLabelValues("host")))
reg.MustRegister(storagedomain.NewCollector(client, collectorDuration.WithLabelValues("storage")))

multiRegs := prometheus.Gatherers{
reg,
appReg,
}

promhttp.HandlerFor(reg, promhttp.HandlerOpts{
promhttp.HandlerFor(multiRegs, promhttp.HandlerOpts{
ErrorLog: log.NewErrorLogger(),
ErrorHandling: promhttp.ContinueOnError}).ServeHTTP(w, r)
ErrorHandling: promhttp.ContinueOnError,
Registry: appReg}).ServeHTTP(w, r)
}
23 changes: 16 additions & 7 deletions statistic/helper.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package statistic

import (
"strings"

"fmt"
"strings"

"github.com/czerwonk/ovirt_api/api"
"github.com/czerwonk/ovirt_exporter/metric"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
)
Expand All @@ -20,20 +18,31 @@ func CollectMetrics(path, prefix string, labelNames, labelValues []string, clien
}

for _, s := range stats.Statistic {
if s.Kind == "gauge" || s.Kind == "counter" {
ch <- convertToMetric(s, prefix, labelNames, labelValues)
if s.Type != "decimal" && s.Type != "integer" {
continue
}
switch s.Kind {
case "gauge":
ch <- convertToMetric(s, prefix, labelNames, labelValues, prometheus.GaugeValue)
case "counter":
ch <- convertToMetric(s, prefix, labelNames, labelValues, prometheus.CounterValue)
}
}
}

func convertToMetric(s Statistic, prefix string, labelNames, labelValues []string) prometheus.Metric {
func convertToMetric(s Statistic, prefix string, labelNames, labelValues []string, valueType prometheus.ValueType) prometheus.Metric {
metricName := strings.Replace(s.Name, ".", "_", -1)

if s.Unit != "none" {
metricName += "_" + s.Unit
}

if valueType == prometheus.CounterValue {
// Suffix counter metrics with '_total' to follow Prometheus best practices.
metricName = strings.ReplaceAll(metricName, "_total", "")
metricName = metricName + "_total"
}
d := prometheus.NewDesc(fmt.Sprint(prefix, metricName), s.Description, labelNames, nil)

return metric.MustCreate(d, s.Values.Value.Datum, labelValues)
return prometheus.MustNewConstMetric(d, valueType, float64(s.Values.Value.Datum), labelValues...)
}
23 changes: 9 additions & 14 deletions storagedomain/storagedomain_collector.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package storagedomain

import (
"sync"

"github.com/czerwonk/ovirt_api/api"
"github.com/czerwonk/ovirt_exporter/metric"
"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -30,31 +28,30 @@ func init() {

// StorageDomainCollector collects storage domain statistics from oVirt
type StorageDomainCollector struct {
client *api.Client
client *api.Client
collectDuration prometheus.Observer
}

// NewCollector creates a new collector
func NewCollector(client *api.Client) prometheus.Collector {
return &StorageDomainCollector{client: client}
func NewCollector(client *api.Client, collectDuration prometheus.Observer) prometheus.Collector {
return &StorageDomainCollector{client: client, collectDuration: collectDuration}
}

// Collect implements Prometheus Collector interface
func (c *StorageDomainCollector) Collect(ch chan<- prometheus.Metric) {
timer := prometheus.NewTimer(c.collectDuration)
defer timer.ObserveDuration()

s := StorageDomains{}
err := c.client.GetAndParse("storagedomains", &s)
if err != nil {
log.Error(err)
return
}

wg := &sync.WaitGroup{}
wg.Add(len(s.Domains))

for _, h := range s.Domains {
go c.collectMetricsForDomain(h, ch, wg)
c.collectMetricsForDomain(h, ch)
}

wg.Wait()
}

// Describe implements Prometheus Collector interface
Expand All @@ -66,9 +63,7 @@ func (c *StorageDomainCollector) Describe(ch chan<- *prometheus.Desc) {
ch <- committedDesc
}

func (c *StorageDomainCollector) collectMetricsForDomain(domain StorageDomain, ch chan<- prometheus.Metric, wg *sync.WaitGroup) {
defer wg.Done()

func (c *StorageDomainCollector) collectMetricsForDomain(domain StorageDomain, ch chan<- prometheus.Metric) {
d := &domain
l := []string{d.Name, string(d.Type), d.Storage.Path}

Expand Down
Loading

0 comments on commit a2fc594

Please sign in to comment.