From 1399ab50b3e16090f2ba5623d6b84c3ce1b2759b Mon Sep 17 00:00:00 2001 From: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com> Date: Mon, 27 Jun 2022 10:54:31 +0300 Subject: [PATCH] API: Universal swagger generation (#51033) --- .bingo/Variables.mk | 6 + .bingo/swagger.mod | 5 + .bingo/swagger.sum | 48 + .bingo/variables.env | 2 + Makefile | 39 +- pkg/services/ngalert/api/tooling/Makefile | 18 +- pkg/services/ngalert/api/tooling/api.json | 30 +- pkg/services/ngalert/api/tooling/post.json | 1738 +++++++------------- pkg/services/ngalert/api/tooling/spec.json | 1640 ++++++------------ public/api-merged.json | 39 +- public/api-spec.json | 9 + 11 files changed, 1204 insertions(+), 2370 deletions(-) create mode 100644 .bingo/swagger.mod create mode 100644 .bingo/swagger.sum diff --git a/.bingo/Variables.mk b/.bingo/Variables.mk index f46a7fdfaf1..f0c57aaef0c 100644 --- a/.bingo/Variables.mk +++ b/.bingo/Variables.mk @@ -29,6 +29,12 @@ $(DRONE): $(BINGO_DIR)/drone.mod @echo "(re)installing $(GOBIN)/drone-v1.5.0" @cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone" +SWAGGER := $(GOBIN)/swagger-v0.29.0 +$(SWAGGER): $(BINGO_DIR)/swagger.mod + @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies. + @echo "(re)installing $(GOBIN)/swagger-v0.29.0" + @cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.29.0 "github.com/go-swagger/go-swagger/cmd/swagger" + GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.40.1 $(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies. diff --git a/.bingo/swagger.mod b/.bingo/swagger.mod new file mode 100644 index 00000000000..35c8442ec14 --- /dev/null +++ b/.bingo/swagger.mod @@ -0,0 +1,5 @@ +module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT + +go 1.18 + +require github.com/go-swagger/go-swagger v0.29.0 // cmd/swagger diff --git a/.bingo/swagger.sum b/.bingo/swagger.sum new file mode 100644 index 00000000000..2441b2fad44 --- /dev/null +++ b/.bingo/swagger.sum @@ -0,0 +1,48 @@ +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= +github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= +github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/loads v0.21.0 h1:jYtUO4wwP7psAweisP/MDoOpdzsYEESdoPcsWjHDR68= +github.com/go-openapi/runtime v0.21.1 h1:/KIG00BzA2x2HRStX2tnhbqbQdPcFlkgsYCiNY20FZs= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= +github.com/go-swagger/go-swagger v0.29.0 h1:z3YoZtLvS1Y8TE/PCat1VypcZxM0IgKLt0NvZxQyNl8= +github.com/go-swagger/go-swagger v0.29.0/go.mod h1:Z4GJzI+bHKKkGB2Ji1rawpi3/ldXX8CkzGIa9HAC5EE= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ= +go.mongodb.org/mongo-driver v1.8.2 h1:8ssUXufb90ujcIvR6MyE1SchaNj0SFxsakiZgxIyrMk= +golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/net v0.0.0-20220121210141-e204ce36a2ba h1:6u6sik+bn/y7vILcYkK3iwTBWN7WtBvB0+SZswQnbf8= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +gopkg.in/ini.v1 v1.66.3 h1:jRskFVxYaMGAMUbN0UZ7niA9gzL9B49DOqE78vg0k3w= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/.bingo/variables.env b/.bingo/variables.env index 56129a870ab..587ea45ff82 100644 --- a/.bingo/variables.env +++ b/.bingo/variables.env @@ -12,6 +12,8 @@ BRA="${GOBIN}/bra-v0.0.0-20200517080246-1e3013ecaff8" DRONE="${GOBIN}/drone-v1.5.0" +SWAGGER="${GOBIN}/swagger-v0.29.0" + GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.40.1" WIRE="${GOBIN}/wire-v0.5.0" diff --git a/Makefile b/Makefile index 047031ebefb..367ca37ad87 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,6 @@ GO = go GO_FILES ?= ./pkg/... SH_FILES ?= $(shell find ./scripts -name *.sh) API_DEFINITION_FILES = $(shell find ./pkg/api/docs/definitions -name '*.go' -print) -SWAGGER_TAG ?= latest GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev) GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS)) @@ -37,50 +36,22 @@ SPEC_TARGET = public/api-spec.json MERGED_SPEC_TARGET := public/api-merged.json NGALERT_SPEC_TARGET = pkg/services/ngalert/api/tooling/api.json -$(SPEC_TARGET): $(API_DEFINITION_FILES) ## Generate API spec - docker run --rm -it \ - -e GOPATH=${HOME}/go:/go \ - -e SWAGGER_GENERATE_EXTENSION=false \ - -v ${HOME}/go:/go \ - -v $$(pwd):/grafana \ - -v $$(pwd)/../grafana-enterprise:$$(pwd)/../grafana-enterprise \ - -w $$(pwd)/pkg/api/docs quay.io/goswagger/swagger:$(SWAGGER_TAG) \ - generate spec -m -o /grafana/public/api-spec.json \ - -w /grafana/pkg/server \ - -x "grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \ - -x "github.com/prometheus/alertmanager" \ - -i /grafana/pkg/api/docs/tags.json - -swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec - $(NGALERT_SPEC_TARGET): +$(MAKE) -C pkg/services/ngalert/api/tooling api.json $(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) ## Merge generated and ngalert API specs - go run pkg/api/docs/merge/merge_specs.go -o=public/api-merged.json $(<) pkg/services/ngalert/api/tooling/api.json - -ensure_go-swagger_mac: - @hash swagger &>/dev/null || (brew tap go-swagger/go-swagger && brew install go-swagger) + go run pkg/api/docs/merge/merge_specs.go -o=$(MERGED_SPEC_TARGET) $(<) $(NGALERT_SPEC_TARGET) ---swagger-api-spec-mac: ensure_go-swagger_mac $(API_DEFINITION_FILES) ## Generate API spec (for M1 Mac) - SWAGGER_GENERATE_EXTENSION=false swagger generate spec -m -w pkg/server -o public/api-spec.json \ +--swagger-api-spec: $(API_DEFINITION_FILES) ## Generate API Swagger specification + SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o public/api-spec.json \ -x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \ -x "github.com/prometheus/alertmanager" \ -i pkg/api/docs/tags.json -swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET) validate-api-spec-mac +swagger-api-spec: gen-go --swagger-api-spec $(MERGED_SPEC_TARGET) validate-api-spec validate-api-spec: $(MERGED_SPEC_TARGET) ## Validate API spec - docker run --rm -it \ - -e GOPATH=${HOME}/go:/go \ - -e SWAGGER_GENERATE_EXTENSION=false \ - -v ${HOME}/go:/go \ - -v $$(pwd):/grafana \ - -w $$(pwd)/pkg/api/docs quay.io/goswagger/swagger:$(SWAGGER_TAG) \ - validate /grafana/$(<) - -validate-api-spec-mac: $(MERGED_SPEC_TARGET) ## Validate API spec - swagger validate $(<) + $(SWAGGER) validate $(<) clean-api-spec: rm $(SPEC_TARGET) $(MERGED_SPEC_TARGET) diff --git a/pkg/services/ngalert/api/tooling/Makefile b/pkg/services/ngalert/api/tooling/Makefile index 8e2ba82a988..75e3fc09942 100644 --- a/pkg/services/ngalert/api/tooling/Makefile +++ b/pkg/services/ngalert/api/tooling/Makefile @@ -1,3 +1,5 @@ +include ../../../../../.bingo/Variables.mk + .DEFAULT_GOAL := openapi API_DIR = definitions @@ -21,21 +23,7 @@ ifneq ($(OS),Windows_NT) endif spec.json spec-stable.json: $(GO_PKG_FILES) - # this is slow because this image does not use the cache - # https://github.com/go-swagger/go-swagger/blob/v0.27.0/Dockerfile#L5 - docker run --rm -it \ - -w /src/$(PATH_DOWN) \ - -v $$(pwd)/$(PATH_UP):/src \ - --entrypoint sh \ - quay.io/goswagger/swagger:$(SWAGGER_TAG) \ - -c \ - "swagger generate spec -m -o $@; swagger generate spec -m --include-tag=stable -o spec-stable.json" - -ensure_go-swagger_mac: - @hash swagger &>/dev/null || (brew tap go-swagger/go-swagger && brew install go-swagger) - -spec.json-mac: ensure_go-swagger_mac $(GO_PKG_FILES) - swagger generate spec -m -w $(API_DIR) -o spec.json && swagger generate spec -m --include-tag=stable -o ngalert.json + SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w $(API_DIR) -o spec.json && $(SWAGGER) generate spec -m --include-tag=stable -o spec-stable.json post.json: spec.json go run cmd/clean-swagger/main.go -if $(<) -of $@ diff --git a/pkg/services/ngalert/api/tooling/api.json b/pkg/services/ngalert/api/tooling/api.json index a5ebb64a483..905ea488c07 100644 --- a/pkg/services/ngalert/api/tooling/api.json +++ b/pkg/services/ngalert/api/tooling/api.json @@ -3141,6 +3141,7 @@ "x-go-package": "github.com/prometheus/alertmanager/timeinterval" }, "URL": { + "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.", "properties": { "ForceQuery": { "type": "boolean" @@ -3173,9 +3174,9 @@ "$ref": "#/definitions/Userinfo" } }, - "title": "URL is a custom URL type that allows validation at configuration load time.", + "title": "A URL represents a parsed URL (technically, a URI reference).", "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "x-go-package": "net/url" }, "Userinfo": { "description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a URL. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.", @@ -3373,6 +3374,7 @@ "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" }, "alertGroup": { + "description": "AlertGroup alert group", "properties": { "alerts": { "description": "alerts", @@ -3394,9 +3396,7 @@ "labels", "receiver" ], - "type": "object", - "x-go-name": "AlertGroup", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "alertGroups": { "items": { @@ -3524,6 +3524,7 @@ "$ref": "#/definitions/Duration" }, "gettableAlert": { + "description": "GettableAlert gettable alert", "properties": { "annotations": { "$ref": "#/definitions/labelSet" @@ -3582,17 +3583,14 @@ "status", "updatedAt" ], - "type": "object", - "x-go-name": "GettableAlert", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "gettableAlerts": { + "description": "GettableAlerts gettable alerts", "items": { "$ref": "#/definitions/gettableAlert" }, - "type": "array", - "x-go-name": "GettableAlerts", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "array" }, "gettableSilence": { "description": "GettableSilence gettable silence", @@ -3783,6 +3781,7 @@ "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" }, "postableSilence": { + "description": "PostableSilence postable silence", "properties": { "comment": { "description": "comment", @@ -3822,11 +3821,10 @@ "matchers", "startsAt" ], - "type": "object", - "x-go-name": "PostableSilence", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "receiver": { + "description": "Receiver receiver", "properties": { "name": { "description": "name", @@ -3837,9 +3835,7 @@ "required": [ "name" ], - "type": "object", - "x-go-name": "Receiver", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "silence": { "description": "Silence silence", diff --git a/pkg/services/ngalert/api/tooling/post.json b/pkg/services/ngalert/api/tooling/post.json index d539a8486db..c5e91a33700 100644 --- a/pkg/services/ngalert/api/tooling/post.json +++ b/pkg/services/ngalert/api/tooling/post.json @@ -5,15 +5,13 @@ ], "definitions": { "Ack": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AddApiKeyCommand": { "description": "COMMANDS", "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "role": { "enum": [ @@ -21,25 +19,20 @@ "Editor", "Admin" ], - "type": "string", - "x-go-enum-desc": "Viewer ROLE_VIEWER\nEditor ROLE_EDITOR\nAdmin ROLE_ADMIN", - "x-go-name": "Role" + "type": "string" }, "secondsToLive": { "format": "int64", - "type": "integer", - "x-go-name": "SecondsToLive" + "type": "integer" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/models" + "type": "object" }, "Alert": { "properties": { "activeAt": { "format": "date-time", - "type": "string", - "x-go-name": "ActiveAt" + "type": "string" }, "annotations": { "$ref": "#/definitions/overrideLabels" @@ -48,12 +41,10 @@ "$ref": "#/definitions/overrideLabels" }, "state": { - "type": "string", - "x-go-name": "State" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "required": [ @@ -63,8 +54,7 @@ "value" ], "title": "Alert has info for an alert.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertDiscovery": { "properties": { @@ -72,16 +62,14 @@ "items": { "$ref": "#/definitions/Alert" }, - "type": "array", - "x-go-name": "Alerts" + "type": "array" } }, "required": [ "alerts" ], "title": "AlertDiscovery has info for all active alerts.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertInstancesResponse": { "properties": { @@ -94,31 +82,25 @@ }, "type": "array" }, - "type": "array", - "x-go-name": "Instances" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertManager": { "properties": { "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" } }, "title": "AlertManager models a configured Alert Manager.", - "type": "object", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "type": "object" }, "AlertManagerNotFound": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertManagerNotReady": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertManagersResult": { "properties": { @@ -126,50 +108,42 @@ "items": { "$ref": "#/definitions/AlertManager" }, - "type": "array", - "x-go-name": "Active" + "type": "array" }, "droppedAlertManagers": { "items": { "$ref": "#/definitions/AlertManager" }, - "type": "array", - "x-go-name": "Dropped" + "type": "array" } }, "title": "AlertManagersResult contains the result from querying the alertmanagers endpoint.", - "type": "object", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "type": "object" }, "AlertQuery": { "properties": { "datasourceUid": { "description": "Grafana data source unique identifier; it should be '-100' for a Server Side Expression operation.", - "type": "string", - "x-go-name": "DatasourceUID" + "type": "string" }, "model": { "description": "JSON is the raw JSON query and includes the above properties as well as custom properties.", - "type": "object", - "x-go-name": "Model" + "type": "object" }, "queryType": { "description": "QueryType is an optional identifier for the type of query.\nIt can be used to distinguish different types of queries.", - "type": "string", - "x-go-name": "QueryType" + "type": "string" }, "refId": { "description": "RefID is the unique identifier of the query, set by the frontend call.", - "type": "string", - "x-go-name": "RefID" + "type": "string" }, "relativeTimeRange": { "$ref": "#/definitions/RelativeTimeRange" } }, "title": "AlertQuery represents a single query associated with an alert definition.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "object" }, "AlertResponse": { "properties": { @@ -177,22 +151,19 @@ "$ref": "#/definitions/AlertDiscovery" }, "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } }, "required": [ "status" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertRule": { "properties": { @@ -203,13 +174,11 @@ "example": { "runbook_url": "https://supercoolrunbook.com/page/13" }, - "type": "object", - "x-go-name": "Annotations" + "type": "object" }, "condition": { "example": "A", - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "example": [ @@ -260,32 +229,26 @@ "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "execErrState": { - "description": "\nAlerting AlertingErrState\nError ErrorErrState\nOK OkErrState", "enum": [ "Alerting", "Error", "OK" ], - "type": "string", - "x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState\nOK OkErrState", - "x-go-name": "ExecErrState" + "type": "string" }, "folderUID": { "example": "project_x", - "type": "string", - "x-go-name": "FolderUID" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" }, "id": { "format": "int64", - "type": "integer", - "x-go-name": "ID" + "type": "integer" }, "labels": { "additionalProperties": { @@ -294,24 +257,19 @@ "example": { "team": "sre-team-1" }, - "type": "object", - "x-go-name": "Labels" + "type": "object" }, "noDataState": { - "description": "\nAlerting Alerting\nNoData NoData\nOK OK", "enum": [ "Alerting", "NoData", "OK" ], - "type": "string", - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + "type": "string" }, "orgID": { "format": "int64", - "type": "integer", - "x-go-name": "OrgID" + "type": "integer" }, "provenance": { "$ref": "#/definitions/Provenance" @@ -320,25 +278,21 @@ "example": "eval_group_1", "maxLength": 190, "minLength": 1, - "type": "string", - "x-go-name": "RuleGroup" + "type": "string" }, "title": { "example": "Always firing", "maxLength": 190, "minLength": 1, - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" }, "updated": { "format": "date-time", "readOnly": true, - "type": "string", - "x-go-name": "Updated" + "type": "string" } }, "required": [ @@ -352,19 +306,16 @@ "execErrState", "for" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertRuleGroup": { "properties": { "interval": { "format": "int64", - "type": "integer", - "x-go-name": "Interval" + "type": "integer" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertingRule": { "description": "adapted from cortex", @@ -373,50 +324,41 @@ "items": { "$ref": "#/definitions/Alert" }, - "type": "array", - "x-go-name": "Alerts" + "type": "array" }, "annotations": { "$ref": "#/definitions/overrideLabels" }, "duration": { "format": "double", - "type": "number", - "x-go-name": "Duration" + "type": "number" }, "evaluationTime": { "format": "double", - "type": "number", - "x-go-name": "EvaluationTime" + "type": "number" }, "health": { - "type": "string", - "x-go-name": "Health" + "type": "string" }, "labels": { "$ref": "#/definitions/overrideLabels" }, "lastError": { - "type": "string", - "x-go-name": "LastError" + "type": "string" }, "lastEvaluation": { "format": "date-time", - "type": "string", - "x-go-name": "LastEvaluation" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "query": { - "type": "string", - "x-go-name": "Query" + "type": "string" }, "state": { "description": "State can be \"pending\", \"firing\", \"inactive\".", - "type": "string", - "x-go-name": "State" + "type": "string" }, "type": { "$ref": "#/definitions/RuleType" @@ -431,25 +373,21 @@ "annotations", "alerts" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "ApiRuleNode": { "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Annotations" + "type": "object" }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -458,16 +396,13 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Labels" + "type": "object" }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Authorization": { "properties": { @@ -475,17 +410,14 @@ "$ref": "#/definitions/Secret" }, "credentials_file": { - "type": "string", - "x-go-name": "CredentialsFile" + "type": "string" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" } }, "title": "Authorization contains HTTP authorization credentials.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "BasicAuth": { "properties": { @@ -493,17 +425,14 @@ "$ref": "#/definitions/Secret" }, "password_file": { - "type": "string", - "x-go-name": "PasswordFile" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } }, "title": "BasicAuth contains basic HTTP authentication credentials.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "Config": { "properties": { @@ -514,15 +443,13 @@ "items": { "$ref": "#/definitions/InhibitRule" }, - "type": "array", - "x-go-name": "InhibitRules" + "type": "array" }, "mute_time_intervals": { "items": { "$ref": "#/definitions/MuteTimeInterval" }, - "type": "array", - "x-go-name": "MuteTimeIntervals" + "type": "array" }, "route": { "$ref": "#/definitions/Route" @@ -531,20 +458,17 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Templates" + "type": "array" } }, "title": "Config is the top-level configuration for Alertmanager's config files.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "ContactPoints": { "items": { "$ref": "#/definitions/EmbeddedContactPoint" }, - "type": "array", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "array" }, "CreateDashboardSnapshotCommand": { "properties": { @@ -556,38 +480,32 @@ }, "deleteKey": { "description": "Unique key used to delete the snapshot. It is different from the `key` so that only the creator can delete the snapshot. Required if `external` is `true`.", - "type": "string", - "x-go-name": "DeleteKey" + "type": "string" }, "expires": { "default": 0, "description": "When the snapshot should expire in seconds in seconds. Default is never to expire.", "format": "int64", - "type": "integer", - "x-go-name": "Expires" + "type": "integer" }, "external": { "default": false, "description": "these are passed when storing an external snapshot ref\nSave the snapshot on an external server rather than locally.", - "type": "boolean", - "x-go-name": "External" + "type": "boolean" }, "key": { "description": "Define the unique key. Required if `external` is `true`.", - "type": "string", - "x-go-name": "Key" + "type": "string" }, "name": { "description": "Snapshot name", - "type": "string", - "x-go-name": "Name" + "type": "string" } }, "required": [ "dashboard" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/models" + "type": "object" }, "DashboardSnapshot": { "description": "DashboardSnapshot model", @@ -645,14 +563,12 @@ "type": "integer" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/models" + "type": "object" }, "DateTime": { "description": "DateTime is a time but it serializes to ISO8601 format with millis\nIt knows how to read 3 different variations of a RFC3339 date time.\nMost APIs we encounter want either millisecond or second precision times.\nThis just tries to make it worry-free.", "format": "date-time", - "type": "string", - "x-go-package": "github.com/go-openapi/strfmt" + "type": "string" }, "DayOfMonthRange": { "properties": { @@ -666,34 +582,29 @@ } }, "title": "A DayOfMonthRange is an inclusive range that may have negative Beginning/End values that represent distance from the End of the month Beginning at -1.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "DiscoveryBase": { "properties": { "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } }, "required": [ "status" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "DsPermissionType": { "description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\nEnum: 0,1", "format": "int64", - "type": "integer", - "x-go-package": "github.com/grafana/grafana/pkg/models" + "type": "integer" }, "Duration": { "format": "int64", @@ -703,8 +614,7 @@ "EmailConfig": { "properties": { "auth_identity": { - "type": "string", - "x-go-name": "AuthIdentity" + "type": "string" }, "auth_password": { "$ref": "#/definitions/Secret" @@ -713,74 +623,61 @@ "$ref": "#/definitions/Secret" }, "auth_username": { - "type": "string", - "x-go-name": "AuthUsername" + "type": "string" }, "from": { - "type": "string", - "x-go-name": "From" + "type": "string" }, "headers": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Headers" + "type": "object" }, "hello": { - "type": "string", - "x-go-name": "Hello" + "type": "string" }, "html": { - "type": "string", - "x-go-name": "HTML" + "type": "string" }, "require_tls": { - "type": "boolean", - "x-go-name": "RequireTLS" + "type": "boolean" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "smarthost": { "$ref": "#/definitions/HostPort" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "tls_config": { "$ref": "#/definitions/TLSConfig" }, "to": { "description": "Email address to notify.", - "type": "string", - "x-go-name": "To" + "type": "string" } }, "title": "EmailConfig configures notifications via mail.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "EmbeddedContactPoint": { "description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.", "properties": { "disableResolveMessage": { "example": false, - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { "description": "Name is used as grouping key in the UI. Contact points with the\nsame name will be grouped in the UI.", "example": "webhook_1", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "readOnly": true, - "type": "string", - "x-go-name": "Provenance" + "type": "string" }, "settings": { "$ref": "#/definitions/Json" @@ -807,50 +704,42 @@ " wecom" ], "example": "webhook", - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { "description": "UID is the unique identifier of the contact point. The UID can be\nset by the user.", "example": "my_external_reference", - "type": "string", - "x-go-name": "UID" + "type": "string" } }, "required": [ "type", "settings" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "ErrorType": { "title": "ErrorType models the different API error types.", - "type": "string", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "type": "string" }, "EvalAlertConditionCommand": { "description": "EvalAlertConditionCommand is the command for evaluating a condition", "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "now": { "format": "date-time", - "type": "string", - "x-go-name": "Now" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "object" }, "EvalQueriesPayload": { "properties": { @@ -858,17 +747,14 @@ "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "now": { "format": "date-time", - "type": "string", - "x-go-name": "Now" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "EvalQueriesResponse": {}, "ExtendedReceiver": { @@ -901,8 +787,7 @@ "$ref": "#/definitions/WechatConfig" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Failure": { "$ref": "#/definitions/ResponseDetails" @@ -913,12 +798,10 @@ "$ref": "#/definitions/AlertManagersResult" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableApiAlertingConfig": { "properties": { @@ -929,30 +812,26 @@ "items": { "$ref": "#/definitions/InhibitRule" }, - "type": "array", - "x-go-name": "InhibitRules" + "type": "array" }, "muteTimeProvenances": { "additionalProperties": { "$ref": "#/definitions/Provenance" }, - "type": "object", - "x-go-name": "MuteTimeProvenances" + "type": "object" }, "mute_time_intervals": { "items": { "$ref": "#/definitions/MuteTimeInterval" }, - "type": "array", - "x-go-name": "MuteTimeIntervals" + "type": "array" }, "receivers": { "description": "Override with our superset receiver type", "items": { "$ref": "#/definitions/GettableApiReceiver" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" }, "route": { "$ref": "#/definitions/Route" @@ -961,12 +840,10 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Templates" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableApiReceiver": { "properties": { @@ -974,97 +851,82 @@ "items": { "$ref": "#/definitions/EmailConfig" }, - "type": "array", - "x-go-name": "EmailConfigs" + "type": "array" }, "grafana_managed_receiver_configs": { "items": { "$ref": "#/definitions/GettableGrafanaReceiver" }, - "type": "array", - "x-go-name": "GrafanaManagedReceivers" + "type": "array" }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "opsgenie_configs": { "items": { "$ref": "#/definitions/OpsGenieConfig" }, - "type": "array", - "x-go-name": "OpsGenieConfigs" + "type": "array" }, "pagerduty_configs": { "items": { "$ref": "#/definitions/PagerdutyConfig" }, - "type": "array", - "x-go-name": "PagerdutyConfigs" + "type": "array" }, "pushover_configs": { "items": { "$ref": "#/definitions/PushoverConfig" }, - "type": "array", - "x-go-name": "PushoverConfigs" + "type": "array" }, "slack_configs": { "items": { "$ref": "#/definitions/SlackConfig" }, - "type": "array", - "x-go-name": "SlackConfigs" + "type": "array" }, "sns_configs": { "items": { "$ref": "#/definitions/SNSConfig" }, - "type": "array", - "x-go-name": "SNSConfigs" + "type": "array" }, "victorops_configs": { "items": { "$ref": "#/definitions/VictorOpsConfig" }, - "type": "array", - "x-go-name": "VictorOpsConfigs" + "type": "array" }, "webhook_configs": { "items": { "$ref": "#/definitions/WebhookConfig" }, - "type": "array", - "x-go-name": "WebhookConfigs" + "type": "array" }, "wechat_configs": { "items": { "$ref": "#/definitions/WechatConfig" }, - "type": "array", - "x-go-name": "WechatConfigs" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableExtendedRuleNode": { "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Annotations" + "type": "object" }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -1076,26 +938,21 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Labels" + "type": "object" }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableGrafanaReceiver": { "properties": { "disableResolveMessage": { - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "$ref": "#/definitions/Provenance" @@ -1104,23 +961,19 @@ "additionalProperties": { "type": "boolean" }, - "type": "object", - "x-go-name": "SecureFields" + "type": "object" }, "settings": { "$ref": "#/definitions/Json" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableGrafanaReceivers": { "properties": { @@ -1128,25 +981,21 @@ "items": { "$ref": "#/definitions/GettableGrafanaReceiver" }, - "type": "array", - "x-go-name": "GrafanaManagedReceivers" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableGrafanaRule": { "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "exec_err_state": { "enum": [ @@ -1154,28 +1003,22 @@ "Alerting", "Error" ], - "type": "string", - "x-go-enum-desc": "OK OkErrState\nAlerting AlertingErrState\nError ErrorErrState", - "x-go-name": "ExecErrState" + "type": "string" }, "id": { "format": "int64", - "type": "integer", - "x-go-name": "ID" + "type": "integer" }, "intervalSeconds": { "format": "int64", - "type": "integer", - "x-go-name": "IntervalSeconds" + "type": "integer" }, "namespace_id": { "format": "int64", - "type": "integer", - "x-go-name": "NamespaceID" + "type": "integer" }, "namespace_uid": { - "type": "string", - "x-go-name": "NamespaceUID" + "type": "string" }, "no_data_state": { "enum": [ @@ -1183,43 +1026,34 @@ "NoData", "OK" ], - "type": "string", - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + "type": "string" }, "orgId": { "format": "int64", - "type": "integer", - "x-go-name": "OrgID" + "type": "integer" }, "provenance": { "$ref": "#/definitions/Provenance" }, "rule_group": { - "type": "string", - "x-go-name": "RuleGroup" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" }, "updated": { "format": "date-time", - "type": "string", - "x-go-name": "Updated" + "type": "string" }, "version": { "format": "int64", - "type": "integer", - "x-go-name": "Version" + "type": "integer" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableNGalertConfig": { "properties": { @@ -1227,8 +1061,7 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Alertmanagers" + "type": "array" }, "alertmanagersChoice": { "enum": [ @@ -1236,13 +1069,10 @@ "internal", "external" ], - "type": "string", - "x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers", - "x-go-name": "AlertmanagersChoice" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableRuleGroupConfig": { "properties": { @@ -1250,26 +1080,22 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "items": { "$ref": "#/definitions/GettableExtendedRuleNode" }, - "type": "array", - "x-go-name": "Rules" + "type": "array" }, "source_tenants": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "SourceTenants" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableStatus": { "properties": { @@ -1282,8 +1108,7 @@ "uptime": { "description": "uptime", "format": "date-time", - "type": "string", - "x-go-name": "Uptime" + "type": "string" }, "versionInfo": { "$ref": "#/definitions/versionInfo" @@ -1295,8 +1120,7 @@ "uptime", "versionInfo" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableUserConfig": { "properties": { @@ -1307,19 +1131,16 @@ "additionalProperties": { "$ref": "#/definitions/Provenance" }, - "type": "object", - "x-go-name": "TemplateFileProvenances" + "type": "object" }, "template_files": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "TemplateFiles" + "type": "object" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GlobalConfig": { "description": "GlobalConfig defines configuration parameters that are valid globally\nunless overwritten.", @@ -1331,8 +1152,7 @@ "$ref": "#/definitions/Secret" }, "opsgenie_api_key_file": { - "type": "string", - "x-go-name": "OpsGenieAPIKeyFile" + "type": "string" }, "opsgenie_api_url": { "$ref": "#/definitions/URL" @@ -1347,12 +1167,10 @@ "$ref": "#/definitions/SecretURL" }, "slack_api_url_file": { - "type": "string", - "x-go-name": "SlackAPIURLFile" + "type": "string" }, "smtp_auth_identity": { - "type": "string", - "x-go-name": "SMTPAuthIdentity" + "type": "string" }, "smtp_auth_password": { "$ref": "#/definitions/Secret" @@ -1361,20 +1179,16 @@ "$ref": "#/definitions/Secret" }, "smtp_auth_username": { - "type": "string", - "x-go-name": "SMTPAuthUsername" + "type": "string" }, "smtp_from": { - "type": "string", - "x-go-name": "SMTPFrom" + "type": "string" }, "smtp_hello": { - "type": "string", - "x-go-name": "SMTPHello" + "type": "string" }, "smtp_require_tls": { - "type": "boolean", - "x-go-name": "SMTPRequireTLS" + "type": "boolean" }, "smtp_smarthost": { "$ref": "#/definitions/HostPort" @@ -1386,8 +1200,7 @@ "$ref": "#/definitions/URL" }, "wechat_api_corp_id": { - "type": "string", - "x-go-name": "WeChatAPICorpID" + "type": "string" }, "wechat_api_secret": { "$ref": "#/definitions/Secret" @@ -1396,8 +1209,7 @@ "$ref": "#/definitions/URL" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "HTTPClientConfig": { "properties": { @@ -1412,13 +1224,11 @@ }, "bearer_token_file": { "description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.", - "type": "string", - "x-go-name": "BearerTokenFile" + "type": "string" }, "follow_redirects": { "description": "FollowRedirects specifies whether the client should follow HTTP 3xx redirects.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.", - "type": "boolean", - "x-go-name": "FollowRedirects" + "type": "boolean" }, "oauth2": { "$ref": "#/definitions/OAuth2" @@ -1431,8 +1241,7 @@ } }, "title": "HTTPClientConfig configures an HTTP client.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "HostPort": { "properties": { @@ -1444,8 +1253,7 @@ } }, "title": "HostPort represents a \"host:port\" network address.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "InclusiveRange": { "properties": { @@ -1459,8 +1267,7 @@ } }, "title": "InclusiveRange is used to hold the Beginning and End values of many time interval components.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "InhibitRule": { "description": "InhibitRule defines an inhibition rule that mutes alerts that match the\ntarget labels if an alert matching the source labels exists.\nBoth alerts have to have a set of labels being equal.", @@ -1473,8 +1280,7 @@ "type": "string" }, "description": "SourceMatch defines a set of labels that have to equal the given\nvalue for source alerts. Deprecated. Remove before v1.0 release.", - "type": "object", - "x-go-name": "SourceMatch" + "type": "object" }, "source_match_re": { "$ref": "#/definitions/MatchRegexps" @@ -1487,8 +1293,7 @@ "type": "string" }, "description": "TargetMatch defines a set of labels that have to equal the given\nvalue for target alerts. Deprecated. Remove before v1.0 release.", - "type": "object", - "x-go-name": "TargetMatch" + "type": "object" }, "target_match_re": { "$ref": "#/definitions/MatchRegexps" @@ -1497,71 +1302,60 @@ "$ref": "#/definitions/Matchers" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "Json": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/components/simplejson" + "type": "object" }, "Label": { "properties": { "Name": { - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "title": "Label is a key/value pair of strings.", - "type": "object", - "x-go-package": "github.com/prometheus/prometheus/pkg/labels" + "type": "object" }, "LabelName": { "description": "A LabelName is a key for a LabelSet or Metric. It has a value associated\ntherewith.", - "type": "string", - "x-go-package": "github.com/prometheus/common/model" + "type": "string" }, "LabelNames": { "items": { "$ref": "#/definitions/LabelName" }, "title": "LabelNames is a sortable LabelName slice. In implements sort.Interface.", - "type": "array", - "x-go-package": "github.com/prometheus/common/model" + "type": "array" }, "LabelSet": { "additionalProperties": { "$ref": "#/definitions/LabelValue" }, "description": "A LabelSet is a collection of LabelName and LabelValue pairs. The LabelSet\nmay be fully-qualified down to the point where it may resolve to a single\nMetric in the data store or not. All operations that occur within the realm\nof a LabelSet can emit a vector of Metric entities to which the LabelSet may\nmatch.", - "type": "object", - "x-go-package": "github.com/prometheus/common/model" + "type": "object" }, "LabelValue": { "title": "A LabelValue is an associated value for a LabelName.", - "type": "string", - "x-go-package": "github.com/prometheus/common/model" + "type": "string" }, "Labels": { "description": "Labels is a sorted set of labels. Order has to be guaranteed upon\ninstantiation.", "items": { "$ref": "#/definitions/Label" }, - "type": "array", - "x-go-package": "github.com/prometheus/prometheus/pkg/labels" + "type": "array" }, "MatchRegexps": { "additionalProperties": { "$ref": "#/definitions/Regexp" }, "title": "MatchRegexps represents a map of Regexp.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "MatchType": { "format": "int64", "title": "MatchType is an enum for label matching types.", - "type": "integer", - "x-go-package": "github.com/prometheus/alertmanager/pkg/labels" + "type": "integer" }, "Matcher": { "properties": { @@ -1576,8 +1370,7 @@ } }, "title": "Matcher models the matching of a label.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/pkg/labels" + "type": "object" }, "Matchers": { "description": "Matchers is a slice of Matchers that is sortable, implements Stringer, and\nprovides a Matches method to match a LabelSet against all Matchers in the\nslice. Note that some users of Matchers might require it to be sorted.", @@ -1589,36 +1382,30 @@ "MessageTemplate": { "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "$ref": "#/definitions/Provenance" }, "template": { - "type": "string", - "x-go-name": "Template" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "MessageTemplateContent": { "properties": { "template": { - "type": "string", - "x-go-name": "Template" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "MessageTemplates": { "items": { "$ref": "#/definitions/MessageTemplate" }, - "type": "array", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "array" }, "MonthRange": { "properties": { @@ -1632,37 +1419,31 @@ } }, "title": "A MonthRange is an inclusive range between [1, 12] where 1 = January.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "MultiStatus": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "MuteTimeInterval": { "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "time_intervals": { "items": { "$ref": "#/definitions/TimeInterval" }, - "type": "array", - "x-go-name": "TimeIntervals" + "type": "array" } }, "title": "MuteTimeInterval represents a named set of time intervals for which a route should be muted.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "MuteTimings": { "items": { "$ref": "#/definitions/MuteTimeInterval" }, - "type": "array", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "array" }, "NamespaceConfigResponse": { "additionalProperties": { @@ -1671,23 +1452,19 @@ }, "type": "array" }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "NotFound": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "NotifierConfig": { "properties": { "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" } }, "title": "NotifierConfig contains base options common across all notifier configurations.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "OAuth2": { "properties": { @@ -1695,38 +1472,32 @@ "$ref": "#/definitions/TLSConfig" }, "client_id": { - "type": "string", - "x-go-name": "ClientID" + "type": "string" }, "client_secret": { "$ref": "#/definitions/Secret" }, "client_secret_file": { - "type": "string", - "x-go-name": "ClientSecretFile" + "type": "string" }, "endpoint_params": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "EndpointParams" + "type": "object" }, "scopes": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "Scopes" + "type": "array" }, "token_url": { - "type": "string", - "x-go-name": "TokenURL" + "type": "string" } }, "title": "OAuth2 is the oauth2 client configuration.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "ObjectMatchers": { "$ref": "#/definitions/Matchers", @@ -1735,133 +1506,107 @@ "OpsGenieConfig": { "properties": { "actions": { - "type": "string", - "x-go-name": "Actions" + "type": "string" }, "api_key": { "$ref": "#/definitions/Secret" }, "api_key_file": { - "type": "string", - "x-go-name": "APIKeyFile" + "type": "string" }, "api_url": { "$ref": "#/definitions/URL" }, "description": { - "type": "string", - "x-go-name": "Description" + "type": "string" }, "details": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Details" + "type": "object" }, "entity": { - "type": "string", - "x-go-name": "Entity" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "note": { - "type": "string", - "x-go-name": "Note" + "type": "string" }, "priority": { - "type": "string", - "x-go-name": "Priority" + "type": "string" }, "responders": { "items": { "$ref": "#/definitions/OpsGenieConfigResponder" }, - "type": "array", - "x-go-name": "Responders" + "type": "array" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "source": { - "type": "string", - "x-go-name": "Source" + "type": "string" }, "tags": { - "type": "string", - "x-go-name": "Tags" + "type": "string" }, "update_alerts": { - "type": "boolean", - "x-go-name": "UpdateAlerts" + "type": "boolean" } }, "title": "OpsGenieConfig configures notifications via OpsGenie.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "OpsGenieConfigResponder": { "properties": { "id": { "description": "One of those 3 should be filled.", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "type": { "description": "team, user, escalation, schedule etc.", - "type": "string", - "x-go-name": "Type" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "PagerdutyConfig": { "properties": { "class": { - "type": "string", - "x-go-name": "Class" + "type": "string" }, "client": { - "type": "string", - "x-go-name": "Client" + "type": "string" }, "client_url": { - "type": "string", - "x-go-name": "ClientURL" + "type": "string" }, "component": { - "type": "string", - "x-go-name": "Component" + "type": "string" }, "description": { - "type": "string", - "x-go-name": "Description" + "type": "string" }, "details": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Details" + "type": "object" }, "group": { - "type": "string", - "x-go-name": "Group" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" @@ -1870,75 +1615,62 @@ "items": { "$ref": "#/definitions/PagerdutyImage" }, - "type": "array", - "x-go-name": "Images" + "type": "array" }, "links": { "items": { "$ref": "#/definitions/PagerdutyLink" }, - "type": "array", - "x-go-name": "Links" + "type": "array" }, "routing_key": { "$ref": "#/definitions/Secret" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "service_key": { "$ref": "#/definitions/Secret" }, "severity": { - "type": "string", - "x-go-name": "Severity" + "type": "string" }, "url": { "$ref": "#/definitions/URL" } }, "title": "PagerdutyConfig configures notifications via PagerDuty.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "PagerdutyImage": { "description": "PagerdutyImage is an image", "properties": { "alt": { - "type": "string", - "x-go-name": "Alt" + "type": "string" }, "href": { - "type": "string", - "x-go-name": "Href" + "type": "string" }, "src": { - "type": "string", - "x-go-name": "Src" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "PagerdutyLink": { "description": "PagerdutyLink is a link", "properties": { "href": { - "type": "string", - "x-go-name": "Href" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "PermissionDenied": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Point": { "properties": { @@ -1952,8 +1684,7 @@ } }, "title": "Point represents a single data point for a given timestamp.", - "type": "object", - "x-go-package": "github.com/prometheus/prometheus/promql" + "type": "object" }, "PostableApiAlertingConfig": { "properties": { @@ -1964,23 +1695,20 @@ "items": { "$ref": "#/definitions/InhibitRule" }, - "type": "array", - "x-go-name": "InhibitRules" + "type": "array" }, "mute_time_intervals": { "items": { "$ref": "#/definitions/MuteTimeInterval" }, - "type": "array", - "x-go-name": "MuteTimeIntervals" + "type": "array" }, "receivers": { "description": "Override with our superset receiver type", "items": { "$ref": "#/definitions/PostableApiReceiver" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" }, "route": { "$ref": "#/definitions/Route" @@ -1989,12 +1717,10 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Templates" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableApiReceiver": { "properties": { @@ -2002,97 +1728,82 @@ "items": { "$ref": "#/definitions/EmailConfig" }, - "type": "array", - "x-go-name": "EmailConfigs" + "type": "array" }, "grafana_managed_receiver_configs": { "items": { "$ref": "#/definitions/PostableGrafanaReceiver" }, - "type": "array", - "x-go-name": "GrafanaManagedReceivers" + "type": "array" }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "opsgenie_configs": { "items": { "$ref": "#/definitions/OpsGenieConfig" }, - "type": "array", - "x-go-name": "OpsGenieConfigs" + "type": "array" }, "pagerduty_configs": { "items": { "$ref": "#/definitions/PagerdutyConfig" }, - "type": "array", - "x-go-name": "PagerdutyConfigs" + "type": "array" }, "pushover_configs": { "items": { "$ref": "#/definitions/PushoverConfig" }, - "type": "array", - "x-go-name": "PushoverConfigs" + "type": "array" }, "slack_configs": { "items": { "$ref": "#/definitions/SlackConfig" }, - "type": "array", - "x-go-name": "SlackConfigs" + "type": "array" }, "sns_configs": { "items": { "$ref": "#/definitions/SNSConfig" }, - "type": "array", - "x-go-name": "SNSConfigs" + "type": "array" }, "victorops_configs": { "items": { "$ref": "#/definitions/VictorOpsConfig" }, - "type": "array", - "x-go-name": "VictorOpsConfigs" + "type": "array" }, "webhook_configs": { "items": { "$ref": "#/definitions/WebhookConfig" }, - "type": "array", - "x-go-name": "WebhookConfigs" + "type": "array" }, "wechat_configs": { "items": { "$ref": "#/definitions/WechatConfig" }, - "type": "array", - "x-go-name": "WechatConfigs" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableExtendedRuleNode": { "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Annotations" + "type": "object" }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -2104,48 +1815,39 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Labels" + "type": "object" }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableGrafanaReceiver": { "properties": { "disableResolveMessage": { - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "secureSettings": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "SecureSettings" + "type": "object" }, "settings": { "$ref": "#/definitions/Json" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableGrafanaReceivers": { "properties": { @@ -2153,25 +1855,21 @@ "items": { "$ref": "#/definitions/PostableGrafanaReceiver" }, - "type": "array", - "x-go-name": "GrafanaManagedReceivers" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableGrafanaRule": { "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "exec_err_state": { "enum": [ @@ -2179,9 +1877,7 @@ "Alerting", "Error" ], - "type": "string", - "x-go-enum-desc": "OK OkErrState\nAlerting AlertingErrState\nError ErrorErrState", - "x-go-name": "ExecErrState" + "type": "string" }, "no_data_state": { "enum": [ @@ -2189,21 +1885,16 @@ "NoData", "OK" ], - "type": "string", - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableNGalertConfig": { "properties": { @@ -2211,8 +1902,7 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Alertmanagers" + "type": "array" }, "alertmanagersChoice": { "enum": [ @@ -2220,13 +1910,10 @@ "internal", "external" ], - "type": "string", - "x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers", - "x-go-name": "AlertmanagersChoice" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableRuleGroupConfig": { "properties": { @@ -2234,19 +1921,16 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "items": { "$ref": "#/definitions/PostableExtendedRuleNode" }, - "type": "array", - "x-go-name": "Rules" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableUserConfig": { "properties": { @@ -2257,16 +1941,13 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "TemplateFiles" + "type": "object" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Provenance": { - "type": "string", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "string" }, "PushoverConfig": { "properties": { @@ -2274,52 +1955,43 @@ "$ref": "#/definitions/duration" }, "html": { - "type": "boolean", - "x-go-name": "HTML" + "type": "boolean" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "priority": { - "type": "string", - "x-go-name": "Priority" + "type": "string" }, "retry": { "$ref": "#/definitions/duration" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "sound": { - "type": "string", - "x-go-name": "Sound" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "token": { "$ref": "#/definitions/Secret" }, "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" }, "url_title": { - "type": "string", - "x-go-name": "URLTitle" + "type": "string" }, "user_key": { "$ref": "#/definitions/Secret" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "Receiver": { "properties": { @@ -2327,80 +1999,68 @@ "items": { "$ref": "#/definitions/EmailConfig" }, - "type": "array", - "x-go-name": "EmailConfigs" + "type": "array" }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "opsgenie_configs": { "items": { "$ref": "#/definitions/OpsGenieConfig" }, - "type": "array", - "x-go-name": "OpsGenieConfigs" + "type": "array" }, "pagerduty_configs": { "items": { "$ref": "#/definitions/PagerdutyConfig" }, - "type": "array", - "x-go-name": "PagerdutyConfigs" + "type": "array" }, "pushover_configs": { "items": { "$ref": "#/definitions/PushoverConfig" }, - "type": "array", - "x-go-name": "PushoverConfigs" + "type": "array" }, "slack_configs": { "items": { "$ref": "#/definitions/SlackConfig" }, - "type": "array", - "x-go-name": "SlackConfigs" + "type": "array" }, "sns_configs": { "items": { "$ref": "#/definitions/SNSConfig" }, - "type": "array", - "x-go-name": "SNSConfigs" + "type": "array" }, "victorops_configs": { "items": { "$ref": "#/definitions/VictorOpsConfig" }, - "type": "array", - "x-go-name": "VictorOpsConfigs" + "type": "array" }, "webhook_configs": { "items": { "$ref": "#/definitions/WebhookConfig" }, - "type": "array", - "x-go-name": "WebhookConfigs" + "type": "array" }, "wechat_configs": { "items": { "$ref": "#/definitions/WechatConfig" }, - "type": "array", - "x-go-name": "WechatConfigs" + "type": "array" } }, "title": "Receiver configuration provides configuration on how to contact a receiver.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "Regexp": { "description": "A Regexp is safe for concurrent use by multiple goroutines,\nexcept for configuration methods, such as Longest.", "title": "Regexp is the representation of a compiled regular expression.", - "type": "object", - "x-go-package": "regexp" + "type": "object" }, "RelativeTimeRange": { "description": "RelativeTimeRange is the per query start and end time\nfor requests.", @@ -2412,32 +2072,27 @@ "$ref": "#/definitions/Duration" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "object" }, "ResponseDetails": { "properties": { "msg": { - "type": "string", - "x-go-name": "Msg" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Route": { "description": "A Route is a node that contains definitions of how to handle alerts. This is modified\nfrom the upstream alertmanager in that it adds the ObjectMatchers property.", "properties": { "continue": { - "type": "boolean", - "x-go-name": "Continue" + "type": "boolean" }, "group_by": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "GroupByStr" + "type": "array" }, "group_interval": { "$ref": "#/definitions/Duration" @@ -2450,8 +2105,7 @@ "type": "string" }, "description": "Deprecated. Remove before v1.0 release.", - "type": "object", - "x-go-name": "Match" + "type": "object" }, "match_re": { "$ref": "#/definitions/MatchRegexps" @@ -2463,8 +2117,7 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "MuteTimeIntervals" + "type": "array" }, "object_matchers": { "$ref": "#/definitions/ObjectMatchers" @@ -2473,8 +2126,7 @@ "$ref": "#/definitions/Provenance" }, "receiver": { - "type": "string", - "x-go-name": "Receiver" + "type": "string" }, "repeat_interval": { "$ref": "#/definitions/Duration" @@ -2483,44 +2135,36 @@ "items": { "$ref": "#/definitions/Route" }, - "type": "array", - "x-go-name": "Routes" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Rule": { "description": "adapted from cortex", "properties": { "evaluationTime": { "format": "double", - "type": "number", - "x-go-name": "EvaluationTime" + "type": "number" }, "health": { - "type": "string", - "x-go-name": "Health" + "type": "string" }, "labels": { "$ref": "#/definitions/overrideLabels" }, "lastError": { - "type": "string", - "x-go-name": "LastError" + "type": "string" }, "lastEvaluation": { "format": "date-time", - "type": "string", - "x-go-name": "LastEvaluation" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "query": { - "type": "string", - "x-go-name": "Query" + "type": "string" }, "type": { "$ref": "#/definitions/RuleType" @@ -2532,8 +2176,7 @@ "health", "type" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleDiscovery": { "properties": { @@ -2541,48 +2184,40 @@ "items": { "$ref": "#/definitions/RuleGroup" }, - "type": "array", - "x-go-name": "RuleGroups" + "type": "array" } }, "required": [ "groups" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleGroup": { "properties": { "evaluationTime": { "format": "double", - "type": "number", - "x-go-name": "EvaluationTime" + "type": "number" }, "file": { - "type": "string", - "x-go-name": "File" + "type": "string" }, "interval": { "format": "double", - "type": "number", - "x-go-name": "Interval" + "type": "number" }, "lastEvaluation": { "format": "date-time", - "type": "string", - "x-go-name": "LastEvaluation" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "description": "In order to preserve rule ordering, while exposing type (alerting or recording)\nspecific properties, both alerting and recording rules are exposed in the\nsame array.", "items": { "$ref": "#/definitions/AlertingRule" }, - "type": "array", - "x-go-name": "Rules" + "type": "array" } }, "required": [ @@ -2591,8 +2226,7 @@ "rules", "interval" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleGroupConfigResponse": { "properties": { @@ -2600,26 +2234,22 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "items": { "$ref": "#/definitions/GettableExtendedRuleNode" }, - "type": "array", - "x-go-name": "Rules" + "type": "array" }, "source_tenants": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "SourceTenants" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleResponse": { "properties": { @@ -2627,74 +2257,61 @@ "$ref": "#/definitions/RuleDiscovery" }, "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } }, "required": [ "status" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleType": { "title": "RuleType models the type of a rule.", - "type": "string", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "type": "string" }, "SNSConfig": { "properties": { "api_url": { - "type": "string", - "x-go-name": "APIUrl" + "type": "string" }, "attributes": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Attributes" + "type": "object" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "phone_number": { - "type": "string", - "x-go-name": "PhoneNumber" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "sigv4": { "$ref": "#/definitions/SigV4Config" }, "subject": { - "type": "string", - "x-go-name": "Subject" + "type": "string" }, "target_arn": { - "type": "string", - "x-go-name": "TargetARN" + "type": "string" }, "topic_arn": { - "type": "string", - "x-go-name": "TopicARN" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "Sample": { "properties": { @@ -2711,13 +2328,11 @@ } }, "title": "Sample is a single sample belonging to a metric.", - "type": "object", - "x-go-package": "github.com/prometheus/prometheus/promql" + "type": "object" }, "Secret": { "title": "Secret special type for storing secrets.", - "type": "string", - "x-go-package": "github.com/prometheus/common/config" + "type": "string" }, "SecretURL": { "$ref": "#/definitions/URL", @@ -2742,8 +2357,7 @@ "$ref": "#/definitions/Secret" } }, - "type": "object", - "x-go-package": "github.com/prometheus/common/sigv4" + "type": "object" }, "SlackAction": { "description": "See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons\nfor more information.", @@ -2752,33 +2366,26 @@ "$ref": "#/definitions/SlackConfirmationField" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "style": { - "type": "string", - "x-go-name": "Style" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "title": "SlackAction configures a single Slack action that is sent with each notification.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "SlackConfig": { "properties": { @@ -2786,149 +2393,118 @@ "items": { "$ref": "#/definitions/SlackAction" }, - "type": "array", - "x-go-name": "Actions" + "type": "array" }, "api_url": { "$ref": "#/definitions/SecretURL" }, "api_url_file": { - "type": "string", - "x-go-name": "APIURLFile" + "type": "string" }, "callback_id": { - "type": "string", - "x-go-name": "CallbackID" + "type": "string" }, "channel": { "description": "Slack channel override, (like #other-channel or @username).", - "type": "string", - "x-go-name": "Channel" + "type": "string" }, "color": { - "type": "string", - "x-go-name": "Color" + "type": "string" }, "fallback": { - "type": "string", - "x-go-name": "Fallback" + "type": "string" }, "fields": { "items": { "$ref": "#/definitions/SlackField" }, - "type": "array", - "x-go-name": "Fields" + "type": "array" }, "footer": { - "type": "string", - "x-go-name": "Footer" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "icon_emoji": { - "type": "string", - "x-go-name": "IconEmoji" + "type": "string" }, "icon_url": { - "type": "string", - "x-go-name": "IconURL" + "type": "string" }, "image_url": { - "type": "string", - "x-go-name": "ImageURL" + "type": "string" }, "link_names": { - "type": "boolean", - "x-go-name": "LinkNames" + "type": "boolean" }, "mrkdwn_in": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "MrkdwnIn" + "type": "array" }, "pretext": { - "type": "string", - "x-go-name": "Pretext" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "short_fields": { - "type": "boolean", - "x-go-name": "ShortFields" + "type": "boolean" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "thumb_url": { - "type": "string", - "x-go-name": "ThumbURL" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "title_link": { - "type": "string", - "x-go-name": "TitleLink" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } }, "title": "SlackConfig configures notifications via Slack.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "SlackConfirmationField": { "description": "SlackConfirmationField protect users from destructive actions or particularly distinguished decisions\nby asking them to confirm their button click one more time.\nSee https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields for more information.", "properties": { "dismiss_text": { - "type": "string", - "x-go-name": "DismissText" + "type": "string" }, "ok_text": { - "type": "string", - "x-go-name": "OkText" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "SlackField": { "description": "Each field must contain a title, value, and optionally, a boolean value to indicate if the field\nis short enough to be displayed next to other fields designated as short.\nSee https://api.slack.com/docs/message-attachments#fields for more information.", "properties": { "short": { - "type": "boolean", - "x-go-name": "Short" + "type": "boolean" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "title": "SlackField configures a single Slack field that is sent with each notification.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "SmtpNotEnabled": { "$ref": "#/definitions/ResponseDetails" @@ -2940,55 +2516,44 @@ "properties": { "ca_file": { "description": "The CA cert to use for the targets.", - "type": "string", - "x-go-name": "CAFile" + "type": "string" }, "cert_file": { "description": "The client cert file for the targets.", - "type": "string", - "x-go-name": "CertFile" + "type": "string" }, "insecure_skip_verify": { "description": "Disable target certificate validation.", - "type": "boolean", - "x-go-name": "InsecureSkipVerify" + "type": "boolean" }, "key_file": { "description": "The client key file for the targets.", - "type": "string", - "x-go-name": "KeyFile" + "type": "string" }, "server_name": { "description": "Used to verify the hostname for the targets.", - "type": "string", - "x-go-name": "ServerName" + "type": "string" } }, "title": "TLSConfig configures the options for TLS connections.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "TestReceiverConfigResult": { "properties": { "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestReceiverResult": { "properties": { @@ -2996,16 +2561,13 @@ "items": { "$ref": "#/definitions/TestReceiverConfigResult" }, - "type": "array", - "x-go-name": "Configs" + "type": "array" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestReceiversConfigAlertParams": { "properties": { @@ -3016,8 +2578,7 @@ "$ref": "#/definitions/LabelSet" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestReceiversConfigBodyParams": { "properties": { @@ -3028,12 +2589,10 @@ "items": { "$ref": "#/definitions/PostableApiReceiver" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestReceiversResult": { "properties": { @@ -3042,33 +2601,28 @@ }, "notified_at": { "format": "date-time", - "type": "string", - "x-go-name": "NotifiedAt" + "type": "string" }, "receivers": { "items": { "$ref": "#/definitions/TestReceiverResult" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestRulePayload": { "properties": { "expr": { "example": "(node_filesystem_avail_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} node_filesystem_size_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} * 100 \u003c 5 and node_filesystem_readonly{fstype!=\"\",job=\"integrations/node_exporter\"} == 0)", - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "grafana_condition": { "$ref": "#/definitions/EvalAlertConditionCommand" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestRuleResponse": { "properties": { @@ -3079,8 +2633,7 @@ "$ref": "#/definitions/AlertInstancesResponse" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TimeInterval": { "description": "TimeInterval describes intervals of time. ContainsTime will tell you if a golang time is contained\nwithin the interval.", @@ -3089,40 +2642,34 @@ "items": { "$ref": "#/definitions/DayOfMonthRange" }, - "type": "array", - "x-go-name": "DaysOfMonth" + "type": "array" }, "months": { "items": { "$ref": "#/definitions/MonthRange" }, - "type": "array", - "x-go-name": "Months" + "type": "array" }, "times": { "items": { "$ref": "#/definitions/TimeRange" }, - "type": "array", - "x-go-name": "Times" + "type": "array" }, "weekdays": { "items": { "$ref": "#/definitions/WeekdayRange" }, - "type": "array", - "x-go-name": "Weekdays" + "type": "array" }, "years": { "items": { "$ref": "#/definitions/YearRange" }, - "type": "array", - "x-go-name": "Years" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "TimeRange": { "description": "For example, 4:00PM to End of the day would Begin at 1020 and End at 1440.", @@ -3137,8 +2684,7 @@ } }, "title": "TimeRange represents a range of minutes within a 1440 minute day, exclusive of the End minute. A day consists of 1440 minutes.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "URL": { "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.", @@ -3175,32 +2721,27 @@ } }, "title": "A URL represents a parsed URL (technically, a URI reference).", - "type": "object", - "x-go-package": "net/url" + "type": "object" }, "Userinfo": { "description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a URL. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.", - "type": "object", - "x-go-package": "net/url" + "type": "object" }, "ValidationError": { "properties": { "msg": { "example": "error message", - "type": "string", - "x-go-name": "Msg" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Vector": { "description": "Vector is basically only an alias for model.Samples, but the\ncontract is that in a Vector, all Samples have the same timestamp.", "items": { "$ref": "#/definitions/Sample" }, - "type": "array", - "x-go-package": "github.com/prometheus/prometheus/promql" + "type": "array" }, "VictorOpsConfig": { "properties": { @@ -3217,40 +2758,32 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "CustomFields" + "type": "object" }, "entity_display_name": { - "type": "string", - "x-go-name": "EntityDisplayName" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message_type": { - "type": "string", - "x-go-name": "MessageType" + "type": "string" }, "monitoring_tool": { - "type": "string", - "x-go-name": "MonitoringTool" + "type": "string" }, "routing_key": { - "type": "string", - "x-go-name": "RoutingKey" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "state_message": { - "type": "string", - "x-go-name": "StateMessage" + "type": "string" } }, "title": "VictorOpsConfig configures notifications via VictorOps.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "WebhookConfig": { "properties": { @@ -3260,26 +2793,22 @@ "max_alerts": { "description": "MaxAlerts is the maximum number of alerts to be sent per webhook message.\nAlerts exceeding this threshold will be truncated. Setting this to 0\nallows an unlimited number of alerts.", "format": "uint64", - "type": "integer", - "x-go-name": "MaxAlerts" + "type": "integer" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "url": { "$ref": "#/definitions/URL" } }, "title": "WebhookConfig configures notifications via a generic webhook.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "WechatConfig": { "properties": { "agent_id": { - "type": "string", - "x-go-name": "AgentID" + "type": "string" }, "api_secret": { "$ref": "#/definitions/Secret" @@ -3288,40 +2817,32 @@ "$ref": "#/definitions/URL" }, "corp_id": { - "type": "string", - "x-go-name": "CorpID" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "message_type": { - "type": "string", - "x-go-name": "MessageType" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "to_party": { - "type": "string", - "x-go-name": "ToParty" + "type": "string" }, "to_tag": { - "type": "string", - "x-go-name": "ToTag" + "type": "string" }, "to_user": { - "type": "string", - "x-go-name": "ToUser" + "type": "string" } }, "title": "WechatConfig configures notifications via Wechat.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "WeekdayRange": { "properties": { @@ -3335,8 +2856,7 @@ } }, "title": "A WeekdayRange is an inclusive range between [0, 6] where 0 = Sunday.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "YearRange": { "properties": { @@ -3350,8 +2870,7 @@ } }, "title": "A YearRange is a positive inclusive range.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "alert": { "description": "Alert alert", @@ -3359,8 +2878,7 @@ "generatorURL": { "description": "generator URL\nFormat: uri", "format": "uri", - "type": "string", - "x-go-name": "GeneratorURL" + "type": "string" }, "labels": { "$ref": "#/definitions/labelSet" @@ -3369,19 +2887,17 @@ "required": [ "labels" ], - "type": "object", - "x-go-name": "Alert", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "alertGroup": { + "description": "AlertGroup alert group", "properties": { "alerts": { "description": "alerts", "items": { "$ref": "#/definitions/gettableAlert" }, - "type": "array", - "x-go-name": "Alerts" + "type": "array" }, "labels": { "$ref": "#/definitions/labelSet" @@ -3395,12 +2911,9 @@ "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" }, @@ -3414,24 +2927,21 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "InhibitedBy" + "type": "array" }, "silencedBy": { "description": "silenced by", "items": { "type": "string" }, - "type": "array", - "x-go-name": "SilencedBy" + "type": "array" }, "state": { "description": "state", "enum": [ "[unprocessed active suppressed]" ], - "type": "string", - "x-go-name": "State" + "type": "string" } }, "required": [ @@ -3439,25 +2949,20 @@ "silencedBy", "state" ], - "type": "object", - "x-go-name": "AlertStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "alertmanagerConfig": { "description": "AlertmanagerConfig alertmanager config", "properties": { "original": { "description": "original", - "type": "string", - "x-go-name": "Original" + "type": "string" } }, "required": [ "original" ], - "type": "object", - "x-go-name": "AlertmanagerConfig", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "alertmanagerStatus": { "description": "AlertmanagerStatus alertmanager status", @@ -3471,8 +2976,7 @@ "uptime": { "description": "uptime", "format": "date-time", - "type": "string", - "x-go-name": "Uptime" + "type": "string" }, "versionInfo": { "$ref": "#/definitions/versionInfo" @@ -3484,47 +2988,39 @@ "uptime", "versionInfo" ], - "type": "object", - "x-go-name": "AlertmanagerStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "clusterStatus": { "description": "ClusterStatus cluster status", "properties": { "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "peers": { "description": "peers", "items": { "$ref": "#/definitions/peerStatus" }, - "type": "array", - "x-go-name": "Peers" + "type": "array" }, "status": { "description": "status", "enum": [ "[ready settling disabled]" ], - "type": "string", - "x-go-name": "Status" + "type": "string" } }, "required": [ "status" ], - "type": "object", - "x-go-name": "ClusterStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "duration": { "$ref": "#/definitions/Duration" }, "gettableAlert": { - "description": "GettableAlert gettable alert", "properties": { "annotations": { "$ref": "#/definitions/labelSet" @@ -3532,19 +3028,16 @@ "endsAt": { "description": "ends at", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "fingerprint": { "description": "fingerprint", - "type": "string", - "x-go-name": "Fingerprint" + "type": "string" }, "generatorURL": { "description": "generator URL\nFormat: uri", "format": "uri", - "type": "string", - "x-go-name": "GeneratorURL" + "type": "string" }, "labels": { "$ref": "#/definitions/labelSet" @@ -3554,14 +3047,12 @@ "items": { "$ref": "#/definitions/receiver" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" }, "startsAt": { "description": "starts at", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" }, "status": { "$ref": "#/definitions/alertStatus" @@ -3569,8 +3060,7 @@ "updatedAt": { "description": "updated at", "format": "date-time", - "type": "string", - "x-go-name": "UpdatedAt" + "type": "string" } }, "required": [ @@ -3589,32 +3079,26 @@ "items": { "$ref": "#/definitions/gettableAlert" }, - "type": "array", - "x-go-name": "GettableAlerts", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "array" }, "gettableSilence": { "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "id": { "description": "id", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -3622,8 +3106,7 @@ "startsAt": { "description": "starts at", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" }, "status": { "$ref": "#/definitions/silenceStatus" @@ -3631,8 +3114,7 @@ "updatedAt": { "description": "updated at", "format": "date-time", - "type": "string", - "x-go-name": "UpdatedAt" + "type": "string" } }, "required": [ @@ -3645,49 +3127,39 @@ "status", "updatedAt" ], - "type": "object", - "x-go-name": "GettableSilence", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "gettableSilences": { "items": { "$ref": "#/definitions/gettableSilence" }, - "type": "array", - "x-go-name": "GettableSilences", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "array" }, "labelSet": { "additionalProperties": { "type": "string" }, "description": "LabelSet label set", - "type": "object", - "x-go-name": "LabelSet", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "matcher": { "description": "Matcher matcher", "properties": { "isEqual": { "description": "is equal", - "type": "boolean", - "x-go-name": "IsEqual" + "type": "boolean" }, "isRegex": { "description": "is regex", - "type": "boolean", - "x-go-name": "IsRegex" + "type": "boolean" }, "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "value": { "description": "value", - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "required": [ @@ -3695,18 +3167,14 @@ "name", "value" ], - "type": "object", - "x-go-name": "Matcher", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "matchers": { "description": "Matchers matchers", "items": { "$ref": "#/definitions/matcher" }, - "type": "array", - "x-go-name": "Matchers", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "array" }, "overrideLabels": { "additionalProperties": { @@ -3714,30 +3182,25 @@ }, "description": "The custom marshaling for labels.Labels ends up doing this anyways.", "title": "override the labels type with a map for generation.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "peerStatus": { "description": "PeerStatus peer status", "properties": { "address": { "description": "address", - "type": "string", - "x-go-name": "Address" + "type": "string" }, "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" } }, "required": [ "address", "name" ], - "type": "object", - "x-go-name": "PeerStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "postableAlert": { "description": "PostableAlert postable alert", @@ -3748,14 +3211,12 @@ "endsAt": { "description": "ends at\nFormat: date-time", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "generatorURL": { "description": "generator URL\nFormat: uri", "format": "uri", - "type": "string", - "x-go-name": "GeneratorURL" + "type": "string" }, "labels": { "$ref": "#/definitions/labelSet" @@ -3763,49 +3224,39 @@ "startsAt": { "description": "starts at\nFormat: date-time", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" } }, "required": [ "labels" ], - "type": "object", - "x-go-name": "PostableAlert", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "postableAlerts": { "description": "PostableAlerts postable alerts", "items": { "$ref": "#/definitions/postableAlert" }, - "type": "array", - "x-go-name": "PostableAlerts", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "array" }, "postableSilence": { - "description": "PostableSilence postable silence", "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "id": { "description": "id", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -3813,8 +3264,7 @@ "startsAt": { "description": "starts at", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" } }, "required": [ @@ -3831,8 +3281,7 @@ "properties": { "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" } }, "required": [ @@ -3845,19 +3294,16 @@ "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -3865,8 +3311,7 @@ "startsAt": { "description": "starts at", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" } }, "required": [ @@ -3876,9 +3321,7 @@ "matchers", "startsAt" ], - "type": "object", - "x-go-name": "Silence", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "silenceStatus": { "description": "SilenceStatus silence status", @@ -3888,49 +3331,40 @@ "enum": [ "[expired active pending]" ], - "type": "string", - "x-go-name": "State" + "type": "string" } }, "required": [ "state" ], - "type": "object", - "x-go-name": "SilenceStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "versionInfo": { "description": "VersionInfo version info", "properties": { "branch": { "description": "branch", - "type": "string", - "x-go-name": "Branch" + "type": "string" }, "buildDate": { "description": "build date", - "type": "string", - "x-go-name": "BuildDate" + "type": "string" }, "buildUser": { "description": "build user", - "type": "string", - "x-go-name": "BuildUser" + "type": "string" }, "goVersion": { "description": "go version", - "type": "string", - "x-go-name": "GoVersion" + "type": "string" }, "revision": { "description": "revision", - "type": "string", - "x-go-name": "Revision" + "type": "string" }, "version": { "description": "version", - "type": "string", - "x-go-name": "Version" + "type": "string" } }, "required": [ @@ -3941,9 +3375,7 @@ "revision", "version" ], - "type": "object", - "x-go-name": "VersionInfo", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" } }, "info": { @@ -3962,24 +3394,21 @@ "description": "Show active alerts", "in": "query", "name": "active", - "type": "boolean", - "x-go-name": "Active" + "type": "boolean" }, { "default": true, "description": "Show silenced alerts", "in": "query", "name": "silenced", - "type": "boolean", - "x-go-name": "Silenced" + "type": "boolean" }, { "default": true, "description": "Show inhibited alerts", "in": "query", "name": "inhibited", - "type": "boolean", - "x-go-name": "Inhibited" + "type": "boolean" }, { "description": "A list of matchers to filter alerts by", @@ -3988,15 +3417,13 @@ "type": "string" }, "name": "filter", - "type": "array", - "x-go-name": "Matchers" + "type": "array" }, { "description": "A regex matching receivers to filter alerts by", "in": "query", "name": "receiver", - "type": "string", - "x-go-name": "Receivers" + "type": "string" } ], "responses": { @@ -4061,24 +3488,21 @@ "description": "Show active alerts", "in": "query", "name": "active", - "type": "boolean", - "x-go-name": "Active" + "type": "boolean" }, { "default": true, "description": "Show silenced alerts", "in": "query", "name": "silenced", - "type": "boolean", - "x-go-name": "Silenced" + "type": "boolean" }, { "default": true, "description": "Show inhibited alerts", "in": "query", "name": "inhibited", - "type": "boolean", - "x-go-name": "Inhibited" + "type": "boolean" }, { "description": "A list of matchers to filter alerts by", @@ -4087,15 +3511,13 @@ "type": "string" }, "name": "filter", - "type": "array", - "x-go-name": "Matchers" + "type": "array" }, { "description": "A regex matching receivers to filter alerts by", "in": "query", "name": "receiver", - "type": "string", - "x-go-name": "Receivers" + "type": "string" } ], "responses": { @@ -4188,8 +3610,7 @@ "type": "string" }, "name": "filter", - "type": "array", - "x-go-name": "Filter" + "type": "array" } ], "responses": { @@ -4410,24 +3831,21 @@ "description": "Show active alerts", "in": "query", "name": "active", - "type": "boolean", - "x-go-name": "Active" + "type": "boolean" }, { "default": true, "description": "Show silenced alerts", "in": "query", "name": "silenced", - "type": "boolean", - "x-go-name": "Silenced" + "type": "boolean" }, { "default": true, "description": "Show inhibited alerts", "in": "query", "name": "inhibited", - "type": "boolean", - "x-go-name": "Inhibited" + "type": "boolean" }, { "description": "A list of matchers to filter alerts by", @@ -4436,15 +3854,13 @@ "type": "string" }, "name": "filter", - "type": "array", - "x-go-name": "Matchers" + "type": "array" }, { "description": "A regex matching receivers to filter alerts by", "in": "query", "name": "receiver", - "type": "string", - "x-go-name": "Receivers" + "type": "string" }, { "description": "DatasoureUID should be the datasource UID identifier", @@ -4523,24 +3939,21 @@ "description": "Show active alerts", "in": "query", "name": "active", - "type": "boolean", - "x-go-name": "Active" + "type": "boolean" }, { "default": true, "description": "Show silenced alerts", "in": "query", "name": "silenced", - "type": "boolean", - "x-go-name": "Silenced" + "type": "boolean" }, { "default": true, "description": "Show inhibited alerts", "in": "query", "name": "inhibited", - "type": "boolean", - "x-go-name": "Inhibited" + "type": "boolean" }, { "description": "A list of matchers to filter alerts by", @@ -4549,15 +3962,13 @@ "type": "string" }, "name": "filter", - "type": "array", - "x-go-name": "Matchers" + "type": "array" }, { "description": "A regex matching receivers to filter alerts by", "in": "query", "name": "receiver", - "type": "string", - "x-go-name": "Receivers" + "type": "string" }, { "description": "DatasoureUID should be the datasource UID identifier", @@ -4671,8 +4082,7 @@ "type": "string" }, "name": "filter", - "type": "array", - "x-go-name": "Filter" + "type": "array" }, { "description": "DatasoureUID should be the datasource UID identifier", @@ -4948,8 +4358,7 @@ "description": "Include Grafana specific labels as part of the response.", "in": "query", "name": "includeInternalLabels", - "type": "boolean", - "x-go-name": "IncludeInternalLabels" + "type": "boolean" } ], "responses": { @@ -4975,8 +4384,7 @@ "description": "Include Grafana specific labels as part of the response.", "in": "query", "name": "includeInternalLabels", - "type": "boolean", - "x-go-name": "IncludeInternalLabels" + "type": "boolean" }, { "description": "Filter the list of rules to those that belong to the specified dashboard UID.", @@ -5785,7 +5193,7 @@ "operationId": "RouteDeleteContactpoints", "parameters": [ { - "description": "UID should be the contact point unique identifier", + "description": "UID is the contact point unique identifier", "in": "path", "name": "UID", "required": true, @@ -5809,7 +5217,7 @@ "operationId": "RoutePutContactpoint", "parameters": [ { - "description": "UID should be the contact point unique identifier", + "description": "UID is the contact point unique identifier", "in": "path", "name": "UID", "required": true, @@ -5949,8 +5357,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" } ], "responses": { @@ -5971,8 +5378,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" } ], "responses": { @@ -6002,8 +5408,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" }, { "in": "body", @@ -6113,8 +5518,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" } ], "responses": { @@ -6135,8 +5539,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" } ], "responses": { @@ -6166,8 +5569,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" }, { "in": "body", diff --git a/pkg/services/ngalert/api/tooling/spec.json b/pkg/services/ngalert/api/tooling/spec.json index ddeefda9cb3..6979b23d525 100644 --- a/pkg/services/ngalert/api/tooling/spec.json +++ b/pkg/services/ngalert/api/tooling/spec.json @@ -28,7 +28,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Active", "description": "Show active alerts", "name": "active", "in": "query" @@ -36,7 +35,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Silenced", "description": "Show silenced alerts", "name": "silenced", "in": "query" @@ -44,7 +42,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Inhibited", "description": "Show inhibited alerts", "name": "inhibited", "in": "query" @@ -54,14 +51,12 @@ "items": { "type": "string" }, - "x-go-name": "Matchers", "description": "A list of matchers to filter alerts by", "name": "filter", "in": "query" }, { "type": "string", - "x-go-name": "Receivers", "description": "A regex matching receivers to filter alerts by", "name": "receiver", "in": "query" @@ -127,7 +122,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Active", "description": "Show active alerts", "name": "active", "in": "query" @@ -135,7 +129,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Silenced", "description": "Show silenced alerts", "name": "silenced", "in": "query" @@ -143,7 +136,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Inhibited", "description": "Show inhibited alerts", "name": "inhibited", "in": "query" @@ -153,14 +145,12 @@ "items": { "type": "string" }, - "x-go-name": "Matchers", "description": "A list of matchers to filter alerts by", "name": "filter", "in": "query" }, { "type": "string", - "x-go-name": "Receivers", "description": "A regex matching receivers to filter alerts by", "name": "receiver", "in": "query" @@ -255,7 +245,6 @@ "items": { "type": "string" }, - "x-go-name": "Filter", "name": "filter", "in": "query" } @@ -476,7 +465,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Active", "description": "Show active alerts", "name": "active", "in": "query" @@ -484,7 +472,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Silenced", "description": "Show silenced alerts", "name": "silenced", "in": "query" @@ -492,7 +479,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Inhibited", "description": "Show inhibited alerts", "name": "inhibited", "in": "query" @@ -502,14 +488,12 @@ "items": { "type": "string" }, - "x-go-name": "Matchers", "description": "A list of matchers to filter alerts by", "name": "filter", "in": "query" }, { "type": "string", - "x-go-name": "Receivers", "description": "A regex matching receivers to filter alerts by", "name": "receiver", "in": "query" @@ -589,7 +573,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Active", "description": "Show active alerts", "name": "active", "in": "query" @@ -597,7 +580,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Silenced", "description": "Show silenced alerts", "name": "silenced", "in": "query" @@ -605,7 +587,6 @@ { "type": "boolean", "default": true, - "x-go-name": "Inhibited", "description": "Show inhibited alerts", "name": "inhibited", "in": "query" @@ -615,14 +596,12 @@ "items": { "type": "string" }, - "x-go-name": "Matchers", "description": "A list of matchers to filter alerts by", "name": "filter", "in": "query" }, { "type": "string", - "x-go-name": "Receivers", "description": "A regex matching receivers to filter alerts by", "name": "receiver", "in": "query" @@ -738,7 +717,6 @@ "items": { "type": "string" }, - "x-go-name": "Filter", "name": "filter", "in": "query" }, @@ -1014,7 +992,6 @@ { "type": "boolean", "default": false, - "x-go-name": "IncludeInternalLabels", "description": "Include Grafana specific labels as part of the response.", "name": "includeInternalLabels", "in": "query" @@ -1041,7 +1018,6 @@ { "type": "boolean", "default": false, - "x-go-name": "IncludeInternalLabels", "description": "Include Grafana specific labels as part of the response.", "name": "includeInternalLabels", "in": "query" @@ -1862,7 +1838,7 @@ "parameters": [ { "type": "string", - "description": "UID should be the contact point unique identifier", + "description": "UID is the contact point unique identifier", "name": "UID", "in": "path", "required": true @@ -1903,7 +1879,7 @@ "parameters": [ { "type": "string", - "description": "UID should be the contact point unique identifier", + "description": "UID is the contact point unique identifier", "name": "UID", "in": "path", "required": true @@ -2027,7 +2003,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Mute timing name", "name": "name", "in": "path", @@ -2059,7 +2034,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Mute timing name", "name": "name", "in": "path", @@ -2098,7 +2072,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Mute timing name", "name": "name", "in": "path", @@ -2197,7 +2170,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Template Name", "name": "name", "in": "path", @@ -2229,7 +2201,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Template Name", "name": "name", "in": "path", @@ -2268,7 +2239,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Template Name", "name": "name", "in": "path", @@ -2356,16 +2326,14 @@ }, "definitions": { "Ack": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AddApiKeyCommand": { "description": "COMMANDS", "type": "object", "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "role": { "type": "string", @@ -2373,17 +2341,13 @@ "Viewer", "Editor", "Admin" - ], - "x-go-enum-desc": "Viewer ROLE_VIEWER\nEditor ROLE_EDITOR\nAdmin ROLE_ADMIN", - "x-go-name": "Role" + ] }, "secondsToLive": { "type": "integer", - "format": "int64", - "x-go-name": "SecondsToLive" + "format": "int64" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/models" + } }, "Alert": { "type": "object", @@ -2397,8 +2361,7 @@ "properties": { "activeAt": { "type": "string", - "format": "date-time", - "x-go-name": "ActiveAt" + "format": "date-time" }, "annotations": { "$ref": "#/definitions/overrideLabels" @@ -2407,15 +2370,12 @@ "$ref": "#/definitions/overrideLabels" }, "state": { - "type": "string", - "x-go-name": "State" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertDiscovery": { "type": "object", @@ -2428,11 +2388,9 @@ "type": "array", "items": { "$ref": "#/definitions/Alert" - }, - "x-go-name": "Alerts" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertInstancesResponse": { "type": "object", @@ -2446,30 +2404,24 @@ "type": "integer", "format": "uint8" } - }, - "x-go-name": "Instances" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertManager": { "type": "object", "title": "AlertManager models a configured Alert Manager.", "properties": { "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + } }, "AlertManagerNotFound": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertManagerNotReady": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertManagersResult": { "type": "object", @@ -2479,18 +2431,15 @@ "type": "array", "items": { "$ref": "#/definitions/AlertManager" - }, - "x-go-name": "Active" + } }, "droppedAlertManagers": { "type": "array", "items": { "$ref": "#/definitions/AlertManager" - }, - "x-go-name": "Dropped" + } } - }, - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + } }, "AlertQuery": { "type": "object", @@ -2498,29 +2447,24 @@ "properties": { "datasourceUid": { "description": "Grafana data source unique identifier; it should be '-100' for a Server Side Expression operation.", - "type": "string", - "x-go-name": "DatasourceUID" + "type": "string" }, "model": { "description": "JSON is the raw JSON query and includes the above properties as well as custom properties.", - "type": "object", - "x-go-name": "Model" + "type": "object" }, "queryType": { "description": "QueryType is an optional identifier for the type of query.\nIt can be used to distinguish different types of queries.", - "type": "string", - "x-go-name": "QueryType" + "type": "string" }, "refId": { "description": "RefID is the unique identifier of the query, set by the frontend call.", - "type": "string", - "x-go-name": "RefID" + "type": "string" }, "relativeTimeRange": { "$ref": "#/definitions/RelativeTimeRange" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + } }, "AlertResponse": { "type": "object", @@ -2532,18 +2476,15 @@ "$ref": "#/definitions/AlertDiscovery" }, "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertRule": { "type": "object", @@ -2564,14 +2505,12 @@ "additionalProperties": { "type": "string" }, - "x-go-name": "Annotations", "example": { "runbook_url": "https://supercoolrunbook.com/page/13" } }, "condition": { "type": "string", - "x-go-name": "Condition", "example": "A" }, "data": { @@ -2579,7 +2518,6 @@ "items": { "$ref": "#/definitions/AlertQuery" }, - "x-go-name": "Data", "example": [ { "datasourceUid": "-100", @@ -2627,19 +2565,15 @@ ] }, "execErrState": { - "description": "\nAlerting AlertingErrState\nError ErrorErrState\nOK OkErrState", "type": "string", "enum": [ "Alerting", "Error", "OK" - ], - "x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState\nOK OkErrState", - "x-go-name": "ExecErrState" + ] }, "folderUID": { "type": "string", - "x-go-name": "FolderUID", "example": "project_x" }, "for": { @@ -2647,34 +2581,28 @@ }, "id": { "type": "integer", - "format": "int64", - "x-go-name": "ID" + "format": "int64" }, "labels": { "type": "object", "additionalProperties": { "type": "string" }, - "x-go-name": "Labels", "example": { "team": "sre-team-1" } }, "noDataState": { - "description": "\nAlerting Alerting\nNoData NoData\nOK OK", "type": "string", "enum": [ "Alerting", "NoData", "OK" - ], - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + ] }, "orgID": { "type": "integer", - "format": "int64", - "x-go-name": "OrgID" + "format": "int64" }, "provenance": { "$ref": "#/definitions/Provenance" @@ -2683,39 +2611,32 @@ "type": "string", "maxLength": 190, "minLength": 1, - "x-go-name": "RuleGroup", "example": "eval_group_1" }, "title": { "type": "string", "maxLength": 190, "minLength": 1, - "x-go-name": "Title", "example": "Always firing" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" }, "updated": { "type": "string", "format": "date-time", - "x-go-name": "Updated", "readOnly": true } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertRuleGroup": { "type": "object", "properties": { "interval": { "type": "integer", - "format": "int64", - "x-go-name": "Interval" + "format": "int64" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertingRule": { "description": "adapted from cortex", @@ -2734,74 +2655,61 @@ "type": "array", "items": { "$ref": "#/definitions/Alert" - }, - "x-go-name": "Alerts" + } }, "annotations": { "$ref": "#/definitions/overrideLabels" }, "duration": { "type": "number", - "format": "double", - "x-go-name": "Duration" + "format": "double" }, "evaluationTime": { "type": "number", - "format": "double", - "x-go-name": "EvaluationTime" + "format": "double" }, "health": { - "type": "string", - "x-go-name": "Health" + "type": "string" }, "labels": { "$ref": "#/definitions/overrideLabels" }, "lastError": { - "type": "string", - "x-go-name": "LastError" + "type": "string" }, "lastEvaluation": { "type": "string", - "format": "date-time", - "x-go-name": "LastEvaluation" + "format": "date-time" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "query": { - "type": "string", - "x-go-name": "Query" + "type": "string" }, "state": { "description": "State can be \"pending\", \"firing\", \"inactive\".", - "type": "string", - "x-go-name": "State" + "type": "string" }, "type": { "$ref": "#/definitions/RuleType" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "ApiRuleNode": { "type": "object", "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Annotations" + } }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -2810,15 +2718,12 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Labels" + } }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Authorization": { "type": "object", @@ -2828,15 +2733,12 @@ "$ref": "#/definitions/Secret" }, "credentials_file": { - "type": "string", - "x-go-name": "CredentialsFile" + "type": "string" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/common/config" + } }, "BasicAuth": { "type": "object", @@ -2846,15 +2748,12 @@ "$ref": "#/definitions/Secret" }, "password_file": { - "type": "string", - "x-go-name": "PasswordFile" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/common/config" + } }, "Config": { "type": "object", @@ -2867,15 +2766,13 @@ "type": "array", "items": { "$ref": "#/definitions/InhibitRule" - }, - "x-go-name": "InhibitRules" + } }, "mute_time_intervals": { "type": "array", "items": { "$ref": "#/definitions/MuteTimeInterval" - }, - "x-go-name": "MuteTimeIntervals" + } }, "route": { "$ref": "#/definitions/Route" @@ -2884,18 +2781,15 @@ "type": "array", "items": { "type": "string" - }, - "x-go-name": "Templates" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "ContactPoints": { "type": "array", "items": { "$ref": "#/definitions/EmbeddedContactPoint" - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "CreateDashboardSnapshotCommand": { "type": "object", @@ -2911,34 +2805,28 @@ }, "deleteKey": { "description": "Unique key used to delete the snapshot. It is different from the `key` so that only the creator can delete the snapshot. Required if `external` is `true`.", - "type": "string", - "x-go-name": "DeleteKey" + "type": "string" }, "expires": { "description": "When the snapshot should expire in seconds in seconds. Default is never to expire.", "type": "integer", "format": "int64", - "default": 0, - "x-go-name": "Expires" + "default": 0 }, "external": { "description": "these are passed when storing an external snapshot ref\nSave the snapshot on an external server rather than locally.", "type": "boolean", - "default": false, - "x-go-name": "External" + "default": false }, "key": { "description": "Define the unique key. Required if `external` is `true`.", - "type": "string", - "x-go-name": "Key" + "type": "string" }, "name": { "description": "Snapshot name", - "type": "string", - "x-go-name": "Name" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/models" + } }, "DashboardSnapshot": { "description": "DashboardSnapshot model", @@ -2996,14 +2884,12 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/models" + } }, "DateTime": { "description": "DateTime is a time but it serializes to ISO8601 format with millis\nIt knows how to read 3 different variations of a RFC3339 date time.\nMost APIs we encounter want either millisecond or second precision times.\nThis just tries to make it worry-free.", "type": "string", - "format": "date-time", - "x-go-package": "github.com/go-openapi/strfmt" + "format": "date-time" }, "DayOfMonthRange": { "type": "object", @@ -3017,8 +2903,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "DiscoveryBase": { "type": "object", @@ -3027,24 +2912,20 @@ ], "properties": { "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "DsPermissionType": { "description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\nEnum: 0,1", "type": "integer", - "format": "int64", - "x-go-package": "github.com/grafana/grafana/pkg/models" + "format": "int64" }, "Duration": { "type": "integer", @@ -3057,8 +2938,7 @@ "title": "EmailConfig configures notifications via mail.", "properties": { "auth_identity": { - "type": "string", - "x-go-name": "AuthIdentity" + "type": "string" }, "auth_password": { "$ref": "#/definitions/Secret" @@ -3067,53 +2947,43 @@ "$ref": "#/definitions/Secret" }, "auth_username": { - "type": "string", - "x-go-name": "AuthUsername" + "type": "string" }, "from": { - "type": "string", - "x-go-name": "From" + "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Headers" + } }, "hello": { - "type": "string", - "x-go-name": "Hello" + "type": "string" }, "html": { - "type": "string", - "x-go-name": "HTML" + "type": "string" }, "require_tls": { - "type": "boolean", - "x-go-name": "RequireTLS" + "type": "boolean" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "smarthost": { "$ref": "#/definitions/HostPort" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "tls_config": { "$ref": "#/definitions/TLSConfig" }, "to": { "description": "Email address to notify.", - "type": "string", - "x-go-name": "To" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "EmbeddedContactPoint": { "description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.", @@ -3125,18 +2995,15 @@ "properties": { "disableResolveMessage": { "type": "boolean", - "x-go-name": "DisableResolveMessage", "example": false }, "name": { "description": "Name is used as grouping key in the UI. Contact points with the\nsame name will be grouped in the UI.", "type": "string", - "x-go-name": "Name", "example": "webhook_1" }, "provenance": { "type": "string", - "x-go-name": "Provenance", "readOnly": true }, "settings": { @@ -3164,45 +3031,37 @@ " webhook", " wecom" ], - "x-go-name": "Type", "example": "webhook" }, "uid": { "description": "UID is the unique identifier of the contact point. The UID can be\nset by the user.", "type": "string", - "x-go-name": "UID", "example": "my_external_reference" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "ErrorType": { "type": "string", - "title": "ErrorType models the different API error types.", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "title": "ErrorType models the different API error types." }, "EvalAlertConditionCommand": { "description": "EvalAlertConditionCommand is the command for evaluating a condition", "type": "object", "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "type": "array", "items": { "$ref": "#/definitions/AlertQuery" - }, - "x-go-name": "Data" + } }, "now": { "type": "string", - "format": "date-time", - "x-go-name": "Now" + "format": "date-time" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + } }, "EvalQueriesPayload": { "type": "object", @@ -3211,16 +3070,13 @@ "type": "array", "items": { "$ref": "#/definitions/AlertQuery" - }, - "x-go-name": "Data" + } }, "now": { "type": "string", - "format": "date-time", - "x-go-name": "Now" + "format": "date-time" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "EvalQueriesResponse": { "$ref": "#/definitions/EvalQueriesResponse" @@ -3255,8 +3111,7 @@ "wechat_configs": { "$ref": "#/definitions/WechatConfig" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Failure": { "$ref": "#/definitions/ResponseDetails" @@ -3268,11 +3123,9 @@ "$ref": "#/definitions/AlertManagersResult" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableApiAlertingConfig": { "type": "object", @@ -3284,30 +3137,26 @@ "type": "array", "items": { "$ref": "#/definitions/InhibitRule" - }, - "x-go-name": "InhibitRules" + } }, "muteTimeProvenances": { "type": "object", "additionalProperties": { "$ref": "#/definitions/Provenance" - }, - "x-go-name": "MuteTimeProvenances" + } }, "mute_time_intervals": { "type": "array", "items": { "$ref": "#/definitions/MuteTimeInterval" - }, - "x-go-name": "MuteTimeIntervals" + } }, "receivers": { "description": "Override with our superset receiver type", "type": "array", "items": { "$ref": "#/definitions/GettableApiReceiver" - }, - "x-go-name": "Receivers" + } }, "route": { "$ref": "#/definitions/Route" @@ -3316,11 +3165,9 @@ "type": "array", "items": { "type": "string" - }, - "x-go-name": "Templates" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableApiReceiver": { "type": "object", @@ -3329,97 +3176,82 @@ "type": "array", "items": { "$ref": "#/definitions/EmailConfig" - }, - "x-go-name": "EmailConfigs" + } }, "grafana_managed_receiver_configs": { "type": "array", "items": { "$ref": "#/definitions/GettableGrafanaReceiver" - }, - "x-go-name": "GrafanaManagedReceivers" + } }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "opsgenie_configs": { "type": "array", "items": { "$ref": "#/definitions/OpsGenieConfig" - }, - "x-go-name": "OpsGenieConfigs" + } }, "pagerduty_configs": { "type": "array", "items": { "$ref": "#/definitions/PagerdutyConfig" - }, - "x-go-name": "PagerdutyConfigs" + } }, "pushover_configs": { "type": "array", "items": { "$ref": "#/definitions/PushoverConfig" - }, - "x-go-name": "PushoverConfigs" + } }, "slack_configs": { "type": "array", "items": { "$ref": "#/definitions/SlackConfig" - }, - "x-go-name": "SlackConfigs" + } }, "sns_configs": { "type": "array", "items": { "$ref": "#/definitions/SNSConfig" - }, - "x-go-name": "SNSConfigs" + } }, "victorops_configs": { "type": "array", "items": { "$ref": "#/definitions/VictorOpsConfig" - }, - "x-go-name": "VictorOpsConfigs" + } }, "webhook_configs": { "type": "array", "items": { "$ref": "#/definitions/WebhookConfig" - }, - "x-go-name": "WebhookConfigs" + } }, "wechat_configs": { "type": "array", "items": { "$ref": "#/definitions/WechatConfig" - }, - "x-go-name": "WechatConfigs" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableExtendedRuleNode": { "type": "object", "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Annotations" + } }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -3431,26 +3263,21 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Labels" + } }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableGrafanaReceiver": { "type": "object", "properties": { "disableResolveMessage": { - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "$ref": "#/definitions/Provenance" @@ -3459,22 +3286,18 @@ "type": "object", "additionalProperties": { "type": "boolean" - }, - "x-go-name": "SecureFields" + } }, "settings": { "$ref": "#/definitions/Json" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableGrafanaReceivers": { "type": "object", @@ -3483,25 +3306,21 @@ "type": "array", "items": { "$ref": "#/definitions/GettableGrafanaReceiver" - }, - "x-go-name": "GrafanaManagedReceivers" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableGrafanaRule": { "type": "object", "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "type": "array", "items": { "$ref": "#/definitions/AlertQuery" - }, - "x-go-name": "Data" + } }, "exec_err_state": { "type": "string", @@ -3509,28 +3328,22 @@ "OK", "Alerting", "Error" - ], - "x-go-enum-desc": "OK OkErrState\nAlerting AlertingErrState\nError ErrorErrState", - "x-go-name": "ExecErrState" + ] }, "id": { "type": "integer", - "format": "int64", - "x-go-name": "ID" + "format": "int64" }, "intervalSeconds": { "type": "integer", - "format": "int64", - "x-go-name": "IntervalSeconds" + "format": "int64" }, "namespace_id": { "type": "integer", - "format": "int64", - "x-go-name": "NamespaceID" + "format": "int64" }, "namespace_uid": { - "type": "string", - "x-go-name": "NamespaceUID" + "type": "string" }, "no_data_state": { "type": "string", @@ -3538,42 +3351,33 @@ "Alerting", "NoData", "OK" - ], - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + ] }, "orgId": { "type": "integer", - "format": "int64", - "x-go-name": "OrgID" + "format": "int64" }, "provenance": { "$ref": "#/definitions/Provenance" }, "rule_group": { - "type": "string", - "x-go-name": "RuleGroup" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" }, "updated": { "type": "string", - "format": "date-time", - "x-go-name": "Updated" + "format": "date-time" }, "version": { "type": "integer", - "format": "int64", - "x-go-name": "Version" + "format": "int64" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableNGalertConfig": { "type": "object", @@ -3582,8 +3386,7 @@ "type": "array", "items": { "type": "string" - }, - "x-go-name": "Alertmanagers" + } }, "alertmanagersChoice": { "type": "string", @@ -3591,12 +3394,9 @@ "all", "internal", "external" - ], - "x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers", - "x-go-name": "AlertmanagersChoice" + ] } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableRuleGroupConfig": { "type": "object", @@ -3605,25 +3405,21 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "type": "array", "items": { "$ref": "#/definitions/GettableExtendedRuleNode" - }, - "x-go-name": "Rules" + } }, "source_tenants": { "type": "array", "items": { "type": "string" - }, - "x-go-name": "SourceTenants" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableStatus": { "type": "object", @@ -3643,14 +3439,12 @@ "uptime": { "description": "uptime", "type": "string", - "format": "date-time", - "x-go-name": "Uptime" + "format": "date-time" }, "versionInfo": { "$ref": "#/definitions/versionInfo" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableUserConfig": { "type": "object", @@ -3662,18 +3456,15 @@ "type": "object", "additionalProperties": { "$ref": "#/definitions/Provenance" - }, - "x-go-name": "TemplateFileProvenances" + } }, "template_files": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "TemplateFiles" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GlobalConfig": { "description": "GlobalConfig defines configuration parameters that are valid globally\nunless overwritten.", @@ -3686,8 +3477,7 @@ "$ref": "#/definitions/Secret" }, "opsgenie_api_key_file": { - "type": "string", - "x-go-name": "OpsGenieAPIKeyFile" + "type": "string" }, "opsgenie_api_url": { "$ref": "#/definitions/URL" @@ -3702,12 +3492,10 @@ "$ref": "#/definitions/SecretURL" }, "slack_api_url_file": { - "type": "string", - "x-go-name": "SlackAPIURLFile" + "type": "string" }, "smtp_auth_identity": { - "type": "string", - "x-go-name": "SMTPAuthIdentity" + "type": "string" }, "smtp_auth_password": { "$ref": "#/definitions/Secret" @@ -3716,20 +3504,16 @@ "$ref": "#/definitions/Secret" }, "smtp_auth_username": { - "type": "string", - "x-go-name": "SMTPAuthUsername" + "type": "string" }, "smtp_from": { - "type": "string", - "x-go-name": "SMTPFrom" + "type": "string" }, "smtp_hello": { - "type": "string", - "x-go-name": "SMTPHello" + "type": "string" }, "smtp_require_tls": { - "type": "boolean", - "x-go-name": "SMTPRequireTLS" + "type": "boolean" }, "smtp_smarthost": { "$ref": "#/definitions/HostPort" @@ -3741,8 +3525,7 @@ "$ref": "#/definitions/URL" }, "wechat_api_corp_id": { - "type": "string", - "x-go-name": "WeChatAPICorpID" + "type": "string" }, "wechat_api_secret": { "$ref": "#/definitions/Secret" @@ -3750,8 +3533,7 @@ "wechat_api_url": { "$ref": "#/definitions/URL" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "HTTPClientConfig": { "type": "object", @@ -3768,13 +3550,11 @@ }, "bearer_token_file": { "description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.", - "type": "string", - "x-go-name": "BearerTokenFile" + "type": "string" }, "follow_redirects": { "description": "FollowRedirects specifies whether the client should follow HTTP 3xx redirects.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.", - "type": "boolean", - "x-go-name": "FollowRedirects" + "type": "boolean" }, "oauth2": { "$ref": "#/definitions/OAuth2" @@ -3785,8 +3565,7 @@ "tls_config": { "$ref": "#/definitions/TLSConfig" } - }, - "x-go-package": "github.com/prometheus/common/config" + } }, "HostPort": { "type": "object", @@ -3798,8 +3577,7 @@ "Port": { "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "InclusiveRange": { "type": "object", @@ -3813,8 +3591,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "InhibitRule": { "description": "InhibitRule defines an inhibition rule that mutes alerts that match the\ntarget labels if an alert matching the source labels exists.\nBoth alerts have to have a set of labels being equal.", @@ -3828,8 +3605,7 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "SourceMatch" + } }, "source_match_re": { "$ref": "#/definitions/MatchRegexps" @@ -3842,8 +3618,7 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "TargetMatch" + } }, "target_match_re": { "$ref": "#/definitions/MatchRegexps" @@ -3851,71 +3626,60 @@ "target_matchers": { "$ref": "#/definitions/Matchers" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "Json": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/components/simplejson" + "type": "object" }, "Label": { "type": "object", "title": "Label is a key/value pair of strings.", "properties": { "Name": { - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/prometheus/pkg/labels" + } }, "LabelName": { "description": "A LabelName is a key for a LabelSet or Metric. It has a value associated\ntherewith.", - "type": "string", - "x-go-package": "github.com/prometheus/common/model" + "type": "string" }, "LabelNames": { "type": "array", "title": "LabelNames is a sortable LabelName slice. In implements sort.Interface.", "items": { "$ref": "#/definitions/LabelName" - }, - "x-go-package": "github.com/prometheus/common/model" + } }, "LabelSet": { "description": "A LabelSet is a collection of LabelName and LabelValue pairs. The LabelSet\nmay be fully-qualified down to the point where it may resolve to a single\nMetric in the data store or not. All operations that occur within the realm\nof a LabelSet can emit a vector of Metric entities to which the LabelSet may\nmatch.", "type": "object", "additionalProperties": { "$ref": "#/definitions/LabelValue" - }, - "x-go-package": "github.com/prometheus/common/model" + } }, "LabelValue": { "type": "string", - "title": "A LabelValue is an associated value for a LabelName.", - "x-go-package": "github.com/prometheus/common/model" + "title": "A LabelValue is an associated value for a LabelName." }, "Labels": { "description": "Labels is a sorted set of labels. Order has to be guaranteed upon\ninstantiation.", "type": "array", "items": { "$ref": "#/definitions/Label" - }, - "x-go-package": "github.com/prometheus/prometheus/pkg/labels" + } }, "MatchRegexps": { "type": "object", "title": "MatchRegexps represents a map of Regexp.", "additionalProperties": { "$ref": "#/definitions/Regexp" - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "MatchType": { "type": "integer", "format": "int64", - "title": "MatchType is an enum for label matching types.", - "x-go-package": "github.com/prometheus/alertmanager/pkg/labels" + "title": "MatchType is an enum for label matching types." }, "Matcher": { "type": "object", @@ -3930,8 +3694,7 @@ "Value": { "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/pkg/labels" + } }, "Matchers": { "description": "Matchers is a slice of Matchers that is sortable, implements Stringer, and\nprovides a Matches method to match a LabelSet against all Matchers in the\nslice. Note that some users of Matchers might require it to be sorted.", @@ -3945,35 +3708,29 @@ "type": "object", "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "$ref": "#/definitions/Provenance" }, "template": { - "type": "string", - "x-go-name": "Template" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "MessageTemplateContent": { "type": "object", "properties": { "template": { - "type": "string", - "x-go-name": "Template" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "MessageTemplates": { "type": "array", "items": { "$ref": "#/definitions/MessageTemplate" - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "MonthRange": { "type": "object", @@ -3987,37 +3744,31 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "MultiStatus": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "MuteTimeInterval": { "type": "object", "title": "MuteTimeInterval represents a named set of time intervals for which a route should be muted.", "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "time_intervals": { "type": "array", "items": { "$ref": "#/definitions/TimeInterval" - }, - "x-go-name": "TimeIntervals" + } } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "MuteTimings": { "type": "array", "items": { "$ref": "#/definitions/MuteTimeInterval" - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "NamespaceConfigResponse": { "type": "object", @@ -4026,23 +3777,19 @@ "items": { "$ref": "#/definitions/GettableRuleGroupConfig" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "NotFound": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "NotifierConfig": { "type": "object", "title": "NotifierConfig contains base options common across all notifier configurations.", "properties": { "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "OAuth2": { "type": "object", @@ -4052,36 +3799,30 @@ "$ref": "#/definitions/TLSConfig" }, "client_id": { - "type": "string", - "x-go-name": "ClientID" + "type": "string" }, "client_secret": { "$ref": "#/definitions/Secret" }, "client_secret_file": { - "type": "string", - "x-go-name": "ClientSecretFile" + "type": "string" }, "endpoint_params": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "EndpointParams" + } }, "scopes": { "type": "array", "items": { "type": "string" - }, - "x-go-name": "Scopes" + } }, "token_url": { - "type": "string", - "x-go-name": "TokenURL" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/common/config" + } }, "ObjectMatchers": { "description": "ObjectMatchers is Matchers with a different Unmarshal and Marshal methods that accept matchers as objects\nthat have already been parsed.", @@ -4092,133 +3833,107 @@ "title": "OpsGenieConfig configures notifications via OpsGenie.", "properties": { "actions": { - "type": "string", - "x-go-name": "Actions" + "type": "string" }, "api_key": { "$ref": "#/definitions/Secret" }, "api_key_file": { - "type": "string", - "x-go-name": "APIKeyFile" + "type": "string" }, "api_url": { "$ref": "#/definitions/URL" }, "description": { - "type": "string", - "x-go-name": "Description" + "type": "string" }, "details": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Details" + } }, "entity": { - "type": "string", - "x-go-name": "Entity" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "note": { - "type": "string", - "x-go-name": "Note" + "type": "string" }, "priority": { - "type": "string", - "x-go-name": "Priority" + "type": "string" }, "responders": { "type": "array", "items": { "$ref": "#/definitions/OpsGenieConfigResponder" - }, - "x-go-name": "Responders" + } }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "source": { - "type": "string", - "x-go-name": "Source" + "type": "string" }, "tags": { - "type": "string", - "x-go-name": "Tags" + "type": "string" }, "update_alerts": { - "type": "boolean", - "x-go-name": "UpdateAlerts" + "type": "boolean" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "OpsGenieConfigResponder": { "type": "object", "properties": { "id": { "description": "One of those 3 should be filled.", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "type": { "description": "team, user, escalation, schedule etc.", - "type": "string", - "x-go-name": "Type" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "PagerdutyConfig": { "type": "object", "title": "PagerdutyConfig configures notifications via PagerDuty.", "properties": { "class": { - "type": "string", - "x-go-name": "Class" + "type": "string" }, "client": { - "type": "string", - "x-go-name": "Client" + "type": "string" }, "client_url": { - "type": "string", - "x-go-name": "ClientURL" + "type": "string" }, "component": { - "type": "string", - "x-go-name": "Component" + "type": "string" }, "description": { - "type": "string", - "x-go-name": "Description" + "type": "string" }, "details": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Details" + } }, "group": { - "type": "string", - "x-go-name": "Group" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" @@ -4227,73 +3942,60 @@ "type": "array", "items": { "$ref": "#/definitions/PagerdutyImage" - }, - "x-go-name": "Images" + } }, "links": { "type": "array", "items": { "$ref": "#/definitions/PagerdutyLink" - }, - "x-go-name": "Links" + } }, "routing_key": { "$ref": "#/definitions/Secret" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "service_key": { "$ref": "#/definitions/Secret" }, "severity": { - "type": "string", - "x-go-name": "Severity" + "type": "string" }, "url": { "$ref": "#/definitions/URL" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "PagerdutyImage": { "description": "PagerdutyImage is an image", "type": "object", "properties": { "alt": { - "type": "string", - "x-go-name": "Alt" + "type": "string" }, "href": { - "type": "string", - "x-go-name": "Href" + "type": "string" }, "src": { - "type": "string", - "x-go-name": "Src" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "PagerdutyLink": { "description": "PagerdutyLink is a link", "type": "object", "properties": { "href": { - "type": "string", - "x-go-name": "Href" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "PermissionDenied": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Point": { "type": "object", @@ -4307,8 +4009,7 @@ "type": "number", "format": "double" } - }, - "x-go-package": "github.com/prometheus/prometheus/promql" + } }, "PostableApiAlertingConfig": { "type": "object", @@ -4320,23 +4021,20 @@ "type": "array", "items": { "$ref": "#/definitions/InhibitRule" - }, - "x-go-name": "InhibitRules" + } }, "mute_time_intervals": { "type": "array", "items": { "$ref": "#/definitions/MuteTimeInterval" - }, - "x-go-name": "MuteTimeIntervals" + } }, "receivers": { "description": "Override with our superset receiver type", "type": "array", "items": { "$ref": "#/definitions/PostableApiReceiver" - }, - "x-go-name": "Receivers" + } }, "route": { "$ref": "#/definitions/Route" @@ -4345,11 +4043,9 @@ "type": "array", "items": { "type": "string" - }, - "x-go-name": "Templates" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableApiReceiver": { "type": "object", @@ -4358,97 +4054,82 @@ "type": "array", "items": { "$ref": "#/definitions/EmailConfig" - }, - "x-go-name": "EmailConfigs" + } }, "grafana_managed_receiver_configs": { "type": "array", "items": { "$ref": "#/definitions/PostableGrafanaReceiver" - }, - "x-go-name": "GrafanaManagedReceivers" + } }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "opsgenie_configs": { "type": "array", "items": { "$ref": "#/definitions/OpsGenieConfig" - }, - "x-go-name": "OpsGenieConfigs" + } }, "pagerduty_configs": { "type": "array", "items": { "$ref": "#/definitions/PagerdutyConfig" - }, - "x-go-name": "PagerdutyConfigs" + } }, "pushover_configs": { "type": "array", "items": { "$ref": "#/definitions/PushoverConfig" - }, - "x-go-name": "PushoverConfigs" + } }, "slack_configs": { "type": "array", "items": { "$ref": "#/definitions/SlackConfig" - }, - "x-go-name": "SlackConfigs" + } }, "sns_configs": { "type": "array", "items": { "$ref": "#/definitions/SNSConfig" - }, - "x-go-name": "SNSConfigs" + } }, "victorops_configs": { "type": "array", "items": { "$ref": "#/definitions/VictorOpsConfig" - }, - "x-go-name": "VictorOpsConfigs" + } }, "webhook_configs": { "type": "array", "items": { "$ref": "#/definitions/WebhookConfig" - }, - "x-go-name": "WebhookConfigs" + } }, "wechat_configs": { "type": "array", "items": { "$ref": "#/definitions/WechatConfig" - }, - "x-go-name": "WechatConfigs" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableExtendedRuleNode": { "type": "object", "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Annotations" + } }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -4460,47 +4141,38 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Labels" + } }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableGrafanaReceiver": { "type": "object", "properties": { "disableResolveMessage": { - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "secureSettings": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "SecureSettings" + } }, "settings": { "$ref": "#/definitions/Json" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableGrafanaReceivers": { "type": "object", @@ -4509,25 +4181,21 @@ "type": "array", "items": { "$ref": "#/definitions/PostableGrafanaReceiver" - }, - "x-go-name": "GrafanaManagedReceivers" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableGrafanaRule": { "type": "object", "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "type": "array", "items": { "$ref": "#/definitions/AlertQuery" - }, - "x-go-name": "Data" + } }, "exec_err_state": { "type": "string", @@ -4535,9 +4203,7 @@ "OK", "Alerting", "Error" - ], - "x-go-enum-desc": "OK OkErrState\nAlerting AlertingErrState\nError ErrorErrState", - "x-go-name": "ExecErrState" + ] }, "no_data_state": { "type": "string", @@ -4545,20 +4211,15 @@ "Alerting", "NoData", "OK" - ], - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + ] }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableNGalertConfig": { "type": "object", @@ -4567,8 +4228,7 @@ "type": "array", "items": { "type": "string" - }, - "x-go-name": "Alertmanagers" + } }, "alertmanagersChoice": { "type": "string", @@ -4576,12 +4236,9 @@ "all", "internal", "external" - ], - "x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers", - "x-go-name": "AlertmanagersChoice" + ] } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableRuleGroupConfig": { "type": "object", @@ -4590,18 +4247,15 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "type": "array", "items": { "$ref": "#/definitions/PostableExtendedRuleNode" - }, - "x-go-name": "Rules" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableUserConfig": { "type": "object", @@ -4613,15 +4267,12 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "TemplateFiles" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Provenance": { - "type": "string", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "string" }, "PushoverConfig": { "type": "object", @@ -4630,51 +4281,42 @@ "$ref": "#/definitions/duration" }, "html": { - "type": "boolean", - "x-go-name": "HTML" + "type": "boolean" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "priority": { - "type": "string", - "x-go-name": "Priority" + "type": "string" }, "retry": { "$ref": "#/definitions/duration" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "sound": { - "type": "string", - "x-go-name": "Sound" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "token": { "$ref": "#/definitions/Secret" }, "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" }, "url_title": { - "type": "string", - "x-go-name": "URLTitle" + "type": "string" }, "user_key": { "$ref": "#/definitions/Secret" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "Receiver": { "type": "object", @@ -4684,78 +4326,66 @@ "type": "array", "items": { "$ref": "#/definitions/EmailConfig" - }, - "x-go-name": "EmailConfigs" + } }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "opsgenie_configs": { "type": "array", "items": { "$ref": "#/definitions/OpsGenieConfig" - }, - "x-go-name": "OpsGenieConfigs" + } }, "pagerduty_configs": { "type": "array", "items": { "$ref": "#/definitions/PagerdutyConfig" - }, - "x-go-name": "PagerdutyConfigs" + } }, "pushover_configs": { "type": "array", "items": { "$ref": "#/definitions/PushoverConfig" - }, - "x-go-name": "PushoverConfigs" + } }, "slack_configs": { "type": "array", "items": { "$ref": "#/definitions/SlackConfig" - }, - "x-go-name": "SlackConfigs" + } }, "sns_configs": { "type": "array", "items": { "$ref": "#/definitions/SNSConfig" - }, - "x-go-name": "SNSConfigs" + } }, "victorops_configs": { "type": "array", "items": { "$ref": "#/definitions/VictorOpsConfig" - }, - "x-go-name": "VictorOpsConfigs" + } }, "webhook_configs": { "type": "array", "items": { "$ref": "#/definitions/WebhookConfig" - }, - "x-go-name": "WebhookConfigs" + } }, "wechat_configs": { "type": "array", "items": { "$ref": "#/definitions/WechatConfig" - }, - "x-go-name": "WechatConfigs" + } } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "Regexp": { "description": "A Regexp is safe for concurrent use by multiple goroutines,\nexcept for configuration methods, such as Longest.", "type": "object", - "title": "Regexp is the representation of a compiled regular expression.", - "x-go-package": "regexp" + "title": "Regexp is the representation of a compiled regular expression." }, "RelativeTimeRange": { "description": "RelativeTimeRange is the per query start and end time\nfor requests.", @@ -4767,33 +4397,28 @@ "to": { "$ref": "#/definitions/Duration" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + } }, "ResponseDetails": { "type": "object", "properties": { "msg": { - "type": "string", - "x-go-name": "Msg" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Route": { "description": "A Route is a node that contains definitions of how to handle alerts. This is modified\nfrom the upstream alertmanager in that it adds the ObjectMatchers property.", "type": "object", "properties": { "continue": { - "type": "boolean", - "x-go-name": "Continue" + "type": "boolean" }, "group_by": { "type": "array", "items": { "type": "string" - }, - "x-go-name": "GroupByStr" + } }, "group_interval": { "$ref": "#/definitions/Duration" @@ -4806,8 +4431,7 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Match" + } }, "match_re": { "$ref": "#/definitions/MatchRegexps" @@ -4819,8 +4443,7 @@ "type": "array", "items": { "type": "string" - }, - "x-go-name": "MuteTimeIntervals" + } }, "object_matchers": { "$ref": "#/definitions/ObjectMatchers" @@ -4829,8 +4452,7 @@ "$ref": "#/definitions/Provenance" }, "receiver": { - "type": "string", - "x-go-name": "Receiver" + "type": "string" }, "repeat_interval": { "$ref": "#/definitions/Duration" @@ -4839,11 +4461,9 @@ "type": "array", "items": { "$ref": "#/definitions/Route" - }, - "x-go-name": "Routes" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Rule": { "description": "adapted from cortex", @@ -4857,38 +4477,31 @@ "properties": { "evaluationTime": { "type": "number", - "format": "double", - "x-go-name": "EvaluationTime" + "format": "double" }, "health": { - "type": "string", - "x-go-name": "Health" + "type": "string" }, "labels": { "$ref": "#/definitions/overrideLabels" }, "lastError": { - "type": "string", - "x-go-name": "LastError" + "type": "string" }, "lastEvaluation": { "type": "string", - "format": "date-time", - "x-go-name": "LastEvaluation" + "format": "date-time" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "query": { - "type": "string", - "x-go-name": "Query" + "type": "string" }, "type": { "$ref": "#/definitions/RuleType" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "RuleDiscovery": { "type": "object", @@ -4900,11 +4513,9 @@ "type": "array", "items": { "$ref": "#/definitions/RuleGroup" - }, - "x-go-name": "RuleGroups" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "RuleGroup": { "type": "object", @@ -4917,37 +4528,30 @@ "properties": { "evaluationTime": { "type": "number", - "format": "double", - "x-go-name": "EvaluationTime" + "format": "double" }, "file": { - "type": "string", - "x-go-name": "File" + "type": "string" }, "interval": { "type": "number", - "format": "double", - "x-go-name": "Interval" + "format": "double" }, "lastEvaluation": { "type": "string", - "format": "date-time", - "x-go-name": "LastEvaluation" + "format": "date-time" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "description": "In order to preserve rule ordering, while exposing type (alerting or recording)\nspecific properties, both alerting and recording rules are exposed in the\nsame array.", "type": "array", "items": { "$ref": "#/definitions/AlertingRule" - }, - "x-go-name": "Rules" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "RuleGroupConfigResponse": { "type": "object", @@ -4956,25 +4560,21 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "type": "array", "items": { "$ref": "#/definitions/GettableExtendedRuleNode" - }, - "x-go-name": "Rules" + } }, "source_tenants": { "type": "array", "items": { "type": "string" - }, - "x-go-name": "SourceTenants" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "RuleResponse": { "type": "object", @@ -4986,70 +4586,57 @@ "$ref": "#/definitions/RuleDiscovery" }, "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "RuleType": { "type": "string", - "title": "RuleType models the type of a rule.", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "title": "RuleType models the type of a rule." }, "SNSConfig": { "type": "object", "properties": { "api_url": { - "type": "string", - "x-go-name": "APIUrl" + "type": "string" }, "attributes": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Attributes" + } }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "phone_number": { - "type": "string", - "x-go-name": "PhoneNumber" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "sigv4": { "$ref": "#/definitions/SigV4Config" }, "subject": { - "type": "string", - "x-go-name": "Subject" + "type": "string" }, "target_arn": { - "type": "string", - "x-go-name": "TargetARN" + "type": "string" }, "topic_arn": { - "type": "string", - "x-go-name": "TopicARN" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "Sample": { "type": "object", @@ -5066,13 +4653,11 @@ "type": "number", "format": "double" } - }, - "x-go-package": "github.com/prometheus/prometheus/promql" + } }, "Secret": { "type": "string", - "title": "Secret special type for storing secrets.", - "x-go-package": "github.com/prometheus/common/config" + "title": "Secret special type for storing secrets." }, "SecretURL": { "title": "SecretURL is a URL that must not be revealed on marshaling.", @@ -5097,8 +4682,7 @@ "SecretKey": { "$ref": "#/definitions/Secret" } - }, - "x-go-package": "github.com/prometheus/common/sigv4" + } }, "SlackAction": { "description": "See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons\nfor more information.", @@ -5109,31 +4693,24 @@ "$ref": "#/definitions/SlackConfirmationField" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "style": { - "type": "string", - "x-go-name": "Style" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "SlackConfig": { "type": "object", @@ -5143,127 +4720,100 @@ "type": "array", "items": { "$ref": "#/definitions/SlackAction" - }, - "x-go-name": "Actions" + } }, "api_url": { "$ref": "#/definitions/SecretURL" }, "api_url_file": { - "type": "string", - "x-go-name": "APIURLFile" + "type": "string" }, "callback_id": { - "type": "string", - "x-go-name": "CallbackID" + "type": "string" }, "channel": { "description": "Slack channel override, (like #other-channel or @username).", - "type": "string", - "x-go-name": "Channel" + "type": "string" }, "color": { - "type": "string", - "x-go-name": "Color" + "type": "string" }, "fallback": { - "type": "string", - "x-go-name": "Fallback" + "type": "string" }, "fields": { "type": "array", "items": { "$ref": "#/definitions/SlackField" - }, - "x-go-name": "Fields" + } }, "footer": { - "type": "string", - "x-go-name": "Footer" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "icon_emoji": { - "type": "string", - "x-go-name": "IconEmoji" + "type": "string" }, "icon_url": { - "type": "string", - "x-go-name": "IconURL" + "type": "string" }, "image_url": { - "type": "string", - "x-go-name": "ImageURL" + "type": "string" }, "link_names": { - "type": "boolean", - "x-go-name": "LinkNames" + "type": "boolean" }, "mrkdwn_in": { "type": "array", "items": { "type": "string" - }, - "x-go-name": "MrkdwnIn" + } }, "pretext": { - "type": "string", - "x-go-name": "Pretext" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "short_fields": { - "type": "boolean", - "x-go-name": "ShortFields" + "type": "boolean" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "thumb_url": { - "type": "string", - "x-go-name": "ThumbURL" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "title_link": { - "type": "string", - "x-go-name": "TitleLink" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "SlackConfirmationField": { "description": "SlackConfirmationField protect users from destructive actions or particularly distinguished decisions\nby asking them to confirm their button click one more time.\nSee https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields for more information.", "type": "object", "properties": { "dismiss_text": { - "type": "string", - "x-go-name": "DismissText" + "type": "string" }, "ok_text": { - "type": "string", - "x-go-name": "OkText" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "SlackField": { "description": "Each field must contain a title, value, and optionally, a boolean value to indicate if the field\nis short enough to be displayed next to other fields designated as short.\nSee https://api.slack.com/docs/message-attachments#fields for more information.", @@ -5271,19 +4821,15 @@ "title": "SlackField configures a single Slack field that is sent with each notification.", "properties": { "short": { - "type": "boolean", - "x-go-name": "Short" + "type": "boolean" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "SmtpNotEnabled": { "$ref": "#/definitions/ResponseDetails" @@ -5297,53 +4843,42 @@ "properties": { "ca_file": { "description": "The CA cert to use for the targets.", - "type": "string", - "x-go-name": "CAFile" + "type": "string" }, "cert_file": { "description": "The client cert file for the targets.", - "type": "string", - "x-go-name": "CertFile" + "type": "string" }, "insecure_skip_verify": { "description": "Disable target certificate validation.", - "type": "boolean", - "x-go-name": "InsecureSkipVerify" + "type": "boolean" }, "key_file": { "description": "The client key file for the targets.", - "type": "string", - "x-go-name": "KeyFile" + "type": "string" }, "server_name": { "description": "Used to verify the hostname for the targets.", - "type": "string", - "x-go-name": "ServerName" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/common/config" + } }, "TestReceiverConfigResult": { "type": "object", "properties": { "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TestReceiverResult": { "type": "object", @@ -5352,15 +4887,12 @@ "type": "array", "items": { "$ref": "#/definitions/TestReceiverConfigResult" - }, - "x-go-name": "Configs" + } }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TestReceiversConfigAlertParams": { "type": "object", @@ -5371,8 +4903,7 @@ "labels": { "$ref": "#/definitions/LabelSet" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TestReceiversConfigBodyParams": { "type": "object", @@ -5384,11 +4915,9 @@ "type": "array", "items": { "$ref": "#/definitions/PostableApiReceiver" - }, - "x-go-name": "Receivers" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TestReceiversResult": { "type": "object", @@ -5398,32 +4927,27 @@ }, "notified_at": { "type": "string", - "format": "date-time", - "x-go-name": "NotifiedAt" + "format": "date-time" }, "receivers": { "type": "array", "items": { "$ref": "#/definitions/TestReceiverResult" - }, - "x-go-name": "Receivers" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TestRulePayload": { "type": "object", "properties": { "expr": { "type": "string", - "x-go-name": "Expr", "example": "(node_filesystem_avail_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} node_filesystem_size_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} * 100 \u003c 5 and node_filesystem_readonly{fstype!=\"\",job=\"integrations/node_exporter\"} == 0)" }, "grafana_condition": { "$ref": "#/definitions/EvalAlertConditionCommand" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TestRuleResponse": { "type": "object", @@ -5434,8 +4958,7 @@ "grafana_alert_instances": { "$ref": "#/definitions/AlertInstancesResponse" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TimeInterval": { "description": "TimeInterval describes intervals of time. ContainsTime will tell you if a golang time is contained\nwithin the interval.", @@ -5445,39 +4968,33 @@ "type": "array", "items": { "$ref": "#/definitions/DayOfMonthRange" - }, - "x-go-name": "DaysOfMonth" + } }, "months": { "type": "array", "items": { "$ref": "#/definitions/MonthRange" - }, - "x-go-name": "Months" + } }, "times": { "type": "array", "items": { "$ref": "#/definitions/TimeRange" - }, - "x-go-name": "Times" + } }, "weekdays": { "type": "array", "items": { "$ref": "#/definitions/WeekdayRange" - }, - "x-go-name": "Weekdays" + } }, "years": { "type": "array", "items": { "$ref": "#/definitions/YearRange" - }, - "x-go-name": "Years" + } } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "TimeRange": { "description": "For example, 4:00PM to End of the day would Begin at 1020 and End at 1440.", @@ -5492,8 +5009,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "URL": { "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.", @@ -5530,32 +5046,27 @@ "User": { "$ref": "#/definitions/Userinfo" } - }, - "x-go-package": "net/url" + } }, "Userinfo": { "description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a URL. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.", - "type": "object", - "x-go-package": "net/url" + "type": "object" }, "ValidationError": { "type": "object", "properties": { "msg": { "type": "string", - "x-go-name": "Msg", "example": "error message" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Vector": { "description": "Vector is basically only an alias for model.Samples, but the\ncontract is that in a Vector, all Samples have the same timestamp.", "type": "array", "items": { "$ref": "#/definitions/Sample" - }, - "x-go-package": "github.com/prometheus/prometheus/promql" + } }, "VictorOpsConfig": { "type": "object", @@ -5574,38 +5085,30 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "CustomFields" + } }, "entity_display_name": { - "type": "string", - "x-go-name": "EntityDisplayName" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message_type": { - "type": "string", - "x-go-name": "MessageType" + "type": "string" }, "monitoring_tool": { - "type": "string", - "x-go-name": "MonitoringTool" + "type": "string" }, "routing_key": { - "type": "string", - "x-go-name": "RoutingKey" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "state_message": { - "type": "string", - "x-go-name": "StateMessage" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "WebhookConfig": { "type": "object", @@ -5617,26 +5120,22 @@ "max_alerts": { "description": "MaxAlerts is the maximum number of alerts to be sent per webhook message.\nAlerts exceeding this threshold will be truncated. Setting this to 0\nallows an unlimited number of alerts.", "type": "integer", - "format": "uint64", - "x-go-name": "MaxAlerts" + "format": "uint64" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "url": { "$ref": "#/definitions/URL" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "WechatConfig": { "type": "object", "title": "WechatConfig configures notifications via Wechat.", "properties": { "agent_id": { - "type": "string", - "x-go-name": "AgentID" + "type": "string" }, "api_secret": { "$ref": "#/definitions/Secret" @@ -5645,38 +5144,30 @@ "$ref": "#/definitions/URL" }, "corp_id": { - "type": "string", - "x-go-name": "CorpID" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "message_type": { - "type": "string", - "x-go-name": "MessageType" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "to_party": { - "type": "string", - "x-go-name": "ToParty" + "type": "string" }, "to_tag": { - "type": "string", - "x-go-name": "ToTag" + "type": "string" }, "to_user": { - "type": "string", - "x-go-name": "ToUser" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "WeekdayRange": { "type": "object", @@ -5690,8 +5181,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "YearRange": { "type": "object", @@ -5705,8 +5195,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "alert": { "description": "Alert alert", @@ -5718,17 +5207,15 @@ "generatorURL": { "description": "generator URL\nFormat: uri", "type": "string", - "format": "uri", - "x-go-name": "GeneratorURL" + "format": "uri" }, "labels": { "$ref": "#/definitions/labelSet" } - }, - "x-go-name": "Alert", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "alertGroup": { + "description": "AlertGroup alert group", "type": "object", "required": [ "alerts", @@ -5741,8 +5228,7 @@ "type": "array", "items": { "$ref": "#/definitions/gettableAlert" - }, - "x-go-name": "Alerts" + } }, "labels": { "$ref": "#/definitions/labelSet" @@ -5751,12 +5237,9 @@ "$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" @@ -5777,28 +5260,23 @@ "type": "array", "items": { "type": "string" - }, - "x-go-name": "InhibitedBy" + } }, "silencedBy": { "description": "silenced by", "type": "array", "items": { "type": "string" - }, - "x-go-name": "SilencedBy" + } }, "state": { "description": "state", "type": "string", "enum": [ "[unprocessed active suppressed]" - ], - "x-go-name": "State" + ] } - }, - "x-go-name": "AlertStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "alertmanagerConfig": { "description": "AlertmanagerConfig alertmanager config", @@ -5809,12 +5287,9 @@ "properties": { "original": { "description": "original", - "type": "string", - "x-go-name": "Original" + "type": "string" } - }, - "x-go-name": "AlertmanagerConfig", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "alertmanagerStatus": { "description": "AlertmanagerStatus alertmanager status", @@ -5835,15 +5310,12 @@ "uptime": { "description": "uptime", "type": "string", - "format": "date-time", - "x-go-name": "Uptime" + "format": "date-time" }, "versionInfo": { "$ref": "#/definitions/versionInfo" } - }, - "x-go-name": "AlertmanagerStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "clusterStatus": { "description": "ClusterStatus cluster status", @@ -5854,34 +5326,28 @@ "properties": { "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "peers": { "description": "peers", "type": "array", "items": { "$ref": "#/definitions/peerStatus" - }, - "x-go-name": "Peers" + } }, "status": { "description": "status", "type": "string", "enum": [ "[ready settling disabled]" - ], - "x-go-name": "Status" + ] } - }, - "x-go-name": "ClusterStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "duration": { "$ref": "#/definitions/Duration" }, "gettableAlert": { - "description": "GettableAlert gettable alert", "type": "object", "required": [ "labels", @@ -5900,19 +5366,16 @@ "endsAt": { "description": "ends at", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "fingerprint": { "description": "fingerprint", - "type": "string", - "x-go-name": "Fingerprint" + "type": "string" }, "generatorURL": { "description": "generator URL\nFormat: uri", "type": "string", - "format": "uri", - "x-go-name": "GeneratorURL" + "format": "uri" }, "labels": { "$ref": "#/definitions/labelSet" @@ -5922,14 +5385,12 @@ "type": "array", "items": { "$ref": "#/definitions/receiver" - }, - "x-go-name": "Receivers" + } }, "startsAt": { "description": "starts at", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" }, "status": { "$ref": "#/definitions/alertStatus" @@ -5937,8 +5398,7 @@ "updatedAt": { "description": "updated at", "type": "string", - "format": "date-time", - "x-go-name": "UpdatedAt" + "format": "date-time" } }, "$ref": "#/definitions/gettableAlert" @@ -5948,8 +5408,6 @@ "items": { "$ref": "#/definitions/gettableAlert" }, - "x-go-name": "GettableAlerts", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models", "$ref": "#/definitions/gettableAlerts" }, "gettableSilence": { @@ -5967,24 +5425,20 @@ "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "id": { "description": "id", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -5992,8 +5446,7 @@ "startsAt": { "description": "starts at", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" }, "status": { "$ref": "#/definitions/silenceStatus" @@ -6001,12 +5454,9 @@ "updatedAt": { "description": "updated at", "type": "string", - "format": "date-time", - "x-go-name": "UpdatedAt" + "format": "date-time" } }, - "x-go-name": "GettableSilence", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models", "$ref": "#/definitions/gettableSilence" }, "gettableSilences": { @@ -6014,8 +5464,6 @@ "items": { "$ref": "#/definitions/gettableSilence" }, - "x-go-name": "GettableSilences", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models", "$ref": "#/definitions/gettableSilences" }, "labelSet": { @@ -6023,9 +5471,7 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "LabelSet", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "matcher": { "description": "Matcher matcher", @@ -6038,36 +5484,28 @@ "properties": { "isEqual": { "description": "is equal", - "type": "boolean", - "x-go-name": "IsEqual" + "type": "boolean" }, "isRegex": { "description": "is regex", - "type": "boolean", - "x-go-name": "IsRegex" + "type": "boolean" }, "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "value": { "description": "value", - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "x-go-name": "Matcher", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "matchers": { "description": "Matchers matchers", "type": "array", "items": { "$ref": "#/definitions/matcher" - }, - "x-go-name": "Matchers", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "overrideLabels": { "description": "The custom marshaling for labels.Labels ends up doing this anyways.", @@ -6075,8 +5513,7 @@ "title": "override the labels type with a map for generation.", "additionalProperties": { "type": "string" - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "peerStatus": { "description": "PeerStatus peer status", @@ -6088,17 +5525,13 @@ "properties": { "address": { "description": "address", - "type": "string", - "x-go-name": "Address" + "type": "string" }, "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" } - }, - "x-go-name": "PeerStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "postableAlert": { "description": "PostableAlert postable alert", @@ -6113,14 +5546,12 @@ "endsAt": { "description": "ends at\nFormat: date-time", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "generatorURL": { "description": "generator URL\nFormat: uri", "type": "string", - "format": "uri", - "x-go-name": "GeneratorURL" + "format": "uri" }, "labels": { "$ref": "#/definitions/labelSet" @@ -6128,24 +5559,18 @@ "startsAt": { "description": "starts at\nFormat: date-time", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" } - }, - "x-go-name": "PostableAlert", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "postableAlerts": { "description": "PostableAlerts postable alerts", "type": "array", "items": { "$ref": "#/definitions/postableAlert" - }, - "x-go-name": "PostableAlerts", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "postableSilence": { - "description": "PostableSilence postable silence", "type": "object", "required": [ "comment", @@ -6157,24 +5582,20 @@ "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "id": { "description": "id", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -6182,8 +5603,7 @@ "startsAt": { "description": "starts at", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" } }, "$ref": "#/definitions/postableSilence" @@ -6197,8 +5617,7 @@ "properties": { "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" } }, "$ref": "#/definitions/receiver" @@ -6216,19 +5635,16 @@ "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "matchers": { "$ref": "#/definitions/matchers" @@ -6236,12 +5652,9 @@ "startsAt": { "description": "starts at", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" } - }, - "x-go-name": "Silence", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "silenceStatus": { "description": "SilenceStatus silence status", @@ -6255,12 +5668,9 @@ "type": "string", "enum": [ "[expired active pending]" - ], - "x-go-name": "State" + ] } - }, - "x-go-name": "SilenceStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "versionInfo": { "description": "VersionInfo version info", @@ -6276,37 +5686,29 @@ "properties": { "branch": { "description": "branch", - "type": "string", - "x-go-name": "Branch" + "type": "string" }, "buildDate": { "description": "build date", - "type": "string", - "x-go-name": "BuildDate" + "type": "string" }, "buildUser": { "description": "build user", - "type": "string", - "x-go-name": "BuildUser" + "type": "string" }, "goVersion": { "description": "go version", - "type": "string", - "x-go-name": "GoVersion" + "type": "string" }, "revision": { "description": "revision", - "type": "string", - "x-go-name": "Revision" + "type": "string" }, "version": { "description": "version", - "type": "string", - "x-go-name": "Version" + "type": "string" } - }, - "x-go-name": "VersionInfo", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } } }, "securityDefinitions": { diff --git a/public/api-merged.json b/public/api-merged.json index f3860817416..2501d8d4e11 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -13192,6 +13192,9 @@ "homeDashboardUID": { "type": "string" }, + "locale": { + "type": "string" + }, "navbar": { "$ref": "#/definitions/NavbarPreference" }, @@ -13645,6 +13648,9 @@ "homeDashboardUID": { "type": "string" }, + "locale": { + "type": "string" + }, "navbar": { "$ref": "#/definitions/NavbarPreference" }, @@ -15458,8 +15464,9 @@ "type": "string" }, "URL": { + "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.", "type": "object", - "title": "URL is a custom URL type that allows validation at configuration load time.", + "title": "A URL represents a parsed URL (technically, a URI reference).", "properties": { "ForceQuery": { "type": "boolean" @@ -15492,7 +15499,7 @@ "$ref": "#/definitions/Userinfo" } }, - "x-go-package": "github.com/prometheus/common/config" + "x-go-package": "net/url" }, "UpdateAlertNotificationCommand": { "type": "object", @@ -15739,6 +15746,9 @@ "homeDashboardUID": { "type": "string" }, + "locale": { + "type": "string" + }, "navbar": { "$ref": "#/definitions/NavbarPreference" }, @@ -16263,6 +16273,7 @@ "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" }, "alertGroup": { + "description": "AlertGroup alert group", "type": "object", "required": ["alerts", "labels", "receiver"], "properties": { @@ -16280,9 +16291,7 @@ "receiver": { "$ref": "#/definitions/receiver" } - }, - "x-go-name": "AlertGroup", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "alertGroups": { "type": "array", @@ -16393,6 +16402,7 @@ "$ref": "#/definitions/Duration" }, "gettableAlert": { + "description": "GettableAlert gettable alert", "type": "object", "required": ["labels", "annotations", "endsAt", "fingerprint", "receivers", "startsAt", "status", "updatedAt"], "properties": { @@ -16442,17 +16452,14 @@ "format": "date-time", "x-go-name": "UpdatedAt" } - }, - "x-go-name": "GettableAlert", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "gettableAlerts": { + "description": "GettableAlerts gettable alerts", "type": "array", "items": { "$ref": "#/definitions/gettableAlert" - }, - "x-go-name": "GettableAlerts", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "gettableSilence": { "description": "GettableSilence gettable silence", @@ -16625,6 +16632,7 @@ "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" }, "postableSilence": { + "description": "PostableSilence postable silence", "type": "object", "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt"], "properties": { @@ -16658,11 +16666,10 @@ "format": "date-time", "x-go-name": "StartsAt" } - }, - "x-go-name": "PostableSilence", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "receiver": { + "description": "Receiver receiver", "type": "object", "required": ["name"], "properties": { @@ -16671,9 +16678,7 @@ "type": "string", "x-go-name": "Name" } - }, - "x-go-name": "Receiver", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "silence": { "description": "Silence silence", diff --git a/public/api-spec.json b/public/api-spec.json index e5b0b52cb6f..c739778b4f4 100644 --- a/public/api-spec.json +++ b/public/api-spec.json @@ -10987,6 +10987,9 @@ "homeDashboardUID": { "type": "string" }, + "locale": { + "type": "string" + }, "navbar": { "$ref": "#/definitions/NavbarPreference" }, @@ -11124,6 +11127,9 @@ "homeDashboardUID": { "type": "string" }, + "locale": { + "type": "string" + }, "navbar": { "$ref": "#/definitions/NavbarPreference" }, @@ -12319,6 +12325,9 @@ "homeDashboardUID": { "type": "string" }, + "locale": { + "type": "string" + }, "navbar": { "$ref": "#/definitions/NavbarPreference" },