You've already forked postgres_exporter
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:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user