created structure and outlines for task docs

pull/20/head
Scott Anderson 2019-01-15 11:30:22 -07:00
parent 93c76bd921
commit 404c7b97d6
9 changed files with 228 additions and 0 deletions

View File

@ -0,0 +1,20 @@
---
title: Process Data with InfluxDB tasks
seotitle: Process Data with InfluxDB tasks
description: placeholder
menu:
v2_0:
name: Process data
weight: 3
---
InfluxDB's _**task engine**_ is designed for processing and analyzing data.
Tasks are user defined Flux scripts that take a stream of input data, modify or
analyze it in some way, then perform an action all on a specified schedule.
Examples include data downsampling, anomaly detection _(Coming)_, alerting _(Coming)_, etc.
The following articles explain how to configure and build tasks using the InfluxDB user interface (UI)
and via raw Flux scripts with the `influx` command line interface (CLI).
They also provide examples of commonly used tasks.
_Links for nested docs._

View File

@ -0,0 +1,10 @@
---
title: Common data processing tasks
seotitle: Common data processing tasks performed with with InfluxDB
description: placeholder
menu:
v2_0:
name: Common tasks
parent: Process data
weight: 4
---

View File

@ -0,0 +1,16 @@
---
title: Downsample data
seotitle: Downsample data in an InfluxDB task
description: placeholder
menu:
v2_0:
name: Downsample data
parent: Common tasks
weight: 4
---
**Requirements:**
- Data source
- Some type of aggregation
- and a `to` statement

View File

@ -0,0 +1,19 @@
---
title: Manage tasks in InfluxDB
seotitle: Manage data processing tasks in InfluxDB
description: placeholder
menu:
v2_0:
name: Manage tasks
parent: Process data
weight: 2
---
InfluxDB provides two options for managing the creation, reading, updating, and deletion (CRUD) of tasks -
through the InfluxDB user interface (UI) or using the `influx` command line interface (CLI).
Both tools can perform all task CRUD operations.
[Create a task](/v2.0/process-data/manage-tasks/create-task)
[View tasks](/v2.0/process-data/manage-tasks/view-tasks)
[Update a task](/v2.0/process-data/manage-tasks/update-task)
[Delete a task](/v2.0/process-data/manage-tasks/delete-task)

View File

@ -0,0 +1,22 @@
---
title: Create a task
seotitle: Create a task for processing data in InfluxDB
description: >
How to create a task that processes data in InfluxDB using the InfluxDB user
interface or the 'influx' command line interface.
menu:
v2_0:
name: Create a task
parent: Manage tasks
weight: 1
---
## Create a task in the InfluxDB UI
## Create a task with the `influx` CLI
```sh
influx task create /path/to/task-script.flux
```

View File

@ -0,0 +1,21 @@
---
title: Delete a task
seotitle: Delete a task for processing data in InfluxDB
description: >
How to delete a task in InfluxDB using the InfluxDB user interface or using
the 'influx' command line interface.
menu:
v2_0:
name: Delete a task
parent: Manage tasks
weight: 4
---
## Delete a task in the InfluxDB UI
## Delete a task with the `influx` CLI
```sh
influx task delete -i task-id
```

View File

@ -0,0 +1,21 @@
---
title: Update a task
seotitle: Update a task for processing data in InfluxDB
description: >
How to update a task that processes data in InfluxDB using the InfluxDB user
interface or the 'influx' command line interface.
menu:
v2_0:
name: Update a task
parent: Manage tasks
weight: 3
---
## Update a task in the InfluxDB UI
## Update a task with the `influx` CLI
```sh
influx task update -i task-id --status task-status
```

View File

@ -0,0 +1,21 @@
---
title: View tasks in InfluxDB
seotitle: View created tasks that process data in InfluxDB
description: >
How to view all created data processing tasks using the InfluxDB user interface
or the 'influx' command line interface.
menu:
v2_0:
name: View tasks
parent: Manage tasks
weight: 2
---
## View tasks in the InfluxDB UI
## View tasks with the `influx` CLI
```sh
influx task find -i task-id -n user-id --limit=100 --org-id=organization-id
```

View File

@ -0,0 +1,78 @@
---
title: Write a task
seotitle: Write a task that processes data in InfluxDB
description: placeholder
menu:
v2_0:
name: Write a task
parent: Process data
weight: 1
---
Tasks are essentially Flux scripts with a "destination."
This destination could be
**Requirements:**
- Task options / scheduler block
- Data source
- Some type of aggregation
- and a `to` statement
```js
option task = {
name: "cqinterval15m",
every: 1h,
offset: 15m ,
concurrency: 4,
retry: 5
}
```
```js
option task = {
name: "cqinterval15m",
cron: "0 0 * * *",
offset: 15m ,
concurrency: 4,
retry: 5
}
```
## Task configuration options
### name
I think it might even be optional
if you dont specify one i think we just put in some default name.
_**Data type:** String_
### every
Defines the inteveral at which the task will run.
_**Data type:** Duration_
_Cannot be used with `cron`_
### cron
- The cron schedule.
- Based on system time.
_**Data type:** String_
_Cannot be used with `every`_
### offset
is so you can allow for data to come in off scheduler. so if you want a task to run on the hour `cron: "0 * * * *"` but your data might come in 10 min late you could say `offset: 15m`
_**Data type:** Duration_
### concurrency
how many concurrent runs of a task can happen at once.. say your schedule is `every: 1s` but it takes 10 sec to complete. you can set a concurrency that will allow that to happen and not just queue up.
_**Data type:** Integer_
### retry
is a int, the number of times to retry before we assume failure.
_**Data type:** Integer_