File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -22,28 +22,24 @@ import (
2222
2323 "github.com/go-kit/log"
2424 "github.com/prometheus/client_golang/prometheus"
25+ "github.com/prometheus/client_golang/prometheus/promauto"
2526 "gopkg.in/yaml.v3"
2627)
2728
2829var (
29- configReloadSuccess = prometheus .NewGauge (prometheus.GaugeOpts {
30+ configReloadSuccess = promauto .NewGauge (prometheus.GaugeOpts {
3031 Namespace : "postgres_exporter" ,
3132 Name : "config_last_reload_successful" ,
3233 Help : "Postgres exporter config loaded successfully." ,
3334 })
3435
35- configReloadSeconds = prometheus .NewGauge (prometheus.GaugeOpts {
36+ configReloadSeconds = promauto .NewGauge (prometheus.GaugeOpts {
3637 Namespace : "postgres_exporter" ,
3738 Name : "config_last_reload_success_timestamp_seconds" ,
3839 Help : "Timestamp of the last successful configuration reload." ,
3940 })
4041)
4142
42- func init () {
43- prometheus .MustRegister (configReloadSuccess )
44- prometheus .MustRegister (configReloadSeconds )
45- }
46-
4743type Config struct {
4844 AuthModules map [string ]AuthModule `yaml:"auth_modules"`
4945}
You can’t perform that action at this time.
0 commit comments