Documentation
¶
Index ¶
- Constants
- Variables
- func GetCountOfCertsIssued(domain string, durationDays int) int
- func GetListOfCertsExpiringSoon(domain string, durationDays int) [][]string
- func GetListOfCertsIssued(domain string, durationDays int) [][]string
- func UpdateCertificateIssueDurationMetric(time time.Duration)
- func UpdateCertsIssuedInLastDayGauge()
- func UpdateCertsIssuedInLastWeekGauge()
- func UpdateDuplicateCertsIssuedInLastWeek()
- func UpdateMetrics(hour int)
Constants ¶
View Source
const ( CRT_SH_PG_DB_HOSTNAME string = "crt.sh" CRT_SH_PG_DB_PORT int = 5432 CRT_SH_PG_DB_USERNAME string = "guest" CRT_SH_PG_DB_NAME string = "certwatch" GET_COUNT_CERTS_ISSUED_BY_LE_SQL string = `` /* 988-byte string literal not displayed */ GET_LIST_CERTS_ISSUED_BY_LE_SQL string = `` /* 997-byte string literal not displayed */ GET_LIST_CERTS_ISSUED_BY_LE_SQL_EXPIRING_SOON string = `` /* 1013-byte string literal not displayed */ )
Variables ¶
View Source
var ( MetricCertsIssuedInLastDayOpenshiftCom = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "certman_operator_certs_in_last_day_openshift_com", Help: "Report how many certs have been issued for Openshift.com in the last 24 hours", }, []string{"name"}) MetricCertsIssuedInLastDayOpenshiftAppsCom = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "certman_operator_certs_in_last_day_openshift_apps_com", Help: "Report how many certs have been issued for Openshiftapps.com in the last 24 hours", }, []string{"name"}) MetricCertsIssuedInLastWeekOpenshiftCom = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "certman_operator_certs_in_last_week_openshift_com", Help: "Report how many certs have been issued for Openshift.com in the last 7 days", }, []string{"name"}) MetricCertsIssuedInLastWeekOpenshiftAppsCom = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "certman_operator_certs_in_last_week_openshift_apps_com", Help: "Report how many certs have been issued for Openshiftapps.com in the last 7 days", }, []string{"name"}) MetricDuplicateCertsIssuedInLastWeek = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "certman_operator_duplicate_certs_in_last_week", Help: "Report how many certs have had duplicate issues", }, []string{"name"}) MetricIssueCertificateDuration = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "certman_operator_certificate_issue_duration", Help: "Runtime of issue certificate function in seconds", ConstLabels: prometheus.Labels{"name": "certman-operator"}, }) MetricsList = []prometheus.Collector{ MetricCertsIssuedInLastDayOpenshiftCom, MetricCertsIssuedInLastDayOpenshiftAppsCom, MetricCertsIssuedInLastWeekOpenshiftCom, MetricCertsIssuedInLastWeekOpenshiftAppsCom, MetricDuplicateCertsIssuedInLastWeek, MetricIssueCertificateDuration, } )
Functions ¶
func GetCountOfCertsIssued ¶
GetCountOfCertsIssued returns the number of certs issued for a given domain in the last durationDays number of days
func GetListOfCertsExpiringSoon ¶
GetListOfCertsExpiringSoon returns a list of certs expiring within the specified number of days
func GetListOfCertsIssued ¶
GetListOfCertsIssued returns a list of certs issued for a given domain since durationDays number of days ago
func UpdateCertsIssuedInLastDayGauge ¶
func UpdateCertsIssuedInLastDayGauge()
UpdateCertsIssuedInLastDayGauge sets the gauge metric with the number of certs issued in last day
func UpdateCertsIssuedInLastWeekGauge ¶
func UpdateCertsIssuedInLastWeekGauge()
UpdateCertsIssuedInLastWeekGuage sets the gauge metric with the number of certs issued in last week
func UpdateDuplicateCertsIssuedInLastWeek ¶
func UpdateDuplicateCertsIssuedInLastWeek()
UpdateDuplicateCertsIssuedInLastWeek ...
func UpdateMetrics ¶
func UpdateMetrics(hour int)
UpdateMetrics updates all the metrics every N hours
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.