Skip to content

Commit

Permalink
fix(splunk): fingerprint (keephq#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren authored Apr 2, 2024
1 parent 056c1b3 commit 6504588
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions keep/providers/splunk_provider/splunk_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SplunkProvider(BaseProvider):
alias="Needed to connect to webhook",
),
]
FINGERPRINT_FIELDS = ["name", "exception", "logger", "service"]
FINGERPRINT_FIELDS = ["exception", "logger", "service"]

SEVERITIES_MAP = {
"1": AlertSeverity.LOW,
Expand Down Expand Up @@ -176,7 +176,12 @@ def _format_alert(
**event
)
alert.fingerprint = SplunkProvider.get_alert_fingerprint(
alert, SplunkProvider.FINGERPRINT_FIELDS
alert,
(
SplunkProvider.FINGERPRINT_FIELDS
if (exception is not None and logger is not None)
else ["name"]
),
)
return alert

Expand Down

0 comments on commit 6504588

Please sign in to comment.