UDP
Synopsis
Creates a target that sends log data as individual UDP datagrams to a remote endpoint. Each event is sent immediately without batching, using a shared connection with mutex-protected writes.
Schema
- name: <string>
description: <string>
type: udp
pipelines: <pipeline[]>
status: <boolean>
properties:
address: <string>
port: <numeric>
max_retries: <numeric>
retry_delay: <numeric>
field_format: <string>
interval: <string|numeric>
cron: <string>
debug:
status: <boolean>
dont_send_logs: <boolean>
Configuration
| Field | Required | Default | Description |
|---|---|---|---|
name | Y | Target name | |
description | N | - | Optional description |
type | Y | Must be udp | |
pipelines | N | - | Optional post-processor pipelines |
status | N | true | Enable/disable the target |
Connection
| Field | Required | Default | Description |
|---|---|---|---|
address | Y | Remote server IP address or hostname | |
port | Y | Remote server port (1-65535) |
Retry
| Field | Required | Default | Description |
|---|---|---|---|
max_retries | N | 3 | Maximum delivery attempts per message (total attempts = max_retries + 1) |
retry_delay | N | 1 | Seconds between retry attempts |
Normalization
| Field | Required | Default | Description |
|---|---|---|---|
field_format | N | - | Data normalization format. See applicable Normalization section |
Scheduler
| Field | Required | Default | Description |
|---|---|---|---|
interval | N | realtime | Execution frequency. See Interval for details |
cron | N | - | Cron expression for scheduled execution. See Cron for details |
Debug Options
| Field | Required | Default | Description |
|---|---|---|---|
debug.status | N | false | Enable debug logging |
debug.dont_send_logs | N | false | Process logs but don't send to target (testing) |
Details
The UDP target sends each event as an individual datagram immediately upon receipt -- there is no batching. A single net.UDPConn connection is established at initialization and shared across all worker threads, with writes serialized by a mutex.
UDP is a connectionless protocol with no built-in delivery guarantees. Datagrams exceeding the network MTU (typically 1500 bytes) may be fragmented or dropped silently. There is no TLS support; for encrypted delivery, use the TCP target with TLS enabled.
On send failure, the target retries up to max_retries times with retry_delay between attempts. Statistics are recorded only after successful delivery.
Examples
Basic
Forwarding logs to a remote UDP endpoint... | |
With Retries
Configuring retry behavior for unreliable networks... | |
With Field Normalization
Normalizing fields to Common Information Model before forwarding... | |