prometheus

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PromVulnCount = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "labeller_cluster_vulnerabilities_count",
			Help: "Number of vulnerabilities in the cluster, labeled by severity",
		},
		[]string{
			"severity",
		},
	)

	PromVulnerableImages = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "labeller_vulnerable_images",
			Help: "Total number of unique vulnerable images running",
		},
	)

	PromLabellerErrorsTotal = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "labeller_errors_total",
			Help: "Number of errors generated by the labeller",
		},
	)

	PromPodEventsTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "labeller_pod_events_total",
			Help: "Total number of pods events, per namespace",
		},
		[]string{
			"event",
			"namespace",
		},
	)

	PromImageManifestVulnEventsTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "labeller_image_manifest_vuln_events_total",
			Help: "Total number of ImageManifestVuln events, per namespace",
		},
		[]string{
			"event",
			"namespace",
		},
	)

	PromQueueSize = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "labeller_queue_size",
			Help: "Number of items in the labeller's queue to process",
		},
	)

	PromSecscanRequestsTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "labeller_secscan_requests_total",
			Help: "Number of requests made to external secscan services, per host",
		},
		[]string{
			"host",
		},
	)

	PromSecscanRequestsDurationSeconds = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name: "labeller_secscan_requests_duration_seconds",
			Help: "Time it takes fto sync security information from secscan server, in seconds",
		},
		[]string{
			"host",
		},
	)

	PromReconciliationDurationSeconds = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Name: "labeller_reconciliation_duration_seconds",
			Help: "Time it takes for the operator's reconciliation, in seconds",
		},
	)
)

Functions

func ObserveReconciliationDuration

func ObserveReconciliationDuration() func()

func ObserveSecscanRequestDuration

func ObserveSecscanRequestDuration(host string) func()

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(addr string) *Server

func (*Server) Start

func (s *Server) Start()

func (*Server) Stop

func (s *Server) Stop() <-chan error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL