# Source: paas-metrics
---

- type: replace
  path: /instance_groups/name=prometheus2/jobs/name=prometheus2/properties/prometheus/custom_rules?/-
  value:
    name: DopplerDroppedEnvelopes
    rules:
      - &alert
        alert: DopplerDroppedEnvelopes_Warning
        expr: sum(increase(firehose_counter_event_loggregator_doppler_dropped_total[1h])) > 100
        labels:
          severity: warning
          notify: email
        annotations:
          summary: "Doppler - dropped envelopes"
          description: "A Doppler VM dropped {{ $value | printf \"%.0f\" }} envelopes in an hour. Investigate whether this is a one-off or we need to scale our Dopplers."

      - <<: *alert
        alert: DopplerDroppedEnvelopes_Critical
        expr: sum(increase(firehose_counter_event_loggregator_doppler_dropped_total[1h])) > 1000
        labels:
          severity: critical
          notify: email

Migrate "Doppler - dropped envelopes" monitor to Prometheus
Migrate "Doppler - dropped envelopes" monitor to Prometheus

Original DataDog monitor:
change(max(last_10m),last_1h):max:cf.loggregator.doppler.dropped{deployment:%s} by {index} > 1000
