mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Fix DTO embedding when getting/putting alert rule groups * Drop usage of word 'Domain' * Rename var as well
6333 lines
160 KiB
JSON
6333 lines
160 KiB
JSON
{
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"schemes": [
|
|
"http",
|
|
"https"
|
|
],
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "Package definitions includes the types required for generating or consuming an OpenAPI\nspec for the Grafana Alerting API.",
|
|
"title": "Grafana Alerting API.",
|
|
"version": "1.1.0"
|
|
},
|
|
"basePath": "/api/v1",
|
|
"paths": {
|
|
"/api/alertmanager/grafana/api/v2/alerts": {
|
|
"get": {
|
|
"description": "get alertmanager alerts",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetGrafanaAMAlerts",
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show active alerts",
|
|
"name": "active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show silenced alerts",
|
|
"name": "silenced",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show inhibited alerts",
|
|
"name": "inhibited",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "A list of matchers to filter alerts by",
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "A regex matching receivers to filter alerts by",
|
|
"name": "receiver",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "gettableAlerts",
|
|
"schema": {
|
|
"$ref": "#/definitions/gettableAlerts"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create alertmanager alerts",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RoutePostGrafanaAMAlerts",
|
|
"parameters": [
|
|
{
|
|
"name": "PostableAlerts",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/postableAlert"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/grafana/api/v2/alerts/groups": {
|
|
"get": {
|
|
"description": "get alertmanager alerts",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetGrafanaAMAlertGroups",
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show active alerts",
|
|
"name": "active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show silenced alerts",
|
|
"name": "silenced",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show inhibited alerts",
|
|
"name": "inhibited",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "A list of matchers to filter alerts by",
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "A regex matching receivers to filter alerts by",
|
|
"name": "receiver",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "alertGroups",
|
|
"schema": {
|
|
"$ref": "#/definitions/alertGroups"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/grafana/api/v2/silence/{SilenceId}": {
|
|
"get": {
|
|
"description": "get silence",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetGrafanaSilence",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "SilenceId",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "gettableSilence",
|
|
"schema": {
|
|
"$ref": "#/definitions/gettableSilence"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "delete silence",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteDeleteGrafanaSilence",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "SilenceId",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/grafana/api/v2/silences": {
|
|
"get": {
|
|
"description": "get silences",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetGrafanaSilences",
|
|
"parameters": [
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"name": "filter",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "gettableSilences",
|
|
"schema": {
|
|
"$ref": "#/definitions/gettableSilences"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create silence",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteCreateGrafanaSilence",
|
|
"parameters": [
|
|
{
|
|
"name": "Silence",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/postableSilence"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "gettableSilence",
|
|
"schema": {
|
|
"$ref": "#/definitions/gettableSilence"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/grafana/api/v2/status": {
|
|
"get": {
|
|
"description": "get alertmanager status and configuration",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetGrafanaAMStatus",
|
|
"responses": {
|
|
"200": {
|
|
"description": "GettableStatus",
|
|
"schema": {
|
|
"$ref": "#/definitions/GettableStatus"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/grafana/config/api/v1/alerts": {
|
|
"get": {
|
|
"description": "gets an Alerting config",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetGrafanaAlertingConfig",
|
|
"responses": {
|
|
"200": {
|
|
"description": "GettableUserConfig",
|
|
"schema": {
|
|
"$ref": "#/definitions/GettableUserConfig"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "sets an Alerting config",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RoutePostGrafanaAlertingConfig",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/PostableUserConfig"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "deletes the Alerting config for a tenant",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteDeleteGrafanaAlertingConfig",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/grafana/config/api/v1/receivers/test": {
|
|
"post": {
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"summary": "Test Grafana managed receivers without saving them.",
|
|
"operationId": "RoutePostTestGrafanaReceivers",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/TestReceiversConfigBodyParams"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"207": {
|
|
"description": "MultiStatus",
|
|
"schema": {
|
|
"$ref": "#/definitions/MultiStatus"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "PermissionDenied",
|
|
"schema": {
|
|
"$ref": "#/definitions/PermissionDenied"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
},
|
|
"408": {
|
|
"description": "Failure",
|
|
"schema": {
|
|
"$ref": "#/definitions/Failure"
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "AlertManagerNotReady",
|
|
"schema": {
|
|
"$ref": "#/definitions/AlertManagerNotReady"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/alerts": {
|
|
"get": {
|
|
"description": "get alertmanager alerts",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetAMAlerts",
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show active alerts",
|
|
"name": "active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show silenced alerts",
|
|
"name": "silenced",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show inhibited alerts",
|
|
"name": "inhibited",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "A list of matchers to filter alerts by",
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "A regex matching receivers to filter alerts by",
|
|
"name": "receiver",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "gettableAlerts",
|
|
"schema": {
|
|
"$ref": "#/definitions/gettableAlerts"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create alertmanager alerts",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RoutePostAMAlerts",
|
|
"parameters": [
|
|
{
|
|
"name": "PostableAlerts",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/postableAlert"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/alerts/groups": {
|
|
"get": {
|
|
"description": "get alertmanager alerts",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetAMAlertGroups",
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show active alerts",
|
|
"name": "active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show silenced alerts",
|
|
"name": "silenced",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Show inhibited alerts",
|
|
"name": "inhibited",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "A list of matchers to filter alerts by",
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "A regex matching receivers to filter alerts by",
|
|
"name": "receiver",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "alertGroups",
|
|
"schema": {
|
|
"$ref": "#/definitions/alertGroups"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}": {
|
|
"get": {
|
|
"description": "get silence",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetSilence",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "SilenceId",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "gettableSilence",
|
|
"schema": {
|
|
"$ref": "#/definitions/gettableSilence"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "delete silence",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteDeleteSilence",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "SilenceId",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/silences": {
|
|
"get": {
|
|
"description": "get silences",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetSilences",
|
|
"parameters": [
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "gettableSilences",
|
|
"schema": {
|
|
"$ref": "#/definitions/gettableSilences"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create silence",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteCreateSilence",
|
|
"parameters": [
|
|
{
|
|
"name": "Silence",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/postableSilence"
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "gettableSilence",
|
|
"schema": {
|
|
"$ref": "#/definitions/gettableSilence"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/{DatasourceUID}/api/v2/status": {
|
|
"get": {
|
|
"description": "get alertmanager status and configuration",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetAMStatus",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "GettableStatus",
|
|
"schema": {
|
|
"$ref": "#/definitions/GettableStatus"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/{DatasourceUID}/config/api/v1/alerts": {
|
|
"get": {
|
|
"description": "gets an Alerting config",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteGetAlertingConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "GettableUserConfig",
|
|
"schema": {
|
|
"$ref": "#/definitions/GettableUserConfig"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "sets an Alerting config",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RoutePostAlertingConfig",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/PostableUserConfig"
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "deletes the Alerting config for a tenant",
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"operationId": "RouteDeleteAlertingConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/alertmanager/{DatasourceUID}/config/api/v1/receivers/test": {
|
|
"post": {
|
|
"tags": [
|
|
"alertmanager"
|
|
],
|
|
"summary": "Test Grafana managed receivers without saving them.",
|
|
"operationId": "RoutePostTestReceivers",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/TestReceiversConfigBodyParams"
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"207": {
|
|
"description": "MultiStatus",
|
|
"schema": {
|
|
"$ref": "#/definitions/MultiStatus"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "PermissionDenied",
|
|
"schema": {
|
|
"$ref": "#/definitions/PermissionDenied"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
},
|
|
"408": {
|
|
"description": "Failure",
|
|
"schema": {
|
|
"$ref": "#/definitions/Failure"
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "AlertManagerNotReady",
|
|
"schema": {
|
|
"$ref": "#/definitions/AlertManagerNotReady"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/prometheus/grafana/api/v1/alerts": {
|
|
"get": {
|
|
"description": "gets the current alerts",
|
|
"tags": [
|
|
"prometheus"
|
|
],
|
|
"operationId": "RouteGetGrafanaAlertStatuses",
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Include Grafana specific labels as part of the response.",
|
|
"name": "includeInternalLabels",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "AlertResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/AlertResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/prometheus/grafana/api/v1/rules": {
|
|
"get": {
|
|
"description": "gets the evaluation statuses of all rules",
|
|
"tags": [
|
|
"prometheus"
|
|
],
|
|
"operationId": "RouteGetGrafanaRuleStatuses",
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Include Grafana specific labels as part of the response.",
|
|
"name": "includeInternalLabels",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Filter the list of rules to those that belong to the specified dashboard UID.",
|
|
"name": "DashboardUID",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"description": "Filter the list of rules to those that belong to the specified panel ID. Dashboard UID must be specified.",
|
|
"name": "PanelID",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "RuleResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/RuleResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/prometheus/{DatasourceUID}/api/v1/alerts": {
|
|
"get": {
|
|
"description": "gets the current alerts",
|
|
"tags": [
|
|
"prometheus"
|
|
],
|
|
"operationId": "RouteGetAlertStatuses",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "AlertResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/AlertResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/prometheus/{DatasourceUID}/api/v1/rules": {
|
|
"get": {
|
|
"description": "gets the evaluation statuses of all rules",
|
|
"tags": [
|
|
"prometheus"
|
|
],
|
|
"operationId": "RouteGetRuleStatuses",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "RuleResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/RuleResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/ruler/grafana/api/v1/rules": {
|
|
"get": {
|
|
"description": "List rule groups",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteGetGrafanaRulesConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "DashboardUID",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"name": "PanelID",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "NamespaceConfigResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/NamespaceConfigResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/ruler/grafana/api/v1/rules/{Namespace}": {
|
|
"get": {
|
|
"description": "Get rule groups by namespace",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteGetNamespaceGrafanaRulesConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "NamespaceConfigResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/NamespaceConfigResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates or updates a rule group",
|
|
"consumes": [
|
|
"application/json",
|
|
"application/yaml"
|
|
],
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RoutePostNameGrafanaRulesConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/PostableRuleGroupConfig"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete namespace",
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteDeleteNamespaceGrafanaRulesConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/ruler/grafana/api/v1/rules/{Namespace}/{Groupname}": {
|
|
"get": {
|
|
"description": "Get rule group",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteGetGrafanaRuleGroupConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Groupname",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "RuleGroupConfigResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/RuleGroupConfigResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete rule group",
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteDeleteGrafanaRuleGroupConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Groupname",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/ruler/{DatasourceUID}/api/v1/rules": {
|
|
"get": {
|
|
"description": "List rule groups",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteGetRulesConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "DashboardUID",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"name": "PanelID",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "NamespaceConfigResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/NamespaceConfigResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}": {
|
|
"get": {
|
|
"description": "Get rule groups by namespace",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteGetNamespaceRulesConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "NamespaceConfigResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/NamespaceConfigResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates or updates a rule group",
|
|
"consumes": [
|
|
"application/json",
|
|
"application/yaml"
|
|
],
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RoutePostNameRulesConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/PostableRuleGroupConfig"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete namespace",
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteDeleteNamespaceRulesConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname}": {
|
|
"get": {
|
|
"description": "Get rule group",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteGetRulegGroupConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Groupname",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "RuleGroupConfigResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/RuleGroupConfigResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete rule group",
|
|
"tags": [
|
|
"ruler"
|
|
],
|
|
"operationId": "RouteDeleteRuleGroupConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Namespace",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Groupname",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/eval": {
|
|
"post": {
|
|
"description": "Test rule",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"testing"
|
|
],
|
|
"operationId": "RouteEvalQueries",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/EvalQueriesPayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "EvalQueriesResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/EvalQueriesResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/ngalert/admin_config": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"configuration"
|
|
],
|
|
"summary": "Get the NGalert configuration of the user's organization, returns 404 if no configuration is present.",
|
|
"operationId": "RouteGetNGalertConfig",
|
|
"responses": {
|
|
"200": {
|
|
"description": "GettableNGalertConfig",
|
|
"schema": {
|
|
"$ref": "#/definitions/GettableNGalertConfig"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Failure",
|
|
"schema": {
|
|
"$ref": "#/definitions/Failure"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failure",
|
|
"schema": {
|
|
"$ref": "#/definitions/Failure"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"configuration"
|
|
],
|
|
"summary": "Creates or updates the NGalert configuration of the user's organization. If no value is sent for alertmanagersChoice, it defaults to \"all\".",
|
|
"operationId": "RoutePostNGalertConfig",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/PostableNGalertConfig"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"configuration"
|
|
],
|
|
"summary": "Deletes the NGalert configuration of the user's organization.",
|
|
"operationId": "RouteDeleteNGalertConfig",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failure",
|
|
"schema": {
|
|
"$ref": "#/definitions/Failure"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/ngalert/alertmanagers": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"configuration"
|
|
],
|
|
"summary": "Get the discovered and dropped Alertmanagers of the user's organization based on the specified configuration.",
|
|
"operationId": "RouteGetAlertmanagers",
|
|
"responses": {
|
|
"200": {
|
|
"description": "GettableAlertmanagers",
|
|
"schema": {
|
|
"$ref": "#/definitions/GettableAlertmanagers"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/alert-rules": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Create a new alert rule.",
|
|
"operationId": "RoutePostAlertRule",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/ProvisionedAlertRule"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "ProvisionedAlertRule",
|
|
"schema": {
|
|
"$ref": "#/definitions/ProvisionedAlertRule"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/alert-rules/{UID}": {
|
|
"get": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Get a specific alert rule by UID.",
|
|
"operationId": "RouteGetAlertRule",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Alert rule UID",
|
|
"name": "UID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "ProvisionedAlertRule",
|
|
"schema": {
|
|
"$ref": "#/definitions/ProvisionedAlertRule"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": " Not found."
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Update an existing alert rule.",
|
|
"operationId": "RoutePutAlertRule",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Alert rule UID",
|
|
"name": "UID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/ProvisionedAlertRule"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "ProvisionedAlertRule",
|
|
"schema": {
|
|
"$ref": "#/definitions/ProvisionedAlertRule"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Delete a specific alert rule by UID.",
|
|
"operationId": "RouteDeleteAlertRule",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Alert rule UID",
|
|
"name": "UID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": " The alert rule was deleted successfully."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/contact-points": {
|
|
"get": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Get all the contact points.",
|
|
"operationId": "RouteGetContactpoints",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by name",
|
|
"name": "name",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "ContactPoints",
|
|
"schema": {
|
|
"$ref": "#/definitions/ContactPoints"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Create a contact point.",
|
|
"operationId": "RoutePostContactpoints",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/EmbeddedContactPoint"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "EmbeddedContactPoint",
|
|
"schema": {
|
|
"$ref": "#/definitions/EmbeddedContactPoint"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/contact-points/{UID}": {
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Update an existing contact point.",
|
|
"operationId": "RoutePutContactpoint",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "UID is the contact point unique identifier",
|
|
"name": "UID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/EmbeddedContactPoint"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Delete a contact point.",
|
|
"operationId": "RouteDeleteContactpoints",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "UID is the contact point unique identifier",
|
|
"name": "UID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": " The contact point was deleted successfully."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": {
|
|
"get": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Get a rule group.",
|
|
"operationId": "RouteGetAlertRuleGroup",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "FolderUID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Group",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "AlertRuleGroup",
|
|
"schema": {
|
|
"$ref": "#/definitions/AlertRuleGroup"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": " Not found."
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Update the interval of a rule group.",
|
|
"operationId": "RoutePutAlertRuleGroup",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "FolderUID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "Group",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/AlertRuleGroup"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "AlertRuleGroup",
|
|
"schema": {
|
|
"$ref": "#/definitions/AlertRuleGroup"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/mute-timings": {
|
|
"get": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Get all the mute timings.",
|
|
"operationId": "RouteGetMuteTimings",
|
|
"responses": {
|
|
"200": {
|
|
"description": "MuteTimings",
|
|
"schema": {
|
|
"$ref": "#/definitions/MuteTimings"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Create a new mute timing.",
|
|
"operationId": "RoutePostMuteTiming",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/MuteTimeInterval"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "MuteTimeInterval",
|
|
"schema": {
|
|
"$ref": "#/definitions/MuteTimeInterval"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/mute-timings/{name}": {
|
|
"get": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Get a mute timing.",
|
|
"operationId": "RouteGetMuteTiming",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Mute timing name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "MuteTimeInterval",
|
|
"schema": {
|
|
"$ref": "#/definitions/MuteTimeInterval"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": " Not found."
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Replace an existing mute timing.",
|
|
"operationId": "RoutePutMuteTiming",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Mute timing name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/MuteTimeInterval"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "MuteTimeInterval",
|
|
"schema": {
|
|
"$ref": "#/definitions/MuteTimeInterval"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Delete a mute timing.",
|
|
"operationId": "RouteDeleteMuteTiming",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Mute timing name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": " The mute timing was deleted successfully."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/policies": {
|
|
"get": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Get the notification policy tree.",
|
|
"operationId": "RouteGetPolicyTree",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Route",
|
|
"schema": {
|
|
"$ref": "#/definitions/Route"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Sets the notification policy tree.",
|
|
"operationId": "RoutePutPolicyTree",
|
|
"parameters": [
|
|
{
|
|
"description": "The new notification routing tree to use",
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/Route"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Clears the notification policy tree.",
|
|
"operationId": "RouteResetPolicyTree",
|
|
"responses": {
|
|
"202": {
|
|
"description": "Ack",
|
|
"schema": {
|
|
"$ref": "#/definitions/Ack"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/templates": {
|
|
"get": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Get all message templates.",
|
|
"operationId": "RouteGetTemplates",
|
|
"responses": {
|
|
"200": {
|
|
"description": "MessageTemplates",
|
|
"schema": {
|
|
"$ref": "#/definitions/MessageTemplates"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": " Not found."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/provisioning/templates/{name}": {
|
|
"get": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Get a message template.",
|
|
"operationId": "RouteGetTemplate",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Template Name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "MessageTemplate",
|
|
"schema": {
|
|
"$ref": "#/definitions/MessageTemplate"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": " Not found."
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Updates an existing template.",
|
|
"operationId": "RoutePutTemplate",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Template Name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/MessageTemplateContent"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "MessageTemplate",
|
|
"schema": {
|
|
"$ref": "#/definitions/MessageTemplate"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "ValidationError",
|
|
"schema": {
|
|
"$ref": "#/definitions/ValidationError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"provisioning",
|
|
"stable"
|
|
],
|
|
"summary": "Delete a template.",
|
|
"operationId": "RouteDeleteTemplate",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Template Name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": " The template was deleted successfully."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/rule/test/grafana": {
|
|
"post": {
|
|
"description": "Test a rule against Grafana ruler",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"testing"
|
|
],
|
|
"operationId": "RouteTestRuleGrafanaConfig",
|
|
"parameters": [
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/TestRulePayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "TestRuleResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/TestRuleResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/rule/test/{DatasourceUID}": {
|
|
"post": {
|
|
"description": "Test a rule against external data source ruler",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"testing"
|
|
],
|
|
"operationId": "RouteTestRuleConfig",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "DatasoureUID should be the datasource UID identifier",
|
|
"name": "DatasourceUID",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "Body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/TestRulePayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "TestRuleResponse",
|
|
"schema": {
|
|
"$ref": "#/definitions/TestRuleResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"$ref": "#/definitions/NotFound"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"Ack": {
|
|
"type": "object"
|
|
},
|
|
"Alert": {
|
|
"type": "object",
|
|
"title": "Alert has info for an alert.",
|
|
"required": [
|
|
"labels",
|
|
"annotations",
|
|
"state",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"activeAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"annotations": {
|
|
"$ref": "#/definitions/overrideLabels"
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/overrideLabels"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"AlertDiscovery": {
|
|
"type": "object",
|
|
"title": "AlertDiscovery has info for all active alerts.",
|
|
"required": [
|
|
"alerts"
|
|
],
|
|
"properties": {
|
|
"alerts": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Alert"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"AlertInstancesResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"instances": {
|
|
"description": "Instances is an array of arrow encoded dataframes\neach frame has a single row, and a column for each instance (alert identified by unique labels) with a boolean value (firing/not firing)",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"format": "uint8"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"AlertManager": {
|
|
"type": "object",
|
|
"title": "AlertManager models a configured Alert Manager.",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"AlertManagerNotReady": {
|
|
"type": "object"
|
|
},
|
|
"AlertManagersResult": {
|
|
"type": "object",
|
|
"title": "AlertManagersResult contains the result from querying the alertmanagers endpoint.",
|
|
"properties": {
|
|
"activeAlertManagers": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/AlertManager"
|
|
}
|
|
},
|
|
"droppedAlertManagers": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/AlertManager"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"AlertQuery": {
|
|
"type": "object",
|
|
"title": "AlertQuery represents a single query associated with an alert definition.",
|
|
"properties": {
|
|
"datasourceUid": {
|
|
"description": "Grafana data source unique identifier; it should be '-100' for a Server Side Expression operation.",
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"description": "JSON is the raw JSON query and includes the above properties as well as custom properties.",
|
|
"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"
|
|
},
|
|
"refId": {
|
|
"description": "RefID is the unique identifier of the query, set by the frontend call.",
|
|
"type": "string"
|
|
},
|
|
"relativeTimeRange": {
|
|
"$ref": "#/definitions/RelativeTimeRange"
|
|
}
|
|
}
|
|
},
|
|
"AlertResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/AlertDiscovery"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"errorType": {
|
|
"$ref": "#/definitions/ErrorType"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"AlertRuleGroup": {
|
|
"type": "object",
|
|
"properties": {
|
|
"folderUid": {
|
|
"type": "string"
|
|
},
|
|
"interval": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/ProvisionedAlertRule"
|
|
}
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"AlertRuleGroupMetadata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"AlertStateType": {
|
|
"type": "string"
|
|
},
|
|
"AlertingRule": {
|
|
"description": "adapted from cortex",
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"query",
|
|
"health",
|
|
"type",
|
|
"state",
|
|
"annotations",
|
|
"alerts"
|
|
],
|
|
"properties": {
|
|
"alerts": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Alert"
|
|
}
|
|
},
|
|
"annotations": {
|
|
"$ref": "#/definitions/overrideLabels"
|
|
},
|
|
"duration": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"evaluationTime": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"health": {
|
|
"type": "string"
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/overrideLabels"
|
|
},
|
|
"lastError": {
|
|
"type": "string"
|
|
},
|
|
"lastEvaluation": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"description": "State can be \"pending\", \"firing\", \"inactive\".",
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/RuleType"
|
|
}
|
|
}
|
|
},
|
|
"ApiRuleNode": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alert": {
|
|
"type": "string"
|
|
},
|
|
"annotations": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"expr": {
|
|
"type": "string"
|
|
},
|
|
"for": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"labels": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"record": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Authorization": {
|
|
"type": "object",
|
|
"title": "Authorization contains HTTP authorization credentials.",
|
|
"properties": {
|
|
"credentials": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"credentials_file": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"BasicAuth": {
|
|
"type": "object",
|
|
"title": "BasicAuth contains basic HTTP authentication credentials.",
|
|
"properties": {
|
|
"password": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"password_file": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"ConfFloat64": {
|
|
"description": "ConfFloat64 is a float64. It Marshals float64 values of NaN of Inf\nto null.",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"Config": {
|
|
"type": "object",
|
|
"title": "Config is the top-level configuration for Alertmanager's config files.",
|
|
"properties": {
|
|
"global": {
|
|
"$ref": "#/definitions/GlobalConfig"
|
|
},
|
|
"inhibit_rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/InhibitRule"
|
|
}
|
|
},
|
|
"mute_time_intervals": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/MuteTimeInterval"
|
|
}
|
|
},
|
|
"route": {
|
|
"$ref": "#/definitions/Route"
|
|
},
|
|
"templates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ContactPoints": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/EmbeddedContactPoint"
|
|
}
|
|
},
|
|
"DataLink": {
|
|
"description": "DataLink define what",
|
|
"type": "object",
|
|
"properties": {
|
|
"targetBlank": {
|
|
"type": "boolean"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"DataResponse": {
|
|
"description": "A map of RefIDs (unique query identifiers) to this type makes up the Responses property of a QueryDataResponse.\nThe Error property is used to allow for partial success responses from the containing QueryDataResponse.",
|
|
"type": "object",
|
|
"title": "DataResponse contains the results from a DataQuery.",
|
|
"properties": {
|
|
"Error": {
|
|
"description": "Error is a property to be set if the the corresponding DataQuery has an error.",
|
|
"type": "string"
|
|
},
|
|
"Frames": {
|
|
"$ref": "#/definitions/Frames"
|
|
}
|
|
}
|
|
},
|
|
"DataTopic": {
|
|
"type": "string",
|
|
"title": "DataTopic is used to identify which topic the frame should be assigned to."
|
|
},
|
|
"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"
|
|
},
|
|
"DayOfMonthRange": {
|
|
"type": "object",
|
|
"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.",
|
|
"properties": {
|
|
"Begin": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"End": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"DiscoveryBase": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"errorType": {
|
|
"$ref": "#/definitions/ErrorType"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"DsPermissionType": {
|
|
"description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\nEnum: 0,1",
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"Duration": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"title": "Duration is a type used for marshalling durations.",
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"EmailConfig": {
|
|
"type": "object",
|
|
"title": "EmailConfig configures notifications via mail.",
|
|
"properties": {
|
|
"auth_identity": {
|
|
"type": "string"
|
|
},
|
|
"auth_password": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"auth_secret": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"auth_username": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"hello": {
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"type": "string"
|
|
},
|
|
"require_tls": {
|
|
"type": "boolean"
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"smarthost": {
|
|
"$ref": "#/definitions/HostPort"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"tls_config": {
|
|
"$ref": "#/definitions/TLSConfig"
|
|
},
|
|
"to": {
|
|
"description": "Email address to notify.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"EmbeddedContactPoint": {
|
|
"description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.",
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"settings"
|
|
],
|
|
"properties": {
|
|
"disableResolveMessage": {
|
|
"type": "boolean",
|
|
"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",
|
|
"example": "webhook_1"
|
|
},
|
|
"provenance": {
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"settings": {
|
|
"$ref": "#/definitions/Json"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"alertmanager",
|
|
" dingding",
|
|
" discord",
|
|
" email",
|
|
" googlechat",
|
|
" kafka",
|
|
" line",
|
|
" opsgenie",
|
|
" pagerduty",
|
|
" pushover",
|
|
" sensugo",
|
|
" slack",
|
|
" teams",
|
|
" telegram",
|
|
" threema",
|
|
" victorops",
|
|
" webhook",
|
|
" wecom"
|
|
],
|
|
"example": "webhook"
|
|
},
|
|
"uid": {
|
|
"description": "UID is the unique identifier of the contact point. The UID can be\nset by the user.",
|
|
"type": "string",
|
|
"example": "my_external_reference"
|
|
}
|
|
}
|
|
},
|
|
"ErrorType": {
|
|
"type": "string",
|
|
"title": "ErrorType models the different API error types."
|
|
},
|
|
"EvalAlertConditionCommand": {
|
|
"description": "EvalAlertConditionCommand is the command for evaluating a condition",
|
|
"type": "object",
|
|
"properties": {
|
|
"condition": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/AlertQuery"
|
|
}
|
|
},
|
|
"now": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"EvalQueriesPayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/AlertQuery"
|
|
}
|
|
},
|
|
"now": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"EvalQueriesResponse": {
|
|
"$ref": "#/definitions/EvalQueriesResponse"
|
|
},
|
|
"ExtendedReceiver": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email_configs": {
|
|
"$ref": "#/definitions/EmailConfig"
|
|
},
|
|
"grafana_managed_receiver": {
|
|
"$ref": "#/definitions/PostableGrafanaReceiver"
|
|
},
|
|
"opsgenie_configs": {
|
|
"$ref": "#/definitions/OpsGenieConfig"
|
|
},
|
|
"pagerduty_configs": {
|
|
"$ref": "#/definitions/PagerdutyConfig"
|
|
},
|
|
"pushover_configs": {
|
|
"$ref": "#/definitions/PushoverConfig"
|
|
},
|
|
"slack_configs": {
|
|
"$ref": "#/definitions/SlackConfig"
|
|
},
|
|
"victorops_configs": {
|
|
"$ref": "#/definitions/VictorOpsConfig"
|
|
},
|
|
"webhook_configs": {
|
|
"$ref": "#/definitions/WebhookConfig"
|
|
},
|
|
"wechat_configs": {
|
|
"$ref": "#/definitions/WechatConfig"
|
|
}
|
|
}
|
|
},
|
|
"Failure": {
|
|
"$ref": "#/definitions/ResponseDetails"
|
|
},
|
|
"Field": {
|
|
"description": "A Field is essentially a slice of various types with extra properties and methods.\nSee NewField() for supported types.\n\nThe slice data in the Field is a not exported, so methods on the Field are used to to manipulate its data.",
|
|
"type": "object",
|
|
"title": "Field represents a typed column of data within a Frame.",
|
|
"properties": {
|
|
"config": {
|
|
"$ref": "#/definitions/FieldConfig"
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/FrameLabels"
|
|
},
|
|
"name": {
|
|
"description": "Name is default identifier of the field. The name does not have to be unique, but the combination\nof name and Labels should be unique for proper behavior in all situations.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"FieldConfig": {
|
|
"type": "object",
|
|
"title": "FieldConfig represents the display properties for a Field.",
|
|
"properties": {
|
|
"color": {
|
|
"description": "Map values to a display color\nNOTE: this interface is under development in the frontend... so simple map for now",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"custom": {
|
|
"description": "Panel Specific Values",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"decimals": {
|
|
"type": "integer",
|
|
"format": "uint16"
|
|
},
|
|
"description": {
|
|
"description": "Description is human readable field metadata",
|
|
"type": "string"
|
|
},
|
|
"displayName": {
|
|
"description": "DisplayName overrides Grafana default naming, should not be used from a data source",
|
|
"type": "string"
|
|
},
|
|
"displayNameFromDS": {
|
|
"description": "DisplayNameFromDS overrides Grafana default naming in a better way that allows users to override it easily.",
|
|
"type": "string"
|
|
},
|
|
"filterable": {
|
|
"description": "Filterable indicates if the Field's data can be filtered by additional calls.",
|
|
"type": "boolean"
|
|
},
|
|
"interval": {
|
|
"description": "Interval indicates the expected regular step between values in the series.\nWhen an interval exists, consumers can identify \"missing\" values when the expected value is not present.\nThe grafana timeseries visualization will render disconnected values when missing values are found it the time field.\nThe interval uses the same units as the values. For time.Time, this is defined in milliseconds.",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"links": {
|
|
"description": "The behavior when clicking on a result",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/DataLink"
|
|
}
|
|
},
|
|
"mappings": {
|
|
"$ref": "#/definitions/ValueMappings"
|
|
},
|
|
"max": {
|
|
"$ref": "#/definitions/ConfFloat64"
|
|
},
|
|
"min": {
|
|
"$ref": "#/definitions/ConfFloat64"
|
|
},
|
|
"noValue": {
|
|
"description": "Alternative to empty string",
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"description": "Path is an explicit path to the field in the datasource. When the frame meta includes a path,\nthis will default to `${frame.meta.path}/${field.name}\n\nWhen defined, this value can be used as an identifier within the datasource scope, and\nmay be used as an identifier to update values in a subsequent request",
|
|
"type": "string"
|
|
},
|
|
"thresholds": {
|
|
"$ref": "#/definitions/ThresholdsConfig"
|
|
},
|
|
"unit": {
|
|
"description": "Numeric Options",
|
|
"type": "string"
|
|
},
|
|
"writeable": {
|
|
"description": "Writeable indicates that the datasource knows how to update this value",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"Frame": {
|
|
"description": "Each Field is well typed by its FieldType and supports optional Labels.\n\nA Frame is a general data container for Grafana. A Frame can be table data\nor time series data depending on its content and field types.",
|
|
"type": "object",
|
|
"title": "Frame is a columnar data structure where each column is a Field.",
|
|
"properties": {
|
|
"Fields": {
|
|
"description": "Fields are the columns of a frame.\nAll Fields must be of the same the length when marshalling the Frame for transmission.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Field"
|
|
}
|
|
},
|
|
"Meta": {
|
|
"$ref": "#/definitions/FrameMeta"
|
|
},
|
|
"Name": {
|
|
"description": "Name is used in some Grafana visualizations.",
|
|
"type": "string"
|
|
},
|
|
"RefID": {
|
|
"description": "RefID is a property that can be set to match a Frame to its originating query.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"FrameLabels": {
|
|
"description": "Labels are used to add metadata to an object. The JSON will always be sorted keys",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"FrameMeta": {
|
|
"description": "https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L11\nNOTE -- in javascript this can accept any `[key: string]: any;` however\nthis interface only exposes the values we want to be exposed",
|
|
"type": "object",
|
|
"title": "FrameMeta matches:",
|
|
"properties": {
|
|
"channel": {
|
|
"description": "Channel is the path to a stream in grafana live that has real-time updates for this data.",
|
|
"type": "string"
|
|
},
|
|
"custom": {
|
|
"description": "Custom datasource specific values.",
|
|
"type": "object"
|
|
},
|
|
"dataTopic": {
|
|
"$ref": "#/definitions/DataTopic"
|
|
},
|
|
"executedQueryString": {
|
|
"description": "ExecutedQueryString is the raw query sent to the underlying system. All macros and templating\nhave been applied. When metadata contains this value, it will be shown in the query inspector.",
|
|
"type": "string"
|
|
},
|
|
"notices": {
|
|
"description": "Notices provide additional information about the data in the Frame that\nGrafana can display to the user in the user interface.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Notice"
|
|
}
|
|
},
|
|
"path": {
|
|
"description": "Path is a browsable path on the datasource.",
|
|
"type": "string"
|
|
},
|
|
"pathSeparator": {
|
|
"description": "PathSeparator defines the separator pattern to decode a hierarchy. The default separator is '/'.",
|
|
"type": "string"
|
|
},
|
|
"preferredVisualisationType": {
|
|
"$ref": "#/definitions/VisType"
|
|
},
|
|
"stats": {
|
|
"description": "Stats is an array of query result statistics.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/QueryStat"
|
|
}
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/FrameType"
|
|
}
|
|
}
|
|
},
|
|
"FrameType": {
|
|
"description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.",
|
|
"type": "string"
|
|
},
|
|
"Frames": {
|
|
"description": "It is the main data container within a backend.DataResponse.",
|
|
"type": "array",
|
|
"title": "Frames is a slice of Frame pointers.",
|
|
"items": {
|
|
"$ref": "#/definitions/Frame"
|
|
}
|
|
},
|
|
"GettableAlertmanagers": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/AlertManagersResult"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"GettableApiAlertingConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"global": {
|
|
"$ref": "#/definitions/GlobalConfig"
|
|
},
|
|
"inhibit_rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/InhibitRule"
|
|
}
|
|
},
|
|
"muteTimeProvenances": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/Provenance"
|
|
}
|
|
},
|
|
"mute_time_intervals": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/MuteTimeInterval"
|
|
}
|
|
},
|
|
"receivers": {
|
|
"description": "Override with our superset receiver type",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/GettableApiReceiver"
|
|
}
|
|
},
|
|
"route": {
|
|
"$ref": "#/definitions/Route"
|
|
},
|
|
"templates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"GettableApiReceiver": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/EmailConfig"
|
|
}
|
|
},
|
|
"grafana_managed_receiver_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/GettableGrafanaReceiver"
|
|
}
|
|
},
|
|
"name": {
|
|
"description": "A unique identifier for this receiver.",
|
|
"type": "string"
|
|
},
|
|
"opsgenie_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/OpsGenieConfig"
|
|
}
|
|
},
|
|
"pagerduty_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PagerdutyConfig"
|
|
}
|
|
},
|
|
"pushover_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PushoverConfig"
|
|
}
|
|
},
|
|
"slack_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SlackConfig"
|
|
}
|
|
},
|
|
"sns_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SNSConfig"
|
|
}
|
|
},
|
|
"telegram_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/TelegramConfig"
|
|
}
|
|
},
|
|
"victorops_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/VictorOpsConfig"
|
|
}
|
|
},
|
|
"webhook_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WebhookConfig"
|
|
}
|
|
},
|
|
"wechat_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WechatConfig"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"GettableExtendedRuleNode": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alert": {
|
|
"type": "string"
|
|
},
|
|
"annotations": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"expr": {
|
|
"type": "string"
|
|
},
|
|
"for": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"grafana_alert": {
|
|
"$ref": "#/definitions/GettableGrafanaRule"
|
|
},
|
|
"labels": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"record": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"GettableGrafanaReceiver": {
|
|
"type": "object",
|
|
"properties": {
|
|
"disableResolveMessage": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"provenance": {
|
|
"$ref": "#/definitions/Provenance"
|
|
},
|
|
"secureFields": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"settings": {
|
|
"$ref": "#/definitions/Json"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"GettableGrafanaReceivers": {
|
|
"type": "object",
|
|
"properties": {
|
|
"grafana_managed_receiver_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/GettableGrafanaReceiver"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"GettableGrafanaRule": {
|
|
"type": "object",
|
|
"properties": {
|
|
"condition": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/AlertQuery"
|
|
}
|
|
},
|
|
"exec_err_state": {
|
|
"type": "string",
|
|
"enum": [
|
|
"OK",
|
|
"Alerting",
|
|
"Error"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"intervalSeconds": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"namespace_id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"namespace_uid": {
|
|
"type": "string"
|
|
},
|
|
"no_data_state": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Alerting",
|
|
"NoData",
|
|
"OK"
|
|
]
|
|
},
|
|
"orgId": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"provenance": {
|
|
"$ref": "#/definitions/Provenance"
|
|
},
|
|
"rule_group": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
},
|
|
"updated": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"version": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"GettableNGalertConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alertmanagers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"alertmanagersChoice": {
|
|
"type": "string",
|
|
"enum": [
|
|
"all",
|
|
"internal",
|
|
"external"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"GettableRuleGroupConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/GettableExtendedRuleNode"
|
|
}
|
|
},
|
|
"source_tenants": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"GettableStatus": {
|
|
"type": "object",
|
|
"required": [
|
|
"cluster",
|
|
"config",
|
|
"uptime",
|
|
"versionInfo"
|
|
],
|
|
"properties": {
|
|
"cluster": {
|
|
"$ref": "#/definitions/clusterStatus"
|
|
},
|
|
"config": {
|
|
"$ref": "#/definitions/PostableApiAlertingConfig"
|
|
},
|
|
"uptime": {
|
|
"description": "uptime",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"versionInfo": {
|
|
"$ref": "#/definitions/versionInfo"
|
|
}
|
|
}
|
|
},
|
|
"GettableUserConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alertmanager_config": {
|
|
"$ref": "#/definitions/GettableApiAlertingConfig"
|
|
},
|
|
"template_file_provenances": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/Provenance"
|
|
}
|
|
},
|
|
"template_files": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"GlobalConfig": {
|
|
"description": "GlobalConfig defines configuration parameters that are valid globally\nunless overwritten.",
|
|
"type": "object",
|
|
"properties": {
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"opsgenie_api_key": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"opsgenie_api_key_file": {
|
|
"type": "string"
|
|
},
|
|
"opsgenie_api_url": {
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"pagerduty_url": {
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"resolve_timeout": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"slack_api_url": {
|
|
"$ref": "#/definitions/SecretURL"
|
|
},
|
|
"slack_api_url_file": {
|
|
"type": "string"
|
|
},
|
|
"smtp_auth_identity": {
|
|
"type": "string"
|
|
},
|
|
"smtp_auth_password": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"smtp_auth_secret": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"smtp_auth_username": {
|
|
"type": "string"
|
|
},
|
|
"smtp_from": {
|
|
"type": "string"
|
|
},
|
|
"smtp_hello": {
|
|
"type": "string"
|
|
},
|
|
"smtp_require_tls": {
|
|
"type": "boolean"
|
|
},
|
|
"smtp_smarthost": {
|
|
"$ref": "#/definitions/HostPort"
|
|
},
|
|
"telegram_api_url": {
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"victorops_api_key": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"victorops_api_url": {
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"wechat_api_corp_id": {
|
|
"type": "string"
|
|
},
|
|
"wechat_api_secret": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"wechat_api_url": {
|
|
"$ref": "#/definitions/URL"
|
|
}
|
|
}
|
|
},
|
|
"HTTPClientConfig": {
|
|
"type": "object",
|
|
"title": "HTTPClientConfig configures an HTTP client.",
|
|
"properties": {
|
|
"authorization": {
|
|
"$ref": "#/definitions/Authorization"
|
|
},
|
|
"basic_auth": {
|
|
"$ref": "#/definitions/BasicAuth"
|
|
},
|
|
"bearer_token": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"bearer_token_file": {
|
|
"description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.",
|
|
"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"
|
|
},
|
|
"oauth2": {
|
|
"$ref": "#/definitions/OAuth2"
|
|
},
|
|
"proxy_url": {
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"tls_config": {
|
|
"$ref": "#/definitions/TLSConfig"
|
|
}
|
|
}
|
|
},
|
|
"HostPort": {
|
|
"type": "object",
|
|
"title": "HostPort represents a \"host:port\" network address.",
|
|
"properties": {
|
|
"Host": {
|
|
"type": "string"
|
|
},
|
|
"Port": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"InclusiveRange": {
|
|
"type": "object",
|
|
"title": "InclusiveRange is used to hold the Beginning and End values of many time interval components.",
|
|
"properties": {
|
|
"Begin": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"End": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"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.",
|
|
"type": "object",
|
|
"properties": {
|
|
"equal": {
|
|
"$ref": "#/definitions/LabelNames"
|
|
},
|
|
"source_match": {
|
|
"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",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"source_match_re": {
|
|
"$ref": "#/definitions/MatchRegexps"
|
|
},
|
|
"source_matchers": {
|
|
"$ref": "#/definitions/Matchers"
|
|
},
|
|
"target_match": {
|
|
"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",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"target_match_re": {
|
|
"$ref": "#/definitions/MatchRegexps"
|
|
},
|
|
"target_matchers": {
|
|
"$ref": "#/definitions/Matchers"
|
|
}
|
|
}
|
|
},
|
|
"InspectType": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"title": "InspectType is a type for the Inspect property of a Notice."
|
|
},
|
|
"Json": {
|
|
"type": "object"
|
|
},
|
|
"Label": {
|
|
"type": "object",
|
|
"title": "Label is a key/value pair of strings.",
|
|
"properties": {
|
|
"Name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"LabelName": {
|
|
"description": "A LabelName is a key for a LabelSet or Metric. It has a value associated\ntherewith.",
|
|
"type": "string"
|
|
},
|
|
"LabelNames": {
|
|
"type": "array",
|
|
"title": "LabelNames is a sortable LabelName slice. In implements sort.Interface.",
|
|
"items": {
|
|
"$ref": "#/definitions/LabelName"
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"LabelValue": {
|
|
"type": "string",
|
|
"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"
|
|
}
|
|
},
|
|
"LegacyAlert": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Created": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"DashboardId": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"EvalData": {
|
|
"$ref": "#/definitions/Json"
|
|
},
|
|
"ExecutionError": {
|
|
"type": "string"
|
|
},
|
|
"For": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"Frequency": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"Handler": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"Id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"Message": {
|
|
"type": "string"
|
|
},
|
|
"Name": {
|
|
"type": "string"
|
|
},
|
|
"NewStateDate": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"OrgId": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"PanelId": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"Settings": {
|
|
"$ref": "#/definitions/Json"
|
|
},
|
|
"Severity": {
|
|
"type": "string"
|
|
},
|
|
"Silenced": {
|
|
"type": "boolean"
|
|
},
|
|
"State": {
|
|
"$ref": "#/definitions/AlertStateType"
|
|
},
|
|
"StateChanges": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"Updated": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"Version": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"MatchRegexps": {
|
|
"type": "object",
|
|
"title": "MatchRegexps represents a map of Regexp.",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/Regexp"
|
|
}
|
|
},
|
|
"MatchType": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"title": "MatchType is an enum for label matching types."
|
|
},
|
|
"Matcher": {
|
|
"type": "object",
|
|
"title": "Matcher models the matching of a label.",
|
|
"properties": {
|
|
"Name": {
|
|
"type": "string"
|
|
},
|
|
"Type": {
|
|
"$ref": "#/definitions/MatchType"
|
|
},
|
|
"Value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"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.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Matcher"
|
|
},
|
|
"$ref": "#/definitions/Matchers"
|
|
},
|
|
"MessageTemplate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"provenance": {
|
|
"$ref": "#/definitions/Provenance"
|
|
},
|
|
"template": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"MessageTemplateContent": {
|
|
"type": "object",
|
|
"properties": {
|
|
"template": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"MessageTemplates": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/MessageTemplate"
|
|
}
|
|
},
|
|
"MonthRange": {
|
|
"type": "object",
|
|
"title": "A MonthRange is an inclusive range between [1, 12] where 1 = January.",
|
|
"properties": {
|
|
"Begin": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"End": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"MultiStatus": {
|
|
"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"
|
|
},
|
|
"time_intervals": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/TimeInterval"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"MuteTimings": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/MuteTimeInterval"
|
|
}
|
|
},
|
|
"NamespaceConfigResponse": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/GettableRuleGroupConfig"
|
|
}
|
|
}
|
|
},
|
|
"NotFound": {
|
|
"type": "object"
|
|
},
|
|
"Notice": {
|
|
"type": "object",
|
|
"title": "Notice provides a structure for presenting notifications in Grafana's user interface.",
|
|
"properties": {
|
|
"inspect": {
|
|
"$ref": "#/definitions/InspectType"
|
|
},
|
|
"link": {
|
|
"description": "Link is an optional link for display in the user interface and can be an\nabsolute URL or a path relative to Grafana's root url.",
|
|
"type": "string"
|
|
},
|
|
"severity": {
|
|
"$ref": "#/definitions/NoticeSeverity"
|
|
},
|
|
"text": {
|
|
"description": "Text is freeform descriptive text for the notice.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"NoticeSeverity": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"title": "NoticeSeverity is a type for the Severity property of a Notice."
|
|
},
|
|
"NotifierConfig": {
|
|
"type": "object",
|
|
"title": "NotifierConfig contains base options common across all notifier configurations.",
|
|
"properties": {
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"OAuth2": {
|
|
"type": "object",
|
|
"title": "OAuth2 is the oauth2 client configuration.",
|
|
"properties": {
|
|
"TLSConfig": {
|
|
"$ref": "#/definitions/TLSConfig"
|
|
},
|
|
"client_id": {
|
|
"type": "string"
|
|
},
|
|
"client_secret": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"client_secret_file": {
|
|
"type": "string"
|
|
},
|
|
"endpoint_params": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"scopes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"token_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"ObjectMatchers": {
|
|
"description": "ObjectMatchers is Matchers with a different Unmarshal and Marshal methods that accept matchers as objects\nthat have already been parsed.",
|
|
"$ref": "#/definitions/Matchers"
|
|
},
|
|
"OpsGenieConfig": {
|
|
"type": "object",
|
|
"title": "OpsGenieConfig configures notifications via OpsGenie.",
|
|
"properties": {
|
|
"actions": {
|
|
"type": "string"
|
|
},
|
|
"api_key": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"api_key_file": {
|
|
"type": "string"
|
|
},
|
|
"api_url": {
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"entity": {
|
|
"type": "string"
|
|
},
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"note": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": "string"
|
|
},
|
|
"responders": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/OpsGenieConfigResponder"
|
|
}
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"source": {
|
|
"type": "string"
|
|
},
|
|
"tags": {
|
|
"type": "string"
|
|
},
|
|
"update_alerts": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"OpsGenieConfigResponder": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "One of those 3 should be filled.",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"description": "team, user, escalation, schedule etc.",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PagerdutyConfig": {
|
|
"type": "object",
|
|
"title": "PagerdutyConfig configures notifications via PagerDuty.",
|
|
"properties": {
|
|
"class": {
|
|
"type": "string"
|
|
},
|
|
"client": {
|
|
"type": "string"
|
|
},
|
|
"client_url": {
|
|
"type": "string"
|
|
},
|
|
"component": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"group": {
|
|
"type": "string"
|
|
},
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"images": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PagerdutyImage"
|
|
}
|
|
},
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PagerdutyLink"
|
|
}
|
|
},
|
|
"routing_key": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"service_key": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"severity": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"$ref": "#/definitions/URL"
|
|
}
|
|
}
|
|
},
|
|
"PagerdutyImage": {
|
|
"description": "PagerdutyImage is an image",
|
|
"type": "object",
|
|
"properties": {
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"href": {
|
|
"type": "string"
|
|
},
|
|
"src": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PagerdutyLink": {
|
|
"description": "PagerdutyLink is a link",
|
|
"type": "object",
|
|
"properties": {
|
|
"href": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PermissionDenied": {
|
|
"type": "object"
|
|
},
|
|
"Point": {
|
|
"type": "object",
|
|
"title": "Point represents a single data point for a given timestamp.",
|
|
"properties": {
|
|
"T": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"V": {
|
|
"type": "number",
|
|
"format": "double"
|
|
}
|
|
}
|
|
},
|
|
"PostableApiAlertingConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"global": {
|
|
"$ref": "#/definitions/GlobalConfig"
|
|
},
|
|
"inhibit_rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/InhibitRule"
|
|
}
|
|
},
|
|
"mute_time_intervals": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/MuteTimeInterval"
|
|
}
|
|
},
|
|
"receivers": {
|
|
"description": "Override with our superset receiver type",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PostableApiReceiver"
|
|
}
|
|
},
|
|
"route": {
|
|
"$ref": "#/definitions/Route"
|
|
},
|
|
"templates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PostableApiReceiver": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/EmailConfig"
|
|
}
|
|
},
|
|
"grafana_managed_receiver_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PostableGrafanaReceiver"
|
|
}
|
|
},
|
|
"name": {
|
|
"description": "A unique identifier for this receiver.",
|
|
"type": "string"
|
|
},
|
|
"opsgenie_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/OpsGenieConfig"
|
|
}
|
|
},
|
|
"pagerduty_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PagerdutyConfig"
|
|
}
|
|
},
|
|
"pushover_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PushoverConfig"
|
|
}
|
|
},
|
|
"slack_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SlackConfig"
|
|
}
|
|
},
|
|
"sns_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SNSConfig"
|
|
}
|
|
},
|
|
"telegram_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/TelegramConfig"
|
|
}
|
|
},
|
|
"victorops_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/VictorOpsConfig"
|
|
}
|
|
},
|
|
"webhook_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WebhookConfig"
|
|
}
|
|
},
|
|
"wechat_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WechatConfig"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PostableExtendedRuleNode": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alert": {
|
|
"type": "string"
|
|
},
|
|
"annotations": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"expr": {
|
|
"type": "string"
|
|
},
|
|
"for": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"grafana_alert": {
|
|
"$ref": "#/definitions/PostableGrafanaRule"
|
|
},
|
|
"labels": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"record": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PostableGrafanaReceiver": {
|
|
"type": "object",
|
|
"properties": {
|
|
"disableResolveMessage": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"secureSettings": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"settings": {
|
|
"$ref": "#/definitions/Json"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PostableGrafanaReceivers": {
|
|
"type": "object",
|
|
"properties": {
|
|
"grafana_managed_receiver_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PostableGrafanaReceiver"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PostableGrafanaRule": {
|
|
"type": "object",
|
|
"properties": {
|
|
"condition": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/AlertQuery"
|
|
}
|
|
},
|
|
"exec_err_state": {
|
|
"type": "string",
|
|
"enum": [
|
|
"OK",
|
|
"Alerting",
|
|
"Error"
|
|
]
|
|
},
|
|
"no_data_state": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Alerting",
|
|
"NoData",
|
|
"OK"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PostableNGalertConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alertmanagers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"alertmanagersChoice": {
|
|
"type": "string",
|
|
"enum": [
|
|
"all",
|
|
"internal",
|
|
"external"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"PostableRuleGroupConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PostableExtendedRuleNode"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PostableUserConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alertmanager_config": {
|
|
"$ref": "#/definitions/PostableApiAlertingConfig"
|
|
},
|
|
"template_files": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Provenance": {
|
|
"type": "string"
|
|
},
|
|
"ProvisionedAlertRule": {
|
|
"type": "object",
|
|
"required": [
|
|
"orgID",
|
|
"folderUID",
|
|
"ruleGroup",
|
|
"title",
|
|
"condition",
|
|
"data",
|
|
"noDataState",
|
|
"execErrState",
|
|
"for"
|
|
],
|
|
"properties": {
|
|
"annotations": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"example": {
|
|
"runbook_url": "https://supercoolrunbook.com/page/13"
|
|
}
|
|
},
|
|
"condition": {
|
|
"type": "string",
|
|
"example": "A"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/AlertQuery"
|
|
},
|
|
"example": [
|
|
{
|
|
"datasourceUid": "-100",
|
|
"model": {
|
|
"conditions": [
|
|
{
|
|
"evaluator": {
|
|
"params": [
|
|
0,
|
|
0
|
|
],
|
|
"type": "gt"
|
|
},
|
|
"operator": {
|
|
"type": "and"
|
|
},
|
|
"query": {
|
|
"params": []
|
|
},
|
|
"reducer": {
|
|
"params": [],
|
|
"type": "avg"
|
|
},
|
|
"type": "query"
|
|
}
|
|
],
|
|
"datasource": {
|
|
"type": "__expr__",
|
|
"uid": "__expr__"
|
|
},
|
|
"expression": "1 == 1",
|
|
"hide": false,
|
|
"intervalMs": 1000,
|
|
"maxDataPoints": 43200,
|
|
"refId": "A",
|
|
"type": "math"
|
|
},
|
|
"queryType": "",
|
|
"refId": "A",
|
|
"relativeTimeRange": {
|
|
"from": 0,
|
|
"to": 0
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"execErrState": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Alerting",
|
|
"Error",
|
|
"OK"
|
|
]
|
|
},
|
|
"folderUID": {
|
|
"type": "string",
|
|
"example": "project_x"
|
|
},
|
|
"for": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"labels": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"example": {
|
|
"team": "sre-team-1"
|
|
}
|
|
},
|
|
"noDataState": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Alerting",
|
|
"NoData",
|
|
"OK"
|
|
]
|
|
},
|
|
"orgID": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"provenance": {
|
|
"$ref": "#/definitions/Provenance"
|
|
},
|
|
"ruleGroup": {
|
|
"type": "string",
|
|
"maxLength": 190,
|
|
"minLength": 1,
|
|
"example": "eval_group_1"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"maxLength": 190,
|
|
"minLength": 1,
|
|
"example": "Always firing"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
},
|
|
"updated": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"readOnly": true
|
|
}
|
|
}
|
|
},
|
|
"PushoverConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"expire": {
|
|
"$ref": "#/definitions/duration"
|
|
},
|
|
"html": {
|
|
"type": "boolean"
|
|
},
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": "string"
|
|
},
|
|
"retry": {
|
|
"$ref": "#/definitions/duration"
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"sound": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"url_title": {
|
|
"type": "string"
|
|
},
|
|
"user_key": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
},
|
|
"QueryStat": {
|
|
"description": "The embedded FieldConfig's display name must be set.\nIt corresponds to the QueryResultMetaStat on the frontend (https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L53).",
|
|
"type": "object",
|
|
"title": "QueryStat is used for storing arbitrary statistics metadata related to a query and its result, e.g. total request time, data processing time.",
|
|
"properties": {
|
|
"color": {
|
|
"description": "Map values to a display color\nNOTE: this interface is under development in the frontend... so simple map for now",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"custom": {
|
|
"description": "Panel Specific Values",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"decimals": {
|
|
"type": "integer",
|
|
"format": "uint16"
|
|
},
|
|
"description": {
|
|
"description": "Description is human readable field metadata",
|
|
"type": "string"
|
|
},
|
|
"displayName": {
|
|
"description": "DisplayName overrides Grafana default naming, should not be used from a data source",
|
|
"type": "string"
|
|
},
|
|
"displayNameFromDS": {
|
|
"description": "DisplayNameFromDS overrides Grafana default naming in a better way that allows users to override it easily.",
|
|
"type": "string"
|
|
},
|
|
"filterable": {
|
|
"description": "Filterable indicates if the Field's data can be filtered by additional calls.",
|
|
"type": "boolean"
|
|
},
|
|
"interval": {
|
|
"description": "Interval indicates the expected regular step between values in the series.\nWhen an interval exists, consumers can identify \"missing\" values when the expected value is not present.\nThe grafana timeseries visualization will render disconnected values when missing values are found it the time field.\nThe interval uses the same units as the values. For time.Time, this is defined in milliseconds.",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"links": {
|
|
"description": "The behavior when clicking on a result",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/DataLink"
|
|
}
|
|
},
|
|
"mappings": {
|
|
"$ref": "#/definitions/ValueMappings"
|
|
},
|
|
"max": {
|
|
"$ref": "#/definitions/ConfFloat64"
|
|
},
|
|
"min": {
|
|
"$ref": "#/definitions/ConfFloat64"
|
|
},
|
|
"noValue": {
|
|
"description": "Alternative to empty string",
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"description": "Path is an explicit path to the field in the datasource. When the frame meta includes a path,\nthis will default to `${frame.meta.path}/${field.name}\n\nWhen defined, this value can be used as an identifier within the datasource scope, and\nmay be used as an identifier to update values in a subsequent request",
|
|
"type": "string"
|
|
},
|
|
"thresholds": {
|
|
"$ref": "#/definitions/ThresholdsConfig"
|
|
},
|
|
"unit": {
|
|
"description": "Numeric Options",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"writeable": {
|
|
"description": "Writeable indicates that the datasource knows how to update this value",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"Receiver": {
|
|
"type": "object",
|
|
"title": "Receiver configuration provides configuration on how to contact a receiver.",
|
|
"properties": {
|
|
"email_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/EmailConfig"
|
|
}
|
|
},
|
|
"name": {
|
|
"description": "A unique identifier for this receiver.",
|
|
"type": "string"
|
|
},
|
|
"opsgenie_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/OpsGenieConfig"
|
|
}
|
|
},
|
|
"pagerduty_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PagerdutyConfig"
|
|
}
|
|
},
|
|
"pushover_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PushoverConfig"
|
|
}
|
|
},
|
|
"slack_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SlackConfig"
|
|
}
|
|
},
|
|
"sns_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SNSConfig"
|
|
}
|
|
},
|
|
"telegram_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/TelegramConfig"
|
|
}
|
|
},
|
|
"victorops_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/VictorOpsConfig"
|
|
}
|
|
},
|
|
"webhook_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WebhookConfig"
|
|
}
|
|
},
|
|
"wechat_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WechatConfig"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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."
|
|
},
|
|
"RelativeTimeRange": {
|
|
"description": "RelativeTimeRange is the per query start and end time\nfor requests.",
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"to": {
|
|
"$ref": "#/definitions/Duration"
|
|
}
|
|
}
|
|
},
|
|
"ResponseDetails": {
|
|
"type": "object",
|
|
"properties": {
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Responses": {
|
|
"description": "The QueryData method the QueryDataHandler method will set the RefId\nproperty on the DataResponses' frames based on these RefIDs.",
|
|
"type": "object",
|
|
"title": "Responses is a map of RefIDs (Unique Query ID) to DataResponses.",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/DataResponse"
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"group_by": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"group_interval": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"group_wait": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"match": {
|
|
"description": "Deprecated. Remove before v1.0 release.",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"match_re": {
|
|
"$ref": "#/definitions/MatchRegexps"
|
|
},
|
|
"matchers": {
|
|
"$ref": "#/definitions/Matchers"
|
|
},
|
|
"mute_time_intervals": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"object_matchers": {
|
|
"$ref": "#/definitions/ObjectMatchers"
|
|
},
|
|
"provenance": {
|
|
"$ref": "#/definitions/Provenance"
|
|
},
|
|
"receiver": {
|
|
"type": "string"
|
|
},
|
|
"repeat_interval": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"routes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Route"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Rule": {
|
|
"description": "adapted from cortex",
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"query",
|
|
"health",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"evaluationTime": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"health": {
|
|
"type": "string"
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/overrideLabels"
|
|
},
|
|
"lastError": {
|
|
"type": "string"
|
|
},
|
|
"lastEvaluation": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/RuleType"
|
|
}
|
|
}
|
|
},
|
|
"RuleDiscovery": {
|
|
"type": "object",
|
|
"required": [
|
|
"groups"
|
|
],
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/RuleGroup"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"RuleGroup": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"file",
|
|
"rules",
|
|
"interval"
|
|
],
|
|
"properties": {
|
|
"evaluationTime": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"file": {
|
|
"type": "string"
|
|
},
|
|
"interval": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"lastEvaluation": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"RuleGroupConfigResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/GettableExtendedRuleNode"
|
|
}
|
|
},
|
|
"source_tenants": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"RuleResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/RuleDiscovery"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"errorType": {
|
|
"$ref": "#/definitions/ErrorType"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"RuleType": {
|
|
"type": "string",
|
|
"title": "RuleType models the type of a rule."
|
|
},
|
|
"SNSConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"api_url": {
|
|
"type": "string"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string"
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"sigv4": {
|
|
"$ref": "#/definitions/SigV4Config"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"target_arn": {
|
|
"type": "string"
|
|
},
|
|
"topic_arn": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Sample": {
|
|
"type": "object",
|
|
"title": "Sample is a single sample belonging to a metric.",
|
|
"properties": {
|
|
"Metric": {
|
|
"$ref": "#/definitions/Labels"
|
|
},
|
|
"T": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"V": {
|
|
"type": "number",
|
|
"format": "double"
|
|
}
|
|
}
|
|
},
|
|
"Secret": {
|
|
"type": "string",
|
|
"title": "Secret special type for storing secrets."
|
|
},
|
|
"SecretURL": {
|
|
"title": "SecretURL is a URL that must not be revealed on marshaling.",
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"SigV4Config": {
|
|
"description": "SigV4Config is the configuration for signing remote write requests with\nAWS's SigV4 verification process. Empty values will be retrieved using the\nAWS default credentials chain.",
|
|
"type": "object",
|
|
"properties": {
|
|
"AccessKey": {
|
|
"type": "string"
|
|
},
|
|
"Profile": {
|
|
"type": "string"
|
|
},
|
|
"Region": {
|
|
"type": "string"
|
|
},
|
|
"RoleARN": {
|
|
"type": "string"
|
|
},
|
|
"SecretKey": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
},
|
|
"SlackAction": {
|
|
"description": "See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons\nfor more information.",
|
|
"type": "object",
|
|
"title": "SlackAction configures a single Slack action that is sent with each notification.",
|
|
"properties": {
|
|
"confirm": {
|
|
"$ref": "#/definitions/SlackConfirmationField"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"style": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"SlackConfig": {
|
|
"type": "object",
|
|
"title": "SlackConfig configures notifications via Slack.",
|
|
"properties": {
|
|
"actions": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SlackAction"
|
|
}
|
|
},
|
|
"api_url": {
|
|
"$ref": "#/definitions/SecretURL"
|
|
},
|
|
"api_url_file": {
|
|
"type": "string"
|
|
},
|
|
"callback_id": {
|
|
"type": "string"
|
|
},
|
|
"channel": {
|
|
"description": "Slack channel override, (like #other-channel or @username).",
|
|
"type": "string"
|
|
},
|
|
"color": {
|
|
"type": "string"
|
|
},
|
|
"fallback": {
|
|
"type": "string"
|
|
},
|
|
"fields": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/SlackField"
|
|
}
|
|
},
|
|
"footer": {
|
|
"type": "string"
|
|
},
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"icon_emoji": {
|
|
"type": "string"
|
|
},
|
|
"icon_url": {
|
|
"type": "string"
|
|
},
|
|
"image_url": {
|
|
"type": "string"
|
|
},
|
|
"link_names": {
|
|
"type": "boolean"
|
|
},
|
|
"mrkdwn_in": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"pretext": {
|
|
"type": "string"
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"short_fields": {
|
|
"type": "boolean"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"thumb_url": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"title_link": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"ok_text": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"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.",
|
|
"type": "object",
|
|
"title": "SlackField configures a single Slack field that is sent with each notification.",
|
|
"properties": {
|
|
"short": {
|
|
"type": "boolean"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"SmtpNotEnabled": {
|
|
"$ref": "#/definitions/ResponseDetails"
|
|
},
|
|
"Success": {
|
|
"$ref": "#/definitions/ResponseDetails"
|
|
},
|
|
"TLSConfig": {
|
|
"type": "object",
|
|
"title": "TLSConfig configures the options for TLS connections.",
|
|
"properties": {
|
|
"ca_file": {
|
|
"description": "The CA cert to use for the targets.",
|
|
"type": "string"
|
|
},
|
|
"cert_file": {
|
|
"description": "The client cert file for the targets.",
|
|
"type": "string"
|
|
},
|
|
"insecure_skip_verify": {
|
|
"description": "Disable target certificate validation.",
|
|
"type": "boolean"
|
|
},
|
|
"key_file": {
|
|
"description": "The client key file for the targets.",
|
|
"type": "string"
|
|
},
|
|
"server_name": {
|
|
"description": "Used to verify the hostname for the targets.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"TelegramConfig": {
|
|
"type": "object",
|
|
"title": "TelegramConfig configures notifications via Telegram.",
|
|
"properties": {
|
|
"api_url": {
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"chat": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"disable_notifications": {
|
|
"type": "boolean"
|
|
},
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"parse_mode": {
|
|
"type": "string"
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"token": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
},
|
|
"TestReceiverConfigResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"TestReceiverResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"grafana_managed_receiver_configs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/TestReceiverConfigResult"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"TestReceiversConfigAlertParams": {
|
|
"type": "object",
|
|
"properties": {
|
|
"annotations": {
|
|
"$ref": "#/definitions/LabelSet"
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/LabelSet"
|
|
}
|
|
}
|
|
},
|
|
"TestReceiversConfigBodyParams": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alert": {
|
|
"$ref": "#/definitions/TestReceiversConfigAlertParams"
|
|
},
|
|
"receivers": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PostableApiReceiver"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"TestReceiversResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alert": {
|
|
"$ref": "#/definitions/TestReceiversConfigAlertParams"
|
|
},
|
|
"notified_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"receivers": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/TestReceiverResult"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"TestRulePayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"expr": {
|
|
"type": "string",
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"TestRuleResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"alerts": {
|
|
"$ref": "#/definitions/Vector"
|
|
},
|
|
"grafana_alert_instances": {
|
|
"$ref": "#/definitions/AlertInstancesResponse"
|
|
}
|
|
}
|
|
},
|
|
"Threshold": {
|
|
"description": "Threshold a single step on the threshold list",
|
|
"type": "object",
|
|
"properties": {
|
|
"color": {
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"$ref": "#/definitions/ConfFloat64"
|
|
}
|
|
}
|
|
},
|
|
"ThresholdsConfig": {
|
|
"description": "ThresholdsConfig setup thresholds",
|
|
"type": "object",
|
|
"properties": {
|
|
"mode": {
|
|
"$ref": "#/definitions/ThresholdsMode"
|
|
},
|
|
"steps": {
|
|
"description": "Must be sorted by 'value', first value is always -Infinity",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Threshold"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ThresholdsMode": {
|
|
"description": "ThresholdsMode absolute or percentage",
|
|
"type": "string"
|
|
},
|
|
"TimeInterval": {
|
|
"description": "TimeInterval describes intervals of time. ContainsTime will tell you if a golang time is contained\nwithin the interval.",
|
|
"type": "object",
|
|
"properties": {
|
|
"days_of_month": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/DayOfMonthRange"
|
|
}
|
|
},
|
|
"months": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/MonthRange"
|
|
}
|
|
},
|
|
"times": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/TimeRange"
|
|
}
|
|
},
|
|
"weekdays": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WeekdayRange"
|
|
}
|
|
},
|
|
"years": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/YearRange"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"TimeRange": {
|
|
"description": "For example, 4:00PM to End of the day would Begin at 1020 and End at 1440.",
|
|
"type": "object",
|
|
"title": "TimeRange represents a range of minutes within a 1440 minute day, exclusive of the End minute. A day consists of 1440 minutes.",
|
|
"properties": {
|
|
"EndMinute": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"StartMinute": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"URL": {
|
|
"type": "object",
|
|
"title": "URL is a custom URL type that allows validation at configuration load time.",
|
|
"properties": {
|
|
"ForceQuery": {
|
|
"type": "boolean"
|
|
},
|
|
"Fragment": {
|
|
"type": "string"
|
|
},
|
|
"Host": {
|
|
"type": "string"
|
|
},
|
|
"Opaque": {
|
|
"type": "string"
|
|
},
|
|
"Path": {
|
|
"type": "string"
|
|
},
|
|
"RawFragment": {
|
|
"type": "string"
|
|
},
|
|
"RawPath": {
|
|
"type": "string"
|
|
},
|
|
"RawQuery": {
|
|
"type": "string"
|
|
},
|
|
"Scheme": {
|
|
"type": "string"
|
|
},
|
|
"User": {
|
|
"$ref": "#/definitions/Userinfo"
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"ValidationError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"msg": {
|
|
"type": "string",
|
|
"example": "error message"
|
|
}
|
|
}
|
|
},
|
|
"ValueMapping": {
|
|
"description": "ValueMapping allows mapping input values to text and color",
|
|
"type": "object"
|
|
},
|
|
"ValueMappings": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/ValueMapping"
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"VictorOpsConfig": {
|
|
"type": "object",
|
|
"title": "VictorOpsConfig configures notifications via VictorOps.",
|
|
"properties": {
|
|
"api_key": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"api_key_file": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"api_url": {
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"custom_fields": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"entity_display_name": {
|
|
"type": "string"
|
|
},
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"message_type": {
|
|
"type": "string"
|
|
},
|
|
"monitoring_tool": {
|
|
"type": "string"
|
|
},
|
|
"routing_key": {
|
|
"type": "string"
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"state_message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"VisType": {
|
|
"type": "string",
|
|
"title": "VisType is used to indicate how the data should be visualized in explore."
|
|
},
|
|
"WebhookConfig": {
|
|
"type": "object",
|
|
"title": "WebhookConfig configures notifications via a generic webhook.",
|
|
"properties": {
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"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"
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"url": {
|
|
"$ref": "#/definitions/URL"
|
|
}
|
|
}
|
|
},
|
|
"WechatConfig": {
|
|
"type": "object",
|
|
"title": "WechatConfig configures notifications via Wechat.",
|
|
"properties": {
|
|
"agent_id": {
|
|
"type": "string"
|
|
},
|
|
"api_secret": {
|
|
"$ref": "#/definitions/Secret"
|
|
},
|
|
"api_url": {
|
|
"$ref": "#/definitions/URL"
|
|
},
|
|
"corp_id": {
|
|
"type": "string"
|
|
},
|
|
"http_config": {
|
|
"$ref": "#/definitions/HTTPClientConfig"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"message_type": {
|
|
"type": "string"
|
|
},
|
|
"send_resolved": {
|
|
"type": "boolean"
|
|
},
|
|
"to_party": {
|
|
"type": "string"
|
|
},
|
|
"to_tag": {
|
|
"type": "string"
|
|
},
|
|
"to_user": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"WeekdayRange": {
|
|
"type": "object",
|
|
"title": "A WeekdayRange is an inclusive range between [0, 6] where 0 = Sunday.",
|
|
"properties": {
|
|
"Begin": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"End": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"YearRange": {
|
|
"type": "object",
|
|
"title": "A YearRange is a positive inclusive range.",
|
|
"properties": {
|
|
"Begin": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"End": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"alert": {
|
|
"description": "Alert alert",
|
|
"type": "object",
|
|
"required": [
|
|
"labels"
|
|
],
|
|
"properties": {
|
|
"generatorURL": {
|
|
"description": "generator URL\nFormat: uri",
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/labelSet"
|
|
}
|
|
}
|
|
},
|
|
"alertGroup": {
|
|
"type": "object",
|
|
"required": [
|
|
"alerts",
|
|
"labels",
|
|
"receiver"
|
|
],
|
|
"properties": {
|
|
"alerts": {
|
|
"description": "alerts",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/gettableAlert"
|
|
}
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/labelSet"
|
|
},
|
|
"receiver": {
|
|
"$ref": "#/definitions/receiver"
|
|
}
|
|
},
|
|
"$ref": "#/definitions/alertGroup"
|
|
},
|
|
"alertGroups": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/alertGroup"
|
|
},
|
|
"$ref": "#/definitions/alertGroups"
|
|
},
|
|
"alertStatus": {
|
|
"description": "AlertStatus alert status",
|
|
"type": "object",
|
|
"required": [
|
|
"inhibitedBy",
|
|
"silencedBy",
|
|
"state"
|
|
],
|
|
"properties": {
|
|
"inhibitedBy": {
|
|
"description": "inhibited by",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"silencedBy": {
|
|
"description": "silenced by",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"state": {
|
|
"description": "state",
|
|
"type": "string",
|
|
"enum": [
|
|
"[unprocessed active suppressed]"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"alertmanagerConfig": {
|
|
"description": "AlertmanagerConfig alertmanager config",
|
|
"type": "object",
|
|
"required": [
|
|
"original"
|
|
],
|
|
"properties": {
|
|
"original": {
|
|
"description": "original",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"alertmanagerStatus": {
|
|
"description": "AlertmanagerStatus alertmanager status",
|
|
"type": "object",
|
|
"required": [
|
|
"cluster",
|
|
"config",
|
|
"uptime",
|
|
"versionInfo"
|
|
],
|
|
"properties": {
|
|
"cluster": {
|
|
"$ref": "#/definitions/clusterStatus"
|
|
},
|
|
"config": {
|
|
"$ref": "#/definitions/alertmanagerConfig"
|
|
},
|
|
"uptime": {
|
|
"description": "uptime",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"versionInfo": {
|
|
"$ref": "#/definitions/versionInfo"
|
|
}
|
|
}
|
|
},
|
|
"clusterStatus": {
|
|
"description": "ClusterStatus cluster status",
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "name",
|
|
"type": "string"
|
|
},
|
|
"peers": {
|
|
"description": "peers",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/peerStatus"
|
|
}
|
|
},
|
|
"status": {
|
|
"description": "status",
|
|
"type": "string",
|
|
"enum": [
|
|
"[ready settling disabled]"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"duration": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"gettableAlert": {
|
|
"description": "GettableAlert gettable alert",
|
|
"type": "object",
|
|
"required": [
|
|
"labels",
|
|
"annotations",
|
|
"endsAt",
|
|
"fingerprint",
|
|
"receivers",
|
|
"startsAt",
|
|
"status",
|
|
"updatedAt"
|
|
],
|
|
"properties": {
|
|
"annotations": {
|
|
"$ref": "#/definitions/labelSet"
|
|
},
|
|
"endsAt": {
|
|
"description": "ends at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"fingerprint": {
|
|
"description": "fingerprint",
|
|
"type": "string"
|
|
},
|
|
"generatorURL": {
|
|
"description": "generator URL\nFormat: uri",
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/labelSet"
|
|
},
|
|
"receivers": {
|
|
"description": "receivers",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/receiver"
|
|
}
|
|
},
|
|
"startsAt": {
|
|
"description": "starts at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/alertStatus"
|
|
},
|
|
"updatedAt": {
|
|
"description": "updated at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"$ref": "#/definitions/gettableAlert"
|
|
},
|
|
"gettableAlerts": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/gettableAlert"
|
|
},
|
|
"$ref": "#/definitions/gettableAlerts"
|
|
},
|
|
"gettableSilence": {
|
|
"type": "object",
|
|
"required": [
|
|
"comment",
|
|
"createdBy",
|
|
"endsAt",
|
|
"matchers",
|
|
"startsAt",
|
|
"id",
|
|
"status",
|
|
"updatedAt"
|
|
],
|
|
"properties": {
|
|
"comment": {
|
|
"description": "comment",
|
|
"type": "string"
|
|
},
|
|
"createdBy": {
|
|
"description": "created by",
|
|
"type": "string"
|
|
},
|
|
"endsAt": {
|
|
"description": "ends at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"id": {
|
|
"description": "id",
|
|
"type": "string"
|
|
},
|
|
"matchers": {
|
|
"$ref": "#/definitions/matchers"
|
|
},
|
|
"startsAt": {
|
|
"description": "starts at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/silenceStatus"
|
|
},
|
|
"updatedAt": {
|
|
"description": "updated at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"$ref": "#/definitions/gettableSilence"
|
|
},
|
|
"gettableSilences": {
|
|
"description": "GettableSilences gettable silences",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/gettableSilence"
|
|
},
|
|
"$ref": "#/definitions/gettableSilences"
|
|
},
|
|
"labelSet": {
|
|
"description": "LabelSet label set",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"matcher": {
|
|
"description": "Matcher matcher",
|
|
"type": "object",
|
|
"required": [
|
|
"isRegex",
|
|
"name",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"isEqual": {
|
|
"description": "is equal",
|
|
"type": "boolean"
|
|
},
|
|
"isRegex": {
|
|
"description": "is regex",
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"description": "name",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"description": "value",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"matchers": {
|
|
"description": "Matchers matchers",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/matcher"
|
|
}
|
|
},
|
|
"overrideLabels": {
|
|
"description": "The custom marshaling for labels.Labels ends up doing this anyways.",
|
|
"type": "object",
|
|
"title": "override the labels type with a map for generation.",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"peerStatus": {
|
|
"description": "PeerStatus peer status",
|
|
"type": "object",
|
|
"required": [
|
|
"address",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"description": "address",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "name",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"postableAlert": {
|
|
"description": "PostableAlert postable alert",
|
|
"type": "object",
|
|
"required": [
|
|
"labels"
|
|
],
|
|
"properties": {
|
|
"annotations": {
|
|
"$ref": "#/definitions/labelSet"
|
|
},
|
|
"endsAt": {
|
|
"description": "ends at\nFormat: date-time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"generatorURL": {
|
|
"description": "generator URL\nFormat: uri",
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/labelSet"
|
|
},
|
|
"startsAt": {
|
|
"description": "starts at\nFormat: date-time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"postableAlerts": {
|
|
"description": "PostableAlerts postable alerts",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/postableAlert"
|
|
}
|
|
},
|
|
"postableSilence": {
|
|
"description": "PostableSilence postable silence",
|
|
"type": "object",
|
|
"required": [
|
|
"comment",
|
|
"createdBy",
|
|
"endsAt",
|
|
"matchers",
|
|
"startsAt"
|
|
],
|
|
"properties": {
|
|
"comment": {
|
|
"description": "comment",
|
|
"type": "string"
|
|
},
|
|
"createdBy": {
|
|
"description": "created by",
|
|
"type": "string"
|
|
},
|
|
"endsAt": {
|
|
"description": "ends at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"id": {
|
|
"description": "id",
|
|
"type": "string"
|
|
},
|
|
"matchers": {
|
|
"$ref": "#/definitions/matchers"
|
|
},
|
|
"startsAt": {
|
|
"description": "starts at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"$ref": "#/definitions/postableSilence"
|
|
},
|
|
"receiver": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"$ref": "#/definitions/receiver"
|
|
},
|
|
"silence": {
|
|
"description": "Silence silence",
|
|
"type": "object",
|
|
"required": [
|
|
"comment",
|
|
"createdBy",
|
|
"endsAt",
|
|
"matchers",
|
|
"startsAt"
|
|
],
|
|
"properties": {
|
|
"comment": {
|
|
"description": "comment",
|
|
"type": "string"
|
|
},
|
|
"createdBy": {
|
|
"description": "created by",
|
|
"type": "string"
|
|
},
|
|
"endsAt": {
|
|
"description": "ends at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"matchers": {
|
|
"$ref": "#/definitions/matchers"
|
|
},
|
|
"startsAt": {
|
|
"description": "starts at",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"silenceStatus": {
|
|
"description": "SilenceStatus silence status",
|
|
"type": "object",
|
|
"required": [
|
|
"state"
|
|
],
|
|
"properties": {
|
|
"state": {
|
|
"description": "state",
|
|
"type": "string",
|
|
"enum": [
|
|
"[expired active pending]"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"versionInfo": {
|
|
"description": "VersionInfo version info",
|
|
"type": "object",
|
|
"required": [
|
|
"branch",
|
|
"buildDate",
|
|
"buildUser",
|
|
"goVersion",
|
|
"revision",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"branch": {
|
|
"description": "branch",
|
|
"type": "string"
|
|
},
|
|
"buildDate": {
|
|
"description": "build date",
|
|
"type": "string"
|
|
},
|
|
"buildUser": {
|
|
"description": "build user",
|
|
"type": "string"
|
|
},
|
|
"goVersion": {
|
|
"description": "go version",
|
|
"type": "string"
|
|
},
|
|
"revision": {
|
|
"description": "revision",
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"description": "version",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"basic": {
|
|
"type": "basic"
|
|
}
|
|
}
|
|
} |