2020-11-24 01:54:34 -06:00
|
|
|
package variables
|
|
|
|
|
|
|
|
// Query variables allow you to write a data source query that can return a
|
|
|
|
// list of metric names, tag values, or keys.
|
2020-11-25 00:43:09 -06:00
|
|
|
#Query: _variable & {
|
2020-11-24 01:54:34 -06:00
|
|
|
// Data source to use.
|
|
|
|
datasource: string
|
|
|
|
// Definition.
|
|
|
|
definition?: string
|
|
|
|
// Query.
|
|
|
|
query: string
|
|
|
|
// Refresh.
|
|
|
|
refresh: int | *1
|
|
|
|
// Regex.
|
|
|
|
regex?: string
|
|
|
|
// * 0 - Disabled.
|
|
|
|
// * 1 - Alphabetical (asc).
|
|
|
|
// * 2 - Alphabetical (desc).
|
|
|
|
// * 3 - Numerical (asc).
|
|
|
|
// * 4 - Numerical (desc).
|
|
|
|
// * 5 - Alphabetical (case-insensitive, asc).
|
|
|
|
// * 6 - Alphabetical (case-insensitive, desc).
|
2021-01-19 11:25:00 -06:00
|
|
|
sort: int >= 0 <= 6 | *0
|
2020-11-24 01:54:34 -06:00
|
|
|
tagValuesQuery?: string
|
|
|
|
tags: [...string] | *[]
|
|
|
|
tagsQuery?: string
|
|
|
|
// Variable type.
|
|
|
|
type: "query"
|
|
|
|
useTags: bool | *false
|
|
|
|
}
|