mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
Prometheus Metrics: Add missing stat_total_teams metric (#65133)
* Prometheus Metrics: Add missing stat_total_teams metric
This commit is contained in:
parent
8941ca813c
commit
895d4cc60b
@ -143,6 +143,9 @@ var (
|
||||
// MStatTotalUsers is a metric total amount of users
|
||||
MStatTotalUsers prometheus.Gauge
|
||||
|
||||
// MStatTotalTeams is a metric total amount of teams
|
||||
MStatTotalTeams prometheus.Gauge
|
||||
|
||||
// MStatActiveUsers is a metric number of active users
|
||||
MStatActiveUsers prometheus.Gauge
|
||||
|
||||
@ -445,6 +448,12 @@ func init() {
|
||||
Namespace: ExporterName,
|
||||
})
|
||||
|
||||
MStatTotalTeams = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
Name: "stat_total_teams",
|
||||
Help: "total amount of teams",
|
||||
Namespace: ExporterName,
|
||||
})
|
||||
|
||||
MStatActiveUsers = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
Name: "stat_active_users",
|
||||
Help: "number of active users",
|
||||
@ -661,6 +670,7 @@ func initMetricVars() {
|
||||
MStatTotalDashboards,
|
||||
MStatTotalFolders,
|
||||
MStatTotalUsers,
|
||||
MStatTotalTeams,
|
||||
MStatActiveUsers,
|
||||
MStatTotalOrgs,
|
||||
MStatTotalPlaylists,
|
||||
|
@ -312,6 +312,7 @@ func (s *Service) updateTotalStats(ctx context.Context) bool {
|
||||
metrics.MStatTotalDashboards.Set(float64(statsQuery.Result.Dashboards))
|
||||
metrics.MStatTotalFolders.Set(float64(statsQuery.Result.Folders))
|
||||
metrics.MStatTotalUsers.Set(float64(statsQuery.Result.Users))
|
||||
metrics.MStatTotalTeams.Set(float64(statsQuery.Result.Teams))
|
||||
metrics.MStatActiveUsers.Set(float64(statsQuery.Result.ActiveUsers))
|
||||
metrics.MStatTotalPlaylists.Set(float64(statsQuery.Result.Playlists))
|
||||
metrics.MStatTotalOrgs.Set(float64(statsQuery.Result.Orgs))
|
||||
|
Loading…
Reference in New Issue
Block a user