Skip to content

Commit 0ce4b1c

Browse files
authored
Merge pull request #240 from antondollmaier/master
add the Version Collector Metric
2 parents 77d8022 + 6258d3a commit 0ce4b1c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.go

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323

2424
kingpin "github.com/alecthomas/kingpin/v2"
2525
"github.com/prometheus/client_golang/prometheus"
26+
versioncollector "github.com/prometheus/client_golang/prometheus/collectors/version"
2627
"github.com/prometheus/client_golang/prometheus/promhttp"
2728
"github.com/prometheus/common/promslog"
2829
"github.com/prometheus/common/promslog/flag"
@@ -136,6 +137,7 @@ func main() {
136137
}
137138
}()
138139

140+
prometheus.MustRegister(versioncollector.NewCollector("ipmi_exporter"))
139141
localCollector := metaCollector{target: targetLocal, module: "default", config: sc}
140142
prometheus.MustRegister(&localCollector)
141143

0 commit comments

Comments
 (0)