1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2026-01-05 22:18:18 +03:00

cleanup and README

Signed-off-by: Joe Adams <github@joeadams.io>

Co-authored-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Joe Adams
2022-06-28 22:22:14 -04:00
parent cc751b7966
commit 8f8d2208f5
4 changed files with 39 additions and 27 deletions

View File

@@ -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"`
}