Alerting: Remove url based external alertmanagers config (#57918)

* Remove URL-based alertmanagers from endpoint config

* WIP

* Add migration and alertmanagers from admin_configuration

* Empty comment removed

* set BasicAuth true when user is present in url

* Remove Alertmanagers from GET /admin_config payload

* Remove URL-based alertmanager configuration from UI

* Fix new uid generation in external alertmanagers migration

* Fix tests for URL-based external alertmanagers

* Fix API tests

* Add more tests, move migration code to separate file, and remove possible am duplicate urls

* Fix edge cases in migration

* Fix imports

* Remove useless fields and fix created_at/updated_at retrieval

Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
This commit is contained in:
Alex Moreno
2022-11-10 16:34:13 +01:00
committed by GitHub
co-authored by George Robinson Konrad Lalik
parent 738e023d13
commit 45facbba11
21 changed files with 411 additions and 796 deletions
+1 -22
View File
@@ -395,11 +395,6 @@
],
"type": "object"
},
"DsPermissionType": {
"description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\nEnum: 0,1",
"format": "int64",
"type": "integer"
},
"Duration": {
"format": "int64",
"title": "Duration is a type used for marshalling durations.",
@@ -1046,12 +1041,6 @@
},
"GettableNGalertConfig": {
"properties": {
"alertmanagers": {
"items": {
"type": "string"
},
"type": "array"
},
"alertmanagersChoice": {
"enum": [
"all",
@@ -1984,12 +1973,6 @@
},
"PostableNGalertConfig": {
"properties": {
"alertmanagers": {
"items": {
"type": "string"
},
"type": "array"
},
"alertmanagersChoice": {
"enum": [
"all",
@@ -3097,9 +3080,6 @@
"Host": {
"type": "string"
},
"OmitHost": {
"type": "boolean"
},
"Opaque": {
"type": "string"
},
@@ -3301,7 +3281,6 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/definitions/alertGroup"
},
@@ -3462,7 +3441,6 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/definitions/gettableAlert"
},
@@ -3667,6 +3645,7 @@
"type": "array"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"properties": {
"comment": {
"description": "comment",