Merge branch 'alpha-9' into alpha-9-changelog
commit
1b85f2af83
|
@ -3,6 +3,7 @@
|
||||||
.inline {
|
.inline {
|
||||||
margin: 0 .15rem;
|
margin: 0 .15rem;
|
||||||
&.middle:before { vertical-align: middle; }
|
&.middle:before { vertical-align: middle; }
|
||||||
|
&.top:before { vertical-align: text-top; }
|
||||||
&.xsmall:before { font-size: .8rem; }
|
&.xsmall:before { font-size: .8rem; }
|
||||||
&.small:before { font-size: .9rem; }
|
&.small:before { font-size: .9rem; }
|
||||||
&.large:before { font-size: 1.1rem; }
|
&.large:before { font-size: 1.1rem; }
|
||||||
|
@ -21,6 +22,28 @@
|
||||||
padding-left: .28rem;
|
padding-left: .28rem;
|
||||||
line-height: 1.25rem;
|
line-height: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.ui-toggle {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
width: 34px;
|
||||||
|
height: 22px;
|
||||||
|
background: #1C1C21;
|
||||||
|
border: 2px solid #383846;
|
||||||
|
border-radius: .7rem;
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 50%;
|
||||||
|
height: 12px;
|
||||||
|
width: 12px;
|
||||||
|
background: #22ADF6;
|
||||||
|
top: 3px;
|
||||||
|
right: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-icon {
|
.nav-icon {
|
||||||
|
|
|
@ -135,6 +135,7 @@
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
> p:only-child{ margin-bottom: 0; }
|
> p:only-child{ margin-bottom: 0; }
|
||||||
}
|
}
|
||||||
|
ul,ol { margin: -.5rem 0 1rem;}
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////// Code ////////////////////////////////////
|
//////////////////////////////////// Code ////////////////////////////////////
|
||||||
|
|
|
@ -11,14 +11,16 @@ weight: 5
|
||||||
v2.0/tags: [tasks]
|
v2.0/tags: [tasks]
|
||||||
---
|
---
|
||||||
|
|
||||||
Process and analyze your data with tasks in the InfluxDB _**task engine**. Use tasks (scheduled Flux queries)
|
Process and analyze your data with tasks in the InfluxDB **task engine**. Use tasks (scheduled Flux queries)
|
||||||
to input a data stream and then analyze, modify, and act on the data accordingly.
|
to input a data stream and then analyze, modify, and act on the data accordingly.
|
||||||
|
|
||||||
Discover how to configure and build tasks using the InfluxDB user interface (UI) and the `influx` command line interface (CLI).
|
Discover how to create and manage tasks using the InfluxDB user interface (UI)
|
||||||
Find examples of data downsampling, anomaly detection_(Coming)_, alerting _(Coming)_, and other common tasks.
|
and the `influx` command line interface (CLI).
|
||||||
|
Find examples of data downsampling, anomaly detection _(Coming)_, alerting
|
||||||
|
_(Coming)_, and other common tasks.
|
||||||
|
|
||||||
{{% note %}}
|
{{% note %}}
|
||||||
Tasks replace InfluxDB v1.x's continuous queries.
|
Tasks replace InfluxDB v1.x continuous queries.
|
||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
|
|
||||||
{{< children >}}
|
{{< children >}}
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
---
|
---
|
||||||
title: Write an InfluxDB task
|
title: Get started with InfluxDB tasks
|
||||||
seotitle: Write an InfluxDB task that processes data
|
list_title: Get started with tasks
|
||||||
description: >
|
description: >
|
||||||
How to write an InfluxDB task that processes data in some way, then performs an action
|
Learn the basics of writing an InfluxDB task that processes data, and then performs an action,
|
||||||
such as storing the modified data in a new bucket or sending an alert.
|
such as storing the modified data in a new bucket or sending an alert.
|
||||||
|
aliases:
|
||||||
|
- /v2.0/process-data/write-a-task/
|
||||||
v2.0/tags: [tasks]
|
v2.0/tags: [tasks]
|
||||||
menu:
|
menu:
|
||||||
v2_0:
|
v2_0:
|
||||||
name: Write a task
|
name: Get started with tasks
|
||||||
parent: Process data
|
parent: Process data
|
||||||
weight: 101
|
weight: 101
|
||||||
---
|
---
|
|
@ -1,9 +1,10 @@
|
||||||
---
|
---
|
||||||
title: Manage tasks in InfluxDB
|
title: Manage tasks in InfluxDB
|
||||||
seotitle: Manage data processing tasks in InfluxDB
|
seotitle: Manage data processing tasks in InfluxDB
|
||||||
|
list_title: Manage tasks
|
||||||
description: >
|
description: >
|
||||||
InfluxDB provides options for managing the creation, reading, updating, and deletion
|
InfluxDB provides options for creating, reading, updating, and deleting tasks
|
||||||
of tasks using both the 'influx' CLI and the InfluxDB UI.
|
using both the `influx` CLI and the InfluxDB UI.
|
||||||
v2.0/tags: [tasks]
|
v2.0/tags: [tasks]
|
||||||
menu:
|
menu:
|
||||||
v2_0:
|
v2_0:
|
||||||
|
|
|
@ -3,7 +3,7 @@ title: Create a task
|
||||||
seotitle: Create a task for processing data in InfluxDB
|
seotitle: Create a task for processing data in InfluxDB
|
||||||
description: >
|
description: >
|
||||||
How to create a task that processes data in InfluxDB using the InfluxDB user
|
How to create a task that processes data in InfluxDB using the InfluxDB user
|
||||||
interface or the 'influx' command line interface.
|
interface or the `influx` command line interface.
|
||||||
menu:
|
menu:
|
||||||
v2_0:
|
v2_0:
|
||||||
name: Create a task
|
name: Create a task
|
||||||
|
@ -14,7 +14,10 @@ weight: 201
|
||||||
InfluxDB provides multiple ways to create tasks both in the InfluxDB user interface (UI)
|
InfluxDB provides multiple ways to create tasks both in the InfluxDB user interface (UI)
|
||||||
and the `influx` command line interface (CLI).
|
and the `influx` command line interface (CLI).
|
||||||
|
|
||||||
_This article assumes you have already [written a task](/v2.0/process-data/write-a-task)._
|
_Before creating a task, review the [basics criteria for writing a task](/v2.0/process-data/get-started)._
|
||||||
|
|
||||||
|
- [InfluxDB UI](#create-a-task-in-the-influxdb-ui)
|
||||||
|
- [`influx` CLI](#create-a-task-using-the-influx-cli)
|
||||||
|
|
||||||
## Create a task in the InfluxDB UI
|
## Create a task in the InfluxDB UI
|
||||||
The InfluxDB UI provides multiple ways to create a task:
|
The InfluxDB UI provides multiple ways to create a task:
|
||||||
|
@ -22,6 +25,8 @@ The InfluxDB UI provides multiple ways to create a task:
|
||||||
- [Create a task from the Data Explorer](#create-a-task-from-the-data-explorer)
|
- [Create a task from the Data Explorer](#create-a-task-from-the-data-explorer)
|
||||||
- [Create a task in the Task UI](#create-a-task-in-the-task-ui)
|
- [Create a task in the Task UI](#create-a-task-in-the-task-ui)
|
||||||
- [Import a task](#import-a-task)
|
- [Import a task](#import-a-task)
|
||||||
|
- [Create a task from a template](#create-a-task-from-a-template)
|
||||||
|
- [Clone a task](#clone-a-task)
|
||||||
|
|
||||||
### Create a task from the Data Explorer
|
### Create a task from the Data Explorer
|
||||||
1. Click on the **Data Explorer** icon in the left navigation menu.
|
1. Click on the **Data Explorer** icon in the left navigation menu.
|
||||||
|
@ -41,11 +46,12 @@ The InfluxDB UI provides multiple ways to create a task:
|
||||||
|
|
||||||
{{< nav-icon "tasks" >}}
|
{{< nav-icon "tasks" >}}
|
||||||
|
|
||||||
2. Click **+ Create Task** in the upper right.
|
2. Click **{{< icon "plus" >}} Create Task** in the upper right.
|
||||||
3. In the left panel, specify the task options.
|
3. Select **New Task**.
|
||||||
See [Task options](/v2.0/process-data/task-options)for detailed information about each option.
|
4. In the left panel, specify the task options.
|
||||||
4. In the right panel, enter your task script.
|
See [Task options](/v2.0/process-data/task-options) for detailed information about each option.
|
||||||
5. Click **Save** in the upper right.
|
5. In the right panel, enter your task script.
|
||||||
|
6. Click **Save** in the upper right.
|
||||||
|
|
||||||
{{< img-hd src="/img/2-0-tasks-create-edit.png" title="Create a task" />}}
|
{{< img-hd src="/img/2-0-tasks-create-edit.png" title="Create a task" />}}
|
||||||
|
|
||||||
|
@ -56,15 +62,27 @@ The InfluxDB UI provides multiple ways to create a task:
|
||||||
|
|
||||||
2. Click **+ Create Task** in the upper right.
|
2. Click **+ Create Task** in the upper right.
|
||||||
3. Select **Import Task**.
|
3. Select **Import Task**.
|
||||||
3. Drag and drop or select a file to upload.
|
4. Upload a JSON task file using one of the following options:
|
||||||
4. Click **Import JSON as Task**.
|
- Drag and drop a JSON task file in the specified area.
|
||||||
|
- Click to upload and the area to select the JSON task from from your file manager.
|
||||||
|
- Select the **JSON** option and paste in raw task JSON.
|
||||||
|
5. Click **Import JSON as Task**.
|
||||||
|
|
||||||
|
### Create a task from a template
|
||||||
|
1. Click on the **Settings** icon in the left navigation menu.
|
||||||
|
|
||||||
|
{{< nav-icon "Settings" >}}
|
||||||
|
|
||||||
|
2. Select **Templates**.
|
||||||
|
3. Hover over the template to use to create the task and click **Create**.
|
||||||
|
|
||||||
|
|
||||||
### Clone a task
|
### Clone a task
|
||||||
1. Click on the **Tasks** icon in the left navigation menu.
|
1. Click on the **Tasks** icon in the left navigation menu.
|
||||||
|
|
||||||
{{< nav-icon "tasks" >}}
|
{{< nav-icon "tasks" >}}
|
||||||
|
|
||||||
2. Hover over the task you would like to clone and click the **{{< icon "duplicate" >}}** that appears.
|
2. Hover over the task you would like to clone and click the **{{< icon "duplicate" >}}** icon that appears.
|
||||||
4. Click **Clone**.
|
4. Click **Clone**.
|
||||||
|
|
||||||
## Create a task using the influx CLI
|
## Create a task using the influx CLI
|
||||||
|
|
|
@ -3,7 +3,7 @@ title: Delete a task
|
||||||
seotitle: Delete a task for processing data in InfluxDB
|
seotitle: Delete a task for processing data in InfluxDB
|
||||||
description: >
|
description: >
|
||||||
How to delete a task in InfluxDB using the InfluxDB user interface or using
|
How to delete a task in InfluxDB using the InfluxDB user interface or using
|
||||||
the 'influx' command line interface.
|
the `influx` command line interface.
|
||||||
menu:
|
menu:
|
||||||
v2_0:
|
v2_0:
|
||||||
name: Delete a task
|
name: Delete a task
|
||||||
|
|
|
@ -18,9 +18,9 @@ Tasks are exported as downloadable JSON files.
|
||||||
{{< nav-icon "tasks" >}}
|
{{< nav-icon "tasks" >}}
|
||||||
|
|
||||||
2. In the list of tasks, hover over the task you would like to export and click
|
2. In the list of tasks, hover over the task you would like to export and click
|
||||||
the **{{< icon "gear" >}}** that appears.
|
the **{{< icon "gear" >}}** icon that appears.
|
||||||
3. Select **Export**.
|
3. Select **Export**.
|
||||||
4. There are multiple options for downloading or saving the task export file:
|
4. Downloading or save the task export file using one of the following options:
|
||||||
- Click **Download JSON** to download the exported JSON file.
|
- Click **Download JSON** to download the exported JSON file.
|
||||||
- Click **Save as template** to save the export file as a task template.
|
- Click **Save as template** to save the export file as a task template.
|
||||||
- Click **Copy to Clipboard** to copy the raw JSON content to your machine's clipboard.
|
- Click **Copy to Clipboard** to copy the raw JSON content to your machine's clipboard.
|
||||||
|
|
|
@ -3,7 +3,7 @@ title: Update a task
|
||||||
seotitle: Update a task for processing data in InfluxDB
|
seotitle: Update a task for processing data in InfluxDB
|
||||||
description: >
|
description: >
|
||||||
How to update a task that processes data in InfluxDB using the InfluxDB user
|
How to update a task that processes data in InfluxDB using the InfluxDB user
|
||||||
interface or the 'influx' command line interface.
|
interface or the `influx` command line interface.
|
||||||
menu:
|
menu:
|
||||||
v2_0:
|
v2_0:
|
||||||
name: Update a task
|
name: Update a task
|
||||||
|
@ -17,7 +17,7 @@ To view your tasks, click the **Tasks** icon in the left navigation menu.
|
||||||
{{< nav-icon "tasks" >}}
|
{{< nav-icon "tasks" >}}
|
||||||
|
|
||||||
#### Update a task's Flux script
|
#### Update a task's Flux script
|
||||||
1. In the list of tasks, click the **Name** of the task you would like to update.
|
1. In the list of tasks, click the **Name** of the task you want to update.
|
||||||
2. In the left panel, modify the task options.
|
2. In the left panel, modify the task options.
|
||||||
3. In the right panel, modify the task script.
|
3. In the right panel, modify the task script.
|
||||||
4. Click **Save** in the upper right.
|
4. Click **Save** in the upper right.
|
||||||
|
@ -25,9 +25,8 @@ To view your tasks, click the **Tasks** icon in the left navigation menu.
|
||||||
{{< img-hd src="/img/2-0-tasks-create-edit.png" alt="Update a task" />}}
|
{{< img-hd src="/img/2-0-tasks-create-edit.png" alt="Update a task" />}}
|
||||||
|
|
||||||
#### Update the status of a task
|
#### Update the status of a task
|
||||||
In the list of tasks, click the toggle in the **Active** column of the task you
|
In the list of tasks, click the {{< icon "toggle" >}} toggle to the left of the
|
||||||
would like to activate or inactivate.
|
task you want to activate or inactivate.
|
||||||
|
|
||||||
|
|
||||||
## Update a task with the influx CLI
|
## Update a task with the influx CLI
|
||||||
Use the `influx task update` command to update or change the status of an existing task.
|
Use the `influx task update` command to update or change the status of an existing task.
|
||||||
|
@ -36,7 +35,7 @@ _This command requires a task ID, which is available in the output of `influx ta
|
||||||
|
|
||||||
#### Update a task's Flux script
|
#### Update a task's Flux script
|
||||||
Pass the file path of your updated Flux script to the `influx task update` command
|
Pass the file path of your updated Flux script to the `influx task update` command
|
||||||
with the ID of the task you would like to update.
|
with the ID of the task you want to update.
|
||||||
Modified [task options](/v2.0/process-data/task-options) defined in the Flux
|
Modified [task options](/v2.0/process-data/task-options) defined in the Flux
|
||||||
script are also updated.
|
script are also updated.
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ influx task update -i 0343698431c35000 @/tasks/cq-mean-1h.flux
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Update the status of a task
|
#### Update the status of a task
|
||||||
Pass the ID of the task you would like to update to the `influx task update`
|
Pass the ID of the task you want to update to the `influx task update`
|
||||||
command with the `--status` flag.
|
command with the `--status` flag.
|
||||||
|
|
||||||
_Possible arguments of the `--status` flag are `active` or `inactive`._
|
_Possible arguments of the `--status` flag are `active` or `inactive`._
|
||||||
|
|
|
@ -3,7 +3,7 @@ title: View tasks
|
||||||
seotitle: View created tasks that process data in InfluxDB
|
seotitle: View created tasks that process data in InfluxDB
|
||||||
description: >
|
description: >
|
||||||
How to view all created data processing tasks using the InfluxDB user interface
|
How to view all created data processing tasks using the InfluxDB user interface
|
||||||
or the 'influx' command line interface.
|
or the `influx` command line interface.
|
||||||
menu:
|
menu:
|
||||||
v2_0:
|
v2_0:
|
||||||
name: View tasks
|
name: View tasks
|
||||||
|
@ -18,10 +18,10 @@ Click the **Tasks** icon in the left navigation to view the lists of tasks.
|
||||||
|
|
||||||
### Filter the list of tasks
|
### Filter the list of tasks
|
||||||
|
|
||||||
1. Enable the **Show Inactive** option to include inactive tasks in the list.
|
1. Click the **Show Inactive** {{< icon "toggle" >}} toggle to include or exclude
|
||||||
2. Enter text in the **Filter tasks by name** field to search for tasks by name.
|
inactive tasks in the list.
|
||||||
3. Select an organization from the **All Organizations** dropdown to filter the list by organization.
|
2. Enter text in the **Filter tasks** field to search for tasks by name or label.
|
||||||
4. Click on the heading of any column to sort by that field.
|
3. Click on the heading of any column to sort by that field.
|
||||||
|
|
||||||
## View tasks with the influx CLI
|
## View tasks with the influx CLI
|
||||||
Use the `influx task find` command to return a list of created tasks.
|
Use the `influx task find` command to return a list of created tasks.
|
||||||
|
|
|
@ -15,6 +15,11 @@ _For information about variable types, see [Variable types](/v2.0/visualize-data
|
||||||
|
|
||||||
### Create a variable in the Data Explorer
|
### Create a variable in the Data Explorer
|
||||||
|
|
||||||
|
{{% note %}}
|
||||||
|
Only [Query variables](/v2.0/visualize-data/variables/variable-types/#query)
|
||||||
|
can be created from the Data Explorer.
|
||||||
|
{{% /note %}}
|
||||||
|
|
||||||
1. Click the **Data Explorer** icon in the sidebar.
|
1. Click the **Data Explorer** icon in the sidebar.
|
||||||
|
|
||||||
{{< nav-icon "data-explorer" >}}
|
{{< nav-icon "data-explorer" >}}
|
||||||
|
@ -35,8 +40,9 @@ _For information about variable types, see [Variable types](/v2.0/visualize-data
|
||||||
2. Select the **Variables** tab.
|
2. Select the **Variables** tab.
|
||||||
3. Click **+Create Variable**.
|
3. Click **+Create Variable**.
|
||||||
4. Enter a name for your variable.
|
4. Enter a name for your variable.
|
||||||
5. Enter your variable.
|
5. Select your [variable type](/v2.0/visualize-data/variables/variable-types/).
|
||||||
6. Click **Create**.
|
6. Enter the appropriate variable information.
|
||||||
|
7. Click **Create**.
|
||||||
|
|
||||||
## Import a variable
|
## Import a variable
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ menu:
|
||||||
weight: 205
|
weight: 205
|
||||||
"v2.0/tags": [variables]
|
"v2.0/tags": [variables]
|
||||||
---
|
---
|
||||||
|
|
||||||
Delete an existing variable in the InfluxDB user interface (UI).
|
Delete an existing variable in the InfluxDB user interface (UI).
|
||||||
|
|
||||||
### Delete a variable
|
### Delete a variable
|
||||||
|
@ -17,4 +18,9 @@ Delete an existing variable in the InfluxDB user interface (UI).
|
||||||
{{< nav-icon "settings" >}}
|
{{< nav-icon "settings" >}}
|
||||||
|
|
||||||
2. Select the **Variables** tab.
|
2. Select the **Variables** tab.
|
||||||
3. Hover over a variable and click the trash can icon.
|
3. Hover over a variable, click the **{{< icon "trash" >}}** icon, and **Delete**.
|
||||||
|
|
||||||
|
{{% warn %}}
|
||||||
|
Once deleted, any dashboards with queries that utilize the variable will no
|
||||||
|
longer function correctly.
|
||||||
|
{{% /warn %}}
|
||||||
|
|
|
@ -18,7 +18,8 @@ Variables are exported as downloadable JSON files.
|
||||||
{{< nav-icon "settings" >}}
|
{{< nav-icon "settings" >}}
|
||||||
|
|
||||||
2. Select the **Variables** tab.
|
2. Select the **Variables** tab.
|
||||||
3. Hover over a variable in the list, then click the gear icon ({{< icon "gear" >}}) and select **Export**.
|
3. Hover over a variable in the list, then click the gear icon (**{{< icon "gear" >}}**)
|
||||||
|
and select **Export**.
|
||||||
4. Review the JSON in the window that appears.
|
4. Review the JSON in the window that appears.
|
||||||
5. Select one of the following options:
|
5. Select one of the following options:
|
||||||
* **Download JSON**: Download the dashboard as a JSON file.
|
* **Download JSON**: Download the dashboard as a JSON file.
|
||||||
|
|
|
@ -19,5 +19,5 @@ Update an existing dashboard variable's name or JSON content in the InfluxDB use
|
||||||
|
|
||||||
2. Select the **Variables** tab.
|
2. Select the **Variables** tab.
|
||||||
3. Click on a variable's name from the list.
|
3. Click on a variable's name from the list.
|
||||||
4. Update the variable's name and query.
|
4. Update the variable's name, type, and associated information.
|
||||||
5. Click **Submit**.
|
5. Click **Submit**.
|
||||||
|
|
|
@ -9,26 +9,43 @@ weight: 207
|
||||||
"v2.0/tags": [variables]
|
"v2.0/tags": [variables]
|
||||||
---
|
---
|
||||||
|
|
||||||
{{% note %}}
|
|
||||||
In the current version of InfluxDB v2.0 alpha, only [query-populated variables](#query) are available.
|
|
||||||
{{% /note %}}
|
|
||||||
|
|
||||||
Variable types determine how a variable's list of possible values is populated.
|
Variable types determine how a variable's list of possible values is populated.
|
||||||
|
The following variable types are available:
|
||||||
|
|
||||||
|
- [Map](#map)
|
||||||
|
- [Query](#query)
|
||||||
|
- [CSV](#csv)
|
||||||
|
|
||||||
|
## Map
|
||||||
|
Map variables use a list of key value pairs in CSV format to map keys to specific values.
|
||||||
|
Keys populate the variable's value list in the InfluxDB user interface (UI), but
|
||||||
|
values are used when actually processing the query.
|
||||||
|
|
||||||
|
The most common use case for map variables is aliasing simple, human-readable keys
|
||||||
|
to complex values.
|
||||||
|
|
||||||
|
##### Map variable CSV example
|
||||||
|
```js
|
||||||
|
Juanito MacNeil,"5TKl6l8i4idg15Fxxe4P"
|
||||||
|
Astrophel Chaudhary,"bDhZbuVj5RV94NcFXZPm"
|
||||||
|
Ochieng Benes,"YIhg6SoMKRUH8FMlHs3V"
|
||||||
|
Mila Emile,"o61AhpOGr5aO3cYVArC0"
|
||||||
|
```
|
||||||
|
|
||||||
## Query
|
## Query
|
||||||
Variable values are populated using the `_value` column of a Flux query.
|
Query variable values are populated using the `_value` column of a Flux query.
|
||||||
|
|
||||||
##### Variable query example
|
##### Query variable example
|
||||||
```js
|
```js
|
||||||
// List all buckets
|
// List all buckets
|
||||||
buckets()
|
buckets()
|
||||||
|> rename(columns: {"name": "_value"})
|
|> rename(columns: {"name": "_value"})
|
||||||
|> keep(columns: ["_value"])
|
|> keep(columns: ["_value"])
|
||||||
```
|
```
|
||||||
|
|
||||||
_For examples of dashboard variable queries, see [Common variable queries](/v2.0/visualize-data/variables/common-variables)._
|
_For examples of dashboard variable queries, see [Common variable queries](/v2.0/visualize-data/variables/common-variables)._
|
||||||
|
|
||||||
|
{{% note %}}
|
||||||
#### Important things to note about variable queries
|
#### Important things to note about variable queries
|
||||||
- The variable will only use values from the `_value` column.
|
- The variable will only use values from the `_value` column.
|
||||||
If the data you’re looking for is in a column other than `_value`, use the
|
If the data you’re looking for is in a column other than `_value`, use the
|
||||||
|
@ -39,3 +56,20 @@ _For examples of dashboard variable queries, see [Common variable queries](/v2.0
|
||||||
Use the [`group()` function](/v2.0/reference/flux/functions/built-in/transformations/group)
|
Use the [`group()` function](/v2.0/reference/flux/functions/built-in/transformations/group)
|
||||||
to group everything into a single table.
|
to group everything into a single table.
|
||||||
- Do not use any [predefined dashboard variables](/v2.0/visualize-data/variables/#predefined-dashboard-variables) in variable queries.
|
- Do not use any [predefined dashboard variables](/v2.0/visualize-data/variables/#predefined-dashboard-variables) in variable queries.
|
||||||
|
{{% /note %}}
|
||||||
|
|
||||||
|
## CSV
|
||||||
|
CSV variables use a CSV-formatted list to populate variable values.
|
||||||
|
A common use case is when the list of potential values is static and cannot be
|
||||||
|
queried from InfluxDB.
|
||||||
|
|
||||||
|
##### CSV variable examples
|
||||||
|
```
|
||||||
|
value1, value2, value3, value4
|
||||||
|
```
|
||||||
|
```
|
||||||
|
value1
|
||||||
|
value2
|
||||||
|
value3
|
||||||
|
value4
|
||||||
|
```
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
{{ else if eq $icon "search" }}
|
{{ else if eq $icon "search" }}
|
||||||
<span class="inline icon-ui-search middle small"></span>
|
<span class="inline icon-ui-search middle small"></span>
|
||||||
{{ else if or (eq $icon "trash") (eq $icon "trashcan") (eq $icon "delete") }}
|
{{ else if or (eq $icon "trash") (eq $icon "trashcan") (eq $icon "delete") }}
|
||||||
<span class="inline icon-ui-trash small"></span>
|
<span class="inline icon-ui-trash top small"></span>
|
||||||
{{ else if eq $icon "triangle" }}
|
{{ else if eq $icon "triangle" }}
|
||||||
<span class="inline icon-ui-triangle middle"></span>
|
<span class="inline icon-ui-triangle middle"></span>
|
||||||
{{ else if eq $icon "cloud" }}
|
{{ else if eq $icon "cloud" }}
|
||||||
|
@ -56,4 +56,6 @@
|
||||||
<span class="inline icon-ui-chat large"></span>
|
<span class="inline icon-ui-chat large"></span>
|
||||||
{{ else if eq $icon "add-label" }}
|
{{ else if eq $icon "add-label" }}
|
||||||
<span class="inline add-btn-round"></span>
|
<span class="inline add-btn-round"></span>
|
||||||
|
{{ else if eq $icon "toggle" }}
|
||||||
|
<span class="inline ui-toggle"><span class="circle"></span></span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue