Skip to content

Commit ef19948

Browse files
committed
fix: change label 'is_active' for metric 'gitea_users' to 'state'
1 parent 9f0948e commit ef19948

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/metrics/collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func NewCollector() Collector {
184184
Users: prometheus.NewDesc(
185185
namespace+"users",
186186
"Number of Users",
187-
[]string{"is_active"}, nil,
187+
[]string{"state"}, nil,
188188
),
189189
Watches: prometheus.NewDesc(
190190
namespace+"watches",
@@ -374,13 +374,13 @@ func (c Collector) Collect(ch chan<- prometheus.Metric) {
374374
c.Users,
375375
prometheus.GaugeValue,
376376
float64(stats.Counter.UsersActive),
377-
"true", // is_active label
377+
"active", // state label
378378
)
379379
ch <- prometheus.MustNewConstMetric(
380380
c.Users,
381381
prometheus.GaugeValue,
382382
float64(stats.Counter.UsersNotActive),
383-
"false", // is_active label
383+
"inactive", // state label
384384
)
385385
ch <- prometheus.MustNewConstMetric(
386386
c.Watches,

0 commit comments

Comments
 (0)