diff --git a/content/v2.0/reference/cli/influx/telegrafs/_index.md b/content/v2.0/reference/cli/influx/telegrafs/_index.md new file mode 100644 index 000000000..a5800cd47 --- /dev/null +++ b/content/v2.0/reference/cli/influx/telegrafs/_index.md @@ -0,0 +1,46 @@ +--- +title: influx telegrafs +description: > + placeholder +menu: + v2_0_ref: + name: influx telegrafs + parent: influx +weight: 101 +v2.0/tags: [telegraf] +--- + +The `influx telegrafs` command lists Telegraf configurations. +Subcommands manage Telegraf configurations. + +## Usage +```sh +influx telegrafs [flags] +influx telegrafs [command] +``` + +## Subcommands +| Subcommand | Description | +|:---------- |:----------- | +| [create](/v2.0/reference/cli/influx/telegrafs/create) | Create a Telegraf configuration | +| [rm](/v2.0/reference/cli/influx/telegrafs/rm) | Remove a Telegraf configuration | +| [update](/v2.0/reference/cli/influx/telegrafs/update) | List Telegraf configurations | + +## Flags +| Flag | | Description | Input type | {{< cli/mapped >}} | +|:---- |:--- |:----------- |:----------: |:------------------ | +| `-h` | `--help` | Help for the `telegrafs` command | | | +| | `--hide-headers` | Hide table headers | | `INFLUX_HIDE_HEADERS` | +| `-i` | `--id` | Telegraf configuration ID to retrieve | string | | +| | `--json` | Output data as JSON | | `INFLUX_OUTPUT_JSON` | +| `-o` | `--org` | Organization name | string | `INFLUX_ORG` | +| | `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | + +## Examples +```sh +# List all known Telegraf configurations +influx telegrafs + +# List only a Telegraf configuration with the specified ID +influx telegrafs -i $ID +``` diff --git a/content/v2.0/reference/cli/influx/telegrafs/create.md b/content/v2.0/reference/cli/influx/telegrafs/create.md new file mode 100644 index 000000000..d76f4a54c --- /dev/null +++ b/content/v2.0/reference/cli/influx/telegrafs/create.md @@ -0,0 +1,45 @@ +--- +title: influx telegrafs create +description: > + placeholder +menu: + v2_0_ref: + name: influx telegrafs create + parent: influx telegrafs +weight: 201 +--- + +The `influx telegrafs create` command creates a new Telegraf configuration in InfluxDB +using a provided Telegraf configuration file. + +## Usage +```sh +influx telegrafs create [flags] +``` + +## Flags +| Flag | | Description | Input type | {{< cli/mapped >}} | +|:---- |:--- |:----------- |:----------: |:------------------ | +| `-d` | `--description` | Telegraf configuration description | string | | +| `-f` | `--file` | Path to Telegraf configuration | string | | +| `-h` | `--help` | Help for the `create` command | | | +| | `--hide-headers` | Hide table headers | | `INFLUX_HIDE_HEADERS` | +| | `--json` | Output data as JSON | | `INFLUX_OUTPUT_JSON` | +| `-n` | `--name` | Telegraf configuration name | string | | +| `-o` | `--org` | Organization name | string | `INFLUX_ORG` | +| | `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | + +## Examples +```sh +# Create a new Telegraf configuration +influx telegrafs create \ + -n "Example configuration name" \ + -d "Example Telegraf configuration description" \ + -f /path/to/telegraf.conf + +# Create a new Telegraf configuration with configuration settings +# provided via STDIN +cat /path/to/telegraf.conf | influx telegrafs create \ + -n "Example configuration name" \ + -d "Example Telegraf configuration description" \ +``` diff --git a/content/v2.0/reference/cli/influx/telegrafs/rm.md b/content/v2.0/reference/cli/influx/telegrafs/rm.md new file mode 100644 index 000000000..147100ea2 --- /dev/null +++ b/content/v2.0/reference/cli/influx/telegrafs/rm.md @@ -0,0 +1,37 @@ +--- +title: influx telegrafs rm +description: > + placeholder +menu: + v2_0_ref: + name: influx telegrafs rm + parent: influx telegrafs +weight: 201 +--- + +The `influx telegrafs rm` command removes Telegraf configurations from InfluxDB. + +## Usage +```sh +influx telegrafs rm [flags] +``` + +#### Aliases +`rm`, `remove` + +## Flags +| Flag | | Description | Input type | {{< cli/mapped >}} | +|:---- |:--- |:----------- |:----------: |:------------------ | +| `-h` | `--help` | Help for the `rm` command | | | +| | `--hide-headers` | Hide the table headers | | `$INFLUX_HIDE_HEADERS` | +| `-i` | `--id` | Telegraf configuration ID to remove | strings | | +| | `--json` | Output data as json | | `$INFLUX_OUTPUT_JSON` | + +## Examples +```sh +# Remove a single Telegraf configuration +influx telegrafs rm -i $ID + +# Remove multiple Telegraf configurations +influx telegrafs rm -i $ID1 -i $ID2 +``` diff --git a/content/v2.0/reference/cli/influx/telegrafs/update.md b/content/v2.0/reference/cli/influx/telegrafs/update.md new file mode 100644 index 000000000..0a12bd248 --- /dev/null +++ b/content/v2.0/reference/cli/influx/telegrafs/update.md @@ -0,0 +1,47 @@ +--- +title: influx telegrafs update +description: > + placeholder +menu: + v2_0_ref: + name: influx telegrafs update + parent: influx telegrafs +weight: 201 +--- + +The `influx telegrafs update` command updates a Telegraf configuration to match the specified parameters. +If a name or description are not provided, they are set to an empty string. + +## Usage +```sh +influx telegrafs update [flags] +``` + +## Flags +| Flag | | Description | Input type | {{< cli/mapped >}} | +|:---- |:--- |:----------- |:----------: |:------------------ | +| `-d` | `--description` | Telegraf configuration description | string | | +| `-f` | `--file` | Path to Telegraf configuration | string | | +| `-h` | `--help` | Help for the `update` command | | | +| | `--hide-headers` | Hide table headers | | `INFLUX_HIDE_HEADERS` | +| | `--json` | Output data as JSON | | `INFLUX_OUTPUT_JSON` | +| `-n` | `--name` | Telegraf configuration name | string | | +| `-o` | `--org` | Organization name | string | `INFLUX_ORG` | +| | `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | + +## Examples +```sh +# Update a Telegraf configuration +influx telegrafs update \ + -i $ID \ + -n "Example configuration name" \ + -d "Example Telegraf configuration description" \ + -f /path/to/telegraf.conf + +# Update a Telegraf configuration with configuration settings +# provided via STDIN +cat /path/to/telegraf.conf | influx telegrafs update \ + -i $ID \ + -n "Example configuration name" \ + -d "Example Telegraf configuration description" \ +```