argocd-notifications-controller). This integration provides an argocd-notifications-cm configuration with one webhook service, two request body templates, and one trigger. Each Argo CD Application maps to two kinds of Flashduty alerts:
- Sync failed: opens when a sync operation ends in
ErrororFailed, and closes automatically when the next sync succeeds (Succeeded) - Health degraded: opens when the application health becomes
Degraded, and closes automatically when it returns toHealthy
In Flashduty On-call
You can get the integration push URL in either of the following ways.
Use a dedicated integration
- In the Flashduty console, select Channel and open a channel
- Select Configuration → Integrations → Private integration, then click Add an integration
- Select Argo CD and click Save
- Open the new integration card and copy the Push URL
Use a shared integration
- In the Flashduty console, select Integration Center → Alert Events
- Select Argo CD and enter an integration name
- Configure the default route and select a channel. You can add more rules under Routes after creation
- Click Save and copy the generated Push URL
Configure Argo CD
The steps below need Kubernetes permission to edit ConfigMaps in the Argo CD namespace (
argocd by default) and to edit annotations on Applications or AppProjects. The Argo CD cluster must be able to reach the domain of the push URL.
1
Add the webhook service, templates, and trigger
Save the following as Merge it into the existing If Argo CD is installed with the Helm chart, put
flashduty-notifications.yaml and replace url with the push URL copied above (including ?integration_key=...):argocd-notifications-cm (--type merge only adds or changes the keys above and leaves the rest of the configuration alone):service.webhook.flashduty under notifications.notifiers, the two templates under notifications.templates, and the trigger under notifications.triggers. Otherwise the next upgrade overwrites the manual change.Notes:- Every value in the templates goes through
toJson, so quotes and line breaks in a sync error message cannot break the JSON. Do not remove it. Keep the field names;event_typeandapp_uidare required - The four trigger conditions cover sync failed, sync succeeded, health degraded, and healthy again. Argo CD records the notified state of each condition separately and sends once when a condition turns from false to true, so no
oncePeris needed argocd_urlcomes fromcontext.argocdUrlinargocd-notifications-cmand is used to build the application link on the alert. When it is not set, the field is empty and the alert is unaffected
2
Subscribe to the trigger
A trigger sends nothing until it is subscribed. Pick the scope you need:
-
One application: add an annotation to the Application
-
All applications of a project: add the same annotation
notifications.argoproj.io/subscribe.on-flashduty.flashduty: ""tometadata.annotationsof the AppProject -
All applications: add an entry to
subscriptionsinargocd-notifications-cm. Ifsubscriptionsalready exists, append to the existing list instead of overwriting it with the merge command above
3
Check connectivity
Argo CD has no test button. Run The command prints debug logs of the request and response, including the full push URL with its
argocd admin notifications template notify in the argocd-notifications-controller Pod to send one notification from the current application state:integration_key, so do not paste the output anywhere public. A 200 OK status on the Received response: line means Flashduty accepted the request. When the application is Healthy, this is a recovery message and creates no alert; in an intermediate state such as Progressing, Flashduty ignores it.4
Verify the lifecycle
Make a subscribed application fail to sync (for example, set a Deployment’s image field to empty in Git and sync) and confirm that Flashduty receives an alert. Revert the change, sync successfully, and confirm that the alert closes.
Alert Key
Flashduty computes the Alert Key from
event_type and the application’s app_uid (app.metadata.uid). Kubernetes gives every object a UID that is unique over the whole lifetime of the cluster, so:
- A sync failure, further failures, and the successful sync of one application land on the same alert; health degraded and healthy again land on another alert, so a successful sync never closes a health alert
- Applications with the same name in different Argo CD instances never share an alert
- An application that is deleted and recreated gets a new UID and a new alert
event_type or app_uid, a sync message without phase, or a health message without health_status.
Alert lifecycle
Status values are case-insensitive. Any other value is rejected.
If an application is deleted while its alert is open, Argo CD sends no recovery message. Close the alert by hand, or turn on the channel’s auto-resolve timeout (24 hours suggested).
Severity
To use one severity for every alert, append
&severity=Critical (or Warning, Info) to the push URL. A recovery event keeps the severity of the original alert.
Alert content
- Title:
Argo CD application <app-name> sync <phase>orArgo CD application <app-name> health <health_status> - Description: for a sync failure, the Argo CD sync result message (
operationState.message); for health degraded,Health status: Degraded - Labels:
resource(application name),app_uid,app_namespace,project,event_type,phase,revision,sync_status,health_status, andapp_url(<argocdUrl>/applications/<app-name>, only whencontext.argocdUrlis set)
Troubleshooting
- No alert arrives: check the
argocd-notifications-controllerlogs (kubectl logs -n argocd deploy/argocd-notifications-controller) and confirm that the application has thenotifications.argoproj.io/subscribe.on-flashduty.flashdutyannotation, or thatsubscriptionsincludeson-flashduty - The logs show
failed with error code 400: make sure the templates match this page and every value goes throughtoJson. The response body names the missing or unsupported field - The logs show
template 'flashduty-sync' is not supportedortrigger 'on-flashduty' is not configured: make sure the keys from the first step are inargocd-notifications-cm. For a Helm install, check the matching values - The alert does not recover: make sure the trigger includes both the
SucceededandHealthyconditions and that neither setsoncePer