You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `influxdb3 test schedule_plugin` command tests a schedule plugin. Use this command to verify plugin behavior without creating a trigger.
3
+
4
+
## Usage
5
+
6
+
<!--pytest.mark.skip-->
7
+
8
+
```bash
9
+
influxdb3 test schedule_plugin [OPTIONS] --database <DATABASE_NAME><FILENAME>
10
+
```
11
+
12
+
## Arguments
13
+
14
+
-**FILENAME**: Path to the plugin file. Use the absolute path or the path relative to the current working directory, such as `<plugin-dir>/<plugin-file-name>.py`.
### Test with input arguments and a custom cron schedule
67
+
68
+
You can pass input arguments to your plugin as key-value pairs and specify a custom cron schedule (using Quartz cron syntax with six fields):
69
+
70
+
<!--pytest.mark.skip-->
71
+
72
+
```bash
73
+
influxdb3 test schedule_plugin \
74
+
--host http://localhost:8182 \
75
+
--database DATABASE_NAME \
76
+
--token AUTH_TOKEN \
77
+
--input-arguments threshold=10,unit=seconds \
78
+
--schedule "0 0 * * * ?" \
79
+
PLUGIN_DIR/FILENAME.py
80
+
```
81
+
- Pass plugin parameters using `--input-arguments` as comma-separated key=value pairs.
82
+
- Use `--schedule` to set the plugin’s execution time with a Quartz cron expression. For example, "0 0 * * * ?" runs the plugin at the start of every hour.
Copy file name to clipboardExpand all lines: content/shared/v3-core-plugins/_index.md
+71-8Lines changed: 71 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -523,27 +523,90 @@ influxdb3 create trigger \
523
523
524
524
### Install Python dependencies
525
525
526
-
If your plugin needs additional Python packages, use the `influxdb3 install` command:
526
+
Use the `influxdb3 install package` command to add third-party libraries (like `pandas`, `requests`, or `influxdb3-python`) to your plugin environment.
527
+
This installs packages into the Processing Engine’s embedded Python environment to ensure compatibility with your InfluxDB instance.
This creates a Python virtual environment in your plugins directory with the specified packages installed.
555
+
{{% /code-tab-content %}}
556
+
557
+
{{< /code-tabs-wrapper >}}
558
+
559
+
These examples install the specified Python package (for example, pandas) into the Processing Engine’s embedded virtual environment.
560
+
561
+
- Use the CLI command when running InfluxDB directly on your system.
562
+
- Use the Docker variant if you're running InfluxDB in a containerized environment.
563
+
564
+
> [!Important]
565
+
> #### Use bundled Python for plugins
566
+
> When you start the server with the `--plugin-dir` option, InfluxDB 3 creates a Python virtual environment (`<PLUGIN_DIR>/venv`) for your plugins.
567
+
> If you need to create a custom virtual environment, use the Python interpreter bundled with InfluxDB 3. Don't use the system Python.
568
+
> Creating a virtual environment with the system Python (for example, using `python -m venv`) can lead to runtime errors and plugin failures.
569
+
>
570
+
>For more information, see the [processing engine README](https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md#official-builds).
571
+
572
+
{{% /code-placeholders %}}
573
+
574
+
InfluxDB creates a Python virtual environment in your plugins directory with the specified packages installed.
539
575
540
576
{{% show-in "enterprise" %}}
541
577
542
-
### Connect Grafana to your InfluxDB instance
578
+
## Distributed cluster considerations
579
+
580
+
When you deploy {{% product-name %}} in a multi-node environment, configure each node based on its role and the plugins it runs.
581
+
582
+
### Match plugin types to the correct node
583
+
584
+
Each plugin must run on a node that supports its trigger type:
0 commit comments