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
Click to show internal directories.
Click to hide internal directories.