Skip to content

Commit

Permalink
Merge pull request #994 from tk422/master
Browse files Browse the repository at this point in the history
harden #993 a bit more
  • Loading branch information
HenriWahl authored Dec 12, 2023
2 parents 576c5d5 + 079897d commit 096e55c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Nagstamon/Servers/Alertmanager/alertmanagerserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ def _get_status(self):
self.new_hosts[service.host].name = str(service.host)
self.new_hosts[service.host].server = self.name
self.new_hosts[service.host].services[service.name] = service
if service.name not in self.new_hosts[service.host].services:
self.new_hosts[service.host].services[service.name] = service
else:
# Compare the labels if they match do *not* create a new "instance" of alert
if not service.labels == self.new_hosts[service.host].services[service.name].labels:
self.new_hosts[service.host].services[service.name + service.fingerprint[0:4]] = service

except Exception as the_exception:
# set checking flag back to False
Expand Down

0 comments on commit 096e55c

Please sign in to comment.