blob: b15c671111680b5df8ea1ebce92c779412675406 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
package metrics
import (
"github.com/prometheus/client_golang/prometheus"
)
var (
// DomainsServed counts the total number of sites served
DomainsServed = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "gitlab_pages_domains_served_total",
Help: "The total number of sites served by this Pages app",
})
// DomainUpdates counts the number of site updates processed
DomainUpdates = prometheus.NewCounter(prometheus.CounterOpts{
Name: "gitlab_pages_domains_updated_total",
Help: "The total number of site updates processed since daemon start",
})
// DomainLastUpdateTime is the UNIX timestamp of the last update
DomainLastUpdateTime = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "gitlab_pages_last_domain_update_seconds",
Help: "UNIX timestamp of the last update",
})
// ProcessedRequests is the number of HTTP requests served
ProcessedRequests = prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "gitlab_pages_http_requests_total",
Help: "Total number of HTTP requests done serving",
},
[]string{"code", "method"},
)
// SessionsActive is the number of HTTP requests currently being processed
SessionsActive = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "gitlab_pages_http_sessions_active",
Help: "The number of HTTP requests currently being processed",
})
)
func init() {
prometheus.MustRegister(DomainsServed)
prometheus.MustRegister(DomainUpdates)
prometheus.MustRegister(DomainLastUpdateTime)
prometheus.MustRegister(ProcessedRequests)
prometheus.MustRegister(SessionsActive)
}
|