From aba6df2e0973bdb92d29e5197504c9ee24e16957 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 19 Jul 2019 15:30:31 +0300 Subject: [PATCH] SAML: add metrics (#18194) (cherry picked from commit 214195441f300c36143cb34580668b30d34b825e) --- pkg/infra/metrics/metrics.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/infra/metrics/metrics.go b/pkg/infra/metrics/metrics.go index 97cee3853dc..b20cebeccbd 100644 --- a/pkg/infra/metrics/metrics.go +++ b/pkg/infra/metrics/metrics.go @@ -56,6 +56,9 @@ var ( // MApiLoginOAuth is a metric api login oauth counter MApiLoginOAuth prometheus.Counter + // MApiLoginSAML is a metric api login SAML counter + MApiLoginSAML prometheus.Counter + // MApiOrgCreate is a metric api org created counter MApiOrgCreate prometheus.Counter @@ -243,6 +246,12 @@ func init() { Namespace: exporterName, }) + MApiLoginSAML = newCounterStartingAtZero(prometheus.CounterOpts{ + Name: "api_login_saml_total", + Help: "api login saml counter", + Namespace: exporterName, + }) + MApiOrgCreate = newCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_org_create_total", Help: "api org created counter", @@ -435,6 +444,7 @@ func initMetricVars() { MApiAdminUserCreate, MApiLoginPost, MApiLoginOAuth, + MApiLoginSAML, MApiOrgCreate, MApiDashboardSnapshotCreate, MApiDashboardSnapshotExternal,