Skip to content

Commit 7afb3d9

Browse files
Apply suggestions from code review
Co-authored-by: Jason Stirnaman <[email protected]>
1 parent d1e44a4 commit 7afb3d9

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

content/shared/v3-core-plugins/_index.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

2-
Use the {{% product-name %}} ProcessingEngine to run code and perform tasks
2+
Use the {{% product-name %}} Processing engine to run code and perform tasks
33
for different database events.
44

5-
{{% product-name %}} provides the InfluxDB 3 Processing Engine, an embedded Python VM that can dynamically load and trigger Python plugins
5+
{{% product-name %}} provides the InfluxDB 3 Processing engine, an embedded Python VM that can dynamically load and trigger Python plugins
66
in response to events in your database.
77

88
## Key Concepts
99

1010
### Plugins
1111

12-
A Processing Engine _plugin_ is Python code you provide to run tasks, such as
12+
A Processing engine _plugin_ is Python code you provide to run tasks, such as
1313
downsampling data, monitoring, creating alerts, or calling external services.
1414

1515
> [!Note]
@@ -25,16 +25,16 @@ A _trigger_ is an InfluxDB 3 resource you create to associate a database
2525
event (for example, a WAL flush) with the plugin that should run.
2626
When an event occurs, the trigger passes configuration details, optional arguments, and event data to the plugin.
2727

28-
The Processing Engine provides four types of triggers—each type corresponds to an event type with event-specific configuration to let you handle events with targeted logic.
28+
The Processing engine provides four types of triggers—each type corresponds to an event type with event-specific configuration to let you handle events with targeted logic.
2929

3030
- **WAL Flush**: Triggered when the write-ahead log (WAL) is flushed to the object store (default is every second).
3131
- **Scheduled Tasks**: Triggered on a schedule you specify using cron syntax.
32-
- **On Request**: Triggered on a GET or POST request to the bound HTTP API endpoint at `/api/v3/engine/<CUSTOM_PATH>`.
32+
- **On-request**: Triggered on a GET or POST request to the bound HTTP API endpoint at `/api/v3/engine/<CUSTOM_PATH>`.
3333
- **Parquet Persistence (coming soon)**: Triggered when InfluxDB 3 persists data to object storage Parquet files.
3434

35-
### Activate the Processing Engine
35+
### Activate the Processing engine
3636

37-
To enable the Processing Engine, start the {{% product-name %}} server with the `--plugin-dir` option and a path to your plugins directory. If the directory doesn’t exist, the server creates it.
37+
To enable the Processing engine, start the {{% product-name %}} server with the `--plugin-dir` option and a path to your plugins directory. If the directory doesn’t exist, the server creates it.
3838

3939
```bash
4040
influxdb3 serve --node-id node0 --object-store [OBJECT STORE TYPE] --plugin-dir /path/to/plugins
@@ -216,7 +216,7 @@ obj_to_log = {"hello": "world"}
216216
influxdb3_local.info("This is an info message with an object", obj_to_log)
217217
```
218218

219-
### Trigger Arguments
219+
### Trigger arguments
220220

221221
Every plugin type can receive arguments from the configuration of the trigger that runs it.
222222
You can use this to provide runtime configuration and drive behavior of a plugin—for example:
@@ -239,7 +239,7 @@ def process_writes(influxdb3_local, table_batches, args=None):
239239

240240
The `args` parameter is optional. If a plugin doesn’t require arguments, you can omit it from the trigger definition.
241241

242-
## Import Plugin Dependencies
242+
## Import plugin dependencies
243243

244244
Use the `influxdb3 install` command to download and install Python packages that your plugin depends on.
245245

@@ -278,10 +278,10 @@ For more information, see the `influxdb3` CLI help:
278278
influxdb3 install package --help
279279
```
280280

281-
## Trigger Types and How They Work
281+
## Configure plugin triggers
282282
Triggers define when and how plugins execute in response to database events. Each trigger type corresponds to a specific event, allowing precise control over automation within {{% product-name %}}.
283283

284-
### WAL Flush Trigger
284+
### WAL flush trigger
285285

286286
When a WAL flush plugin is triggered, the plugin receives a list of `table_batches` filtered by the trigger configuration (either _all tables_ in the database or a specific table).
287287

@@ -337,9 +337,9 @@ For more information about trigger arguments, see the CLI help:
337337
influxdb3 create trigger help
338338
```
339339

340-
### Schedule Trigger
340+
### Schedule trigger
341341

342-
Schedule plugins run on a schedule specified in cron syntax. The plugin will receive the local API, the time of the trigger, and any arguments passed in the trigger definition. Here's an example of a simple schedule plugin:
342+
Schedule plugins run on a schedule specified in cron syntax. The plugin receives the local API, the time of the trigger, and any arguments passed in the trigger definition. Here's an example of a simple schedule plugin:
343343

344344
```python
345345
# see if a table has been written to in the last 5 minutes
@@ -392,9 +392,9 @@ def process_request(influxdb3_local, query_parameters, request_headers, request_
392392
return 200, {"Content-Type": "application/json"}, json.dumps({"status": "ok", "line": line_str})
393393
```
394394

395-
#### On request trigger configuration
395+
#### On-request trigger configuration
396396

397-
On Request plugins are set with a `trigger-spec` of `request:<endpoint>`. The `args` parameter can be used to pass configuration to the plugin. For example, if we wanted the above plugin to run on the endpoint `/api/v3/engine/my_plugin`, we would use `request:my_plugin` as the `trigger-spec`.
397+
On-request plugins are set with a `trigger-spec` of `request:<endpoint>`. The `args` parameter can be used to pass configuration to the plugin. For example, if we wanted the above plugin to run on the endpoint `/api/v3/engine/my_plugin`, we would use `request:my_plugin` as the `trigger-spec`.
398398

399399
Trigger specs must be unique across all configured plugins, regardless of which database they are tied to, given the path is the same. Here's an example to create a request trigger tied to the "hello-world' path using a plugin in the plugin-dir:
400400

0 commit comments

Comments
 (0)