-
Notifications
You must be signed in to change notification settings - Fork 0
/
metrics.go
25 lines (20 loc) · 1.07 KB
/
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
package collector
import "github.com/prometheus/client_golang/prometheus"
var (
notBefore = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "saml_x509_cert_not_before",
Help: "SAML X509 certificate validity period start",
}, []string{"entityid", "use", "serial_number", "issuer_C", "issuer_CN", "issuer_L", "issuer_O", "issuer_ST", "subject_C", "subject_CN", "subject_L", "subject_O"})
notAfter = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "saml_x509_cert_not_after",
Help: "SAML X509 certificate expiration date",
}, []string{"entityid", "use", "serial_number", "issuer_C", "issuer_CN", "issuer_L", "issuer_O", "issuer_ST", "subject_C", "subject_CN", "subject_L", "subject_O"})
certParse = prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "saml_x509_read_error_total",
Help: "Errors encountered while parsing SAML X509 certificates",
}, []string{"entityid", "use"})
metadataParse = prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "saml_metadata_error_total",
Help: "Errors encountered while parsing SAML metadata",
}, []string{"url"})
)