I am developing a dashboard, which receives all Alertmanager readings and processes them. I looked for a unique field in the request payload to create a unique external alert id in my database. The request payload looks something like this:
{
"status": "firing",
"labels": {
"alertname": "",
"app": "",
"cluster": "",
"deployed_location": "",
"instance": "",
"job": "",
"kubernetes_namespace": "",
"kubernetes_pod_name": "",
"pod_template_hash": "",
"release": "",
"replica": "",
"severity": ""
},
"annotations": {
"description": "",
"summary": ""
},
"startsAt": "",
"endsAt": "",
"generatorURL": "",
"fingerprint": ""
}
I first used the generatorURL
field, but then realized it many different alerts have the same value for generatorURL
. I have been trying fingerprint
, and the situation is much better. However, I am having instances where 2 to 15 alerts have the same fingerprint
.
I am wondering:
- Is there really no unique field in Alertmanager requests?
- It is the nature of Alertmanager logic (or that of my alerts) that a number of alerts are created with the same
fingerprint
and I should just deal with it and handle it on my side, i.e. not create an incident in my DB if the givenfingerprint
is already used. I also worry that if I setunique=True
on my alert model, some new alerts that have the same fingerprint will be missed...
fingerprint
,alertName
, andstartsAt
to generate a unique id, and I am still getting duplicate alerts. – William