grafana/pkg/services/ngalert/notifier
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
..
alertmanager_mock Alerting: Add methods for silences to the forked Alertmanager (#77805) 2023-11-08 12:03:40 +01:00
channels_config Alerting: Add support for responders to Opsgenie integration (#77159) 2023-10-27 13:06:46 -04:00
alertmanager_config.go Chore: capitalise messages for alerting (#74335) 2023-09-04 18:46:34 +02:00
alertmanager_test.go Alerting: Move legacy alert migration from sqlstore migration to service (#72702) 2023-10-12 13:43:10 +01:00
alertmanager.go Alerting: Send state to the remote Alertmanager (#78538) 2023-11-29 12:49:39 +01:00
alerts.go Alerting: Fetch alerts from a remote Alertmanager (#75844) 2023-10-19 11:27:37 +02:00
compat_test.go Alerting: Update alerting module to 20230418161049-5f374e58cb32 + refactoring (#66622) 2023-04-25 13:39:46 -04:00
compat.go Alerting: Update alerting module to 20230418161049-5f374e58cb32 + refactoring (#66622) 2023-04-25 13:39:46 -04:00
config_test.go Alerting: Fix provisioned templates being ignored by alertmanager (#69485) 2023-06-02 15:47:43 -04:00
config.go Alerting: Fix provisioned templates being ignored by alertmanager (#69485) 2023-06-02 15:47:43 -04:00
crypto.go Alerting: Fix contact point testing with secure settings (#72235) 2023-07-25 10:04:27 -04:00
email_test.go Alerting: Bump grafana/alerting and refactor the ImageStore/Provider to provide image URL/bytes (#70182) 2023-06-21 20:53:30 -03:00
file_store_test.go Alerting: Add GetFullState method to FileStore (#78701) 2023-11-28 15:34:45 +01:00
file_store.go Alerting: Add GetFullState method to FileStore (#78701) 2023-11-28 15:34:45 +01:00
images_test.go Alerting: Bump grafana/alerting and refactor the ImageStore/Provider to provide image URL/bytes (#70182) 2023-06-21 20:53:30 -03:00
images.go Alerting: Bump grafana/alerting and refactor the ImageStore/Provider to provide image URL/bytes (#70182) 2023-06-21 20:53:30 -03:00
log.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
multiorg_alertmanager_test.go Alerting: Send state to the remote Alertmanager (#78538) 2023-11-29 12:49:39 +01:00
multiorg_alertmanager.go Alerting: Send state to the remote Alertmanager (#78538) 2023-11-29 12:49:39 +01:00
receivers_test.go Alerting: Update alerting module to 20230418161049-5f374e58cb32 + refactoring (#66622) 2023-04-25 13:39:46 -04:00
receivers.go Alerting: Fetch receivers from remote Alertmanager (#76841) 2023-10-20 11:34:17 +02:00
redis_channel_test.go Alerting: Add support for running HA using Redis (#65267) 2023-04-19 17:05:26 +02:00
redis_channel.go Chore: capitalise messages for alerting (#74335) 2023-09-04 18:46:34 +02:00
redis_peer.go Chore: Upgrade Go to 1.21.3 (#77304) 2023-11-01 09:17:38 -07:00
sender.go Alerting: Update alerting module to 20230418161049-5f374e58cb32 + refactoring (#66622) 2023-04-25 13:39:46 -04:00
silences.go Alerting: Manage remote Alertmanager silences (#75452) 2023-10-02 07:36:11 -03:00
status.go Alerting: Use interfaces for the Alertmanager (#73900) 2023-09-06 07:59:29 -03:00
templates_test.go Alerting: Template Testing API (#67450) 2023-04-28 15:56:59 +01:00
templates.go Alerting: Use interfaces for the Alertmanager (#73900) 2023-09-06 07:59:29 -03:00
testing.go Alerting: Move legacy alert migration from sqlstore migration to service (#72702) 2023-10-12 13:43:10 +01:00