argoproj / argoproj/notifications-engine
Alert only if certain time passed
- Dominant language
- Go
- Stars
- 334
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
I’m trying to avoid receiving false alerts/spam-like notifications when applications' health status change briefly e.g `degraded/unknown <-> healthy` often within a minute.

I tried to add the following time condition to alert if the app has been in the current state for 5 mins or more but it’s not working, or maybe I’m using the wrong field `app.status.operationState.startedAt` here?
```yaml
trigger.on-health-degraded: |
- description: Application has degraded
oncePer: app.status.operationState.syncResult.revision
send:
- app-health-degraded
when: app.status.health.status == 'Degraded' and time.Now().Sub(time.Parse(app.status.operationState.startedAt)).Minutes() >= 5
```
I'm curious if anyone solved this issue using argocd-notifications?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the health-status flap using the trigger.on-health-degraded configuration and the app.status fields shown in the issue. Check which timestamp represents time in the current health state and define the behavior for transitions; done means notifications are suppressed until the state has remained degraded for at least five minutes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100