diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index 9c61820..70493a2 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -230,7 +230,7 @@ func startServer() { fmt.Println("Starting server...") go func() { - metrics.SetHealty(true) + metrics.SetHealthy(true) err := router.Run(fmt.Sprintf("%v:%v", options.HTTPHost, options.HTTPPort)) if err != nil { diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index 43b9bf9..7b8b112 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -16,8 +16,8 @@ var ( Help: "Total number of custom queries executed", }) - healtyGauge = promauto.NewGauge(prometheus.GaugeOpts{ - Name: "pgweb_healty", + healthyGauge = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "pgweb_healthy", Help: "Server health status", }) ) @@ -30,10 +30,10 @@ func SetSessionsCount(val int) { sessionsGauge.Set(float64(val)) } -func SetHealty(val bool) { +func SetHealthy(val bool) { healthy := 0.0 if val { healthy = 1.0 } - healtyGauge.Set(float64(healthy)) + healthyGauge.Set(float64(healthy)) }