Ganesh Vernekar
ad6648b649
Alerting: Do no hard fail on finding discontinued channels on migration ( #34894 )
...
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
2021-05-28 16:06:30 +02:00
Ganesh Vernekar
95ee5f01b5
NGAlert: Do not pick a random default channel if no default exists ( #34465 )
...
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
2021-05-20 10:30:09 +02:00
Ganesh Vernekar
e52f718a87
NGAlert: Migrate old notification channel config ( #33846 )
...
* NGAlert: Migrate old notification channel config
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Copy the required structs and functions
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Fix lint
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Fix review comments and error on discontinued channels
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Use both ID and UID to map channels, attach UID to channels
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Fix lint
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Bug fixes
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Use alert table instead of dashboard for channel IDs
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Fix offline reviews: don't add empty receivers and routes, add receiver for unmigrated channels
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Handle multiple default channels, pick default from used channels
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
* Include default channels in all receivers
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
2021-05-19 21:10:12 +02:00
Kyle Brandt
b987237c9b
Alerting: Remove UALERT_MIG env guard from dashboard rule migration ( #34384 )
...
Rules/notifications/etc migration will now be activated with feature flag alone.
When the feature flag is enabled dashboard alerts are migrated into the system.
When the feature flag is removed, all migrated and newly created alerts in the new system are deleted.
2021-05-19 09:37:56 -04:00
David Parrott
bbb7bbf891
Alerting: Remove back end logic for supporting KeepLastState ( #34242 )
...
* Removed back end logic for supporting KeepLastState
* Map keep_state correctly in migrations
2021-05-18 10:55:43 -07:00
gotjosh
eb74994b8b
Alerting: Modify configuration apply and save semantics - v2 ( #34143 )
...
* Save default configuration to the database and copy over secure settings
2021-05-14 19:49:54 +01:00
Owen Diehl
baca873a84
extracts alertmanager from DI, including migrations ( #34071 )
...
* extracts alertmanager from DI, including migrations
* includes alertmanager Run method in ngalert
* removes 3s test shutdown timeout
* lint
2021-05-13 14:01:38 -04:00
Kyle Brandt
3da8db7f3f
Alerting: Run table migrations regardless of feature flag and move out of service ( #33996 )
2021-05-12 14:39:48 -04:00
Kyle Brandt
dc3e17ba5b
Alerting: Change rule migration to be based on feature flag ( #33792 )
...
makes it so the feature flag can be turned on off, and the migration will be cleared and rerun. All existing NG alert rules, configuration settings, etc are removed when disabling the feature flag.
for https://github.com/grafana/alerting-squad/issues/142
Co-authored-by: Sofia Papagiannaki <sofia@grafana.com >
2021-05-11 08:08:39 -04:00
Kyle Brandt
57d46ea991
AlertingMigration: Separate info into multiple annos ( #33641 )
2021-05-03 11:42:31 -04:00
Kyle Brandt
efe856ae4e
AlertingMigration: Create alert_rule_version entry ( #33585 )
...
Create the alert rule version entry during the migration so it is consistent with rules created via api.
for https://github.com/grafana/alerting-squad/issues/123
2021-04-30 15:08:01 -04:00
Kyle Brandt
c25eab4eda
AlertMigration: remove alert_rule UID db check ( #33568 )
...
do not believe this is needed due to uniqueness promised by shortid lib
since there is no provisioning yet. https://github.com/teris-io/shortid
2021-04-30 13:35:26 -04:00
Kyle Brandt
713260f6fa
Alerting: Remove datasource (name) from migration ( #33544 )
...
no longer needed as of https://github.com/grafana/grafana/pull/33416
for https://github.com/grafana/alerting-squad/issues/126
2021-04-30 07:47:01 -04:00
Kyle Brandt
6c8ef2a9c2
Alerting: Alert Rule migration ( #33000 )
...
* Not complete, put migration behind env flag for now:
UALERT_MIG=iDidBackup
* Important to backup, and not expect the same DB to keep working until the env trigger is removed.
* Alerting: Migrate dashboard alert permissions
* Do not use imported models
* Change folder titles
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com >
2021-04-29 13:24:37 -04:00