grafana/pkg/services/ngalert/remote
Santiago 73776f37eb
Alerting: Send state to the remote Alertmanager (#78538)
* Alerting: Introduce a Mimir client as part of the Remote Alertmanager

Mimir client that understands the new APIs developed for mimir. Very much a WIP still.

* more wip

* appease the linter

* more linting

* add more code

* get state from kvstore, encode, send

* send state to the remote Alertmanager, extract fullstate logic into its own function

* pass kvstore to remote.NewAlertmanager()

* refactor

* add fake kvstore to tests

* tests

* use FileStore to get state

* always log 'completed state upload'

* refactor compareRemoteConfig

* base64-encode the state in the file store

* export silences and nflog filenames, refactor

* log 'completed state/config upload...' regardless of outcome

* add values to the state store in tests

* address code review comments

* log error from filestore

---------

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2023-11-29 12:49:39 +01:00
..
client Alerting: Send state to the remote Alertmanager (#78538) 2023-11-29 12:49:39 +01:00
alertmanager_test.go Alerting: Send state to the remote Alertmanager (#78538) 2023-11-29 12:49:39 +01:00
alertmanager.go Alerting: Send state to the remote Alertmanager (#78538) 2023-11-29 12:49:39 +01:00
forked_alertmanager_test.go Alerting: Add lifecycle methods to the forked Alertmanager (#77741) 2023-11-14 11:17:17 +01:00
remote_primary_forked_alertmanager.go Alerting: Add lifecycle methods to the forked Alertmanager (#77741) 2023-11-14 11:17:17 +01:00
remote_secondary_forked_alertmanager.go Alerting: Add lifecycle methods to the forked Alertmanager (#77741) 2023-11-14 11:17:17 +01:00