argoproj / argoproj/notifications-engine

Alert only if certain time passed

Open
#99 5 comments 7 reactions 0 assignees View on GitHub
enhancement help wanted
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.

argocd-health-status-notification

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.