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
48
49
50
51
52
53
54
55
56
57
58
59
|
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_served_domains",
Help: "The number of sites served by this Pages app",
})
// FailedDomainUpdates counts the number of failed site updates
FailedDomainUpdates = prometheus.NewCounter(prometheus.CounterOpts{
Name: "gitlab_pages_domains_failed_total",
Help: "The total number of site updates that have failed since daemon start",
})
// DomainUpdates counts the number of site updates successfully processed
DomainUpdates = prometheus.NewCounter(prometheus.CounterOpts{
Name: "gitlab_pages_domains_updated_total",
Help: "The total number of site updates successfully 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",
})
// DomainsConfigurationUpdateDuration is the time it takes to update domains configuration from disk
DomainsConfigurationUpdateDuration = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "gitlab_pages_domains_configuration_update_duration",
Help: "The time (in seconds) it takes to update domains configuration from disk",
})
// DomainsSourceCacheHit is the number of GitLab API call cache hits
DomainsSourceCacheHit = prometheus.NewCounter(prometheus.CounterOpts{
Name: "gitlab_pages_domains_source_cache_hit",
Help: "The number of GitLab domains API cache hits",
})
// DomainsSourceCacheMiss is the number of GitLab API call cache misses
DomainsSourceCacheMiss = prometheus.NewCounter(prometheus.CounterOpts{
Name: "gitlab_pages_domains_source_cache_miss",
Help: "The number of GitLab domains API cache misses",
})
)
func init() {
prometheus.MustRegister(DomainsServed)
prometheus.MustRegister(FailedDomainUpdates)
prometheus.MustRegister(DomainUpdates)
prometheus.MustRegister(DomainLastUpdateTime)
prometheus.MustRegister(DomainsConfigurationUpdateDuration)
prometheus.MustRegister(DomainsSourceCacheHit)
prometheus.MustRegister(DomainsSourceCacheMiss)
}
|