From 9714a0468742b73cb5046dae771c7613d7f0192d Mon Sep 17 00:00:00 2001 From: "Eric D. Schabell" Date: Fri, 5 Dec 2025 14:10:26 +0100 Subject: [PATCH 1/2] pipeline: inputs: mqtt: update mqtt input config with buffer_size defaults and payload_key examples. Fixes #2282. Signed-off-by: Eric D. Schabell --- pipeline/inputs/mqtt.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pipeline/inputs/mqtt.md b/pipeline/inputs/mqtt.md index e005ad2a6..6e49c9a95 100644 --- a/pipeline/inputs/mqtt.md +++ b/pipeline/inputs/mqtt.md @@ -6,12 +6,22 @@ The _MQTT_ input plugin retrieves messages and data from MQTT control packets ov The plugin supports the following configuration parameters: -| Key | Description | Default | -|:--------------|:--------------------------------------------------------------------------------------------------------|:----------| -| `Listen` | Listener network interface. | `0.0.0.0` | -| `Port` | TCP port where listening for connections. | `1883` | -| `Payload_Key` | Specify the key where the payload key/value will be preserved. | _none_ | -| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` | +| Key | Description | Default | +|:--------------|:--------------------------------------------------------------------------------------------------------|:-------------| +| `buffer_size` | Maximum payload size (in bytes) for a single MQTT message. | `2048` | +| `listen` | Listener network interface. | `0.0.0.0` | +| `payload_key` | Specify the key where the payload key/value will be preserved. | _none_ | +| `port` | TCP port where listening for connections. | `1883` | +| `threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` | + +Notes: +- `buffer_size` defaults to `2048` bytes; messages larger than this limit are dropped. +- Defaults for `listen` and `port` are `0.0.0.0` and `1883`, so you can omit them if you want the standard MQTT listener. +- Payloads are expected to be JSON maps; non-JSON payloads will fail to parse. + +### TLS / SSL + +The MQTT input plugin supports TLS/SSL. For the available options and guidance, see [Transport Security](../../administration/transport-security.md). ## Get started @@ -55,6 +65,7 @@ pipeline: tag: data listen: 0.0.0.0 port: 1883 + payload_key: payload outputs: - name: stdout @@ -70,6 +81,7 @@ pipeline: Tag data Listen 0.0.0.0 Port 1883 + Payload_Key payload [OUTPUT] Name stdout From b2831c2e08ef57c1a85d1a218a951d41bbb24683 Mon Sep 17 00:00:00 2001 From: "Eric D. Schabell" Date: Fri, 5 Dec 2025 14:17:45 +0100 Subject: [PATCH 2/2] pipeline: inputs: mqtt: updated description of payload_key as per review comments. Signed-off-by: Eric D. Schabell --- pipeline/inputs/mqtt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/inputs/mqtt.md b/pipeline/inputs/mqtt.md index 6e49c9a95..b6d102097 100644 --- a/pipeline/inputs/mqtt.md +++ b/pipeline/inputs/mqtt.md @@ -10,7 +10,7 @@ The plugin supports the following configuration parameters: |:--------------|:--------------------------------------------------------------------------------------------------------|:-------------| | `buffer_size` | Maximum payload size (in bytes) for a single MQTT message. | `2048` | | `listen` | Listener network interface. | `0.0.0.0` | -| `payload_key` | Specify the key where the payload key/value will be preserved. | _none_ | +| `payload_key` | Field name where the MQTT message payload will be stored in the output record. | _none_ | | `port` | TCP port where listening for connections. | `1883` | | `threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |