# argocd_source_degraded_alert.yaml
apiVersion: coralogix.com/v1beta1
kind: Alert
metadata:
  name: bitbucketcontainernotrunning-test
spec:
  alertType:
    metricThreshold:
      metricFilter:
        promql: >-
          sum({namespace="bitbucket",pod=~"bitbucket-k8s-.*",condition="false"}) by (pod)
      missingValues:
        replaceWithZero: true
      rules:
        - condition:
            conditionType: moreThan
            forOverPct: 100
            ofTheLast:
              specificValue: 5m
            threshold: 0
          override:
            priority: p1
  description: >-
    Bitbucket one of the container is not running
  entityLabels:
    app: bitbucket
  name: Bitbucketcontainernotrunning-test
  notificationGroup:
    groupByKeys:
      - pod
    webhooks:
      - integration:
          integrationRef:
            backendRef:
              name: opsgenie-example
        notifyOn: triggeredAndResolved
        retriggeringPeriod:
          minutes: 60
      - integration:
          integrationRef:
            backendRef:
              name: critical-alerts-webhook
        notifyOn: triggeredAndResolved
        retriggeringPeriod:
          minutes: 60
  priority: p1
status:
  conditions:
    - lastTransitionTime: '2025-07-17T07:39:54Z'
      message: >-
        error on extracting alert properties: failed to expand notification
        group: failed to expand webhooks settings: failed to expand webhook
        setting: failed to expand integration: failed to convert name to
        integration ID: webhook critical-alerts-webhook not found
      observedGeneration: 1
      reason: RemoteCreationFailed
      status: 'False'
      type: RemoteSynced