sync

package
v0.0.0-...-d1c08c1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InconsistentAlert

type InconsistentAlert struct {
	Alert               *models.GettableAlert
	GrafanaAlertGroupID string
	Reason              string
	Fingerprint         string
	Alertname           string
}

InconsistentAlert represents an alert that exists in Alertmanager but not in Grafana IRM

type Reconciler

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

Reconciler handles the synchronization between Alertmanager and Grafana IRM

func NewReconciler

func NewReconciler(amClient *alertmanager.Client, grafanaClient *grafana.Client, metricsExporter *metrics.Exporter) *Reconciler

NewReconciler creates a new Reconciler instance

func (*Reconciler) ReconcileAndResolveOptimized

func (r *Reconciler) ReconcileAndResolveOptimized(ctx context.Context) error

ReconcileAndResolveOptimized performs a full reconciliation cycle with optimized data fetching It fetches data from Alertmanager and Grafana once, then processes it in parallel goroutines

func (*Reconciler) ResolveInconsistency

func (r *Reconciler) ResolveInconsistency(ctx context.Context, alert InconsistentAlert) error

ResolveInconsistency handles the resolution of an inconsistent alert This function should be called for each alert that needs to be resolved in IRM

Jump to

Keyboard shortcuts

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