Fix typo in the healthy metric (#657)
This commit is contained in:
parent
bed7ab9564
commit
941c0acea3
@ -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 {
|
||||
|
@ -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))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user