prometheus/cmd/prometheus
Julien 6cde0096e2 Add notifications to the web UI when configuration reload fails.
This commit introduces a new `/api/v1/notifications/live` endpoint that
utilizes Server-Sent Events (SSE) to stream notifications to the web UI.
This is used to display alerts such as when a configuration reload
has failed.

I opted for SSE over WebSockets because SSE is simpler to implement and
more robust for our use case. Since we only need one-way communication
from the server to the client, SSE fits perfectly without the overhead
of establishing and maintaining a two-way WebSocket connection.

When the SSE connection fails, we go back to a classic
/api/v1/notifications API endpoint.

This commit also contains the required UI changes for the new Mantine UI.

Signed-off-by: Julien <roidelapluie@o11y.eu>
2024-09-27 15:28:38 +02:00
..
testdata End-to-end Query Log test (#6600) 2020-01-19 21:56:13 +00:00
main.go Add notifications to the web UI when configuration reload fails. 2024-09-27 15:28:38 +02:00
main_test.go utf8: enable utf-8 support by default 2024-09-06 08:48:11 -04:00
main_unix_test.go tests: remove err from message when testify prints it already 2024-02-01 14:18:01 +00:00
query_log_test.go Fix various linting errors 2024-06-24 16:11:53 -07:00
scrape_failure_log_test.go Scrape: Add scrape_failure_log_file to log Scrape Failures 2024-09-05 11:01:40 +02:00