From e8e69d980471a6ef76244e473e42946490252448 Mon Sep 17 00:00:00 2001 From: peterbarnett03 Date: Wed, 21 May 2025 09:14:22 -0400 Subject: [PATCH 1/2] fix: clarify that a plugin filename is needed --- .../shared/influxdb3-cli/create/trigger.md | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/content/shared/influxdb3-cli/create/trigger.md b/content/shared/influxdb3-cli/create/trigger.md index ea4f25da9..55134ff82 100644 --- a/content/shared/influxdb3-cli/create/trigger.md +++ b/content/shared/influxdb3-cli/create/trigger.md @@ -10,6 +10,7 @@ processing engine. influxdb3 create trigger [OPTIONS] \ --database \ --token \ + --plugin-filename \ --trigger-spec \ ``` @@ -20,16 +21,21 @@ influxdb3 create trigger [OPTIONS] \ ## Options -| Option | | Description | -| :----- | :--------------- | :--------------------------------------------------------------------------------------- | -| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) | -| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on | -| | `--token` | _({{< req >}})_ Authentication token | -| | `--trigger-spec` | Trigger specification--for example `table:` or `all_tables` | -| | `--disabled` | Create the trigger in disabled state | -| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) | -| `-h` | `--help` | Print help information | -| | `--help-all` | Print detailed help information | +| Option | | Description | +| :----- | :------------------ | :------------------------------------------------------------------------------------------------------- | +| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) | +| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on | +| | `--token` | _({{< req >}})_ Authentication token | +| | `--plugin-filename` | _({{< req >}})_ Python file name of the file on the server's plugin-dir containing the plugin code. | +| | `--trigger-spec` | Trigger specification--for example `table:` or `all_tables` | +| | `--disabled` | Create the trigger in disabled state | +| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) | +| `-h` | `--help` | Print help information | +| | `--help-all` | Print detailed help information | + +If you want to use a plugin from the [Plugin Library](https://github.com/influxdata/influxdb3_plugins) repo, use the url path with `gh:` specified as the prefix. +For example, to use the [System Metrics](https://github.com/influxdata/influxdb3_plugins/blob/main/examples/schedule/system_metrics/system_metrics.py) plugin, the plugin filename is `gh:examples/schedule/system_metrics/system_metrics.py`. + ### Option environment variables @@ -47,8 +53,8 @@ The following examples show how to use the `influxdb3 create trigger` command to - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Database name -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: -Authentication token +- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: Authentication token +- {{% code-placeholder-key %}}`PLUGIN_FILENAME`{{% /code-placeholder-key %}}: Python plugin filename - {{% code-placeholder-key %}}`TRIGGER_NAME`{{% /code-placeholder-key %}}: Name of the trigger to create - {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: @@ -66,6 +72,7 @@ Create a trigger that processes data from a specific table. influxdb3 create trigger \ --database DATABASE_NAME \ --token AUTH_TOKEN \ + --plugin-filename PLUGIN_FILENAME \ --trigger-spec table:TABLE_NAME \ TRIGGER_NAME ``` @@ -80,6 +87,7 @@ Create a trigger that applies to all tables in the specified database. influxdb3 create trigger \ --database DATABASE_NAME \ --token AUTH_TOKEN \ + --plugin-filename \ --trigger-spec all_tables \ TRIGGER_NAME ``` @@ -97,6 +105,7 @@ influxdb3 create trigger \ --disabled \ --database DATABASE_NAME \ --token AUTH_TOKEN \ + --plugin-filename \ --trigger-spec table:TABLE_NAME \ TRIGGER_NAME ``` From 630002bed1ed8fcda1420f26c20491e7a6714337 Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Wed, 21 May 2025 10:48:34 -0500 Subject: [PATCH 2/2] Update content/shared/influxdb3-cli/create/trigger.md --- content/shared/influxdb3-cli/create/trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/trigger.md b/content/shared/influxdb3-cli/create/trigger.md index 55134ff82..dbb223128 100644 --- a/content/shared/influxdb3-cli/create/trigger.md +++ b/content/shared/influxdb3-cli/create/trigger.md @@ -26,7 +26,7 @@ influxdb3 create trigger [OPTIONS] \ | `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) | | `-d` | `--database` | _({{< req >}})_ Name of the database to operate on | | | `--token` | _({{< req >}})_ Authentication token | -| | `--plugin-filename` | _({{< req >}})_ Python file name of the file on the server's plugin-dir containing the plugin code. | +| | `--plugin-filename` | _({{< req >}})_ Name of the file, stored in the server's `plugin-dir`, that contains the Python plugin code to run | | | `--trigger-spec` | Trigger specification--for example `table:` or `all_tables` | | | `--disabled` | Create the trigger in disabled state | | | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |