metrics

package
v0.68.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OrgStatusActive  = "active"
	OrgStatusPending = "pending"
	OrgStatusError   = "error"
)
View Source
const (
	OpConfigureOrg         = "configure_org"
	OpDeleteOrg            = "delete_org"
	OpConfigureDatasources = "configure_datasources"
	OpConfigureDashboard   = "configure_dashboard"
	OpDeleteDashboard      = "delete_dashboard"
)

Operation label values for GrafanaAPIErrors.

View Source
const (
	OpPushConfig   = "push_config"
	OpDeleteConfig = "delete_config"
)

Operation label values for MimirAlertmanagerAPIErrors.

View Source
const (
	OpDeleteRules = "delete_rules"
)

Operation label values for RulerAPIErrors.

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"})

	// AgentCredentialInfo is an info gauge with one series per AgentCredential.
	AgentCredentialInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "observability_operator_agent_credential_info",
		Help: "Info gauge for AgentCredential resources; one series per active credential",
	}, []string{"namespace", "name", "backend", "agent_name"})

	// AgentCredentialReconcileErrors counts reconcile errors from the AgentCredential
	// controller, labelled by backend and reconcile step (render, aggregate).
	AgentCredentialReconcileErrors = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "observability_operator_agent_credential_reconcile_errors_total",
		Help: "Total number of AgentCredential reconcile errors, by backend and step",
	}, []string{"backend", "step"})
)

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