
Each alert rule configuration includes:
- Alert name: The identifier for the alert (e.g., “ArgoApplicationOutOfSync”).
- Expression: The condition that triggers the alert. In this example, the alert fires when an ArgoCD application’s synchronization status is out of sync (
argocd_app_info{sync_status="OutOfSync"} == 1). - Duration: The period (5 minutes in this instance) the condition must persist before the alert triggers.
- Labels: Metadata tags for routing and categorizing alerts, such as a
severitylevel set to “warning”. - Annotations: Additional information, including a summary message to describe the alert.
After updating the rules file, check the Rules tab in the Prometheus UI. If an ArgoCD application’s synchronization status deviates from the expected state, the alert will trigger and be visible in the Alertmanager UI.