Skip to content

Commit

Permalink
Update config/config.go
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Kochie <superq@gmail.com>
  • Loading branch information
sysadmind and SuperQ authored Jul 5, 2022
1 parent 1263ccd commit 2bb86cd
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,24 @@ import (

"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"gopkg.in/yaml.v3"
)

var (
configReloadSuccess = prometheus.NewGauge(prometheus.GaugeOpts{
configReloadSuccess = promauto.NewGauge(prometheus.GaugeOpts{
Namespace: "postgres_exporter",
Name: "config_last_reload_successful",
Help: "Postgres exporter config loaded successfully.",
})

configReloadSeconds = prometheus.NewGauge(prometheus.GaugeOpts{
configReloadSeconds = promauto.NewGauge(prometheus.GaugeOpts{
Namespace: "postgres_exporter",
Name: "config_last_reload_success_timestamp_seconds",
Help: "Timestamp of the last successful configuration reload.",
})
)

func init() {
prometheus.MustRegister(configReloadSuccess)
prometheus.MustRegister(configReloadSeconds)
}

type Config struct {
AuthModules map[string]AuthModule `yaml:"auth_modules"`
}
Expand Down

0 comments on commit 2bb86cd

Please sign in to comment.