Skip to content

Alert only if certain time passed #99

@mubarak-j

Description

@mubarak-j

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?

    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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions