From f939222942f1c496b9a0f2c1dd30fcf5f2a7da49 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 11 May 2022 13:04:53 -0700 Subject: [PATCH] add support for extra prometheus labels (#14899) fixes #14353 --- cmd/common-main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/common-main.go b/cmd/common-main.go index debd7bcdb..5bdbab2d9 100644 --- a/cmd/common-main.go +++ b/cmd/common-main.go @@ -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.