Alerting: modify alertmanager endpoints for proxying using the datasource UID (#47978)
* Alerting: enable proxying alertmanager calls using the datasource UID * Remove use of datasource ID from the API * Update frontend
This commit is contained in:
@@ -30,7 +30,7 @@ import (
|
||||
// 201: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route POST /api/alertmanager/{DatasourceID}/config/api/v1/alerts alertmanager RoutePostAlertingConfig
|
||||
// swagger:route POST /api/alertmanager/{DatasourceUID}/config/api/v1/alerts alertmanager RoutePostAlertingConfig
|
||||
//
|
||||
// sets an Alerting config
|
||||
//
|
||||
@@ -46,7 +46,7 @@ import (
|
||||
// 200: GettableUserConfig
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceID}/config/api/v1/alerts alertmanager RouteGetAlertingConfig
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/config/api/v1/alerts alertmanager RouteGetAlertingConfig
|
||||
//
|
||||
// gets an Alerting config
|
||||
//
|
||||
@@ -62,7 +62,7 @@ import (
|
||||
// 200: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/alertmanager/{DatasourceID}/config/api/v1/alerts alertmanager RouteDeleteAlertingConfig
|
||||
// swagger:route DELETE /api/alertmanager/{DatasourceUID}/config/api/v1/alerts alertmanager RouteDeleteAlertingConfig
|
||||
//
|
||||
// deletes the Alerting config for a tenant
|
||||
//
|
||||
@@ -78,7 +78,7 @@ import (
|
||||
// 200: GettableStatus
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceID}/api/v2/status alertmanager RouteGetAMStatus
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/status alertmanager RouteGetAMStatus
|
||||
//
|
||||
// get alertmanager status and configuration
|
||||
//
|
||||
@@ -94,7 +94,7 @@ import (
|
||||
// 200: gettableAlerts
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceID}/api/v2/alerts alertmanager RouteGetAMAlerts
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/alerts alertmanager RouteGetAMAlerts
|
||||
//
|
||||
// get alertmanager alerts
|
||||
//
|
||||
@@ -110,7 +110,7 @@ import (
|
||||
// 200: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route POST /api/alertmanager/{DatasourceID}/api/v2/alerts alertmanager RoutePostAMAlerts
|
||||
// swagger:route POST /api/alertmanager/{DatasourceUID}/api/v2/alerts alertmanager RoutePostAMAlerts
|
||||
//
|
||||
// create alertmanager alerts
|
||||
//
|
||||
@@ -126,7 +126,7 @@ import (
|
||||
// 200: alertGroups
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceID}/api/v2/alerts/groups alertmanager RouteGetAMAlertGroups
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/alerts/groups alertmanager RouteGetAMAlertGroups
|
||||
//
|
||||
// get alertmanager alerts
|
||||
//
|
||||
@@ -148,7 +148,7 @@ import (
|
||||
// 408: Failure
|
||||
// 409: AlertManagerNotReady
|
||||
|
||||
// swagger:route POST /api/alertmanager/{DatasourceID}/config/api/v1/receivers/test alertmanager RoutePostTestReceivers
|
||||
// swagger:route POST /api/alertmanager/{DatasourceUID}/config/api/v1/receivers/test alertmanager RoutePostTestReceivers
|
||||
//
|
||||
// Test Grafana managed receivers without saving them.
|
||||
//
|
||||
@@ -170,7 +170,7 @@ import (
|
||||
// 200: gettableSilences
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceID}/api/v2/silences alertmanager RouteGetSilences
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/silences alertmanager RouteGetSilences
|
||||
//
|
||||
// get silences
|
||||
//
|
||||
@@ -186,7 +186,7 @@ import (
|
||||
// 201: gettableSilence
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route POST /api/alertmanager/{DatasourceID}/api/v2/silences alertmanager RouteCreateSilence
|
||||
// swagger:route POST /api/alertmanager/{DatasourceUID}/api/v2/silences alertmanager RouteCreateSilence
|
||||
//
|
||||
// create silence
|
||||
//
|
||||
@@ -202,7 +202,7 @@ import (
|
||||
// 200: gettableSilence
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceID}/api/v2/silence/{SilenceId} alertmanager RouteGetSilence
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId} alertmanager RouteGetSilence
|
||||
//
|
||||
// get silence
|
||||
//
|
||||
@@ -218,7 +218,7 @@ import (
|
||||
// 200: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/alertmanager/{DatasourceID}/api/v2/silence/{SilenceId} alertmanager RouteDeleteSilence
|
||||
// swagger:route DELETE /api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId} alertmanager RouteDeleteSilence
|
||||
//
|
||||
// delete silence
|
||||
//
|
||||
@@ -427,31 +427,39 @@ type AlertsParams struct {
|
||||
}
|
||||
|
||||
// swagger:parameters RoutePostAMAlerts RoutePostGrafanaAMAlerts
|
||||
// swagger:parameters RoutePostAMAlerts
|
||||
type PostableAlerts struct {
|
||||
// in:body
|
||||
PostableAlerts []amv2.PostableAlert `yaml:"" json:""`
|
||||
}
|
||||
|
||||
// swagger:parameters RoutePostAlertingConfig RoutePostGrafanaAlertingConfig
|
||||
// swagger:parameters RoutePostAlertingConfig
|
||||
type BodyAlertingConfig struct {
|
||||
// in:body
|
||||
Body PostableUserConfig
|
||||
}
|
||||
|
||||
// alertmanager routes
|
||||
// swagger:parameters RoutePostAlertingConfig RouteGetAlertingConfig RouteDeleteAlertingConfig RouteGetAMStatus RouteGetAMAlerts RoutePostAMAlerts RouteGetAMAlertGroups RouteGetSilences RouteCreateSilence RouteGetSilence RouteDeleteSilence RoutePostAlertingConfig RoutePostTestReceivers
|
||||
// ruler routes
|
||||
// swagger:parameters RouteGetRulesConfig RoutePostNameRulesConfig RouteGetNamespaceRulesConfig RouteDeleteNamespaceRulesConfig RouteGetRulegGroupConfig RouteDeleteRuleGroupConfig
|
||||
// prom routes
|
||||
// swagger:parameters RouteGetRuleStatuses RouteGetAlertStatuses
|
||||
// testing routes
|
||||
// swagger:parameters RouteTestReceiverConfig RouteTestRuleConfig
|
||||
type DatasourceReference struct {
|
||||
// DatasourceID should be the numeric datasource id
|
||||
type DatasourceIDReference struct {
|
||||
// DatasourceID should be the numeric datasource identifier
|
||||
// in:path
|
||||
DatasourceID int
|
||||
}
|
||||
|
||||
// alertmanager routes
|
||||
// swagger:parameters RoutePostAlertingConfig RouteGetAlertingConfig RouteDeleteAlertingConfig RouteGetAMStatus RouteGetAMAlerts RoutePostAMAlerts RouteGetAMAlertGroups RouteGetSilences RouteCreateSilence RouteGetSilence RouteDeleteSilence RoutePostAlertingConfig RoutePostTestReceivers
|
||||
type DatasourceUIDReference struct {
|
||||
// DatasoureUID should be the datasource UID identifier
|
||||
// in:path
|
||||
DatasourceUID string
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type PostableUserConfig struct {
|
||||
TemplateFiles map[string]string `yaml:"template_files" json:"template_files"`
|
||||
|
||||
@@ -596,7 +596,7 @@
|
||||
"type": "string",
|
||||
"x-go-name": "Name"
|
||||
},
|
||||
"provanance": {
|
||||
"provenance": {
|
||||
"type": "string",
|
||||
"x-go-name": "Provenance"
|
||||
},
|
||||
@@ -882,6 +882,9 @@
|
||||
"type": "string",
|
||||
"x-go-name": "Name"
|
||||
},
|
||||
"provenance": {
|
||||
"$ref": "#/definitions/Provenance"
|
||||
},
|
||||
"secureFields": {
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
@@ -3100,6 +3103,7 @@
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"properties": {
|
||||
"alerts": {
|
||||
"description": "alerts",
|
||||
@@ -3121,17 +3125,14 @@
|
||||
"labels",
|
||||
"receiver"
|
||||
],
|
||||
"type": "object",
|
||||
"x-go-name": "AlertGroup",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
|
||||
"type": "object"
|
||||
},
|
||||
"alertGroups": {
|
||||
"description": "AlertGroups alert groups",
|
||||
"items": {
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
},
|
||||
"type": "array",
|
||||
"x-go-name": "AlertGroups",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
|
||||
"type": "array"
|
||||
},
|
||||
"alertStatus": {
|
||||
"description": "AlertStatus alert status",
|
||||
@@ -3320,6 +3321,7 @@
|
||||
"type": "array"
|
||||
},
|
||||
"gettableSilence": {
|
||||
"description": "GettableSilence gettable silence",
|
||||
"properties": {
|
||||
"comment": {
|
||||
"description": "comment",
|
||||
@@ -3371,17 +3373,14 @@
|
||||
"status",
|
||||
"updatedAt"
|
||||
],
|
||||
"type": "object",
|
||||
"x-go-name": "GettableSilence",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
|
||||
"type": "object"
|
||||
},
|
||||
"gettableSilences": {
|
||||
"description": "GettableSilences gettable silences",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gettableSilence"
|
||||
},
|
||||
"type": "array",
|
||||
"x-go-name": "GettableSilences",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
|
||||
"type": "array"
|
||||
},
|
||||
"labelSet": {
|
||||
"additionalProperties": {
|
||||
@@ -3510,6 +3509,7 @@
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
|
||||
},
|
||||
"postableSilence": {
|
||||
"description": "PostableSilence postable silence",
|
||||
"properties": {
|
||||
"comment": {
|
||||
"description": "comment",
|
||||
@@ -3549,9 +3549,7 @@
|
||||
"matchers",
|
||||
"startsAt"
|
||||
],
|
||||
"type": "object",
|
||||
"x-go-name": "PostableSilence",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
|
||||
"type": "object"
|
||||
},
|
||||
"receiver": {
|
||||
"properties": {
|
||||
@@ -4128,7 +4126,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/alerts": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/alerts": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"operationId": "RouteGetAMAlerts",
|
||||
@@ -4175,12 +4173,11 @@
|
||||
"x-go-name": "Receivers"
|
||||
},
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4216,12 +4213,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4243,7 +4239,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/alerts/groups": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/alerts/groups": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"operationId": "RouteGetAMAlertGroups",
|
||||
@@ -4290,12 +4286,11 @@
|
||||
"x-go-name": "Receivers"
|
||||
},
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4317,7 +4312,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/silence/{SilenceId}": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}": {
|
||||
"delete": {
|
||||
"description": "delete silence",
|
||||
"operationId": "RouteDeleteSilence",
|
||||
@@ -4329,12 +4324,11 @@
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4366,12 +4360,11 @@
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4393,7 +4386,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/silences": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/silences": {
|
||||
"get": {
|
||||
"description": "get silences",
|
||||
"operationId": "RouteGetSilences",
|
||||
@@ -4408,12 +4401,11 @@
|
||||
"x-go-name": "Filter"
|
||||
},
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4446,12 +4438,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4473,18 +4464,17 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/status": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/status": {
|
||||
"get": {
|
||||
"description": "get alertmanager status and configuration",
|
||||
"operationId": "RouteGetAMStatus",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4506,18 +4496,17 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/config/api/v1/alerts": {
|
||||
"/api/alertmanager/{DatasourceUID}/config/api/v1/alerts": {
|
||||
"delete": {
|
||||
"description": "deletes the Alerting config for a tenant",
|
||||
"operationId": "RouteDeleteAlertingConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4543,12 +4532,11 @@
|
||||
"operationId": "RouteGetAlertingConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4581,12 +4569,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4608,7 +4595,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/config/api/v1/receivers/test": {
|
||||
"/api/alertmanager/{DatasourceUID}/config/api/v1/receivers/test": {
|
||||
"post": {
|
||||
"operationId": "RoutePostTestReceivers",
|
||||
"parameters": [
|
||||
@@ -4620,12 +4607,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"format": "int64",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
"name": "DatasourceUID",
|
||||
"required": true,
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4751,7 +4737,7 @@
|
||||
"operationId": "RouteGetAlertStatuses",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"format": "int64",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
@@ -4778,7 +4764,7 @@
|
||||
"operationId": "RouteGetRuleStatuses",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"format": "int64",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
@@ -5182,7 +5168,7 @@
|
||||
"operationId": "RouteGetRulesConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"format": "int64",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
@@ -5223,7 +5209,7 @@
|
||||
"operationId": "RouteDeleteNamespaceRulesConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"format": "int64",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
@@ -5254,7 +5240,7 @@
|
||||
"operationId": "RouteGetNamespaceRulesConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"format": "int64",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
@@ -5292,7 +5278,7 @@
|
||||
"operationId": "RoutePostNameRulesConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"format": "int64",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
@@ -5332,7 +5318,7 @@
|
||||
"operationId": "RouteDeleteRuleGroupConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"format": "int64",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
@@ -5369,7 +5355,7 @@
|
||||
"operationId": "RouteGetRulegGroupConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"format": "int64",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
@@ -5587,7 +5573,7 @@
|
||||
"operationId": "RouteTestRuleConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"format": "int64",
|
||||
"in": "path",
|
||||
"name": "DatasourceID",
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/alerts": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/alerts": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"tags": [
|
||||
@@ -515,10 +515,9 @@
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -556,10 +555,9 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -580,7 +578,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/alerts/groups": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/alerts/groups": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"tags": [
|
||||
@@ -630,10 +628,9 @@
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -654,7 +651,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/silence/{SilenceId}": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}": {
|
||||
"get": {
|
||||
"description": "get silence",
|
||||
"tags": [
|
||||
@@ -669,10 +666,9 @@
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -706,10 +702,9 @@
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -730,7 +725,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/silences": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/silences": {
|
||||
"get": {
|
||||
"description": "get silences",
|
||||
"tags": [
|
||||
@@ -748,10 +743,9 @@
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -786,10 +780,9 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -810,7 +803,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/api/v2/status": {
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/status": {
|
||||
"get": {
|
||||
"description": "get alertmanager status and configuration",
|
||||
"tags": [
|
||||
@@ -819,10 +812,9 @@
|
||||
"operationId": "RouteGetAMStatus",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -843,7 +835,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/config/api/v1/alerts": {
|
||||
"/api/alertmanager/{DatasourceUID}/config/api/v1/alerts": {
|
||||
"get": {
|
||||
"description": "gets an Alerting config",
|
||||
"tags": [
|
||||
@@ -852,10 +844,9 @@
|
||||
"operationId": "RouteGetAlertingConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -890,10 +881,9 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -921,10 +911,9 @@
|
||||
"operationId": "RouteDeleteAlertingConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -945,7 +934,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceID}/config/api/v1/receivers/test": {
|
||||
"/api/alertmanager/{DatasourceUID}/config/api/v1/receivers/test": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"alertmanager"
|
||||
@@ -961,10 +950,9 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"name": "DatasourceID",
|
||||
"type": "string",
|
||||
"description": "DatasoureUID should be the datasource UID identifier",
|
||||
"name": "DatasourceUID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
@@ -1093,7 +1081,7 @@
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"name": "DatasourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -1120,7 +1108,7 @@
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"name": "DatasourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -1527,7 +1515,7 @@
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"name": "DatasourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -1568,7 +1556,7 @@
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"name": "DatasourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -1603,7 +1591,7 @@
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"name": "DatasourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -1641,7 +1629,7 @@
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"name": "DatasourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -1677,7 +1665,7 @@
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"name": "DatasourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -1714,7 +1702,7 @@
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"name": "DatasourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -1932,7 +1920,7 @@
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "DatasourceID should be the numeric datasource id",
|
||||
"description": "DatasourceID should be the numeric datasource identifier",
|
||||
"name": "DatasourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -2551,7 +2539,7 @@
|
||||
"type": "string",
|
||||
"x-go-name": "Name"
|
||||
},
|
||||
"provanance": {
|
||||
"provenance": {
|
||||
"type": "string",
|
||||
"x-go-name": "Provenance"
|
||||
},
|
||||
@@ -2839,6 +2827,9 @@
|
||||
"type": "string",
|
||||
"x-go-name": "Name"
|
||||
},
|
||||
"provenance": {
|
||||
"$ref": "#/definitions/Provenance"
|
||||
},
|
||||
"secureFields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
@@ -5057,6 +5048,7 @@
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"alerts",
|
||||
@@ -5079,17 +5071,14 @@
|
||||
"$ref": "#/definitions/receiver"
|
||||
}
|
||||
},
|
||||
"x-go-name": "AlertGroup",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
},
|
||||
"alertGroups": {
|
||||
"description": "AlertGroups alert groups",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
},
|
||||
"x-go-name": "AlertGroups",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
|
||||
"$ref": "#/definitions/alertGroups"
|
||||
},
|
||||
"alertStatus": {
|
||||
@@ -5281,6 +5270,7 @@
|
||||
"$ref": "#/definitions/gettableAlerts"
|
||||
},
|
||||
"gettableSilence": {
|
||||
"description": "GettableSilence gettable silence",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"comment",
|
||||
@@ -5333,17 +5323,14 @@
|
||||
"x-go-name": "UpdatedAt"
|
||||
}
|
||||
},
|
||||
"x-go-name": "GettableSilence",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
|
||||
"$ref": "#/definitions/gettableSilence"
|
||||
},
|
||||
"gettableSilences": {
|
||||
"description": "GettableSilences gettable silences",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gettableSilence"
|
||||
},
|
||||
"x-go-name": "GettableSilences",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
|
||||
"$ref": "#/definitions/gettableSilences"
|
||||
},
|
||||
"labelSet": {
|
||||
@@ -5473,6 +5460,7 @@
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
|
||||
},
|
||||
"postableSilence": {
|
||||
"description": "PostableSilence postable silence",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"comment",
|
||||
@@ -5513,8 +5501,6 @@
|
||||
"x-go-name": "StartsAt"
|
||||
}
|
||||
},
|
||||
"x-go-name": "PostableSilence",
|
||||
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
|
||||
"$ref": "#/definitions/postableSilence"
|
||||
},
|
||||
"receiver": {
|
||||
|
||||
Reference in New Issue
Block a user