metrics

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrometheusRuleName = "prometheus-k8s-rules-cnv"
	MonitorNamespace   = "openshift-monitoring"

	PrometheusLabelKey           = "prometheus.ssp.kubevirt.io"
	PrometheusLabelValue         = "true"
	PrometheusClusterRoleName    = "prometheus-k8s-ssp"
	PrometheusServiceAccountName = "prometheus-k8s"
	MetricsPortName              = "metrics"
)
View Source
const (
	CommonTemplatesRestoredIncreaseQuery   = "sum(increase(kubevirt_ssp_common_templates_restored_total{pod=~'ssp-operator.*'}[1h]))"
	TemplateValidatorRejectedIncreaseQuery = "sum(increase(kubevirt_ssp_template_validator_rejected_total{pod=~'virt-template-validator.*'}[1h]))"
)

Variables

View Source
var RecordRulesDescList = []RecordRulesDesc{
	{
		Name:        "kubevirt_ssp_operator_up",
		Expr:        intstr.FromString("sum(up{pod=~'ssp-operator.*'}) OR on() vector(0)"),
		Description: "The total number of running ssp-operator pods",
		Type:        "Gauge",
	},
	{
		Name:        "kubevirt_ssp_template_validator_up",
		Expr:        intstr.FromString("sum(up{pod=~'virt-template-validator.*'}) OR on() vector(0)"),
		Description: "The total number of running virt-template-validator pods",
		Type:        "Gauge",
	},
	{
		Name:        "kubevirt_ssp_operator_reconcile_succeeded_aggregated",
		Expr:        intstr.FromString("sum(kubevirt_ssp_operator_reconcile_succeeded)"),
		Description: "The total number of ssp-operator pods reconciling with no errors",
		Type:        "Gauge",
	},
	{
		Name:        "kubevirt_ssp_template_validator_rejected_increase",
		Expr:        intstr.FromString(TemplateValidatorRejectedIncreaseQuery + " OR on() vector(0)"),
		Description: "The increase in the number of rejected template validators, over the last hour",
		Type:        "Gauge",
	},
	{
		Name:        "kubevirt_ssp_common_templates_restored_increase",
		Expr:        intstr.FromString(CommonTemplatesRestoredIncreaseQuery + " OR on() vector(0)"),
		Description: "The increase in the number of common templates restored by the operator back to their original state, over the last hour",
		Type:        "Gauge",
	},
}

RecordRulesDescList lists all SSP Operator Prometheus Record Rules

Functions

func New added in v0.13.0

func New() operands.Operand

func ServiceMonitorLabels added in v0.14.0

func ServiceMonitorLabels() map[string]string

func WatchClusterTypes added in v0.14.0

func WatchClusterTypes() []operands.WatchType

func WatchTypes added in v0.13.0

func WatchTypes() []operands.WatchType

Types

type RecordRulesDesc added in v0.14.0

type RecordRulesDesc struct {
	Name        string
	Expr        intstr.IntOrString
	Description string
	Type        string
}

RecordRulesDesc represent SSP Operator Prometheus Record Rules

Jump to

Keyboard shortcuts

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