Skip to content

Commit 5b42d3a

Browse files
committed
fix: terms and formatting in monolith get-started and plugins. Add related links.
2 parents 90eb51e + 9715622 commit 5b42d3a

File tree

5 files changed

+39
-30
lines changed

5 files changed

+39
-30
lines changed

content/influxdb3/core/plugins.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ menu:
77
weight: 4
88
influxdb3/core/tags: []
99
related:
10-
- /influxdb3/core/reference/cli/influxdb3/test/wal_plugin/)
11-
- /influxdb3/core/reference/cli/influxdb3/create/plugin/)
12-
- /influxdb3/core/reference/cli/influxdb3/create/trigger/)
10+
- /influxdb3/core/reference/cli/influxdb3/test/wal_plugin/
11+
- /influxdb3/core/reference/cli/influxdb3/create/plugin/
12+
- /influxdb3/core/reference/cli/influxdb3/create/trigger/
1313
source: /shared/v3-core-plugins/_index.md
1414
---
1515

content/influxdb3/enterprise/plugins.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ menu:
77
weight: 4
88
influxdb3/core/tags: []
99
related:
10-
- /influxdb3/enterprise/reference/cli/influxdb3/test/wal_plugin/)
11-
- /influxdb3/enterprise/reference/cli/influxdb3/create/plugin/)
12-
- /influxdb3/enterprise/reference/cli/influxdb3/create/trigger/)
10+
- /influxdb3/enterprise/reference/cli/influxdb3/test/wal_plugin/
11+
- /influxdb3/enterprise/reference/cli/influxdb3/create/plugin/
12+
- /influxdb3/enterprise/reference/cli/influxdb3/create/trigger/
1313
source: /shared/v3-core-plugins/_index.md
1414
---
1515

content/shared/v3-core-get-started/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,9 @@ and a _trigger-spec_, which defines when the plugin is executed and what data it
591591
InfluxDB 3 provides the following types of triggers, each with specific trigger-specs:
592592
593593
- **On WAL flush**: Sends a batch of written data (for a specific table or all tables) to a plugin (by default, every second).
594-
> - **On Schedule**: Executes a plugin on a user-configured schedule (using a crontab or a duration); useful for data collection and deadman monitoring.
595-
> - **On Request**: Binds a plugin to a custom HTTP API endpoint at `/api/v3/engine/<PATH>`.
596-
> The plugin receives the HTTP request headers and content, and can then parse, process, and send the data into the database or to third-party services.
594+
- **On Schedule**: Executes a plugin on a user-configured schedule (using a crontab or a duration); useful for data collection and deadman monitoring.
595+
- **On Request**: Binds a plugin to a custom HTTP API endpoint at `/api/v3/engine/<ENDPOINT>`.
596+
The plugin receives the HTTP request headers and content, and can then parse, process, and send the data into the database or to third-party services.
597597
598598
### Test, create, and trigger plugin code
599599

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

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,25 @@ You can use this to provide runtime configuration and drive behavior of a plugin
227227
- threshold values for monitoring
228228
- connection properties for connecting to third-party services
229229

230-
To pass arguments to a plugin, specify argument key-value pairs in the trigger--for example, using the CLI:
230+
To pass arguments to a plugin, specify trigger arguments in a comma-separated list
231+
of key-value pairs--for example, using the CLI:
231232

232233
```bash
233234
influxdb3 create trigger
234-
--trigger-arguments <TRIGGER_ARGUMENTS>
235-
Comma separated list of key/value pairs to use as trigger arguments. Example: key1=val1,key2=val2
235+
--trigger-arguments key1=val1,key2=val2
236+
```
237+
236238
The arguments are passed to the plugin as a `Dict[str, str]` where the key is
237-
the argument name and the value is the argument value.
239+
the argument name and the value is the argument value--for example:
240+
241+
```python
242+
args = {
243+
"key1": "value1",
244+
"key2": "value2",
245+
}
246+
```
238247

239-
The following example shows how to use an argument in a WAL plugin:
248+
The following example shows how to access and use an argument in a WAL plugin:
240249

241250
```python
242251
def process_writes(influxdb3_local, table_batches, args=None):
@@ -368,7 +377,7 @@ def process_scheduled_call(influxdb3_local, time, args=None):
368377

369378
Schedule plugins are set with a `trigger-spec` of `schedule:<cron_expression>` or `every:<duration>`. The `args` parameter can be used to pass configuration to the plugin. For example, if we wanted to use the system-metrics example from the Github repo and have it collect every 10 seconds we could use the following trigger definition:
370379

371-
```shell
380+
```bash
372381
influxdb3 create trigger \
373382
--trigger-spec "every:10s" \
374383
--plugin-filename "gh:examples/schedule/system_metrics/system_metrics.py" \
@@ -377,13 +386,10 @@ influxdb3 create trigger \
377386

378387
### On Request trigger
379388

380-
On Request plugins are triggered by a request to an endpoint that you define
381-
under `/api/v3/engine`.
382-
When triggered, the plugin receives the shared API, query parameters `Dict[str, str]`,
383-
request headers `Dict[str, str]`, the request body (as bytes),
384-
and any arguments passed in the trigger definition.
389+
On Request plugins are triggered by a request to a custom HTTP API endpoint.
390+
The plugin receives the shared API, query parameters `Dict[str, str]`, request headers `Dict[str, str]`, the request body (as bytes), and any arguments passed in the trigger definition.
385391

386-
#### Example: simple On Request plugin
392+
#### Example: On Request plugin
387393

388394
```python
389395
import json
@@ -410,16 +416,19 @@ def process_request(influxdb3_local, query_parameters, request_headers, request_
410416

411417
#### On Request trigger configuration
412418

413-
Define an On Request plugin using the `request:<endpoint>` trigger-spec.
419+
To create a trigger for an On Request plugin, specify the `request:<ENDPOINT>` trigger-spec.
414420

415-
For example, the following command creates an `/api/v3/engine/my_plugin` endpoint
416-
that runs a `<plugin-directory>/examples/my-on-request.py` plugin:
421+
For example, the following command creates an HTTP API `/api/v3/engine/my-plugin` endpoint for the plugin file:
417422

418423
```bash
419424
influxdb3 create trigger \
420-
--trigger-spec "request:my_plugin" \
425+
--trigger-spec "request:my-plugin" \
421426
--plugin-filename "examples/my-on-request.py" \
422427
--database mydb my-plugin
428+
```
429+
430+
To run the plugin, you send an HTTP request to `<HOST>/api/v3/engine/my-plugin`.
423431

424-
Because all On Request plugins share the same root URL, trigger specs must be
425-
unique across all plugins configured for a server, regardless of which database they are associated with.
432+
Because all On Request plugins for a server share the same `<host>/api/v3/engine/` base URL,
433+
the trigger-spec you define must be unique across all plugins configured for a server,
434+
regardless of which database they are associated with.

content/shared/v3-enterprise-get-started/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,9 @@ and a _trigger-spec_, which defines when the plugin is executed and what data it
580580
InfluxDB 3 provides the following types of triggers, each with specific trigger-specs:
581581
582582
- **On WAL flush**: Sends a batch of written data (for a specific table or all tables) to a plugin (by default, every second).
583-
> - **On Schedule**: Executes a plugin on a user-configured schedule (using a crontab or a duration); useful for data collection and deadman monitoring.
584-
> - **On Request**: Binds a plugin to a custom HTTP API endpoint at `/api/v3/engine/<PATH>`.
585-
> The plugin receives the HTTP request headers and content, and can then parse, process, and send the data into the database or to third-party services.
583+
- **On Schedule**: Executes a plugin on a user-configured schedule (using a crontab or a duration); useful for data collection and deadman monitoring.
584+
- **On Request**: Binds a plugin to a custom HTTP API endpoint at `/api/v3/engine/<ENDPOINT>`.
585+
The plugin receives the HTTP request headers and content, and can then parse, process, and send the data into the database or to third-party services.
586586
587587
### Test, create, and trigger plugin code
588588

0 commit comments

Comments
 (0)