-1

I am working with alertmanager.

I want to check the details Alertmanager is saving at the backend for each alerts.

Does Alertmanager creates an unique key for alerts received?

I want to know is there any work around to fetch it?

1 Answers1

0

The API provides a fingerprint that can be used as a ID:

curl prometheus:9093/api/v1/alerts | jq

{
  "status": "success",
  "data": [
    {
      "labels": {
        "alertname": "x",
        "instance": "x",
        "job": "x",
        "kubernetes_namespace": "x",
        "kubernetes_service_name": "x"
      },
      "annotations": {
        "summary": "Probe for service x failed"
      },
      "startsAt": "2018-07-25T09:43:09.34190371Z",
      "endsAt": "2018-07-25T09:48:59.2920459Z",
      "generatorURL": "https://x",
      "status": {
        "state": "active",
        "silencedBy": [],
        "inhibitedBy": []
      },
      "receivers": [
        "x"
      ],
      "fingerprint": "dd19ae3d4e06ac55"
    }
  ]
}
Ignacio Millán
  • 7,480
  • 1
  • 25
  • 28