-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ID for alerts and add alert ID's to silences #681
Comments
In the current data model, alerts are ephemeral and do not have an ID assigned to them. Internally, the first silence that matches (and silences) an alert has its ID added to the alert's data structure in the You can do two things:
(filter == And that will return the alerts that match the matchers in |
Update: We are not adding alert IDs. |
I'm curious about those alert IDs. What does the current plan look like? |
@stuartnelson3: I talked to @fabxc in regards to adding Alert ids with the API update. There are no actions (create, update, delete) needed in the UI where we have to address a specific alert. Thereby adding a specific Alert id is not on the agenda. Doing so would open up many questions in regards to the realisation of eventual consistency inside a mesh network of Alertmanagers. @HyperDevil Let us know if @stuartnelson3 answer solves your problem. |
@mxinden and @stuartnelson3 The point for me is that i need to make a list of alerts outside of Alertmanager using the API, and i want to filter out the alarms that i silcenced (i dont care about which silence rule, as long as it is silenced) |
0.4.2 has the concept of |
@stuartnelson3 i am quering /api/v1/alerts using my web browser. Then i try to search for the string "silen" and i find no results, while i have several alerts which have been silenced. Strange. |
Related to #786 |
The github.com/beevik/ntp package was recently updated with some API changes that broke node_exporter. This commit fetches the latest version of the ntp package and brings node_exporter in line with the latest API.
This issue can be closed. cc @stuartnelson3 Here is the output of the /api/v1/alerts endpoint: {
"status": "success",
"data": [
{
"labels": {
"alertname": "TargetDown",
"instance": "http://localhost:8081",
"job": "blackbox",
"severity": "critical"
},
"annotations": {
"summary": "Target down"
},
"startsAt": "2018-03-16T12:06:10.79789965+01:00",
"endsAt": "2018-03-16T13:43:25.800193318+01:00",
"generatorURL": "http://simon-laptop:9090/graph?g0.expr=probe_success+%21%3D+1&g0.tab=1",
"status": {
"state": "suppressed",
"silencedBy": [
"e69e786f-e2ac-462d-a3c2-0855c8ba1bf8"
],
"inhibitedBy": []
},
"receivers": [
"webhook"
],
"fingerprint": "5432f81757da9979"
}
]
} |
Hi,
I am trying to parse the API output, for alerts and silences. (in PHP)
The silences seem to have an ID, but does not have the explicit alarm ID attached in the JSON output (if alarm has an ID?).
Also the alarms do not have an unique ID so that i cannot match which alarms are being silences by a certain rule.
Is there an internal connection between the alarms and the silences?
The text was updated successfully, but these errors were encountered: