mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
001589cd6d
Adds ability to record metrics and gather them for Prometheus.
15 lines
433 B
Go
15 lines
433 B
Go
package validator
|
|
|
|
import (
|
|
"github.com/authelia/authelia/v4/internal/configuration/schema"
|
|
)
|
|
|
|
// ValidateTelemetry validates the telemetry configuration.
|
|
func ValidateTelemetry(config *schema.Configuration, validator *schema.StructValidator) {
|
|
if config.Telemetry.Metrics.Enabled {
|
|
if config.Telemetry.Metrics.Address.String() == "" {
|
|
config.Telemetry.Metrics.Address = schema.DefaultTelemetryConfig.Metrics.Address
|
|
}
|
|
}
|
|
}
|