VictoriaMetrics/app/vmalert/notifier
Hui Wang 4f3a6b85b9
app/vmalert: fix memory leak with -notifier.blackhole
Previous commit 9ca74d1fff added a regression for notifier's metrics exposed by vmalert. vmalert returned new notifier instances for the blackhole notifier type. And it registered new metrics each get notifiers function was called. It registered duplicate metrics and lead to OOM crash.

 This commit properly init blachole notifier instances and add metrics for it only once, during application start.

 Related issue:
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8532
2025-03-19 14:04:47 +01:00
..
testdata vmalert: support specifying full http url in notifier static_configs target () 2023-11-01 16:44:54 +01:00
alert.go app/vmalert: fixes reload of external templates 2024-12-13 12:10:31 +01:00
alert_test.go app/vmalert: fix possible template overwritten between rule annotations 2024-12-10 21:43:39 +01:00
alertmanager.go app/vmalert: add vmalert_alerts_send_duration_seconds metric () 2025-03-12 14:32:01 +01:00
alertmanager_request.qtpl app/vmalert/notifier: fix rendering of Alertmanager notification body 2025-01-10 16:51:06 +04:00
alertmanager_request.qtpl.go app/vmalert/notifier: fix rendering of Alertmanager notification body 2025-01-10 16:51:06 +04:00
alertmanager_test.go app/vmalert/notifier: fix rendering of Alertmanager notification body 2025-01-10 16:51:06 +04:00
config.go all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:23:26 +02:00
config_test.go app/vmalert: switch from table-driven tests to f-tests 2024-07-12 22:45:50 +02:00
config_watcher.go all: consistently use %w instead of %s in when error is passed to fmt.Errorf() 2023-10-26 09:44:40 +02:00
config_watcher_test.go app/vmalert: switch from table-driven tests to f-tests 2024-07-12 22:45:50 +02:00
faker.go vmalert-tool: implement unittest () 2023-10-16 14:12:06 +02:00
init.go app/vmalert: fix memory leak with -notifier.blackhole 2025-03-19 14:04:47 +01:00
init_test.go vmalert: follow-up after d4ac4b7813 () 2023-07-18 16:03:28 -07:00
notifier.go vmalert: allow configuring custom notifier headers per group () 2023-05-08 17:07:44 -07:00
notifier_blackhole.go app/vmalert: properly unregister exposed metrics for alerting rules 2025-02-21 12:43:27 +01:00
notifier_blackhole_test.go app/vmalert: switch from table-driven tests to f-tests 2024-07-12 22:45:50 +02:00
package_test.go app/vmalert: fixes reload of external templates 2024-12-13 12:10:31 +01:00