File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -22,28 +22,24 @@ import (
22
22
23
23
"github.com/go-kit/log"
24
24
"github.com/prometheus/client_golang/prometheus"
25
+ "github.com/prometheus/client_golang/prometheus/promauto"
25
26
"gopkg.in/yaml.v3"
26
27
)
27
28
28
29
var (
29
- configReloadSuccess = prometheus .NewGauge (prometheus.GaugeOpts {
30
+ configReloadSuccess = promauto .NewGauge (prometheus.GaugeOpts {
30
31
Namespace : "postgres_exporter" ,
31
32
Name : "config_last_reload_successful" ,
32
33
Help : "Postgres exporter config loaded successfully." ,
33
34
})
34
35
35
- configReloadSeconds = prometheus .NewGauge (prometheus.GaugeOpts {
36
+ configReloadSeconds = promauto .NewGauge (prometheus.GaugeOpts {
36
37
Namespace : "postgres_exporter" ,
37
38
Name : "config_last_reload_success_timestamp_seconds" ,
38
39
Help : "Timestamp of the last successful configuration reload." ,
39
40
})
40
41
)
41
42
42
- func init () {
43
- prometheus .MustRegister (configReloadSuccess )
44
- prometheus .MustRegister (configReloadSeconds )
45
- }
46
-
47
43
type Config struct {
48
44
AuthModules map [string ]AuthModule `yaml:"auth_modules"`
49
45
}
You can’t perform that action at this time.
0 commit comments