Skip to content

[🐛 Bug]: Prometheus provider ignores custom fingerprint fields for dedupe #5370

@poandlsl

Description

@poandlsl

Describe the bug
It appears that the Prometheus provider ignores custom fingerprint fields set in the deduplication rule and generates the fingerprint hash based on the alertname alone.

To Reproduce
Steps to reproduce the behavior:

  1. Provision or manually add a Prometheus provider. (with pulling enabled)
  2. Modify default deduplication rule for Prometheus provider to use multiple labels for Fields to use for fingerprint.
  3. Observe alerts with different values for selected fingerprint labels are still deduplicated based on alert name alone.

Expected behavior
Prometheus provider should generate a unique fingerprint hash based on labels configured in deduplication rule.

Additional context

Provider provision config:

{
  "keepPrometheus": {
    "type": "prometheus",
    "authentication": {
      "url": "https://prometheus.dev1.domain.com",
      "verify": false
    },
    "deduplication_rules": {
      "prometheus_default_dedupe": {
        "description": "This is the default deduplication rule for Prometheus alerts",
        "fingerprint_fields": [
          "labels.alertname",
          "labels.env_dc",
          "labels.group"
        ],
        "full_deduplication": false
      }
    }
  }
}

Note identical fingerprint hash for alerts with different group labels:

Image
$ echo -n 'NodeLowDiskSpace4Hours' | sha256sum
6211e97de90695be41b49c773306001204872a6ebb36f4aa72a5bbd998ce7ac5  -

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingProviderProviders related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions