cloudflare/pint

Public

mirrored from https://github.com/cloudflare/pintAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.63.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmd/pint/metrics.go

59lines · modecode

1package main
2
3import "github.com/prometheus/client_golang/prometheus"
4
5var (
6 metricsRegistry = prometheus.NewRegistry()
7
8 pintVersion = prometheus.NewGaugeVec(
9 prometheus.GaugeOpts{
10 Name: "pint_version",
11 Help: "Version information",
12 },
13 []string{"version"},
14 )
15 checkIterationsTotal = prometheus.NewCounter(
16 prometheus.CounterOpts{
17 Name: "pint_check_iterations_total",
18 Help: "Total number of completed check iterations since pint start",
19 },
20 )
21 checkIterationChecks = prometheus.NewGauge(
22 prometheus.GaugeOpts{
23 Name: "pint_last_run_checks",
24 Help: "The number of checks to run in the current iteration",
25 },
26 )
27 checkIterationChecksDone = prometheus.NewGauge(
28 prometheus.GaugeOpts{
29 Name: "pint_last_run_checks_done",
30 Help: "The number of checks completed in the current iteration",
31 },
32 )
33 checkDuration = prometheus.NewSummaryVec(
34 prometheus.SummaryOpts{
35 Name: "pint_check_duration_seconds",
36 Help: "How long did a check took to complete",
37 },
38 []string{"check"},
39 )
40 lastRunTime = prometheus.NewGauge(
41 prometheus.GaugeOpts{
42 Name: "pint_last_run_time_seconds",
43 Help: "Last checks run completion time since unix epoch in seconds",
44 },
45 )
46 lastRunDuration = prometheus.NewGauge(
47 prometheus.GaugeOpts{
48 Name: "pint_last_run_duration_seconds",
49 Help: "Last checks run duration in seconds",
50 },
51 )
52 rulesParsedTotal = prometheus.NewCounterVec(
53 prometheus.CounterOpts{
54 Name: "pint_rules_parsed_total",
55 Help: "Total number of rules parsed since startup",
56 },
57 []string{"kind"},
58 )
59)