2021-04-09 04:55:41 -05:00
|
|
|
/*Package api contains base API implementation of unified alerting
|
|
|
|
*
|
|
|
|
*Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
|
|
|
*
|
|
|
|
*Do not manually edit these files, please find ngalert/api/swagger-codegen/ for commands on how to generate them.
|
|
|
|
*/
|
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
2021-04-28 15:59:15 -05:00
|
|
|
"net/http"
|
|
|
|
|
2021-04-09 04:55:41 -05:00
|
|
|
"github.com/grafana/grafana/pkg/api/response"
|
|
|
|
"github.com/grafana/grafana/pkg/api/routing"
|
2022-03-24 16:13:47 -05:00
|
|
|
"github.com/grafana/grafana/pkg/middleware"
|
2023-08-29 05:43:33 -05:00
|
|
|
"github.com/grafana/grafana/pkg/middleware/requestmeta"
|
2023-01-27 01:50:36 -06:00
|
|
|
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
2021-04-19 13:26:04 -05:00
|
|
|
apimodels "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
|
2021-04-30 11:28:06 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/ngalert/metrics"
|
2021-12-13 02:22:57 -06:00
|
|
|
"github.com/grafana/grafana/pkg/web"
|
2021-04-09 04:55:41 -05:00
|
|
|
)
|
|
|
|
|
2022-07-18 02:08:08 -05:00
|
|
|
type AlertmanagerApi interface {
|
2023-01-27 01:50:36 -06:00
|
|
|
RouteCreateGrafanaSilence(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteCreateSilence(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteDeleteAlertingConfig(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteDeleteGrafanaAlertingConfig(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteDeleteGrafanaSilence(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteDeleteSilence(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetAMAlertGroups(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetAMAlerts(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetAMStatus(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetAlertingConfig(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetGrafanaAMAlertGroups(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetGrafanaAMAlerts(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetGrafanaAMStatus(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetGrafanaAlertingConfig(*contextmodel.ReqContext) response.Response
|
2023-03-31 15:43:04 -05:00
|
|
|
RouteGetGrafanaAlertingConfigHistory(*contextmodel.ReqContext) response.Response
|
2023-01-27 01:50:36 -06:00
|
|
|
RouteGetGrafanaReceivers(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetGrafanaSilence(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetGrafanaSilences(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetSilence(*contextmodel.ReqContext) response.Response
|
|
|
|
RouteGetSilences(*contextmodel.ReqContext) response.Response
|
|
|
|
RoutePostAMAlerts(*contextmodel.ReqContext) response.Response
|
|
|
|
RoutePostAlertingConfig(*contextmodel.ReqContext) response.Response
|
|
|
|
RoutePostGrafanaAlertingConfig(*contextmodel.ReqContext) response.Response
|
2023-04-05 13:10:03 -05:00
|
|
|
RoutePostGrafanaAlertingConfigHistoryActivate(*contextmodel.ReqContext) response.Response
|
2023-01-27 01:50:36 -06:00
|
|
|
RoutePostTestGrafanaReceivers(*contextmodel.ReqContext) response.Response
|
2023-04-28 09:56:59 -05:00
|
|
|
RoutePostTestGrafanaTemplates(*contextmodel.ReqContext) response.Response
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
|
|
|
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteCreateGrafanaSilence(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Request Body
|
2022-02-04 11:42:04 -06:00
|
|
|
conf := apimodels.PostableSilence{}
|
|
|
|
if err := web.Bind(ctx.Req, &conf); err != nil {
|
|
|
|
return response.Error(http.StatusBadRequest, "bad request data", err)
|
|
|
|
}
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteCreateGrafanaSilence(ctx, conf)
|
2021-04-09 04:55:41 -05:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteCreateSilence(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Request Body
|
2021-12-13 02:22:57 -06:00
|
|
|
conf := apimodels.PostableSilence{}
|
|
|
|
if err := web.Bind(ctx.Req, &conf); err != nil {
|
|
|
|
return response.Error(http.StatusBadRequest, "bad request data", err)
|
|
|
|
}
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteCreateSilence(ctx, conf, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteDeleteAlertingConfig(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteDeleteAlertingConfig(ctx, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteDeleteGrafanaAlertingConfig(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteDeleteGrafanaAlertingConfig(ctx)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteDeleteGrafanaSilence(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
silenceIdParam := web.Params(ctx.Req)[":SilenceId"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteDeleteGrafanaSilence(ctx, silenceIdParam)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteDeleteSilence(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
silenceIdParam := web.Params(ctx.Req)[":SilenceId"]
|
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteDeleteSilence(ctx, silenceIdParam, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetAMAlertGroups(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetAMAlertGroups(ctx, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetAMAlerts(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetAMAlerts(ctx, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetAMStatus(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetAMStatus(ctx, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetAlertingConfig(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetAlertingConfig(ctx, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetGrafanaAMAlertGroups(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetGrafanaAMAlertGroups(ctx)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetGrafanaAMAlerts(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetGrafanaAMAlerts(ctx)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetGrafanaAMStatus(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetGrafanaAMStatus(ctx)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetGrafanaAlertingConfig(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetGrafanaAlertingConfig(ctx)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-03-31 15:43:04 -05:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetGrafanaAlertingConfigHistory(ctx *contextmodel.ReqContext) response.Response {
|
|
|
|
return f.handleRouteGetGrafanaAlertingConfigHistory(ctx)
|
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetGrafanaReceivers(ctx *contextmodel.ReqContext) response.Response {
|
2022-10-03 08:58:41 -05:00
|
|
|
return f.handleRouteGetGrafanaReceivers(ctx)
|
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetGrafanaSilence(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
silenceIdParam := web.Params(ctx.Req)[":SilenceId"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetGrafanaSilence(ctx, silenceIdParam)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetGrafanaSilences(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetGrafanaSilences(ctx)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetSilence(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
silenceIdParam := web.Params(ctx.Req)[":SilenceId"]
|
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetSilence(ctx, silenceIdParam, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RouteGetSilences(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRouteGetSilences(ctx, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RoutePostAMAlerts(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Request Body
|
2021-12-13 02:22:57 -06:00
|
|
|
conf := apimodels.PostableAlerts{}
|
|
|
|
if err := web.Bind(ctx.Req, &conf); err != nil {
|
|
|
|
return response.Error(http.StatusBadRequest, "bad request data", err)
|
|
|
|
}
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRoutePostAMAlerts(ctx, conf, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RoutePostAlertingConfig(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Path Parameters
|
2022-06-23 15:13:39 -05:00
|
|
|
datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"]
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Request Body
|
2021-12-13 02:22:57 -06:00
|
|
|
conf := apimodels.PostableUserConfig{}
|
|
|
|
if err := web.Bind(ctx.Req, &conf); err != nil {
|
|
|
|
return response.Error(http.StatusBadRequest, "bad request data", err)
|
|
|
|
}
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRoutePostAlertingConfig(ctx, conf, datasourceUIDParam)
|
2021-12-13 02:22:57 -06:00
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RoutePostGrafanaAlertingConfig(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Request Body
|
2022-02-04 11:42:04 -06:00
|
|
|
conf := apimodels.PostableUserConfig{}
|
|
|
|
if err := web.Bind(ctx.Req, &conf); err != nil {
|
|
|
|
return response.Error(http.StatusBadRequest, "bad request data", err)
|
|
|
|
}
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRoutePostGrafanaAlertingConfig(ctx, conf)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-04-05 13:10:03 -05:00
|
|
|
func (f *AlertmanagerApiHandler) RoutePostGrafanaAlertingConfigHistoryActivate(ctx *contextmodel.ReqContext) response.Response {
|
|
|
|
// Parse Path Parameters
|
|
|
|
idParam := web.Params(ctx.Req)[":id"]
|
|
|
|
return f.handleRoutePostGrafanaAlertingConfigHistoryActivate(ctx, idParam)
|
|
|
|
}
|
2023-01-27 01:50:36 -06:00
|
|
|
func (f *AlertmanagerApiHandler) RoutePostTestGrafanaReceivers(ctx *contextmodel.ReqContext) response.Response {
|
2022-07-18 02:08:08 -05:00
|
|
|
// Parse Request Body
|
2022-02-04 11:42:04 -06:00
|
|
|
conf := apimodels.TestReceiversConfigBodyParams{}
|
|
|
|
if err := web.Bind(ctx.Req, &conf); err != nil {
|
|
|
|
return response.Error(http.StatusBadRequest, "bad request data", err)
|
|
|
|
}
|
2022-07-18 02:08:08 -05:00
|
|
|
return f.handleRoutePostTestGrafanaReceivers(ctx, conf)
|
2022-02-04 11:42:04 -06:00
|
|
|
}
|
2023-04-28 09:56:59 -05:00
|
|
|
func (f *AlertmanagerApiHandler) RoutePostTestGrafanaTemplates(ctx *contextmodel.ReqContext) response.Response {
|
|
|
|
// Parse Request Body
|
|
|
|
conf := apimodels.TestTemplatesConfigBodyParams{}
|
|
|
|
if err := web.Bind(ctx.Req, &conf); err != nil {
|
|
|
|
return response.Error(http.StatusBadRequest, "bad request data", err)
|
|
|
|
}
|
|
|
|
return f.handleRoutePostTestGrafanaTemplates(ctx, conf)
|
|
|
|
}
|
2021-12-13 02:22:57 -06:00
|
|
|
|
2022-07-18 02:08:08 -05:00
|
|
|
func (api *API) RegisterAlertmanagerApiEndpoints(srv AlertmanagerApi, m *metrics.API) {
|
2021-04-09 04:55:41 -05:00
|
|
|
api.RouteRegister.Group("", func(group routing.RouteRegister) {
|
2022-02-04 11:42:04 -06:00
|
|
|
group.Post(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/api/v2/silences"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodPost, "/api/alertmanager/grafana/api/v2/silences"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodPost,
|
|
|
|
"/api/alertmanager/grafana/api/v2/silences",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteCreateGrafanaSilence),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2021-04-28 15:59:15 -05:00
|
|
|
group.Post(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/api/v2/silences"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodPost, "/api/alertmanager/{DatasourceUID}/api/v2/silences"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodPost,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/silences",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteCreateSilence),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Delete(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/config/api/v1/alerts"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodDelete, "/api/alertmanager/{DatasourceUID}/config/api/v1/alerts"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodDelete,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/config/api/v1/alerts",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteDeleteAlertingConfig),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
2022-02-04 11:42:04 -06:00
|
|
|
group.Delete(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/config/api/v1/alerts"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodDelete, "/api/alertmanager/grafana/config/api/v1/alerts"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodDelete,
|
|
|
|
"/api/alertmanager/grafana/config/api/v1/alerts",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteDeleteGrafanaAlertingConfig),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Delete(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/api/v2/silence/{SilenceId}"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodDelete, "/api/alertmanager/grafana/api/v2/silence/{SilenceId}"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodDelete,
|
|
|
|
"/api/alertmanager/grafana/api/v2/silence/{SilenceId}",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteDeleteGrafanaSilence),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2021-04-28 15:59:15 -05:00
|
|
|
group.Delete(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodDelete, "/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodDelete,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteDeleteSilence),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Get(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/api/v2/alerts/groups"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/{DatasourceUID}/api/v2/alerts/groups"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodGet,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/alerts/groups",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetAMAlertGroups),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Get(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/api/v2/alerts"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/{DatasourceUID}/api/v2/alerts"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodGet,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/alerts",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetAMAlerts),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
2021-06-15 11:14:02 -05:00
|
|
|
group.Get(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/api/v2/status"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/{DatasourceUID}/api/v2/status"),
|
2021-06-15 11:14:02 -05:00
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodGet,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/status",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetAMStatus),
|
2021-06-15 11:14:02 -05:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2021-04-28 15:59:15 -05:00
|
|
|
group.Get(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/config/api/v1/alerts"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/{DatasourceUID}/config/api/v1/alerts"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodGet,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/config/api/v1/alerts",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetAlertingConfig),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
2022-02-04 11:42:04 -06:00
|
|
|
group.Get(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/api/v2/alerts/groups"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/grafana/api/v2/alerts/groups"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodGet,
|
|
|
|
"/api/alertmanager/grafana/api/v2/alerts/groups",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetGrafanaAMAlertGroups),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Get(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/api/v2/alerts"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/grafana/api/v2/alerts"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodGet,
|
|
|
|
"/api/alertmanager/grafana/api/v2/alerts",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetGrafanaAMAlerts),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Get(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/api/v2/status"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/grafana/api/v2/status"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodGet,
|
|
|
|
"/api/alertmanager/grafana/api/v2/status",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetGrafanaAMStatus),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Get(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/config/api/v1/alerts"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/grafana/config/api/v1/alerts"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodGet,
|
|
|
|
"/api/alertmanager/grafana/config/api/v1/alerts",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetGrafanaAlertingConfig),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2023-03-31 15:43:04 -05:00
|
|
|
group.Get(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/config/history"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2023-03-31 15:43:04 -05:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/grafana/config/history"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodGet,
|
|
|
|
"/api/alertmanager/grafana/config/history",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetGrafanaAlertingConfigHistory),
|
2023-03-31 15:43:04 -05:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2022-10-03 08:58:41 -05:00
|
|
|
group.Get(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/config/api/v1/receivers"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-10-03 08:58:41 -05:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/grafana/config/api/v1/receivers"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodGet,
|
|
|
|
"/api/alertmanager/grafana/config/api/v1/receivers",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetGrafanaReceivers),
|
2022-10-03 08:58:41 -05:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2022-02-04 11:42:04 -06:00
|
|
|
group.Get(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/api/v2/silence/{SilenceId}"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/grafana/api/v2/silence/{SilenceId}"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodGet,
|
|
|
|
"/api/alertmanager/grafana/api/v2/silence/{SilenceId}",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetGrafanaSilence),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Get(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/api/v2/silences"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/grafana/api/v2/silences"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodGet,
|
|
|
|
"/api/alertmanager/grafana/api/v2/silences",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetGrafanaSilences),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2021-04-28 15:59:15 -05:00
|
|
|
group.Get(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodGet,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetSilence),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Get(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/api/v2/silences"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodGet, "/api/alertmanager/{DatasourceUID}/api/v2/silences"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodGet,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/silences",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RouteGetSilences),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Post(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/api/v2/alerts"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodPost, "/api/alertmanager/{DatasourceUID}/api/v2/alerts"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodPost,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/alerts",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RoutePostAMAlerts),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
|
|
|
group.Post(
|
2022-04-29 02:25:22 -05:00
|
|
|
toMacaronPath("/api/alertmanager/{DatasourceUID}/config/api/v1/alerts"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-04-29 02:25:22 -05:00
|
|
|
api.authorize(http.MethodPost, "/api/alertmanager/{DatasourceUID}/config/api/v1/alerts"),
|
2021-04-30 11:28:06 -05:00
|
|
|
metrics.Instrument(
|
2021-04-28 15:59:15 -05:00
|
|
|
http.MethodPost,
|
2022-04-29 02:25:22 -05:00
|
|
|
"/api/alertmanager/{DatasourceUID}/config/api/v1/alerts",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RoutePostAlertingConfig),
|
2021-04-30 11:28:06 -05:00
|
|
|
m,
|
2021-04-28 15:59:15 -05:00
|
|
|
),
|
|
|
|
)
|
2022-02-04 11:42:04 -06:00
|
|
|
group.Post(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/config/api/v1/alerts"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodPost, "/api/alertmanager/grafana/config/api/v1/alerts"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodPost,
|
|
|
|
"/api/alertmanager/grafana/config/api/v1/alerts",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RoutePostGrafanaAlertingConfig),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2023-04-05 13:10:03 -05:00
|
|
|
group.Post(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/config/history/{id}/_activate"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2023-04-05 13:10:03 -05:00
|
|
|
api.authorize(http.MethodPost, "/api/alertmanager/grafana/config/history/{id}/_activate"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodPost,
|
|
|
|
"/api/alertmanager/grafana/config/history/{id}/_activate",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RoutePostGrafanaAlertingConfigHistoryActivate),
|
2023-04-05 13:10:03 -05:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2022-02-04 11:42:04 -06:00
|
|
|
group.Post(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/config/api/v1/receivers/test"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2022-02-04 11:42:04 -06:00
|
|
|
api.authorize(http.MethodPost, "/api/alertmanager/grafana/config/api/v1/receivers/test"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodPost,
|
|
|
|
"/api/alertmanager/grafana/config/api/v1/receivers/test",
|
2023-04-24 11:18:44 -05:00
|
|
|
api.Hooks.Wrap(srv.RoutePostTestGrafanaReceivers),
|
2022-02-04 11:42:04 -06:00
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2023-04-28 09:56:59 -05:00
|
|
|
group.Post(
|
|
|
|
toMacaronPath("/api/alertmanager/grafana/config/api/v1/templates/test"),
|
2023-08-29 05:43:33 -05:00
|
|
|
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
2023-09-29 07:56:48 -05:00
|
|
|
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
2023-04-28 09:56:59 -05:00
|
|
|
api.authorize(http.MethodPost, "/api/alertmanager/grafana/config/api/v1/templates/test"),
|
|
|
|
metrics.Instrument(
|
|
|
|
http.MethodPost,
|
|
|
|
"/api/alertmanager/grafana/config/api/v1/templates/test",
|
|
|
|
api.Hooks.Wrap(srv.RoutePostTestGrafanaTemplates),
|
|
|
|
m,
|
|
|
|
),
|
|
|
|
)
|
2022-03-24 16:13:47 -05:00
|
|
|
}, middleware.ReqSignedIn)
|
2021-04-09 04:55:41 -05:00
|
|
|
}
|