diff --git a/vault/core_metrics.go b/vault/core_metrics.go index c302099953..b5b5c15f72 100644 --- a/vault/core_metrics.go +++ b/vault/core_metrics.go @@ -607,6 +607,17 @@ func (c *Core) GetSecretEngineUsageMetrics() map[string]int { for _, entry := range c.mounts.Entries { mountType := entry.Type + + if mountType == mountTypeNSIdentity { + mountType = pluginconsts.SecretEngineIdentity + } + if mountType == mountTypeNSSystem { + mountType = pluginconsts.SecretEngineSystem + } + if mountType == mountTypeNSCubbyhole { + mountType = pluginconsts.SecretEngineCubbyhole + } + if _, ok := mounts[mountType]; !ok { mounts[mountType] = 1 } else { @@ -625,6 +636,11 @@ func (c *Core) GetAuthMethodUsageMetrics() map[string]int { for _, entry := range c.auth.Entries { authType := entry.Type + + if authType == mountTypeNSToken { + authType = pluginconsts.AuthTypeToken + } + if _, ok := mounts[authType]; !ok { mounts[authType] = 1 } else { diff --git a/vault/mount.go b/vault/mount.go index 365d3f2aba..d95489bbe3 100644 --- a/vault/mount.go +++ b/vault/mount.go @@ -75,6 +75,7 @@ const ( mountTypeSystem = "system" mountTypeNSSystem = "ns_system" mountTypeIdentity = "identity" + mountTypeNSIdentity = "ns_identity" mountTypeCubbyhole = "cubbyhole" mountTypePlugin = "plugin" mountTypeKV = "kv"