-
Notifications
You must be signed in to change notification settings - Fork 3
/
metrics.go
28 lines (23 loc) · 1001 Bytes
/
metrics.go
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
package collectors
import (
"github.com/prometheus/client_golang/prometheus"
)
var (
CFAuditEventCollectorErrorsTotal = prometheus.NewCounter(prometheus.CounterOpts{
Name: "cf_audit_event_collector_errors_total",
Help: "Number of errors encountered by CF Audit Event Collector",
})
CFAuditEventCollectorEventsCollectedTotal = prometheus.NewCounter(prometheus.CounterOpts{
Name: "cf_audit_event_collector_events_collected_total",
Help: "Number of events collected and saved to the DB by CF Audit Event Collector",
})
CFAuditEventCollectorEventsCollectDurationTotal = prometheus.NewCounter(prometheus.CounterOpts{
Name: "cf_audit_event_collector_collect_duration_total",
Help: "Number of seconds spent collecting events by CF Audit Event Collector",
})
)
func initMetrics() {
prometheus.MustRegister(CFAuditEventCollectorErrorsTotal)
prometheus.MustRegister(CFAuditEventCollectorEventsCollectedTotal)
prometheus.MustRegister(CFAuditEventCollectorEventsCollectDurationTotal)
}