VictoriaMetrics/app/vmalert/notifier
Hui Wang e8f5dbd598
vmalert: add command line flag -notifier.headers ()
to allow configuring additional headers in each request to the
corresponding notifier.
Other flags like `-datasource.headers`, `-remoteWrite.headers` already
use `^^` as delimiter, it's consistent to use it in `-notifier.headers`
as well.

related https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3260
vmalert can integrate with alertmanager that supports multi-tenant by
adding tenantID header`X-Scope-OrgID` in requests.
In multitenancy, vmalert can also filter alerts which send to different
notifier addresses(or with different header settings) using
`alert_relabel_configs`.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3260

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit 0f1ec33892)
2024-08-19 21:41:57 +02:00
..
testdata vmalert: support specifying full http url in notifier static_configs target () 2023-11-01 16:44:54 +01:00
alert_test.go app/vmalert: switch from table-driven tests to f-tests 2024-07-12 22:45:50 +02:00
alert.go app/vmalert: sanitize label names before sending to Alertmanager () 2023-12-08 18:09:07 +02:00
alertmanager_request.qtpl fix issue#3053 () 2022-10-10 21:54:18 +03:00
alertmanager_request.qtpl.go vmalert: revert unexpected fileds rename during refactoring () 2022-10-12 09:33:16 +03:00
alertmanager_test.go vmalert: respect HTTP headers defined in notifier configuration file () 2024-08-06 16:30:10 +02:00
alertmanager.go lib/httputils: parse URL before creating HTTP transport () 2024-08-16 11:34:49 +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_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.go all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:23:26 +02:00
faker.go vmalert-tool: implement unittest () 2023-10-16 14:12:06 +02:00
init_test.go vmalert: follow-up after d4ac4b7813 () 2023-07-18 16:03:28 -07:00
init.go vmalert: add command line flag -notifier.headers () 2024-08-19 21:41:57 +02:00
notifier_blackhole_test.go app/vmalert: switch from table-driven tests to f-tests 2024-07-12 22:45:50 +02:00
notifier_blackhole.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
package_test.go added reusable templates support () 2022-05-20 12:25:11 +03:00