Fix up deprecated client_golang use.

Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
SuperQ 2022-06-17 13:27:10 +02:00
parent 85aa834641
commit b9061f820c
No known key found for this signature in database
GPG key ID: C646B23C9E3245F1

View file

@ -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{})