metrics

package
v0.67.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrgStatusActive  = "active"
	OrgStatusPending = "pending"
	OrgStatusError   = "error"
)

Variables

View Source
var (
	MimirQueryErrors = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "observability_operator_mimir_head_series_query_errors_total",
		Help: "Total number of reconciliations error",
	}, nil)

	// GrafanaOrganization metrics
	GrafanaOrganizationTenantInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "observability_operator_grafana_organization_tenants",
		Help: "Information about tenant resources per organization",
	}, []string{"name", "org_id"})

	GrafanaOrganizationInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "observability_operator_grafana_organization_info",
		Help: "Information about GrafanaOrganization resources",
	}, []string{"name", "display_name", "org_id", "status"}) // status: active, pending, error

	// Alertmanager metrics
	AlertmanagerRoutes = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "observability_operator_alertmanager_routes",
		Help: "Number of routes configured in Alertmanager per tenant",
	}, []string{"tenant"})

	// GrafanaAPIErrors counts errors returned by the Grafana API, labelled by operation.
	// operation values: configure_org, delete_org, configure_datasources, configure_dashboard, delete_dashboard
	GrafanaAPIErrors = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "observability_operator_grafana_api_errors_total",
		Help: "Total number of errors from the Grafana API, by operation",
	}, []string{"operation"})

	// MimirAlertmanagerAPIErrors counts errors returned by the Mimir Alertmanager API, labelled by operation.
	// operation values: push_config, delete_config
	MimirAlertmanagerAPIErrors = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "observability_operator_mimir_alertmanager_api_errors_total",
		Help: "Total number of errors from the Mimir Alertmanager API, by operation",
	}, []string{"operation"})

	// RulerAPIErrors counts errors returned by the ruler API (Mimir or Loki), labelled by operation.
	// operation values: delete_rules
	RulerAPIErrors = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "observability_operator_ruler_api_errors_total",
		Help: "Total number of errors from the ruler API, by operation",
	}, []string{"operation"})

	// MonitoredClusterInfo is an info gauge with one series per cluster currently being monitored.
	// Use count(observability_operator_monitored_cluster_info) to get the total cluster count.
	MonitoredClusterInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "observability_operator_monitored_cluster_info",
		Help: "Info gauge for clusters being monitored; one series per active cluster",
	}, []string{"cluster_name", "cluster_namespace"})
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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