add support for extra prometheus labels (#14899)

fixes #14353
This commit is contained in:
Harshavardhana 2022-05-11 13:04:53 -07:00 committed by GitHub
parent c293c2e9a3
commit f939222942
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,6 +190,10 @@ func minioConfigToConsoleFeatures() {
os.Setenv("CONSOLE_PROMETHEUS_URL", value)
if value := env.Get("MINIO_PROMETHEUS_JOB_ID", "minio-job"); value != "" {
os.Setenv("CONSOLE_PROMETHEUS_JOB_ID", value)
// Support additional labels for more granular filtering.
if value := env.Get("MINIO_PROMETHEUS_EXTRA_LABELS", ""); value != "" {
os.Setenv("CONSOLE_PROMETHEUS_EXTRA_LABELS", value)
}
}
}
// Enable if LDAP is enabled.