Project

General

Profile

Bug #55578

Updated by Volker Theile almost 2 years ago

When creating a new monitoring silence the form is pre-filled with the wrong alert data. It is always used the alert data from the very first object in the list of the API response but not the specified alert identified by the 'fingerprint' property. 

 The reason for this is the dashboard tries to query the alerts with the selected fingerprint. but according to https://prometheus.io/docs/prometheus/latest/querying/api/#alerts it is not possible to filter for alerts. The filtering must be done in the Dashboard frontend or the backend API. Using Alertmanager v2 API it is also not possible to filter for alerts by 'fingerprint', see https://github.com/prometheus/alertmanager/blob/main/api/v2/openapi.yaml#L159. For example, http://localhost:9093/api/v2/alerts/?filter=fingerprint%3D52d8976dd77b7c24 or http://localhost:9093/api/v2/alerts/?filter=["fingerprint=52d8976dd77b7c24"] do not return the alert with the fingerprint 52d8976dd77b7c24. 

 The same problem applies to editing silences. The selected silence is not edited, it's always the first one in the list returned API response but not that with the specified 'id' property. 

Back