mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-22 08:48:43 +02:00
go version and deps update, fixed middlewares and metrics
- fixed "API JWT secret empty" warning output format - fixed metrics initialized when it should not - fixed middlewares.modifyRequest Host header not working properly
This commit is contained in:
@@ -174,16 +174,16 @@ func (mon *monitor) checkUpdateHealth() error {
|
||||
logger.Debug().Msg(detail)
|
||||
notif.Notify(mon.service, "server is down")
|
||||
}
|
||||
if common.PrometheusEnabled {
|
||||
go func() {
|
||||
m := metrics.GetRouteMetrics()
|
||||
var up float64
|
||||
if healthy {
|
||||
up = 1
|
||||
}
|
||||
m.HealthStatus.With(metrics.HealthMetricLabels(mon.service)).Set(up)
|
||||
}()
|
||||
}
|
||||
}
|
||||
if common.PrometheusEnabled {
|
||||
go func() {
|
||||
m := metrics.GetRouteMetrics()
|
||||
var up float64
|
||||
if healthy {
|
||||
up = 1
|
||||
}
|
||||
m.HealthStatus.With(metrics.HealthMetricLabels(mon.service)).Set(up)
|
||||
}()
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user