metrics

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 8 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"
	Rhel6AlertName               = "DeprecatedRHEL6Vm"
)
View Source
const (
	Total_restored_common_templates_increase_query = "sum(increase(total_restored_common_templates{pod=~'ssp-operator.*'}[1h]))"
	Total_rejected_vms_increase_query              = "sum(increase(total_rejected_vms{pod=~'virt-template-validator.*'}[1h]))"
)

Variables

View Source
var RecordRulesDescList = []RecordRulesDesc{
	{
		Name:        "kubevirt_ssp_operator_up_total",
		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_total",
		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_num_of_operator_reconciling_properly",
		Expr:        intstr.FromString("sum(ssp_operator_reconciling_properly)"),
		Description: "The total number of ssp-operator pods reconciling with no errors",
		Type:        "Gauge",
	},
	{
		Name:        "kubevirt_ssp_rejected_vms_total",
		Expr:        intstr.FromString(Total_rejected_vms_increase_query + " OR on() vector(0)"),
		Description: "The total number of vms rejected by virt-template-validator",
		Type:        "Counter",
	},
	{
		Name:        "kubevirt_ssp_common_templates_restored_total",
		Expr:        intstr.FromString(Total_restored_common_templates_increase_query + " OR on() vector(0)"),
		Description: "The total number of common templates restored by the operator back to their original state",
		Type:        "Counter",
	},
}

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