Kapacitor CLIs (#5162)
* WIP kapacitor command line tools * added note to kapacitor delete command * finished kapacitor cli docs * updated kapacitor cli landing page * Apply suggestions from code review Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com> * updated kapacitor service-tests example output --------- Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>pull/5163/head
parent
35f3f09edb
commit
16ed30ae49
|
@ -81,8 +81,12 @@
|
|||
|
||||
.truncate a.truncate-toggle:hover { color: $kapacitor-article-link; }
|
||||
|
||||
//////////////////// NO-WRAP on Kapacitor command tables ///////////////////
|
||||
#commands + table tr td:first-child{white-space: nowrap;}
|
||||
|
||||
}
|
||||
|
||||
.algolia-autocomplete .algolia-docsearch-suggestion--highlight { color: $kapacitor-article-link; }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: Kapacitor command line tools
|
||||
description: >
|
||||
...
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: Command line tools
|
||||
parent: Reference
|
||||
weight: 105
|
||||
---
|
||||
|
||||
{{< children >}}
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
title: kapacitor CLI
|
||||
description: >
|
||||
The `kapacitor` CLI interacts with and manages the Kapacitor server.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor
|
||||
parent: Command line tools
|
||||
weight: 201
|
||||
---
|
||||
|
||||
The `kapacitor` CLI interacts with and manages the Kapacitor server.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor [command] [flags] [args]
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Description |
|
||||
| :---------------------------------------------------------------------------------- | :----------------------------------------------------- |
|
||||
| [backup](/kapacitor/v1/reference/cli/kapacitor/backup/) | Backup the Kapacitor database |
|
||||
| [define](/kapacitor/v1/reference/cli/kapacitor/define/) | Create or update a task |
|
||||
| [define-template](/kapacitor/v1/reference/cli/kapacitor/define-template/) | Create or update a template |
|
||||
| [define-topic-handler](/kapacitor/v1/reference/cli/kapacitor/define-topic-handler/) | Create or update an alert handler for a topic |
|
||||
| [delete](/kapacitor/v1/reference/cli/kapacitor/delete/) | Delete Kapacitor resources |
|
||||
| [disable](/kapacitor/v1/reference/cli/kapacitor/disable/) | Disable a task |
|
||||
| [enable](/kapacitor/v1/reference/cli/kapacitor/enable/) | Enable a task |
|
||||
| [flux](/kapacitor/v1/reference/cli/kapacitor/flux/) | Manage Kapacitor Flux tasks |
|
||||
| [help](/kapacitor/v1/reference/cli/kapacitor/help/) | Print help for a command |
|
||||
| [level](/kapacitor/v1/reference/cli/kapacitor/level/) | Set the logging level on the `kapacitord` server |
|
||||
| [list](/kapacitor/v1/reference/cli/kapacitor/list/) | List information about Kapacitor resources |
|
||||
| [logs](/kapacitor/v1/reference/cli/kapacitor/logs/) | Output Kapacitor logs |
|
||||
| [record](/kapacitor/v1/reference/cli/kapacitor/record/) | Record the results of a task or query |
|
||||
| [reload](/kapacitor/v1/reference/cli/kapacitor/reload/) | Reload a task with an updated task definition |
|
||||
| [replay](/kapacitor/v1/reference/cli/kapacitor/replay/) | Replay a recording to a task |
|
||||
| [replay-live](/kapacitor/v1/reference/cli/kapacitor/replay-live/) | Replay data to a task without recording it |
|
||||
| [service-tests](/kapacitor/v1/reference/cli/kapacitor/service-tests/) | Run service tests |
|
||||
| [show](/kapacitor/v1/reference/cli/kapacitor/show/) | Display information about a task |
|
||||
| [show-template](/kapacitor/v1/reference/cli/kapacitor/show-template/) | Display information about a template |
|
||||
| [show-topic](/kapacitor/v1/reference/cli/kapacitor/show-topic/) | Display information about an alert topic |
|
||||
| [show-topic-handler](/kapacitor/v1/reference/cli/kapacitor/show-topic-handler/) | Display information about an alert handler for a topic |
|
||||
| [stats](/kapacitor/v1/reference/cli/kapacitor/stats/) | Display Kapacitor server statistics |
|
||||
| [vars](/kapacitor/v1/reference/cli/kapacitor/vars/) | Print Kapacitor debug vars in JSON format |
|
||||
| [version](/kapacitor/v1/reference/cli/kapacitor/version/) | Display the Kapacitor version |
|
||||
| [watch](/kapacitor/v1/reference/cli/kapacitor/watch/) | Watch logs for a task |
|
||||
|
||||
## Flags {#kapacitor-flags}
|
||||
|
||||
| Flag | Description | Environment variable |
|
||||
| :------------ | :-------------------------------------------------------------------- | :--------------------- |
|
||||
| `-skipVerify` | Disable SSL or TLS verification | `KAPACITOR_UNSAFE_SSL` |
|
||||
| `-url` | URL of the `kapacitord` server _(default is `http://localhost:9092`)_ | `KAPACITOR_URL` |
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: kapacitor backup
|
||||
description: >
|
||||
The `kapacitor backup` command saves a backup of the Kapacitor database to a file.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor backup
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor backup` command saves a backup of the Kapacitor database to a file.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor backup <output-file>
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **output-file**: Backup filepath
|
|
@ -0,0 +1,78 @@
|
|||
---
|
||||
title: kapacitor define-template
|
||||
description: >
|
||||
The `kapacitor define-template` command creates or updates a template.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor define-template
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor define-template` command creates or updates a template.
|
||||
A template is defined using a TICKscript that contains the data processing
|
||||
pipeline of the template.
|
||||
|
||||
{{% note %}}
|
||||
Updating a template reloads all associated tasks.
|
||||
{{% /note %}}
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor define-template <template-id> [flags]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **template-id**: Unique identifier for the template
|
||||
|
||||
## Flags {#command-flags}
|
||||
|
||||
| Flag | Description |
|
||||
| :------ | :--------------------------------- |
|
||||
| `-tick` | TICKscript filepath |
|
||||
| `-type` | Template type (`stream` or `batch`) |
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
- [Create a new template for stream tasks](#create-a-new-template-for-stream-tasks)
|
||||
- [Create a new template for batch tasks](#create-a-new-template-for-batch-tasks)
|
||||
- [Update a template's TICKscript](#update-a-templates-tickscript)
|
||||
- [Update a template's type](#update-a-templates-type)
|
||||
|
||||
### Create a new template for stream tasks
|
||||
|
||||
When creating a new template, you must provide a template ID, TICKscript, and
|
||||
template type.
|
||||
|
||||
```sh
|
||||
kapacitor define-template my-template \
|
||||
-tick /path/to/TICKscript.tick \
|
||||
-type stream
|
||||
```
|
||||
|
||||
### Create a new template for batch tasks
|
||||
|
||||
When creating a new template, you must provide a template ID, TICKscript, and
|
||||
template type.
|
||||
|
||||
```sh
|
||||
kapacitor define-template my-template \
|
||||
-tick /path/to/TICKscript.tick \
|
||||
-type batch
|
||||
```
|
||||
|
||||
### Update a template's TICKscript
|
||||
|
||||
```sh
|
||||
kapacitor define-template existing-template \
|
||||
-tick /path/to/new_TICKscript.tick
|
||||
```
|
||||
|
||||
### Update a template's type
|
||||
|
||||
```sh
|
||||
kapacitor define-template existing-template -type batch
|
||||
```
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
title: kapacitor define-topic-handler
|
||||
description: >
|
||||
The `kapacitor define-topic-handler` command creates or updates a handler.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor define-topic-handler
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor define-topic-handler` command creates or updates a handler.
|
||||
Handlers are defined using a JSON or YAML file.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor define-topic-handler <handler-spec-file>
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **handler-spec-file**: Filepath of the handler specification file.
|
||||
Supports JSON or YAML files.
|
||||
|
||||
## Examples
|
||||
|
||||
##### Define a handler using the slack.yaml file
|
||||
|
||||
```sh
|
||||
kapacitor define-topic-handler /path/to/slack.yaml
|
||||
```
|
|
@ -0,0 +1,98 @@
|
|||
---
|
||||
title: kapacitor define
|
||||
description: >
|
||||
The `kapacitor define` command creates or updates a task.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor define
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor define` command creates or updates a task.
|
||||
A task is defined via a TICKscript that defines the data processing pipeline of the task.
|
||||
|
||||
{{% note %}}
|
||||
When an existing task is updated, the task will be reloaded unless the
|
||||
`-no-reload` flag is included in the command.
|
||||
{{% /note %}}
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor define [<task-id>] [flags]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **task-id**: Unique identifier for the task
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | Description | Input |
|
||||
| :----------- | :----------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- |
|
||||
| `-dbrp` | Database and retention policy to query (can be specified multiple times) | `"db"."rp"` (double quotes are optional unless identifiers contain whitespace or special characters) |
|
||||
| `-file` | Path to a YAML or JSON template task file | Filepath |
|
||||
| `-no-reload` | Do not reload the task even when enabled | |
|
||||
| `-template` | Template ID to use to create the task | Template ID |
|
||||
| `-tick` | Path to the TICKscript to use to create the task | Filepath |
|
||||
| `-type` | Task type | `stream` or `batch` |
|
||||
| `-vars` | Path to a JSON variables file when using a template | Filepath |
|
||||
|
||||
## Examples
|
||||
|
||||
- [Create a new task from a TICKscript](#create-a-new-task-from-a-tickscript)
|
||||
- [Create a new task from a template](#create-a-new-task-from-a-template)
|
||||
- [Update the TICKscript of a task](#update-the-tickscript-of-a-task)
|
||||
- [Update a task without reloading the task](#update-a-task-without-reloading-the-task)
|
||||
- [Update a task to query multiple DBRP combinations](#update-a-task-to-query-multiple-dbrp-combinations)
|
||||
|
||||
### Create a new task from a TICKscript
|
||||
|
||||
```sh
|
||||
kapacitor define my_task \
|
||||
-dbrp mydb.myrp \
|
||||
-tick /path/to/TICKscript.tick \
|
||||
-type stream
|
||||
```
|
||||
|
||||
### Create a new task from a template
|
||||
|
||||
```sh
|
||||
kapacitor define my_task \
|
||||
-dbrp mydb.myrp \
|
||||
-template alert_template \
|
||||
-vars /path/to/vars.json \
|
||||
-type batch
|
||||
```
|
||||
|
||||
### Update the TICKscript of a task
|
||||
|
||||
```sh
|
||||
kapacitor define existing_task \
|
||||
-tick /path/to/new_TICKscript.tick
|
||||
```
|
||||
|
||||
### Update a task without reloading the task
|
||||
|
||||
```sh
|
||||
kapacitor define existing_task \
|
||||
-tick /path/to/new_TICKscript.tick \
|
||||
-no-reload
|
||||
```
|
||||
|
||||
### Update a task to query multiple DBRP combinations
|
||||
|
||||
{{% note %}}
|
||||
If a task queries multiple database and retention policy (DBRP) combinations,
|
||||
to add more, you must include all existing DBRPs.
|
||||
Any existing DBRPs omitted from the command when updating a task are removed
|
||||
from the task.
|
||||
{{% /note %}}
|
||||
|
||||
```sh
|
||||
kapacitor define existing_task \
|
||||
-dbrp mydb.myrp \
|
||||
-dbrp otherdb.default \
|
||||
-dbrp telegraf.autogen
|
||||
```
|
|
@ -0,0 +1,70 @@
|
|||
---
|
||||
title: kapacitor delete
|
||||
description: >
|
||||
The `kapacitor delete` command deletes tasks, templates, recordings, replays,
|
||||
topics, or handlers.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor delete
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor delete` command deletes tasks, templates, recordings, replays,
|
||||
topics, or handlers.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor delete <resource-type> [<topic>] [<resource-id-or-pattern>]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **resource-type**: Resource type to delete.
|
||||
The following resource types can be deleted:
|
||||
|
||||
- `tasks`
|
||||
- `templates`
|
||||
- `recordings`
|
||||
- `replays`
|
||||
- `topics`
|
||||
- `topic-handlers`
|
||||
|
||||
- **topic**: Topic to delete a handler from. _Only required when deleting a handler_.
|
||||
|
||||
- **resource-id-or-pattern**: Resource ID or glob pattern to match resource IDs
|
||||
to delete.
|
||||
|
||||
## Examples
|
||||
|
||||
- [Delete a task](#delete-a-task)
|
||||
- [Delete tasks matching a glob pattern](#delete-tasks-matching-a-glob-pattern)
|
||||
- [Delete a recording](#delete-a-recording)
|
||||
- [Delete a handler](#delete-a-handler)
|
||||
|
||||
### Delete a task
|
||||
|
||||
```sh
|
||||
kapacitor delete tasks my_task
|
||||
```
|
||||
|
||||
### Delete tasks matching a glob pattern
|
||||
|
||||
```sh
|
||||
kapacitor delete tasks *_alert
|
||||
```
|
||||
|
||||
### Delete a recording
|
||||
|
||||
```sh
|
||||
kapacitor delete recordings b0a2ba8a-aeeb-45ec-bef9-1a2939963586
|
||||
```
|
||||
|
||||
### Delete a handler
|
||||
|
||||
To delete a handler, specify the topic before the handler ID or glob pattern.
|
||||
|
||||
```sh
|
||||
kapacitor delete topic-handlers system slack
|
||||
```
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: kapacitor disable
|
||||
description: >
|
||||
The `kapacitor disable` command stops and disables a task.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor disable
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor disable` command stops and disables a task.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor disable <task-id-or-pattern>
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **task-id-or-pattern**: Task ID or glob pattern to match task IDs to disable.
|
||||
|
||||
## Examples
|
||||
|
||||
- [Disable a specific task](#disable-a-specific-task)
|
||||
- [Disable all tasks with IDs that match a glob pattern](#disable-all-tasks-with-ids-that-match-a-glob-pattern)
|
||||
|
||||
### Disable a specific task
|
||||
|
||||
```sh
|
||||
kapacitor disable cpu_alert
|
||||
```
|
||||
|
||||
### Disable all tasks with IDs that match a glob pattern
|
||||
|
||||
```sh
|
||||
kapacitor disable *_alert
|
||||
```
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: kapacitor enable
|
||||
description: >
|
||||
The `kapacitor enable` command enables and starts a task.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor enable
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor enable` command enables and starts a task.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor enable <task-id-or-pattern>
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **task-id-or-pattern**: Task ID or glob pattern to match task IDs to enable.
|
||||
|
||||
## Examples
|
||||
|
||||
- [Enable a specific task](#enable-a-specific-task)
|
||||
- [Enable all tasks with IDs that match a glob pattern](#enable-all-tasks-with-ids-that-match-a-glob-pattern)
|
||||
|
||||
### Enable a specific task
|
||||
|
||||
```sh
|
||||
kapacitor enable cpu_alert
|
||||
```
|
||||
|
||||
### Enable all tasks with IDs that match a glob pattern
|
||||
|
||||
```sh
|
||||
kapacitor enable *_alert
|
||||
```
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: kapacitor flux
|
||||
description: >
|
||||
The `kapacitor flux` command and its subcommands manage Flux tasks in Kapacitor.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor flux` command and its subcommands manage Flux tasks in Kapacitor.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux [subcommand]
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Subcommand | Description |
|
||||
| :------------------------------------------------------- | :----------------------------------------- |
|
||||
| [task](/kapacitor/v1/reference/cli/kapacitor/flux/task/) | Manage Kapacitor Flux tasks |
|
||||
| help, h | List commands or return help for a command |
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :------- | :---------------- |
|
||||
| `-h` | `--help` | Show command help |
|
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
title: kapacitor flux task
|
||||
description: >
|
||||
The `kapacitor flux task` command and its subcommands manage Flux tasks in Kapacitor.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task
|
||||
parent: kapacitor flux
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor flux task` command and its subcommands manage Flux tasks in Kapacitor.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task [subcommand] [flags] [arguments]
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Subcommand | Description |
|
||||
| :---------------------------------------------------------------------------- | :----------------------------------------- |
|
||||
| [create](/kapacitor/v1/reference/cli/kapacitor/flux/task/create/) | Create a Flux task |
|
||||
| [delete](/kapacitor/v1/reference/cli/kapacitor/flux/task/delete/) | Delete Flux tasks |
|
||||
| help, h | List commands or return help for a command |
|
||||
| [list](/kapacitor/v1/reference/cli/kapacitor/flux/task/list/) | List Flux tasks |
|
||||
| [log](/kapacitor/v1/reference/cli/kapacitor/flux/task/log/) | View Flux task logs |
|
||||
| [retry-failed](/kapacitor/v1/reference/cli/kapacitor/flux/task/retry-failed/) | Retry failed Flux task runs |
|
||||
| [run](/kapacitor/v1/reference/cli/kapacitor/flux/task/run/) | Manage Flux task runs |
|
||||
| [update](/kapacitor/v1/reference/cli/kapacitor/flux/task/update/) | Update a Flux task |
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :------- | :---------------- |
|
||||
| `-h` | `--help` | Show command help |
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
title: kapacitor flux task create
|
||||
description: >
|
||||
The `kapacitor flux task create` command creates a Flux task using a specified
|
||||
file or _stdin_.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task create
|
||||
parent: kapacitor flux task
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/flux/manage/create/
|
||||
---
|
||||
|
||||
The `kapacitor flux task create` command creates a Flux task using a specified
|
||||
file or _stdin_.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task create [flags] [flux-script]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **flux-script**: Flux script provided via _stdin_ (`-`).
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :------- | :----------------------- |
|
||||
| `-f` | `--file` | Path to Flux script file |
|
||||
| `-h` | `--help` | Show command help |
|
||||
| | `--json` | Output data as JSON |
|
||||
|
||||
## Examples
|
||||
|
||||
### Create a Kapacitor Flux task using a file
|
||||
|
||||
```sh
|
||||
kapacitor flux task create \
|
||||
--file /path/to/task.flux
|
||||
```
|
||||
|
||||
### Create a Kapacitor Flux task via stdin
|
||||
|
||||
```sh
|
||||
kapacitor flux task create -
|
||||
# Enter the Flux script in the stdin prompt
|
||||
```
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: kapacitor flux task delete
|
||||
description: >
|
||||
The `kapacitor flux task delete` command deletes Kapacitor Flux tasks.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task delete
|
||||
parent: kapacitor flux task
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/flux/manage/delete/
|
||||
---
|
||||
|
||||
The `kapacitor flux task delete` command deletes Kapacitor Flux tasks.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task delete [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :------- | :---------------------------- |
|
||||
| `-h` | `--help` | Show command help |
|
||||
| `-i` | `--id` | {{< req >}}: Task ID to delete |
|
||||
| | `--json` | Output data as JSON |
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitor flux task delete --id 000x00xX0xXXx00
|
||||
```
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
title: kapacitor flux task list
|
||||
description: >
|
||||
The `kapacitor flux task list` command lists Kapacitor Flux tasks.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task list
|
||||
parent: kapacitor flux task
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/flux/manage/list/
|
||||
---
|
||||
|
||||
The `kapacitor flux task list` command lists Kapacitor Flux tasks.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task list [flags]
|
||||
```
|
||||
|
||||
#### Aliases
|
||||
|
||||
- `find`
|
||||
- `ls`
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :---------- | :--------------------------------------- |
|
||||
| `-h` | `--help` | Show command help |
|
||||
| `-i` | `--id` | Task ID |
|
||||
| | `--json` | Output data as JSON |
|
||||
| | `--limit` | Number of tasks to return _(default is 500)_ |
|
||||
| `-n` | `--user-id` | Task owner ID |
|
||||
|
||||
## Examples
|
||||
|
||||
- [List all Kapacitor Flux tasks](#list-all-kapacitor-flux-tasks)
|
||||
- [List a specific Kapacitor Flux task](#list-a-specific-kapacitor-flux-task)
|
||||
- [List Kapacitor Flux tasks owned by a specific user](#list-kapacitor-flux-tasks-owned-by-a-specific-user)
|
||||
- [Limit the number of Kapacitor Flux tasks returned](#limit-the-number-of-kapacitor-flux-tasks-returned)
|
||||
|
||||
### List all Kapacitor Flux tasks
|
||||
|
||||
```sh
|
||||
kapacitor flux task list
|
||||
```
|
||||
|
||||
### List a specific Kapacitor Flux task
|
||||
|
||||
```sh
|
||||
kapacitor flux task list --id 000x00xX0xXXx00
|
||||
```
|
||||
|
||||
### List Kapacitor Flux tasks owned by a specific user
|
||||
|
||||
```sh
|
||||
kapacitor flux task list --user-id XXX000xX0x00xX0
|
||||
```
|
||||
|
||||
### Limit the number of Kapacitor Flux tasks returned
|
||||
|
||||
```sh
|
||||
kapacitor flux task list --limit 20
|
||||
```
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
title: kapacitor flux task log
|
||||
description: >
|
||||
The `kapacitor flux task log` command and subcommands view and manage Kapacitor
|
||||
Flux task logs.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task log
|
||||
parent: kapacitor flux task
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/flux/manage/view-task-logs/
|
||||
---
|
||||
|
||||
The `kapacitor flux task log` command and subcommands view and manage Kapacitor
|
||||
Flux task logs.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task log [subcommand] [flags]
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Subcommand | Description |
|
||||
| :---------------------------------------------------------------- | :----------------------------------------- |
|
||||
| help, h | List commands or return help for a command |
|
||||
| [list](/kapacitor/v1/reference/cli/kapacitor/flux/task/log/list/) | List logs for a Flux tasks |
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :------- | :---------------- |
|
||||
| `-h` | `--help` | Show command help |
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
title: kapacitor flux task log list
|
||||
description: >
|
||||
The `kapacitor flux task log list` command outputs Kapacitor Flux task logs.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task log list
|
||||
parent: kapacitor flux task log
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/flux/manage/view-task-logs/
|
||||
---
|
||||
|
||||
The `kapacitor flux task log list` command outputs Kapacitor Flux task logs.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task log list [flags]
|
||||
```
|
||||
|
||||
#### Aliases
|
||||
|
||||
- `find`
|
||||
- `ls`
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :---------- | :------------------- |
|
||||
| `-h` | `--help` | Show command help |
|
||||
| | `--json` | Output data as JSON |
|
||||
| | `--run-id` | Task run ID |
|
||||
| | `--task-id` | {{< req >}}: Task ID |
|
||||
|
||||
## Examples
|
||||
|
||||
### Show all run logs for a Flux task
|
||||
|
||||
```sh
|
||||
kapacitor flux task log list --task-id 000x00xX0xXXx00
|
||||
```
|
||||
|
||||
### Show logs for a specific Flux task run
|
||||
|
||||
```sh
|
||||
kapacitor flux task log list \
|
||||
--task-id 000x00xX0xXXx00 \
|
||||
--run-id XXX0xx0xX00Xx0X
|
||||
```
|
|
@ -0,0 +1,86 @@
|
|||
---
|
||||
title: kapacitor flux task retry-failed
|
||||
description: >
|
||||
The `kapacitor flux task retry-failed` command retries failed Kapacitor Flux
|
||||
task runs.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task retry-failed
|
||||
parent: kapacitor flux task
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/flux/manage/retry-failed/
|
||||
---
|
||||
|
||||
The `kapacitor flux task retry-failed` command retries failed Kapacitor Flux
|
||||
task runs.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task retry-failed [flags]
|
||||
```
|
||||
|
||||
#### Aliases
|
||||
|
||||
- `rtf`
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :------------- | :----------------------------------------------------------------------------------- |
|
||||
| | `--after` | Retry failed runs that occurred after this time _(RFC3339 timestamp)_ |
|
||||
| | `--before` | Retry failed runs that occurred before this time _(RFC3339 timestamp)_ |
|
||||
| | `--dry-run` | Output information about runs that would be retried without retrying the failed runs |
|
||||
| `-h` | `--help` | Show command help |
|
||||
| `-i` | `--id` | Flux task ID |
|
||||
| | `--json` | Output data as JSON |
|
||||
| | `--run-limit` | Maximum number of failed runs to retry per task _(default is 100)_ |
|
||||
| | `--task-limit` | Maximum number of tasks to retry failed runs for _(default is 100)_ |
|
||||
|
||||
## Examples
|
||||
|
||||
- [Retry failed Flux task runs for all tasks](#retry-failed-flux-task-runs-for-all-tasks)
|
||||
- [Retry failed Flux task runs for a specific task](#retry-failed-flux-task-runs-for-a-specific-task)
|
||||
- [Retry Flux task runs that failed in a specific time range](#retry-flux-task-runs-that-failed-in-a-specific-time-range)
|
||||
- [View information about failed runs that would be executed](#view-information-about-failed-runs-that-would-be-executed)
|
||||
- [Limit the number of tasks to retry failed runs for](#limit-the-number-of-tasks-to-retry-failed-runs-for)
|
||||
- [Limit the number of failed runs to retry for each task](#limit-the-number-of-failed-runs-to-retry-for-each-task)
|
||||
|
||||
### Retry failed Flux task runs for all tasks
|
||||
|
||||
```sh
|
||||
kapacitor flux task retry-failed
|
||||
```
|
||||
|
||||
### Retry failed Flux task runs for a specific task
|
||||
|
||||
```sh
|
||||
kapacitor flux task retry-failed --id 000x00xX0xXXx00
|
||||
```
|
||||
|
||||
### Retry Flux task runs that failed in a specific time range
|
||||
|
||||
```sh
|
||||
kapacitor flux task retry-failed \
|
||||
--after 2023-01-01T00:00:00Z \
|
||||
--before 2023-01-31T00:00:00Z
|
||||
```
|
||||
|
||||
### View information about failed runs that would be executed
|
||||
|
||||
```sh
|
||||
kapacitor flux task retry-failed --dry-run
|
||||
```
|
||||
|
||||
### Limit the number of tasks to retry failed runs for
|
||||
|
||||
```sh
|
||||
kapacitor flux task retry-failed --task-limit 10
|
||||
```
|
||||
|
||||
### Limit the number of failed runs to retry for each task
|
||||
|
||||
```sh
|
||||
kapacitor flux task retry-failed --run-limit 10
|
||||
```
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: kapacitor flux task run
|
||||
description: >
|
||||
The `kapacitor flux task run` command and subcommands manage Kapacitor Flux
|
||||
task runs.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task run
|
||||
parent: kapacitor flux task
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor flux task run` command and subcommands manage Kapacitor Flux
|
||||
task runs.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task run [subcommand] [flags] [arguments]
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Subcommand | Description |
|
||||
| :------------------------------------------------------------------ | :----------------------------------------- |
|
||||
| help, h | List commands or return help for a command |
|
||||
| [list](/kapacitor/v1/reference/cli/kapacitor/flux/task/run/list/) | List Flux task runs |
|
||||
| [retry](/kapacitor/v1/reference/cli/kapacitor/flux/task/run/retry/) | Retry Flux task runs |
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :------- | :---------------- |
|
||||
| `-h` | `--help` | Show command help |
|
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
title: kapacitor flux task run list
|
||||
description: >
|
||||
The `kapacitor flux task run list` command lists runs Kapacitor Flux task.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task run list
|
||||
parent: kapacitor flux task run
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/flux/manage/task-runs/
|
||||
---
|
||||
|
||||
The `kapacitor flux task run list` command lists runs Kapacitor Flux task.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task run list [flags]
|
||||
```
|
||||
|
||||
#### Aliases
|
||||
|
||||
- `find`
|
||||
- `ls`
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :---------- | :--------------------------------------------------------------- |
|
||||
| | `--json` | Output data as JSON |
|
||||
| | `--task-id` | {{< req >}}: Flux task ID |
|
||||
| | `--run-id` | Task run ID |
|
||||
| | `--before` | Output runs that executed before this time _(RFC3339 timestamp)_ |
|
||||
| | `--after` | Output runs that executed after this time _(RFC3339 timestamp)_ |
|
||||
| | `--limit` | Limit the results _(default is 100)_ |
|
||||
| `-h` | `--help` | Show command help |
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
- [List runs for a Flux task](#list-runs-for-a-flux-task)
|
||||
- [List Flux task runs that occurred in a time range](#list-flux-task-runs-that-occurred-in-a-time-range)
|
||||
- [List a limited number of Flux task runs](#list-a-limited-number-of-flux-task-runs)
|
||||
|
||||
### List runs for a Flux task
|
||||
|
||||
```sh
|
||||
kapacitor flux task run list --task-id 000x00xX0xXXx00
|
||||
```
|
||||
|
||||
### List Flux task runs that occurred in a time range
|
||||
|
||||
```sh
|
||||
kapacitor flux task run list \
|
||||
--task-id 000x00xX0xXXx00 \
|
||||
--after 2021-01-01T00:00:00Z \
|
||||
--before 2021-01-31T00:00:00Z
|
||||
```
|
||||
|
||||
### List a limited number of Flux task runs
|
||||
|
||||
```sh
|
||||
kapacitor flux task run list \
|
||||
--task-id 000x00xX0xXXx00 \
|
||||
--limit 10
|
||||
```
|
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
title: kapacitor flux task run retry
|
||||
description: >
|
||||
The `kapacitor flux task run retry` command retries a Kapacitor Flux task run.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task run retry
|
||||
parent: kapacitor flux task run
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/flux/manage/task-runs/
|
||||
---
|
||||
|
||||
The `kapacitor flux task run retry` command retries a Kapacitor Flux task run.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task run retry [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :---------- | :------------------------ |
|
||||
| `-h` | `--help` | Show command help |
|
||||
| | `--json` | Output data as JSON |
|
||||
| `-r` | `--run-id` | {{< req >}}: Task run ID |
|
||||
| `-i` | `--task-id` | {{< req >}}: Flux task ID |
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitor flux task run retry \
|
||||
--task-id 000x00xX0xXXx00 \
|
||||
--run-id XXX0xx0xX00Xx0X
|
||||
```
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
title: kapacitor flux task update
|
||||
description: >
|
||||
The `kapacitor flux task update` command updates a Kapacitor Flux task using a
|
||||
specified file or _stdin_.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor flux task update
|
||||
parent: kapacitor flux task
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/flux/manage/update/
|
||||
---
|
||||
|
||||
The `kapacitor flux task update` command updates a Kapacitor Flux task using a
|
||||
specified file or _stdin_.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor flux task update [flags] [flux-script]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **flux-script**: Flux script provided via _stdin_ (`-`).
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | | Description |
|
||||
| :--- | :--------- | :------------------------------------------------ |
|
||||
| `-f` | `--file` | Path to Flux script file |
|
||||
| `-h` | `--help` | Show command help |
|
||||
| `-i` | `--id` | {{< req >}}: Flux task ID |
|
||||
| | `--json` | Output data as JSON |
|
||||
| | `--status` | Update the task's status (`active` or `inactive`) |
|
||||
|
||||
## Examples
|
||||
|
||||
- [Update Flux task code using a file](#update-flux-task-code-using-a-file)
|
||||
- [Update Flux task code via stdin](#update-flux-task-code-via-stdin)
|
||||
- [Enable or disable a Flux task](#enable-or-disable-a-flux-task)
|
||||
|
||||
### Update Flux task code using a file
|
||||
|
||||
```sh
|
||||
kapacitor flux task update \
|
||||
--id 000x00xX0xXXx00 \
|
||||
--file /path/to/updated-task.flux
|
||||
```
|
||||
|
||||
### Update Flux task code via stdin
|
||||
|
||||
```sh
|
||||
kapacitor flux task update --id 000x00xX0xXXx00 -
|
||||
# Enter the Flux script in the stdin prompt
|
||||
```
|
||||
|
||||
### Enable or disable a Flux task
|
||||
|
||||
```sh
|
||||
kapacitor flux task update \
|
||||
--id 000x00xX0xXXx00 \
|
||||
--status inactive
|
||||
```
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: kapacitor help
|
||||
description: >
|
||||
The `kapacitor help` command returns help information for a specific
|
||||
[command](/kapacitor/v1/reference/cli/kapacitor/#commands).
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor help
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor help` command returns help information for a specific
|
||||
[command](/kapacitor/v1/reference/cli/kapacitor/#commands).
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor help [command]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitor help define-template
|
||||
```
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: kapacitor level
|
||||
description: >
|
||||
The `kapacitor level` command sets the log level on the Kapacitor server
|
||||
([`kapacitord`](/kapacitor/v1/referene/cli/kapacitord/)).
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor level
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor level` command sets the log level on the Kapacitor server
|
||||
([`kapacitord`](/kapacitor/v1/referene/cli/kapacitord/)).
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor level [log-level]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **log-level**: Log level to set on the Kapacitor server
|
||||
|
||||
- `debug`: Verbose debugging information
|
||||
- `info`: Standard Kapacitor server logs
|
||||
- `error`: Report errors only
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitor level error
|
||||
```
|
|
@ -0,0 +1,79 @@
|
|||
---
|
||||
title: kapacitor list
|
||||
description: >
|
||||
The `kapacitor list` command lists tasks, templates, recordings, replays,
|
||||
topics, or handlers and their current state.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor list
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor list` command lists tasks, templates, recordings, replays,
|
||||
topics, or handlers and their current state.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor list <resource-type> [<topic>] [<resource-id-or-pattern>]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **resource-type**: Resource type to list.
|
||||
The following resource are supported:
|
||||
|
||||
- `tasks`
|
||||
- `templates`
|
||||
- `recordings`
|
||||
- `replays`
|
||||
- `topics`
|
||||
- `topic-handlers`
|
||||
- `service-tests`
|
||||
|
||||
- **topic**: Topic to list handlers from. _Only required when listing handlers_.
|
||||
|
||||
- **resource-id-or-pattern**: Resource ID or glob pattern to match resource IDs
|
||||
to list. If no resource ID or pattern is specified, all resources of the
|
||||
specified resource type are listed.
|
||||
|
||||
## Examples
|
||||
|
||||
- [List all tasks](#list-all-tasks)
|
||||
- [List all tasks matching a glob pattern](#list-all-tasks-matching-a-glob-pattern)
|
||||
- [List a specific recording](#list-a-specific-recording)
|
||||
- [List all handlers in a topic](#list-all-handlers-in-a-topic)
|
||||
- [List a specific handler in a topic](#list-a-specific-handler-in-a-topic)
|
||||
|
||||
### List all tasks
|
||||
|
||||
```sh
|
||||
kapacitor list tasks
|
||||
```
|
||||
|
||||
### List all tasks matching a glob pattern
|
||||
|
||||
```sh
|
||||
kapacitor list tasks *_alert
|
||||
```
|
||||
|
||||
### List a specific recording
|
||||
|
||||
```sh
|
||||
kapacitor list recordings b0a2ba8a-aeeb-45ec-bef9-1a2939963586
|
||||
```
|
||||
|
||||
### List all handlers in a topic
|
||||
|
||||
```sh
|
||||
kapacitor list topic-handlers system
|
||||
```
|
||||
|
||||
### List a specific handler in a topic
|
||||
|
||||
To list a handler, specify the topic before the handler ID or glob pattern.
|
||||
|
||||
```sh
|
||||
kapacitor list topic-handlers system email
|
||||
```
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
title: kapacitor logs
|
||||
description: >
|
||||
The `kapacitor logs` command outputs Kapacitor logs and optionally filters by
|
||||
tags.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor logs
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/cli_client/#logging, Kapacitor logging
|
||||
- /kapacitor/v1/reference/cli/kapacitor/watch/
|
||||
---
|
||||
|
||||
The `kapacitor logs` command outputs Kapacitor logs and optionally filters by tags.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor logs [<tags> ...]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **tags**: Log tag key-value pairs to filter by
|
||||
|
||||
## Examples
|
||||
|
||||
- [Stream Kapacitor logs](#stream-kapacitor-logs)
|
||||
- [Stream kapacitor logs filtered by tags](#stream-kapacitor-logs-filtered-by-tags)
|
||||
|
||||
### Stream Kapacitor logs
|
||||
|
||||
```sh
|
||||
kapacitor logs
|
||||
```
|
||||
|
||||
### Stream kapacitor logs filtered by tags
|
||||
|
||||
```sh
|
||||
kapacitor logs service=http lvl=info+
|
||||
```
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
title: kapacitor record
|
||||
description: >
|
||||
The `kapacitor record` command records the result of an InfluxDB query or a
|
||||
snapshot of the live data stream.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor record
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
cascade:
|
||||
related:
|
||||
- /kapacitor/v1/working/cli_client/#data-sampling, Kapacitor data sampling
|
||||
- /kapacitor/v1/reference/cli/kapacitor/replay/
|
||||
---
|
||||
|
||||
The `kapacitor record` command and its subcommands record the result of an
|
||||
InfluxDB query or a snapshot of the live data stream.
|
||||
|
||||
_To replay the recording, see [`kapacitor replay`](/kapacitor/v1/reference/cli/kapacitor/replay/)._
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor record [subcommand] [flags]
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Subcommand | Description |
|
||||
| :------------------------------------------------------------- | :----------------------- |
|
||||
| [batch](/kapacitor/v1/reference/cli/kapacitor/record/batch/) | Record a batch task |
|
||||
| [query](/kapacitor/v1/reference/cli/kapacitor/record/query/) | Record an InfluxDB query |
|
||||
| [stream](/kapacitor/v1/reference/cli/kapacitor/record/stream/) | Record a stream task |
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
---
|
||||
title: kapacitor record batch
|
||||
description: >
|
||||
The `kapacitor record batch` command records the result of a Kapacitor batch task.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor record batch
|
||||
parent: kapacitor record
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor record batch` command records the result of a Kapacitor batch task.
|
||||
Once the recording is stopped, the command outputs the recording ID.
|
||||
If no recording ID is specified, Kapacitor assigns a random ID.
|
||||
|
||||
{{< req "The command requires the following" >}}:
|
||||
|
||||
- **Time range to query**: Use the `-past` flag or `-start` and `-stop` flags
|
||||
- **Task ID**: Use the `-task` flag
|
||||
|
||||
_To replay the recording, see [`kapacitor replay`](/kapacitor/v1/reference/cli/kapacitor/replay/)._
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor record batch [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | Description |
|
||||
| :-------------- | :-------------------------------------------------- |
|
||||
| `-no-wait` | Run recording in the background |
|
||||
| `-past` | Set start time via `now - past` |
|
||||
| `-recording-id` | ID to assign to the recording |
|
||||
| `-start` | Start time for the set of queries |
|
||||
| `-stop` | Stop time for the set of queries (default is now) |
|
||||
| `-task` | {{< req >}}: Task ID (uses the queries in the task) |
|
||||
|
||||
## Examples
|
||||
|
||||
- [Record a batch task using an absolute time range](#record-a-batch-task-using-an-absolute-time-range)
|
||||
- [Record a batch task using a relative time range](#record-a-batch-task-using-a-relative-time-range)
|
||||
- [Record a batch task and assign a custom recording ID](#record-a-batch-task-and-assign-a-custom-recording-id)
|
||||
|
||||
### Record a batch task using an absolute time range
|
||||
|
||||
```sh
|
||||
kapacitor record batch \
|
||||
-task example-task-id \
|
||||
-start 2023-01-01T00:00:00Z \
|
||||
-stop 2023-06-01T00:00:00Z
|
||||
```
|
||||
|
||||
### Record a batch task using a relative time range
|
||||
|
||||
```sh
|
||||
kapacitor record batch \
|
||||
-task example-task-id \
|
||||
-past 90d
|
||||
```
|
||||
|
||||
### Record a batch task and assign a custom recording ID
|
||||
|
||||
```sh
|
||||
kapacitor record batch \
|
||||
-task example-task-id \
|
||||
-past 90d \
|
||||
-recording-id 90d-example-task-rec
|
||||
```
|
|
@ -0,0 +1,69 @@
|
|||
---
|
||||
title: kapacitor record query
|
||||
description: >
|
||||
The `kapacitor record query` command records the result of an InfluxQL query.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor record query
|
||||
parent: kapacitor record
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor record query` command records the result of an InfluxQL query.
|
||||
Once the recording is stopped, the command outputs the recording ID.
|
||||
If no recording ID is specified, Kapacitor assigns a random ID.
|
||||
|
||||
{{< req "The command requires the following" >}}:
|
||||
|
||||
- **InfluxQL query**: Use the `-query` flag
|
||||
- **Recording type**: Use the `-type` flag and pass either `batch` or `query`
|
||||
|
||||
_To replay the recording, see [`kapacitor replay`](/kapacitor/v1/reference/cli/kapacitor/replay/)._
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor record query [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | Description |
|
||||
| :-------------- | :-------------------------------------------------------------------------------------------------- |
|
||||
| `-query` | {{< req >}}: Query to record. |
|
||||
| `-type` | {{< req >}}: Recording type (`stream` or `batch`) |
|
||||
| `-cluster` | [Named InfluxDB cluster or instance](/kapacitor/v1/administration/configuration/#influxdb) to query |
|
||||
| `-no-wait` | Run recording in the background |
|
||||
| `-recording-id` | ID to assign to the recording |
|
||||
|
||||
## Examples
|
||||
|
||||
- [Record an InfluxQL query](#record-an-influxql-query)
|
||||
- [Record an InfluxQL query and assign a custom recording ID](#record-an-influxql-query-and-assign-a-custom-recording-id)
|
||||
- [Record an InfluxQL query for a specific InfluxDB cluster](#record-an-influxql-query-for-a-specific-influxdb-cluster)
|
||||
|
||||
### Record an InfluxQL query
|
||||
|
||||
```sh
|
||||
influx record query \
|
||||
-query "SELECT temp, hum FROM db.rp.home" \
|
||||
-type batch
|
||||
```
|
||||
|
||||
### Record an InfluxQL query and assign a custom recording ID
|
||||
|
||||
```sh
|
||||
influx record query \
|
||||
-query "SELECT temp, hum FROM db.rp.home" \
|
||||
-type batch \
|
||||
-recording-id example-query-rec
|
||||
```
|
||||
|
||||
### Record an InfluxQL query for a specific InfluxDB cluster
|
||||
|
||||
```sh
|
||||
influx record query \
|
||||
-query "SELECT temp, hum FROM db.rp.home" \
|
||||
-type batch \
|
||||
-cluster influxdb-enterprise
|
||||
```
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
title: kapacitor record stream
|
||||
description: >
|
||||
The `kapacitor record stream` command records the result of a Kapacitor stream task.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor record stream
|
||||
parent: kapacitor record
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor record stream` command records the result of a Kapacitor stream task.
|
||||
Once the recording is stopped, the command outputs the recording ID.
|
||||
If no recording ID is specified, Kapacitor assigns a random ID.
|
||||
|
||||
{{< req "The command requires the following" >}}:
|
||||
|
||||
- **Recording duration**: Use the `-duration` flag
|
||||
- **Task ID**: Use the `-task` flag
|
||||
|
||||
_To replay the recording, see [`kapacitor replay`](/kapacitor/v1/reference/cli/kapacitor/replay/)._
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor record stream [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | Description |
|
||||
| :-------------- | :------------------------------------------------------- |
|
||||
| `-duration` | {{< req >}}: How long to record the data stream |
|
||||
| `-no-wait` | Run recording in the background |
|
||||
| `-recording-id` | ID to assign to the recording |
|
||||
| `-task` | {{< req >}}: Task ID (uses the `dbrp` value in the task) |
|
||||
|
||||
## Examples
|
||||
|
||||
- [Record a stream task](#record-a-stream-task)
|
||||
- [Record a stream task and assign a custom recording ID](#record-a-stream-task-and-assign-a-custom-recording-id)
|
||||
|
||||
### Record a stream task
|
||||
|
||||
```sh
|
||||
kapacitor record stream \
|
||||
-task example-task-id \
|
||||
-duration 1h
|
||||
```
|
||||
|
||||
### Record a stream task and assign a custom recording ID
|
||||
|
||||
```sh
|
||||
kapacitor record stream \
|
||||
-task example-task-id \
|
||||
-duration 1h \
|
||||
-recording-id 1h-example-stream-rec
|
||||
```
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: kapacitor reload
|
||||
description: >
|
||||
The `kapacitor reload` command disables and reenables running Kapacitor tasks.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor reload
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor reload` command disables and reenables running Kapacitor tasks.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor reload <task-id-or-pattern>
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **task-id-or-pattern**: Task ID or glob pattern to match task IDs to reload.
|
||||
|
||||
## Examples
|
||||
|
||||
- [Reload a specific task](#reload-a-specific-task)
|
||||
- [Reload all tasks with IDs that match a pattern](#reload-all-tasks-with-ids-that-match-a-pattern)
|
||||
|
||||
### Reload a specific task
|
||||
|
||||
```sh
|
||||
kapacitor reload cpu_alert
|
||||
```
|
||||
|
||||
### Reload all tasks with IDs that match a pattern
|
||||
|
||||
```sh
|
||||
kapacitor reload *_alert
|
||||
```
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: kapacitor replay-live
|
||||
description: >
|
||||
The `kapacitor replay-live` command and its subcommands replay data to a task
|
||||
without saving a recording.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor replay-live
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor replay-live` command and its subcommands replay data to a task
|
||||
without saving a recording.
|
||||
The command is a hybrid of the `kapacitor record batch|query` and
|
||||
`kapacitor replay` commands.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor replay-live [subcommand] [flags]
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Subcommand | Description |
|
||||
| :------------------------------------------------------------------ | :-------------------------- |
|
||||
| [batch](/kapacitor/v1/reference/cli/kapacitor/replay-live/batch/) | Replay data to a batch task |
|
||||
| [stream](/kapacitor/v1/reference/cli/kapacitor/replay-live/stream/) | Replay data to stream task |
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
title: kapacitor replay-live batch
|
||||
description: >
|
||||
The `kapacitor replay-live batch` command replays queries in a batch task
|
||||
without saving a recording.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor replay-live batch
|
||||
parent: kapacitor replay-live
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor replay-live batch` command replays queries in a batch task
|
||||
without saving a recording.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor replay-live batch [flags]
|
||||
```
|
||||
|
||||
## Flags {#replay-live-flags}
|
||||
|
||||
| Flag | Description |
|
||||
| :------------ | :------------------------------------------------------------------------ |
|
||||
| `-no-wait` | Run replay in the background |
|
||||
| `-past` | Set start time via `now - past` |
|
||||
| `-real-clock` | Replay queries in real time, otherwise replay queries as fast as possible |
|
||||
| `-rec-time` | Use times saved in the recording instead of present times |
|
||||
| `-replay-id` | ID to assign to the replay (default is a random ID) |
|
||||
| `-start` | Start time for the set of queries |
|
||||
| `-stop` | Stop time for the set of queries (default now) |
|
||||
| `-task` | {{< req >}}: Task ID |
|
||||
|
||||
## Examples
|
||||
|
||||
- [Live-replay batch queries in an absolute time range](#live-replay-batch-queries-in-an-absolute-time-range)
|
||||
- [Live-replay batch queries in a relative time range](#live-replay-batch-queries-in-a-relative-time-range)
|
||||
|
||||
### Live-replay batch queries in an absolute time range
|
||||
|
||||
```sh
|
||||
kapacitor replay-live batch \
|
||||
-task cpu_idle \
|
||||
-start 2023-09-01T00:00:00Z \
|
||||
-stop 2023-09-02T00:00:00Z
|
||||
```
|
||||
|
||||
### Live-replay batch queries in a relative time range
|
||||
|
||||
```sh
|
||||
kapacitor replay-live batch \
|
||||
-task cpu_idle \
|
||||
-past 10h
|
||||
```
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
title: kapacitor replay-live query
|
||||
description: >
|
||||
The `kapacitor replay-live query` command replays the result of a query
|
||||
against a task without saving a recording.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor replay-live query
|
||||
parent: kapacitor replay-live
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor replay-live query` command replays the result of a query
|
||||
against a task without saving a recording.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor replay-live query [flags]
|
||||
```
|
||||
|
||||
## Flags {#replay-live-flags}
|
||||
|
||||
| Flag | Description |
|
||||
| :------------ | :-------------------------------------------------------------------------------------------------- |
|
||||
| `-cluster` | [Named InfluxDB cluster or instance](/kapacitor/v1/administration/configuration/#influxdb) to query |
|
||||
| `-no-wait` | Run replay in the background |
|
||||
| `-query` | InfluxQL query to replay |
|
||||
| `-real-clock` | Replay queries in real time, otherwise replay queries as fast as possible |
|
||||
| `-rec-time` | Use times saved in the recording instead of present times |
|
||||
| `-replay-id` | ID to assign to the replay (default is a random ID) |
|
||||
| `-task` | {{< req >}}: Task ID |
|
||||
|
||||
## Examples
|
||||
|
||||
##### Replay the results of a query against an alert task
|
||||
|
||||
```sh
|
||||
kapacitor replay-live query \
|
||||
-task cpu_alert \
|
||||
-rec-time \
|
||||
-query 'SELECT value FROM telegraf.default.cpu_idle WHERE time > now() - 1h'
|
||||
```
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
title: kapacitor replay
|
||||
description: >
|
||||
The `kapacitor replay` command replays a task or query recording.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor replay
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/reference/cli/kapacitor/record/
|
||||
- /kapacitor/v1/working/cli_client/#data-sampling, Kapacitor data sampling
|
||||
---
|
||||
|
||||
The `kapacitor replay` command replays a task or query recording.
|
||||
|
||||
The times of the data points will either be relative to `now` or, if the `-rec-time`
|
||||
flag is included, the exact times in the recording.
|
||||
In either case, relative times between data points remain the same.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor replay [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | Description |
|
||||
| :------------ | :------------------------------------------------------------------ |
|
||||
| `-no-wait` | Run replay in the background |
|
||||
| `-real-clock` | Replay data in real time, otherwise replay data as fast as possible |
|
||||
| `-rec-time` | Use times saved in the recording instead of present times |
|
||||
| `-recording` | {{< req >}}: Recording ID to replay |
|
||||
| `-replay-id` | ID to assign to the replay (default is a random ID) |
|
||||
| `-task` | Task ID |
|
||||
|
||||
## Examples
|
||||
|
||||
##### Replay a recording
|
||||
|
||||
```sh
|
||||
kapacitor replay \
|
||||
-recording 4e0f09c5-1426-4778-8f9b-c4a88f5c2b66 \
|
||||
-task cpu_alert
|
||||
```
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
title: kapacitor service-tests
|
||||
description: >
|
||||
The `kapacitor service-tests` command executes one or more of the available
|
||||
service tests.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor service-tests
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor service-tests` command executes one or more of the available
|
||||
service tests.
|
||||
|
||||
{{% note %}}
|
||||
_Use the [`kapacitor list service-tests` command](/kapacitor/v1/reference/cli/kapacitor/list/)
|
||||
to list all available service tests._
|
||||
{{% /note %}}
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor service-tests [<service> ...]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **service**: Kapacitor service (handler) to execute service tests for
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitor service-tests slack talk smtp
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View example output" %}}
|
||||
```text
|
||||
Service Success Message
|
||||
slack true
|
||||
talk false service is not enabled
|
||||
smtp false service is not enabled
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
title: kapacitor show-template
|
||||
description: >
|
||||
The `kapacitor show-template` command returns information about a template.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor show-template
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor show-template` command returns information about a template.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor show-template <template-id>
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **template-id**: Template ID to return information about
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitor show-template example-template-id
|
||||
```
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
title: kapacitor show-topic-handler
|
||||
description: >
|
||||
The `kapacitor show-topic-handler` command returns information about a topic handler.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor show-topic-handler
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor show-topic-handler` command returns information about a topic handler.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor show-topic-handler <topic-id> <handler-id>
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **topic-id**: Topic ID
|
||||
- **handler-id**: Handler ID to return information about
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitor show-topic-handler cpu slack
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View example output" %}}
|
||||
```text
|
||||
ID: slack
|
||||
Topic: cpu
|
||||
Kind: slack
|
||||
Match:
|
||||
Options: {"channel":"#kapacitor"}
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
title: kapacitor show-topic
|
||||
description: >
|
||||
The `kapacitor show-topic` command returns information about a topic.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor show-topic
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor show-topic` command returns information about a topic.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor show-topic <topic-id>
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **topic-id**: Topic ID to return information about
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitor show-topic example-topic-id
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View example output" %}}
|
||||
```text
|
||||
ID: example-topic-id
|
||||
Level: OK
|
||||
Collected: 0
|
||||
Handlers: []
|
||||
Events:
|
||||
Event Level Message Date
|
||||
cpu:nil OK cpu:nil is OK 13 Sep 23 13:34 CET
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
title: kapacitor show
|
||||
description: >
|
||||
The `kapacitor show` command returns information about a task.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor show
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor show` command returns information about a task.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor show [flags] [task-id]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | Description |
|
||||
| :------ | :---------------------------------------------- |
|
||||
| -replay | Display task information related to a replay ID |
|
||||
|
||||
## Examples
|
||||
|
||||
### Show information about a task
|
||||
|
||||
```sh
|
||||
kapacitor show example-task-id
|
||||
```
|
||||
|
||||
### Show information about a task in the context of a replay
|
||||
|
||||
{{% note %}}
|
||||
Use the [`kapacitor list replays` command](/kapacitor/v1/reference/cli/kapacitor/list/)
|
||||
to view replay IDs.
|
||||
{{% /note %}}
|
||||
|
||||
```sh
|
||||
kapacitor show -replay example-replay-id example-task-id
|
||||
```
|
|
@ -0,0 +1,92 @@
|
|||
---
|
||||
title: kapacitor stats
|
||||
description: >
|
||||
The `kapacitor stats` command returns Kapacitor server statistics.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor stats
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor stats` command returns Kapacitor server statistics.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor stats <context>
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **context**: Statistics context. The following contexts are available:
|
||||
- **general**: Displays a summary of Kapacitor statistics.
|
||||
- **ingress**: Displays statistics about data Kapacitor is receiving segmented
|
||||
by database, retention policy, and measurement.
|
||||
|
||||
## Examples
|
||||
|
||||
- [View general Kapacitor statistics](#view-general-kapacitor-statistics)
|
||||
- [View Kapacitor ingress statistics](#view-kapacitor-ingress-statistics)
|
||||
|
||||
### View general Kapacitor statistics
|
||||
|
||||
```sh
|
||||
kapacitor stats general
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View example general statistics output" %}}
|
||||
```sh
|
||||
ClusterID: ef3b3f9d-0997-4c0b-b1b6-5d0fb37fe509
|
||||
ServerID: 90582c9c-2e25-4654-903e-0acfc48fb5da
|
||||
Host: localhost
|
||||
Tasks: 8
|
||||
Enabled Tasks: 2
|
||||
Subscriptions: 12
|
||||
Version: 1.7.0~n201711280812
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
### View Kapacitor ingress statistics
|
||||
|
||||
```sh
|
||||
kapacitor stats ingress
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View example ingress statistics output" %}}
|
||||
```sh
|
||||
Database Retention Policy Measurement Points Received
|
||||
_internal monitor cq 5274
|
||||
_internal monitor database 52740
|
||||
_internal monitor httpd 5274
|
||||
_internal monitor queryExecutor 5274
|
||||
_internal monitor runtime 5274
|
||||
_internal monitor shard 300976
|
||||
_internal monitor subscriber 126576
|
||||
_internal monitor tsm1_cache 300976
|
||||
_internal monitor tsm1_engine 300976
|
||||
_internal monitor tsm1_filestore 300976
|
||||
_internal monitor tsm1_wal 300976
|
||||
_internal monitor write 5274
|
||||
_kapacitor autogen edges 26370
|
||||
_kapacitor autogen ingress 73817
|
||||
_kapacitor autogen kapacitor 2637
|
||||
_kapacitor autogen load 2637
|
||||
_kapacitor autogen nodes 23733
|
||||
_kapacitor autogen runtime 2637
|
||||
_kapacitor autogen topics 73836
|
||||
chronograf autogen alerts 1560
|
||||
telegraf autogen cpu 47502
|
||||
telegraf autogen disk 31676
|
||||
telegraf autogen diskio 52800
|
||||
telegraf autogen kernel 5280
|
||||
telegraf autogen mem 5280
|
||||
telegraf autogen processes 5280
|
||||
telegraf autogen swap 10560
|
||||
telegraf autogen system 15840
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
|
@ -0,0 +1,151 @@
|
|||
---
|
||||
title: kapacitor vars
|
||||
description: >
|
||||
The `kapacitor vars` command returns variables associated with the Kapacitor
|
||||
server in JSON format.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor vars
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor vars` command returns variables associated with the Kapacitor
|
||||
server in JSON format.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor vars
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View example output" %}}
|
||||
|
||||
{{% note %}}
|
||||
Some fields in the following output have been truncated for brevity.
|
||||
{{% /note %}}
|
||||
|
||||
```json
|
||||
{
|
||||
"cluster_id": "4210702c-bd32-487d-9a08-f6d782cebb41",
|
||||
"cmdline": [
|
||||
"./kapacitord"
|
||||
],
|
||||
"host": "localhost",
|
||||
"kapacitor": {
|
||||
"33f8dea0-0989-4643-ab77-041a03510c32": {
|
||||
"name": "ingress",
|
||||
"tags": {
|
||||
"database": "_internal",
|
||||
"retention_policy": "monitor",
|
||||
"measurement": "database",
|
||||
"task_master": "main",
|
||||
"cluster_id": "4210702c-bd32-487d-9a08-f6d782cebb41",
|
||||
"server_id": "b37b6336-659c-41c6-8985-9e077e87507a",
|
||||
"host": "localhost"
|
||||
},
|
||||
"values": {
|
||||
"points_received": 42
|
||||
}
|
||||
},
|
||||
"f85ada29-506e-4e49-a7b7-b85eabc69cb1": {
|
||||
"values": {
|
||||
"points_received": 1561
|
||||
},
|
||||
"name": "ingress",
|
||||
"tags": {
|
||||
"database": "_internal",
|
||||
"retention_policy": "monitor",
|
||||
"measurement": "tsm1_filestore",
|
||||
"cluster_id": "4210702c-bd32-487d-9a08-f6d782cebb41",
|
||||
"server_id": "b37b6336-659c-41c6-8985-9e077e87507a",
|
||||
"host": "localhost",
|
||||
"task_master": "main"
|
||||
}
|
||||
},
|
||||
...
|
||||
},
|
||||
"memstats": {
|
||||
"Alloc": 37329312,
|
||||
"TotalAlloc": 82967992,
|
||||
"Sys": 80999688,
|
||||
"Lookups": 0,
|
||||
"Mallocs": 506924,
|
||||
"Frees": 362253,
|
||||
"HeapAlloc": 37329312,
|
||||
"HeapSys": 66027520,
|
||||
"HeapIdle": 24068096,
|
||||
"HeapInuse": 41959424,
|
||||
"HeapReleased": 5537792,
|
||||
"HeapObjects": 144671,
|
||||
"StackInuse": 1081344,
|
||||
"StackSys": 1081344,
|
||||
"MSpanInuse": 520000,
|
||||
"MSpanSys": 701760,
|
||||
"MCacheInuse": 19200,
|
||||
"MCacheSys": 31200,
|
||||
"BuckHashSys": 1474509,
|
||||
"GCSys": 9466824,
|
||||
"OtherSys": 2216531,
|
||||
"NextGC": 55888456,
|
||||
"LastGC": 1696341811994713000,
|
||||
"PauseTotalNs": 498619,
|
||||
"PauseNs": [
|
||||
32555,
|
||||
194389,
|
||||
88467,
|
||||
88318,
|
||||
94890,
|
||||
0,
|
||||
...
|
||||
],
|
||||
"PauseEnd": [
|
||||
1696341734917436000,
|
||||
1696341735037835000,
|
||||
1696341735207253000,
|
||||
1696341771998312000,
|
||||
1696341811994713000,
|
||||
0,
|
||||
...
|
||||
],
|
||||
"NumGC": 5,
|
||||
"NumForcedGC": 0,
|
||||
"GCCPUFraction": 0.000037085629051112796,
|
||||
"EnableGC": true,
|
||||
"DebugGC": false,
|
||||
"BySize": [
|
||||
{
|
||||
"Size": 0,
|
||||
"Mallocs": 0,
|
||||
"Frees": 0
|
||||
},
|
||||
{
|
||||
"Size": 8,
|
||||
"Mallocs": 3645,
|
||||
"Frees": 1540
|
||||
},
|
||||
{
|
||||
"Size": 16,
|
||||
"Mallocs": 122649,
|
||||
"Frees": 81676
|
||||
},
|
||||
{
|
||||
"Size": 24,
|
||||
"Mallocs": 60766,
|
||||
"Frees": 40835
|
||||
},
|
||||
...
|
||||
]
|
||||
},
|
||||
"num_enabled_tasks": 0,
|
||||
"num_subscriptions": 8,
|
||||
"num_tasks": 2,
|
||||
"platform": "OSS",
|
||||
"product": "kapacitor",
|
||||
"server_id": "b37b6336-659c-41c6-8985-9e077e87507a",
|
||||
"version": "{{< latest-patch >}}"
|
||||
}
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: kapacitor version
|
||||
description: >
|
||||
The `kapacitor version` command outputs the version, build branch, and git
|
||||
commit hash for the current `kapacitor` CLI.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor version
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitor version` command outputs the version, build branch, and git
|
||||
commit hash for the current `kapacitor` CLI.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor version
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitor version
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View example output" %}}
|
||||
```sh
|
||||
Kapacitor OSS v{{< latest-patch >}} (git: HEAD 00x0x0X0Xx0x0xXX0xxxXxx00000xX0000x0xXx0)
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
title: kapacitor watch
|
||||
description: >
|
||||
The `kapacitor watch` command streams logs associated with a task.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitor watch
|
||||
parent: kapacitor
|
||||
weight: 301
|
||||
related:
|
||||
- /kapacitor/v1/working/cli_client/#logging, Kapacitor logging
|
||||
- /kapacitor/v1/reference/cli/kapacitor/logs/
|
||||
---
|
||||
|
||||
The `kapacitor watch` command streams logs associated with a task.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitor watch <task-id> [<tags> ...]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- **task-id**: Task ID
|
||||
- **tags**: Log tag key-value pairs to filter by
|
||||
|
||||
## Examples
|
||||
|
||||
- [Stream all logs from a task](#stream-all-logs-from-a-task)
|
||||
- [Stream logs from a task filtered by tags](#stream-logs-from-a-task-filtered-by-tags)
|
||||
|
||||
### Stream all logs from a task
|
||||
|
||||
```sh
|
||||
kapacitor watch example-task-id
|
||||
```
|
||||
|
||||
### Stream logs from a task filtered by tags
|
||||
|
||||
```sh
|
||||
kapacitor watch example-task-id level=CRITICAL node=alert2
|
||||
```
|
|
@ -0,0 +1,88 @@
|
|||
---
|
||||
title: kapacitord
|
||||
description: >
|
||||
The `kapacitord` daemon starts and runs the Kapacitor server.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitord
|
||||
parent: Command line tools
|
||||
weight: 201
|
||||
---
|
||||
|
||||
The `kapacitord` daemon starts and runs the Kapacitor server.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitord [[command] [flags]]
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Description |
|
||||
| :------------------------------------------------------------- | :------------------------------------------ |
|
||||
| [config](/kapacitor/v1/reference/cli/kapacitord/config/) | Display the default Kapacitor configuration |
|
||||
| [downgrade](/kapacitor/v1/reference/cli/kapacitord/downgrade/) | Reverts a topic store format upgrade |
|
||||
| [help](/kapacitor/v1/reference/cli/kapacitord/help/) | Output help for a command |
|
||||
| [run](/kapacitor/v1/reference/cli/kapacitord/run/) | Run the Kapacitor server |
|
||||
| [version](/kapacitor/v1/reference/cli/kapacitord/) | Display the Kapacitor version |
|
||||
|
||||
{{% note %}}
|
||||
_[`run`](/kapacitor/v1/reference/cli/kapacitord/run/) is the default command._
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | Description | Input |
|
||||
| :------------------ | :-------------------------------------------------------- | :------------------------------------- |
|
||||
| `-blacklist-cidrs` | Blacklist CIDRs for most HTTP GET/POST operations | Comma-separated list of CIDRs |
|
||||
| `-config` | Path to Kapacitor configuration file | Configuration filepath |
|
||||
| `-disable-handlers` | Disable alert handlers | Comma-separated list of alert-handlers |
|
||||
| `-hostname` | Override the hostname in the Kapacitor configuration file | Hostname |
|
||||
| `-pidfile` | Write process ID to a file | PID filepath |
|
||||
| `-log-file` | Write logs to a file | Log filepath |
|
||||
| `-log-level` | Set the log level | `debug`, `info`, or `error` |
|
||||
|
||||
## Examples
|
||||
|
||||
- [Run Kapacitor with default settings](#run-kapacitor-with-default-settings)
|
||||
- [Run Kapacitor with custom configuration settings](#run-kapacitor-with-custom-configuration-settings)
|
||||
- [Disable alert handlers](#disable-alert-handlers)
|
||||
- [Change Kapacitor logging settings](#change-kapacitor-logging-settings)
|
||||
- [Blacklist HTTP GET or POST operations from specific CIDRs](#blacklist-http-get-or-post-operations-from-specific-cidrs)
|
||||
|
||||
### Run Kapacitor with default settings
|
||||
|
||||
```sh
|
||||
kapacitord
|
||||
```
|
||||
|
||||
### Run Kapacitor with custom configuration settings
|
||||
|
||||
```sh
|
||||
kapacitord -config /path/to/kapacitor.conf
|
||||
```
|
||||
|
||||
### Disable alert handlers
|
||||
|
||||
Disabling alert handlers can be useful for security reasons--for example,
|
||||
disabling the `exec` handler on a shared system.
|
||||
|
||||
```sh
|
||||
kapacitord -disable-handlers exec,mqtt
|
||||
```
|
||||
|
||||
### Change Kapacitor logging settings
|
||||
|
||||
```sh
|
||||
kapacitord \
|
||||
-log-file /path/to/kapacitor.log \
|
||||
-log-level debug
|
||||
```
|
||||
|
||||
### Blacklist HTTP GET or POST operations from specific CIDRs
|
||||
|
||||
```sh
|
||||
kapacitord -blacklist-cidrs 10.10.0.0/16,192.168.200.5/30
|
||||
```
|
|
@ -0,0 +1,389 @@
|
|||
---
|
||||
title: kapacitord config
|
||||
description: >
|
||||
The `kapacitord config` outputs the default Kapacitor configuration.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitord config
|
||||
parent: kapacitord
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitord config` outputs the default Kapacitor configuration.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitord config
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View `kapacitord config` output" %}}
|
||||
```toml
|
||||
hostname = "localhost"
|
||||
data_dir = "/Users/username/.kapacitor"
|
||||
skip-config-overrides = false
|
||||
default-retention-policy = ""
|
||||
|
||||
[alert]
|
||||
persist-topics = true
|
||||
topic-buffer-length = 5000
|
||||
|
||||
[auth]
|
||||
enabled = false
|
||||
cache-expiration = "0s"
|
||||
bcrypt-cost = 0
|
||||
meta-addr = ""
|
||||
meta-username = ""
|
||||
meta-password = ""
|
||||
meta-internal-shared-secret = ""
|
||||
meta-use-tls = false
|
||||
meta-ca = ""
|
||||
meta-cert = ""
|
||||
meta-key = ""
|
||||
meta-insecure-skip-verify = false
|
||||
|
||||
[http]
|
||||
bind-address = ":9092"
|
||||
auth-enabled = false
|
||||
log-enabled = true
|
||||
write-tracing = false
|
||||
pprof-enabled = false
|
||||
https-enabled = false
|
||||
https-certificate = "/etc/ssl/kapacitor.pem"
|
||||
https-private-key = ""
|
||||
shutdown-timeout = "10s"
|
||||
shared-secret = ""
|
||||
|
||||
[replay]
|
||||
dir = "/Users/username/.kapacitor/replay"
|
||||
|
||||
[storage]
|
||||
boltdb = "/Users/username/.kapacitor/kapacitor.db"
|
||||
|
||||
[task]
|
||||
dir = "/Users/username/.kapacitor/tasks"
|
||||
snapshot-interval = "1m0s"
|
||||
|
||||
[fluxtask]
|
||||
enabled = false
|
||||
task-run-influxdb = ""
|
||||
task-run-bucket = "kapacitor_fluxtask_logs"
|
||||
task-run-org = ""
|
||||
task-run-orgid = ""
|
||||
task-run-measurement = "runs"
|
||||
default-influxdb = ""
|
||||
|
||||
[load]
|
||||
enabled = false
|
||||
dir = "/Users/username/.kapacitor/load"
|
||||
|
||||
[[influxdb]]
|
||||
enabled = true
|
||||
name = "default"
|
||||
default = false
|
||||
urls = ["http://localhost:8086"]
|
||||
username = ""
|
||||
password = ""
|
||||
token = ""
|
||||
http-shared-secret = false
|
||||
ssl-ca = ""
|
||||
ssl-cert = ""
|
||||
ssl-key = ""
|
||||
insecure-skip-verify = false
|
||||
timeout = "0s"
|
||||
disable-subscriptions = false
|
||||
subscription-protocol = "http"
|
||||
subscription-mode = "cluster"
|
||||
kapacitor-hostname = ""
|
||||
http-port = 0
|
||||
udp-bind = ""
|
||||
udp-buffer = 1000
|
||||
udp-read-buffer = 0
|
||||
startup-timeout = "5m0s"
|
||||
subscriptions-sync-interval = "1m0s"
|
||||
subscription-path = ""
|
||||
compression = "gzip"
|
||||
[influxdb.excluded-subscriptions]
|
||||
_kapacitor = ["autogen"]
|
||||
|
||||
[logging]
|
||||
file = "STDERR"
|
||||
level = "DEBUG"
|
||||
|
||||
[config-override]
|
||||
enabled = true
|
||||
|
||||
[tls]
|
||||
min-version = ""
|
||||
max-version = ""
|
||||
|
||||
[collectd]
|
||||
enabled = false
|
||||
bind-address = ":25826"
|
||||
database = "collectd"
|
||||
retention-policy = ""
|
||||
batch-size = 5000
|
||||
batch-pending = 10
|
||||
batch-timeout = "10s"
|
||||
read-buffer = 0
|
||||
typesdb = "/usr/share/collectd/types.db"
|
||||
security-level = "none"
|
||||
auth-file = "/etc/collectd/auth_file"
|
||||
parse-multivalue-plugin = "split"
|
||||
|
||||
[opentsdb]
|
||||
enabled = false
|
||||
bind-address = ":4242"
|
||||
database = "opentsdb"
|
||||
retention-policy = ""
|
||||
consistency-level = "one"
|
||||
tls-enabled = false
|
||||
certificate = "/etc/ssl/influxdb.pem"
|
||||
batch-size = 1000
|
||||
batch-pending = 5
|
||||
batch-timeout = "1s"
|
||||
log-point-errors = true
|
||||
|
||||
[alerta]
|
||||
enabled = false
|
||||
url = ""
|
||||
insecure-skip-verify = false
|
||||
token = ""
|
||||
token-prefix = ""
|
||||
environment = ""
|
||||
origin = ""
|
||||
timeout = "0s"
|
||||
|
||||
[bigpanda]
|
||||
enabled = false
|
||||
global = false
|
||||
app-key = ""
|
||||
token = ""
|
||||
state-changes-only = false
|
||||
insecure-skip-verify = false
|
||||
url = "https://api.bigpanda.io/data/v2/alerts"
|
||||
auto-attributes = "tags,fields"
|
||||
|
||||
[[discord]]
|
||||
enabled = false
|
||||
default = true
|
||||
workspace = ""
|
||||
url = ""
|
||||
timestamp = false
|
||||
username = ""
|
||||
avatar-url = ""
|
||||
embed-title = ""
|
||||
global = false
|
||||
state-changes-only = false
|
||||
ssl-ca = ""
|
||||
ssl-cert = ""
|
||||
ssl-key = ""
|
||||
insecure-skip-verify = false
|
||||
|
||||
[hipchat]
|
||||
enabled = false
|
||||
url = ""
|
||||
token = ""
|
||||
room = ""
|
||||
global = false
|
||||
state-changes-only = false
|
||||
|
||||
[[kafka]]
|
||||
enabled = false
|
||||
id = "default"
|
||||
timeout = "0s"
|
||||
batch-size = 0
|
||||
batch-timeout = "0s"
|
||||
use-ssl = false
|
||||
ssl-ca = ""
|
||||
ssl-cert = ""
|
||||
ssl-key = ""
|
||||
insecure-skip-verify = false
|
||||
sasl-username = ""
|
||||
sasl-password = ""
|
||||
sasl-mechanism = ""
|
||||
sasl-gssapi-service-name = ""
|
||||
sasl-gssapi-auth-type = ""
|
||||
sasl-gssapi-disable-pafxfast = false
|
||||
sasl-gssapi-kerberos-config-path = ""
|
||||
sasl-gssapi-key-tab-path = ""
|
||||
sasl-gssapi-realm = ""
|
||||
sasl-access-token = ""
|
||||
|
||||
[[mqtt]]
|
||||
enabled = false
|
||||
name = "default"
|
||||
default = false
|
||||
url = ""
|
||||
ssl-ca = ""
|
||||
ssl-cert = ""
|
||||
ssl-key = ""
|
||||
insecure-skip-verify = false
|
||||
client-id = ""
|
||||
username = ""
|
||||
password = ""
|
||||
|
||||
[opsgenie]
|
||||
enabled = false
|
||||
api-key = ""
|
||||
url = "https://api.opsgenie.com/v1/json/alert"
|
||||
recovery_url = "https://api.opsgenie.com/v1/json/alert/note"
|
||||
global = false
|
||||
|
||||
[opsgenie2]
|
||||
enabled = false
|
||||
api-key = ""
|
||||
url = "https://api.opsgenie.com/v2/alerts"
|
||||
recovery_action = "notes"
|
||||
global = false
|
||||
details = false
|
||||
|
||||
[pagerduty]
|
||||
enabled = false
|
||||
url = "https://events.pagerduty.com/generic/2010-04-15/create_event.json"
|
||||
service-key = ""
|
||||
global = false
|
||||
|
||||
[pagerduty2]
|
||||
enabled = false
|
||||
url = "https://events.pagerduty.com/v2/enqueue"
|
||||
routing-key = ""
|
||||
global = false
|
||||
|
||||
[pushover]
|
||||
enabled = false
|
||||
token = ""
|
||||
user-key = ""
|
||||
url = "https://api.pushover.net/1/messages.json"
|
||||
|
||||
[[httppost]]
|
||||
endpoint = "example"
|
||||
url = "http://example.com"
|
||||
alert-template = ""
|
||||
alert-template-file = ""
|
||||
row-template = ""
|
||||
row-template-file = ""
|
||||
[httppost.basic-auth]
|
||||
username = ""
|
||||
password = ""
|
||||
|
||||
[smtp]
|
||||
enabled = false
|
||||
host = "localhost"
|
||||
port = 25
|
||||
username = ""
|
||||
password = ""
|
||||
no-verify = false
|
||||
global = false
|
||||
state-changes-only = false
|
||||
from = ""
|
||||
idle-timeout = "30s"
|
||||
|
||||
[snmptrap]
|
||||
enabled = false
|
||||
addr = "localhost:162"
|
||||
community = "kapacitor"
|
||||
retries = 1
|
||||
|
||||
[sensu]
|
||||
enabled = false
|
||||
addr = ""
|
||||
source = "Kapacitor"
|
||||
|
||||
[servicenow]
|
||||
enabled = false
|
||||
url = "https://instance.service-now.com/api/global/em/jsonv2"
|
||||
source = ""
|
||||
username = ""
|
||||
password = ""
|
||||
global = false
|
||||
state-changes-only = false
|
||||
|
||||
[[slack]]
|
||||
enabled = false
|
||||
default = true
|
||||
workspace = ""
|
||||
url = ""
|
||||
token = ""
|
||||
channel = ""
|
||||
username = "kapacitor"
|
||||
icon-emoji = ""
|
||||
global = false
|
||||
state-changes-only = false
|
||||
ssl-ca = ""
|
||||
ssl-cert = ""
|
||||
ssl-key = ""
|
||||
insecure-skip-verify = false
|
||||
|
||||
[talk]
|
||||
enabled = false
|
||||
url = ""
|
||||
author_name = ""
|
||||
|
||||
[teams]
|
||||
enabled = false
|
||||
channel-url = ""
|
||||
global = false
|
||||
state-changes-only = false
|
||||
|
||||
[telegram]
|
||||
enabled = false
|
||||
url = "https://api.telegram.org/bot"
|
||||
token = ""
|
||||
chat-id = ""
|
||||
parse-mode = ""
|
||||
disable-web-page-preview = false
|
||||
disable-notification = false
|
||||
global = false
|
||||
state-changes-only = false
|
||||
|
||||
[victorops]
|
||||
enabled = false
|
||||
api-key = ""
|
||||
routing-key = ""
|
||||
url = "https://alert.victorops.com/integrations/generic/20131114/alert"
|
||||
global = false
|
||||
json-data = false
|
||||
|
||||
[zenoss]
|
||||
enabled = false
|
||||
url = "https://tenant.zenoss.io:8080/zport/dmd/evconsole_router"
|
||||
username = ""
|
||||
password = ""
|
||||
action = "EventsRouter"
|
||||
method = "add_event"
|
||||
type = "rpc"
|
||||
tid = 1
|
||||
collector = "Kapacitor"
|
||||
global = false
|
||||
state-changes-only = false
|
||||
[zenoss.severity-map]
|
||||
OK = "Clear"
|
||||
Info = "Info"
|
||||
Warning = "Warning"
|
||||
Critical = "Critical"
|
||||
|
||||
[reporting]
|
||||
enabled = true
|
||||
url = "https://usage.influxdata.com"
|
||||
|
||||
[stats]
|
||||
enabled = true
|
||||
stats-interval = "10s"
|
||||
database = "_kapacitor"
|
||||
retention-policy = "autogen"
|
||||
timing-sample-rate = 0.1
|
||||
timing-movavg-size = 1000
|
||||
|
||||
[udf]
|
||||
|
||||
[deadman]
|
||||
interval = "10s"
|
||||
threshold = 0.0
|
||||
id = "{{ .Group }}:NODE_NAME for task '{{ .TaskName }}'"
|
||||
message = "{{ .ID }} is {{ if eq .Level \"OK\" }}alive{{ else }}dead{{ end }}: {{ index .Fields \"emitted\" | printf \"%0.3f\" }} points/INTERVAL."
|
||||
global = false
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: kapacitord downgrade
|
||||
description: >
|
||||
The `kapacitord downgrade` reverts a topic store format upgrade.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitord downgrade
|
||||
parent: kapacitord
|
||||
weight: 301
|
||||
metadata: [Kapacitor v1.7.0+]
|
||||
---
|
||||
|
||||
The `kapacitord downgrade` reverts a topic store format upgrade.
|
||||
|
||||
Some versions of Kapacitor change the format of the topic store (for example: 1.6 to 1.7).
|
||||
If you find that you need to use a previous version of Kapacitor with a different
|
||||
topic store format, use this command to migrate the topic store back to the
|
||||
previous format.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitord downgrade
|
||||
```
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
title: kapacitord help
|
||||
description: >
|
||||
The `kapacitord help` outputs help information for a specified `kapacitord` command.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitord help
|
||||
parent: kapacitord
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitord help` outputs help information for a specified
|
||||
[`kapacitord` command](/kapacitor/v1/reference/cli/kapacitord/#commands).
|
||||
If no command is specified, it outputs help information for the `kapacitord` daemon.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitord help [command]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
##### Output help information for the downgrade command
|
||||
|
||||
```sh
|
||||
kapacitord help downgrade
|
||||
```
|
|
@ -0,0 +1,73 @@
|
|||
---
|
||||
title: kapacitord run
|
||||
description: >
|
||||
The `kapacitord run` starts and runs the Kapacitor server.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitord run
|
||||
parent: kapacitord
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitord run` starts and runs the Kapacitor server.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitord run [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Flag | Description | Input |
|
||||
| :------------------ | :-------------------------------------------------------- | :------------------------------------- |
|
||||
| `-blacklist-cidrs` | Blacklist CIDRs for most HTTP GET/POST operations | Comma-separated list of CIDRs |
|
||||
| `-config` | Path to Kapacitor configuration file | Configuration filepath |
|
||||
| `-disable-handlers` | Disable alert handlers | Comma-separated list of alert-handlers |
|
||||
| `-hostname` | Override the hostname in the Kapacitor configuration file | Hostname |
|
||||
| `-pidfile` | Write process ID to a file | PID filepath |
|
||||
| `-log-file` | Write logs to a file | Log filepath |
|
||||
| `-log-level` | Set the log level | `debug`, `info`, or `error` |
|
||||
|
||||
## Examples
|
||||
|
||||
- [Run Kapacitor with default settings](#run-kapacitor-with-default-settings)
|
||||
- [Run Kapacitor with custom configuration settings](#run-kapacitor-with-custom-configuration-settings)
|
||||
- [Disable alert handlers](#disable-alert-handlers)
|
||||
- [Change Kapacitor logging settings](#change-kapacitor-logging-settings)
|
||||
- [Blacklist HTTP GET or POST operations from specific CIDRs](#blacklist-http-get-or-post-operations-from-specific-cidrs)
|
||||
|
||||
### Run Kapacitor with default settings
|
||||
|
||||
```sh
|
||||
kapacitord run
|
||||
```
|
||||
|
||||
### Run Kapacitor with custom configuration settings
|
||||
|
||||
```sh
|
||||
kapacitord run -config /path/to/kapacitor.conf
|
||||
```
|
||||
|
||||
### Disable alert handlers
|
||||
|
||||
Disabling alert handlers can be useful for security reasons--for example,
|
||||
disabling the `exec` handler on a shared system.
|
||||
|
||||
```sh
|
||||
kapacitord run -disable-handlers exec,mqtt
|
||||
```
|
||||
|
||||
### Change Kapacitor logging settings
|
||||
|
||||
```sh
|
||||
kapacitord run \
|
||||
-log-file /path/to/kapacitor.log \
|
||||
-log-level debug
|
||||
```
|
||||
|
||||
### Blacklist HTTP GET or POST operations from specific CIDRs
|
||||
|
||||
```sh
|
||||
kapacitord run -blacklist-cidrs 10.10.0.0/16,192.168.200.5/30
|
||||
```
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: kapacitord version
|
||||
description: >
|
||||
The `kapacitord version` command outputs the version, build branch, and git
|
||||
commit hash for the current Kapacitor server.
|
||||
menu:
|
||||
kapacitor_v1:
|
||||
name: kapacitord version
|
||||
parent: kapacitord
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `kapacitord version` command outputs the version, build branch, and git
|
||||
commit hash for the current Kapacitor server.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
kapacitord version
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
kapacitord version
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View example output" %}}
|
||||
```sh
|
||||
Kapacitor OSS version v{{< latest-patch >}} (git: HEAD 00x0x0X0Xx0x0xXX0xxxXxx00000xX0000x0xXx0)
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
|
@ -12,6 +12,7 @@ related:
|
|||
- /influxdb/cloud/tools/kapacitor/
|
||||
- /influxdb/v2/tools/kapacitor/
|
||||
- /kapacitor/v1/working/flux/manage/create/
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/
|
||||
- /influxdb/cloud/process-data/get-started/, Get started with Flux tasks
|
||||
- /influxdb/cloud/process-data/common-tasks/
|
||||
- /influxdb/cloud/process-data/task-options/
|
||||
|
|
|
@ -11,6 +11,7 @@ cascade:
|
|||
related:
|
||||
- /kapacitor/v1/working/flux/
|
||||
- /chronograf/v1/guides/advanced-kapacitor/
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/
|
||||
---
|
||||
|
||||
Use the **`kapacitor` CLI** and the **Kapacitor HTTP API** to manage Kapacitor Flux tasks.
|
||||
|
|
|
@ -7,6 +7,8 @@ menu:
|
|||
name: Create Flux tasks
|
||||
parent: Manage Flux tasks
|
||||
weight: 1
|
||||
related:
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/create/
|
||||
---
|
||||
|
||||
Use the **`kapacitor` CLI** or the **Kapacitor HTTP API** to create Kapacitor Flux tasks.
|
||||
|
|
|
@ -7,6 +7,8 @@ menu:
|
|||
name: Delete Flux tasks
|
||||
parent: Manage Flux tasks
|
||||
weight: 6
|
||||
related:
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/delete/
|
||||
---
|
||||
|
||||
Use the **`kapacitor` CLI** or the **Kapacitor HTTP API** to delete Kapacitor Flux tasks.
|
||||
|
|
|
@ -7,6 +7,8 @@ menu:
|
|||
name: List Flux tasks
|
||||
parent: Manage Flux tasks
|
||||
weight: 2
|
||||
related:
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/list/
|
||||
---
|
||||
|
||||
Use the **`kapacitor` CLI** or the **Kapacitor HTTP API** to list Kapacitor Flux tasks.
|
||||
|
|
|
@ -10,6 +10,7 @@ weight: 5
|
|||
related:
|
||||
- /kapacitor/v1/working/flux/
|
||||
- /kapacitor/v1/working/flux/manage/task/runs
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/retry-failed/
|
||||
---
|
||||
|
||||
Use the `kapacitor flux task retry-failed` command to retry failed Kapacitor Flux task runs.
|
||||
|
|
|
@ -10,6 +10,10 @@ weight: 4
|
|||
related:
|
||||
- /kapacitor/v1/working/flux/manage/retry-failed/
|
||||
- /kapacitor/v1/working/flux/
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/run/
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/run/list/
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/run/retry/
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/retry-failed/
|
||||
---
|
||||
|
||||
Use the **`kapacitor` CLI** or the **Kapacitor HTTP API** to manage Kapacitor Flux task runs.
|
||||
|
|
|
@ -7,6 +7,8 @@ menu:
|
|||
name: Update Flux tasks
|
||||
parent: Manage Flux tasks
|
||||
weight: 3
|
||||
related:
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/update/
|
||||
---
|
||||
|
||||
Use the **`kapacitor` CLI** or the **Kapacitor HTTP API** to update Kapacitor Flux tasks.
|
||||
|
@ -36,14 +38,14 @@ Provide the following flags:
|
|||
##### Update Flux task code
|
||||
```sh
|
||||
kapacitor flux task update \
|
||||
--id 000x00xX0xXXx00
|
||||
--id 000x00xX0xXXx00 \
|
||||
--file /path/to/updated-task.flux
|
||||
```
|
||||
|
||||
##### Enable or disable a Flux task
|
||||
```sh
|
||||
kapacitor flux task update \
|
||||
--id 000x00xX0xXXx00
|
||||
--id 000x00xX0xXXx00 \
|
||||
--status inactive
|
||||
```
|
||||
{{% /tab-content %}}
|
||||
|
|
|
@ -7,6 +7,8 @@ menu:
|
|||
name: View Flux task logs
|
||||
parent: Manage Flux tasks
|
||||
weight: 4
|
||||
related:
|
||||
- /kapacitor/v1/reference/cli/kapacitor/flux/task/log/
|
||||
---
|
||||
|
||||
Use the **`kapacitor` CLI** or the **Kapacitor HTTP API** to view Kapacitor Flux task logs.
|
||||
|
|
Loading…
Reference in New Issue