Skip to main content

UDP

Forward

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

FieldRequiredDefaultDescription
nameYTarget name
descriptionN-Optional description
typeYMust be udp
pipelinesN-Optional post-processor pipelines
statusNtrueEnable/disable the target

Connection

FieldRequiredDefaultDescription
addressYRemote server IP address or hostname
portYRemote server port (1-65535)

Retry

FieldRequiredDefaultDescription
max_retriesN3Maximum delivery attempts per message (total attempts = max_retries + 1)
retry_delayN1Seconds between retry attempts

Normalization

FieldRequiredDefaultDescription
field_formatN-Data normalization format. See applicable Normalization section

Scheduler

FieldRequiredDefaultDescription
intervalNrealtimeExecution frequency. See Interval for details
cronN-Cron expression for scheduled execution. See Cron for details

Debug Options

FieldRequiredDefaultDescription
debug.statusNfalseEnable debug logging
debug.dont_send_logsNfalseProcess 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...

targets:
- name: udp_forwarder
type: udp
properties:
address: "192.168.1.100"
port: 514

With Retries

Configuring retry behavior for unreliable networks...

targets:
- name: udp_retry
type: udp
properties:
address: "logs.example.com"
port: 5000
max_retries: 5
retry_delay: 2

With Field Normalization

Normalizing fields to Common Information Model before forwarding...

targets:
- name: udp_normalized
type: udp
properties:
address: "192.168.1.100"
port: 514
field_format: "cim"