Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion pkg/services/ngalert/api/tooling/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@
},
"metric": {
"type": "string"
},
"targetDatasourceUid": {
"type": "string"
}
},
"title": "Record is the provisioned export of models.Record.",
Expand Down Expand Up @@ -3492,6 +3495,11 @@
"description": "Name of the recorded metric.",
"example": "grafana_alerts_ratio",
"type": "string"
},
"target_datasource_uid": {
"description": "Which data source should be used to write the output of the recording rule, specified by UID.",
"example": "my-prom",
"type": "string"
}
},
"required": [
Expand Down Expand Up @@ -4355,6 +4363,15 @@
"description": "Name of the associated template definition for this result.",
"type": "string"
},
"scope": {
"description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".",
"enum": [
".",
".Alerts",
".Alert"
],
"type": "string"
},
"text": {
"description": "Interpolated value of the template.",
"type": "string"
Expand Down Expand Up @@ -4493,6 +4510,7 @@
"type": "object"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nThe Host field contains the host and port subcomponents of the URL.\nWhen the port is present, it is separated from the host with a colon.\nWhen the host is an IPv6 address, it must be enclosed in square brackets:\n\"[fe80::1]:80\". The [net.JoinHostPort] function combines a host and port\ninto a string suitable for the Host field, adding square brackets to\nthe host when necessary.\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the [URL.EscapedPath] method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
"properties": {
"ForceQuery": {
"type": "boolean"
Expand Down Expand Up @@ -4528,7 +4546,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"title": "URL is a custom URL type that allows validation at configuration load time.",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"type": "object"
},
"UpdateRuleGroupResponse": {
Expand Down Expand Up @@ -4770,6 +4788,7 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/definitions/alertGroup",
"type": "object"
Expand Down
19 changes: 17 additions & 2 deletions pkg/services/ngalert/api/tooling/post.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@
},
"metric": {
"type": "string"
},
"targetDatasourceUid": {
"type": "string"
}
},
"title": "Record is the provisioned export of models.Record.",
Expand Down Expand Up @@ -3492,6 +3495,11 @@
"description": "Name of the recorded metric.",
"example": "grafana_alerts_ratio",
"type": "string"
},
"target_datasource_uid": {
"description": "Which data source should be used to write the output of the recording rule, specified by UID.",
"example": "my-prom",
"type": "string"
}
},
"required": [
Expand Down Expand Up @@ -4355,6 +4363,15 @@
"description": "Name of the associated template definition for this result.",
"type": "string"
},
"scope": {
"description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".",
"enum": [
".",
".Alerts",
".Alert"
],
"type": "string"
},
"text": {
"description": "Interpolated value of the template.",
"type": "string"
Expand Down Expand Up @@ -4933,7 +4950,6 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/definitions/gettableAlert",
"type": "object"
Expand Down Expand Up @@ -5058,7 +5074,6 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence",
"type": "object"
Expand Down
19 changes: 17 additions & 2 deletions pkg/services/ngalert/api/tooling/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -4584,6 +4584,9 @@
},
"metric": {
"type": "string"
},
"targetDatasourceUid": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -7685,6 +7688,11 @@
"description": "Name of the recorded metric.",
"type": "string",
"example": "grafana_alerts_ratio"
},
"target_datasource_uid": {
"description": "Which data source should be used to write the output of the recording rule, specified by UID.",
"type": "string",
"example": "my-prom"
}
}
},
Expand Down Expand Up @@ -8544,6 +8552,15 @@
"description": "Name of the associated template definition for this result.",
"type": "string"
},
"scope": {
"description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".",
"type": "string",
"enum": [
".",
".Alerts",
".Alert"
]
},
"text": {
"description": "Interpolated value of the template.",
"type": "string"
Expand Down Expand Up @@ -9121,7 +9138,6 @@
}
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"type": "array",
"items": {
"type": "object",
Expand Down Expand Up @@ -9246,7 +9262,6 @@
}
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array",
"items": {
"type": "object",
Expand Down