Skip to content

Commit 86c4c35

Browse files
authored
Merge branch 'master' into sql-window-functions
2 parents ba7f109 + 13bec42 commit 86c4c35

File tree

6 files changed

+163
-129
lines changed

6 files changed

+163
-129
lines changed

content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,29 @@ Very useful for troubleshooting, but will log any sensitive data contained withi
303303

304304
Environment variable: `INFLUXDB_DATA_QUERY_LOG_ENABLED`
305305

306+
#### query-log-path
307+
308+
An absolute path to the query log file.
309+
The default is `""` (queries aren't logged to a file).
310+
311+
Query logging supports SIGHUP-based log rotation.
312+
313+
The following is an example of a `logrotate` configuration:
314+
315+
```
316+
/var/log/influxdb/queries.log {
317+
rotate 5
318+
daily
319+
compress
320+
missingok
321+
notifempty
322+
create 644 root root
323+
postrotate
324+
/bin/kill -HUP `pgrep -x influxd`
325+
endscript
326+
}
327+
```
328+
306329
#### wal-fsync-delay
307330

308331
Default is `"0s"`.

content/influxdb3/core/plugins.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
---
2-
title: Python Plugins and Processing Engine
2+
title: Processing engine and Python plugins
33
description: Use the Python processing engine to trigger and execute custom code on different events in an {{< product-name >}} instance.
44
menu:
55
influxdb3_core:
6-
name: Processing Engine and Python Plugins
6+
name: Processing engine and Python plugins
77
weight: 4
88
influxdb3/core/tags: []
9+
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/
913
source: /shared/v3-core-plugins/_index.md
1014
---
1115

content/influxdb3/enterprise/plugins.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
---
2-
title: Python Plugins and Processing Engine
2+
title: Processing engine and Python plugins
33
description: Use the Python processing engine to trigger and execute custom code on different events in an {{< product-name >}} instance.
44
menu:
55
influxdb3_enterprise:
6-
name: Processing Engine and Python Plugins
6+
name: Processing engine and Python plugins
77
weight: 4
8-
influxdb3/enterprise/tags: []
8+
influxdb3/core/tags: []
9+
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/
913
source: /shared/v3-core-plugins/_index.md
1014
---
1115

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

Lines changed: 27 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,12 @@ source ~/.zshrc
135135
To start your InfluxDB instance, use the `influxdb3 serve` command
136136
and provide the following:
137137

138-
- `--object-store`: Specifies the type of Object store to use. InfluxDB supports the following: local file system (`file`), `memory`, S3 (and compatible services like Ceph or Minio) (`s3`), Google Cloud Storage (`google`), and Azure Blob Storage (`azure`).
139-
- `--node-id`: A string identifier that determines the server's storage path within the configured storage location
138+
- `--object-store`: Specifies the type of Object store to use.
139+
InfluxDB supports the following: local file system (`file`), `memory`,
140+
S3 (and compatible services like Ceph or Minio) (`s3`),
141+
Google Cloud Storage (`google`), and Azure Blob Storage (`azure`).
142+
- `--node-id`: A string identifier that determines the server's storage path
143+
within the configured storage location, and, in a multi-node setup, is used to reference the node.
140144

141145
The following examples show how to start InfluxDB 3 with different object store configurations:
142146

@@ -216,7 +220,7 @@ InfluxDB is a schema-on-write database. You can start writing data and InfluxDB
216220
After a schema is created, InfluxDB validates future write requests against it before accepting the data.
217221
Subsequent requests can add new fields on-the-fly, but can't add new tags.
218222
219-
InfluxDB 3 Core is optimized for recent data, but accepts writes from any time period. It persists that data in Parquet files for access by third-party systems for longer term historical analysis and queries. If you require longer historical queries with a compactor that optimizes data organization, consider using [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/).
223+
{{% product-name %}} is optimized for recent data, but accepts writes from any time period. It persists that data in Parquet files for access by third-party systems for longer term historical analysis and queries. If you require longer historical queries with a compactor that optimizes data organization, consider using [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/).
220224
221225
222226
The database has three write API endpoints that respond to HTTP `POST` requests:
@@ -278,7 +282,7 @@ With `accept_partial=true`:
278282
```
279283
280284
Line `1` is written and queryable.
281-
The response is an HTTP error (`400`) status, and the response body contains `partial write of line protocol occurred` and details about the problem line.
285+
The response is an HTTP error (`400`) status, and the response body contains the error message `partial write of line protocol occurred` with details about the problem line.
282286
283287
##### Parsing failed for write_lp endpoint
284288
@@ -323,7 +327,7 @@ For more information, see [diskless architecture](#diskless-architecture).
323327
> Because InfluxDB sends a write response after the WAL file has been flushed to the configured object store (default is every second), individual write requests might not complete quickly, but you can make many concurrent requests to achieve higher total throughput.
324328
> Future enhancements will include an API parameter that lets requests return without waiting for the WAL flush.
325329
326-
#### Create a database or Table
330+
#### Create a database or table
327331
328332
To create a database without writing data, use the `create` subcommand--for example:
329333
@@ -340,9 +344,10 @@ influxdb3 create -h
340344
### Query the database
341345
342346
InfluxDB 3 now supports native SQL for querying, in addition to InfluxQL, an
343-
SQL-like language customized for time series queries. {{< product-name >}} limits
344-
query time ranges to 72 hours (both recent and historical) to ensure query performance.
347+
SQL-like language customized for time series queries.
345348
349+
{{< product-name >}} limits
350+
query time ranges to 72 hours (both recent and historical) to ensure query performance.
346351
For more information about the 72-hour limitation, see the
347352
[update on InfluxDB 3 Core’s 72-hour limitation](https://www.influxdata.com/blog/influxdb3-open-source-public-alpha-jan-27/).
348353
@@ -400,7 +405,7 @@ $ influxdb3 query --database=servers "SELECT DISTINCT usage_percent, time FROM c
400405
401406
### Querying using the CLI for InfluxQL
402407
403-
[InfluxQL](/influxdb3/core/reference/influxql/) is an SQL-like language developed by InfluxData with specific features tailored for leveraging and working with InfluxDB. It’s compatible with all versions of InfluxDB, making it a good choice for interoperability across different InfluxDB installations.
408+
[InfluxQL](/influxdb3/version/reference/influxql/) is an SQL-like language developed by InfluxData with specific features tailored for leveraging and working with InfluxDB. It’s compatible with all versions of InfluxDB, making it a good choice for interoperability across different InfluxDB installations.
404409
405410
To query using InfluxQL, enter the `influxdb3 query` subcommand and specify `influxql` in the language option--for example:
406411
@@ -499,7 +504,7 @@ You can use the `influxdb3` CLI to create a last value cache.
499504
Usage: $ influxdb3 create last_cache [OPTIONS] -d <DATABASE_NAME> -t <TABLE> [CACHE_NAME]
500505
501506
Options:
502-
-h, --host <HOST_URL> URL of the running InfluxDB 3 Core server [env: INFLUXDB3_HOST_URL=]
507+
-h, --host <HOST_URL> URL of the running {{% product-name %}} server [env: INFLUXDB3_HOST_URL=]
503508
-d, --database <DATABASE_NAME> The database to run the query against [env: INFLUXDB3_DATABASE_NAME=]
504509
--token <AUTH_TOKEN> The token for authentication [env: INFLUXDB3_AUTH_TOKEN=]
505510
-t, --table <TABLE> The table for which the cache is created
@@ -569,35 +574,26 @@ influxdb3 create distinct_cache -h
569574
570575
The InfluxDB 3 Processing engine is an embedded Python VM for running code inside the database to process and transform data.
571576
572-
To use the Processing engine, you create [plugins](#plugin) and [triggers](#trigger).
577+
To activate the Processing engine, pass the `--plugin-dir <PLUGIN_DIR>` option when starting the {{% product-name %}} server.
578+
`PLUGIN_DIR` is your filesystem location for storing [plugin](#plugin) files for the Processing engine to run.
573579
574580
#### Plugin
575581
576-
A plugin is a Python function that has a signature compatible with one of the [trigger types](#trigger-types).
577-
The [`influxdb3 create plugin`](/influxdb3/core/reference/cli/influxdb3/create/plugin/) command loads a Python plugin file into the server.
582+
A plugin is a Python function that has a signature compatible with a Processing engine [trigger](#trigger).
578583
579584
#### Trigger
580585
581-
After you load a plugin into an InfluxDB 3 server, you can create one or more
582-
triggers associated with the plugin.
583-
When you create a trigger, you specify a plugin, a database, optional runtime arguments,
584-
and a trigger-spec, which specifies `all_tables` or `table:my_table_name` (for filtering data sent to the plugin).
585-
When you _enable_ a trigger, the server executes the plugin code according to the
586-
plugin signature.
586+
When you create a trigger, you specify a [plugin](#plugin), a database, optional arguments,
587+
and a _trigger-spec_, which defines when the plugin is executed and what data it receives.
587588
588589
##### Trigger types
589590
590-
InfluxDB 3 provides the following types of triggers:
591+
InfluxDB 3 provides the following types of triggers, each with specific trigger-specs:
591592
592-
- **On WAL flush**: Sends the batch of write data to a plugin once a second (configurable).
593-
594-
> [!Note]
595-
> Currently, only the **WAL flush** trigger is supported, but more are on the way:
596-
>
597-
> - **On Snapshot**: Sends metadata to a plugin for further processing against the Parquet data or to send the information elsewhere (for example, to an Iceberg Catalog). _Not yet available._
598-
> - **On Schedule**: Executes a plugin on a user-configured schedule, useful for data collection and deadman monitoring. _Not yet available._
599-
> - **On Request**: Binds a plugin to an HTTP endpoint at `/api/v3/plugins/<name>`. _Not yet available._
600-
> 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.
593+
- **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/<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.
601597
602598
### Test, create, and trigger plugin code
603599
@@ -686,7 +682,7 @@ Test your InfluxDB 3 plugin safely without affecting written data. During a plug
686682
To test a plugin, do the following:
687683
688684
1. Create a _plugin directory_--for example, `/path/to/.influxdb/plugins`
689-
2. [Start the InfluxDB server](#start-influxdb) and include the `--plugin-dir` option with your plugin directory path.
685+
2. [Start the InfluxDB server](#start-influxdb) and include the `--plugin-dir <PATH>` option.
690686
3. Save the [preceding example code](#example-python-plugin) to a plugin file inside of the plugin directory. If you haven't yet written data to the table in the example, comment out the lines where it queries.
691687
4. To run the test, enter the following command with the following options:
692688
@@ -706,7 +702,7 @@ You can quickly see how the plugin behaves, what data it would have written to t
706702
You can then edit your Python code in the plugins directory, and rerun the test.
707703
The server reloads the file for every request to the `test` API.
708704
709-
For more information, see [`influxdb3 test wal_plugin`](/influxdb3/core/reference/cli/influxdb3/test/wal_plugin/) or run `influxdb3 test wal_plugin -h`.
705+
For more information, see [`influxdb3 test wal_plugin`](/influxdb3/version/reference/cli/influxdb3/test/wal_plugin/) or run `influxdb3 test wal_plugin -h`.
710706
711707
With the plugin code inside the server plugin directory, and a successful test,
712708
you're ready to create a plugin and a trigger to run on the server.
@@ -729,14 +725,6 @@ influxdb3 test wal_plugin \
729725
test.py
730726
```
731727
732-
```bash
733-
# Create a plugin to run
734-
influxdb3 create plugin \
735-
-d mydb \
736-
--code-filename="/path/to/.influxdb3/plugins/test.py" \
737-
test_plugin
738-
```
739-
740728
```bash
741729
# Create a trigger that runs the plugin
742730
influxdb3 create trigger \
@@ -754,11 +742,7 @@ enable the trigger and have it run the plugin as you write data:
754742
influxdb3 enable trigger --database mydb trigger1
755743
```
756744
757-
For more information, see the following:
758-
759-
- [`influxdb3 test wal_plugin`](/influxdb3/core/reference/cli/influxdb3/test/wal_plugin/)
760-
- [`influxdb3 create plugin`](/influxdb3/core/reference/cli/influxdb3/create/plugin/)
761-
- [`influxdb3 create trigger`](/influxdb3/core/reference/cli/influxdb3/create/trigger/)
745+
For more information, see [Python plugins and the Processing engine](/influxdb3/version/plugins/).
762746
763747
### Diskless architecture
764748

0 commit comments

Comments
 (0)