keep icon indicating copy to clipboard operation
keep copied to clipboard

[๐Ÿ› Bug]: Deduplication isn't work for Linked provider

Open Khodesaeed opened this issue 5 months ago โ€ข 4 comments

Describe the bug I have connected all my Promethuses with push-based mode to Keep, and I've created a workflow to send some alerts to Telegram. The expected result is to get an alert once, but I keep getting the same alert every time it hits.

WorkFlow

workflow:
  id: uranus-alerts-workflow
  name: Uranus Alerts
  description: Handle Uranus Notifiable Alerts
  disabled: false
  triggers:
    - type: alert
      cel: cluster == "uranus"
  inputs: []
  consts:
    chat_id: "XXXXX"
    topic_id: "XXXX"
  owners: []
  services: []
  steps: []
  actions:
    - name: KubePersistentVolumeFillingUp and KubePersistentVolumeInodesFillingUp
      if: "('{{ alert.name }}' == 'KubePersistentVolumeFillingUp' or '{{ alert.name }}' == 'KubePersistentVolumeInodesFillingUp') and '{{ alert.status }}' == 'firing'"
      provider:
        type: telegram
        config: "{{ providers.XXXX }}"
        with:
          chat_id: "{{ consts.chat_id }}"
          topic_id: "{{ consts.topic_id }}"
          parse_mode: html
          message: |
            ๐Ÿšจ๐Ÿšจ FIRING ALERTS ๐Ÿšจ๐Ÿšจ
            ๐Ÿ”น <b>alert name:</b> {{ alert.name }}
            ๐Ÿ”น <b>status:</b> {{ alert.status }}
            ๐Ÿ”น <b>cluster:</b> {{ alert.cluster }}
            ๐Ÿ”น <b>namespace:</b> {{ alert.labels.namespace }}
            ๐Ÿ”น <b>persistentvolumeclaim:</b> {{ alert.labels.persistentvolumeclaim }}
            ๐Ÿ”ธ <i>summary:</i> {{ alert.annotations.summary }}
            ๐Ÿ”ธ <i>dashboard:</i> <a href="{{ alert.generatorURL }}">Link</a>
            ๐Ÿ”ธ <i>description:</i> 
            <blockquote expandable>{{ alert.description }}</blockquote>

    - name: KubePersistentVolumeFillingUpResolved
      if: "('{{ alert.name }}' == 'KubePersistentVolumeFillingUp' or '{{ alert.name }}' == 'KubePersistentVolumeInodesFillingUp') and '{{ alert.status }}' == 'resolved'"
      provider:
        type: telegram
        config: "{{ providers.XXXX }}"
        with:
          chat_id: "{{ consts.chat_id }}"
          topic_id: "{{ consts.topic_id }}"
          parse_mode: html
          message: | 
            โœ…โœ… RESOLVED ALERTS โœ…โœ…
            ๐Ÿ”น <b>alert name:</b> {{ alert.name }}
            ๐Ÿ”น <b>status:</b> {{ alert.status }}
            ๐Ÿ”น <b>persistentvolumeclaim:</b> {{ alert.labels.persistentvolumeclaim }}

Screenshots

Image Image

Additional context

Khodesaeed avatar Aug 13 '25 14:08 Khodesaeed

Hi @Khodesaeed! I'm Dosu and Iโ€™m helping the keep team.

Deduplication in Keep relies on generating a fingerprint for each alert using key fields, and by default, it should suppress repeated identical alerts except for changes in explicitly ignored fields like lastReceived time. For push-based Prometheus integrations, if alerts are sent without the provider_id in the push URL, Keep may treat each push as coming from a new Linked provider, which breaks deduplication and results in duplicate notifications. To fix this, make sure your Prometheus push configuration URL includes ?provider_id=YOUR_PROVIDER_ID so all alerts are associated with the correct provider and deduplication works as expected. You can find more details in the deduplication docs and Linked provider setup guide.

If you still see duplicates after this, check if any fields in your alert payloads (like labels or annotations) are changing between pushes, as this can also affect deduplication. As a troubleshooting step, you can try enabling "Full deduplication" for your provider in the UI, which will discard exact duplicate events except for ignored fields. If you want more targeted help, sharing a sample of the raw alert payloads being sent to Keep would be useful.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report ๐Ÿ› | Otherย ย Chat with Dosuย Join Discordย Share on X

dosubot[bot] avatar Aug 13 '25 14:08 dosubot[bot]

Based on the document, add provider_id=YOUR_PROVIDER_ID attach alerts to the connected provider, and I don't have any.

Khodesaeed avatar Aug 13 '25 15:08 Khodesaeed

Every provider in Keepโ€”whether linked or connectedโ€”has a unique provider_id, which you can find in the Providers page of the Keep UI. To resolve your deduplication issue, open the Providers page, locate your Prometheus provider (for example, "prometheus-linked-0"), and copy its provider_id (usually shown as "id" in the UI). Add this value to your Prometheus Alertmanager webhook URL as ?provider_id=THE_ID_YOU_FOUND. This will ensure alerts are attached to the correct provider and deduplication works as expected. More details on this setup are in the linked providers documentation.

If you use a linked provider regularly, consider converting it to a connected provider for better deduplication and security; the same provider_id usage applies.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report ๐Ÿ› | Otherย ย Chat with Dosuย Join Discordย Share on X

dosubot[bot] avatar Aug 13 '25 15:08 dosubot[bot]

hey @Khodesaeed - yea its a limitation, I think we already have some ticket about it. are you for for contributing this feature?

shahargl avatar Aug 13 '25 16:08 shahargl