mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-12-21 02:21:55 +01:00
Fix up deprecated client_golang use.
Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
parent
85aa834641
commit
b9061f820c
1 changed files with 3 additions and 2 deletions
5
main.go
5
main.go
|
@ -5,6 +5,7 @@ import (
|
|||
"net/http"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/collectors"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
|
||||
|
@ -55,8 +56,8 @@ func init() {
|
|||
func main() {
|
||||
reg := prometheus.NewPedanticRegistry()
|
||||
reg.MustRegister(
|
||||
prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}),
|
||||
prometheus.NewGoCollector(),
|
||||
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
|
||||
collectors.NewGoCollector(),
|
||||
)
|
||||
|
||||
prometheus.WrapRegistererWithPrefix("", reg).MustRegister(SMARTctlManagerCollector{})
|
||||
|
|
Loading…
Reference in a new issue