# PMM is sending repeated alerts for same service

**URL:** <https://forums.percona.com/t/pmm-is-sending-repeated-alerts-for-same-service/22602>\
**Category:** Percona Server for MongoDB\
**Tags:** pmm\
**Created:** [June 6, 2023, 3:54pm UTC](https://forums.percona.com/t/pmm-is-sending-repeated-alerts-for-same-service/22602 "2023-06-06T15:54:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhinav\_Gautam](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/abhinav_gautam/32/10966_2.png) [@Abhinav\_Gautam](https://forums.percona.com/u/Abhinav_Gautam)\
**Post date:** [June 6, 2023, 3:54pm UTC](https://forums.percona.com/t/pmm-is-sending-repeated-alerts-for-same-service/22602/1 "2023-06-06T15:54:28Z")

</div>

I have created my own alert template for replication oplog window.

```auto
---
templates:
  - name: mongodb_replication_oplog_window_less_than_2_hours
    version: 1
    summary: Replication oplog window less than 2 hours
    expr: |-
      avg by (service_name,cluster) (mongodb_mongod_replset_oplog_head_timestamp-mongodb_mongod_replset_oplog_tail_timestamp) / 3600
      < [[.threshold]]
    params:
      - name: threshold
        summary: Time in seconds
        unit: "s"
        type: float
        range: [0, 10000]
        value: 7200
    for: 5m
    severity: critical
    labels:
      exporter_type: mongodb_exporter
      channel: oncall
    annotations:
      summary: "Production | MongoDB | Instance: {{ $labels.service_name }} | Low Replication oplog Window"
      message: "Replication oplog window less than 2 hours"
      duration: "5 mins"
      value: "{{ $value }}"
      tag: replicaSet

```

The issue here is that, when a give mongo\_service is in alerting state for sometime for this alert and another service also comes in the alerting state during this time, then the alert is being sent for the first service as well, this is causing repeated alerts. How can I resolve this?

---

<div class="post-metadata">

**Author:** ![Parag\_Bhayani](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/parag_bhayani/32/3710_2.png) [@Parag\_Bhayani](https://forums.percona.com/u/Parag_Bhayani)\
**Post date:** [June 7, 2023, 12:29am UTC](https://forums.percona.com/t/pmm-is-sending-repeated-alerts-for-same-service/22602/2 "2023-06-07T00:29:34Z")

</div>

Hi @Abhinav_Gautam ,

Which PMM version are you currently using?

Regards,  
Parag

---

<div class="post-metadata">

**Author:** ![Abhinav\_Gautam](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/abhinav_gautam/32/10966_2.png) [@Abhinav\_Gautam](https://forums.percona.com/u/Abhinav_Gautam)\
**Post date:** [June 7, 2023, 9:29am UTC](https://forums.percona.com/t/pmm-is-sending-repeated-alerts-for-same-service/22602/3 "2023-06-07T09:29:38Z")

</div>

I used helm to install percona, It is 2.37.0
