UDP
Send logs to a remote UDP server
Last updated
Was this helpful?
Was this helpful?
fluent-bit -i cpu -t cpu -o udp://192.168.2.3:5170 -p format=json_lines -vfluent-bit -i cpu -t cpu -o udp -p host=192.168.2.3 -p port=5170 \
-p format=json_lines -o stdout -m '*'pipeline:
inputs:
- name: cpu
tag: cpu
outputs:
- name: udp
match: '*'
host: 192.168.2.3
port: 5170
format: json_lines[INPUT]
Name cpu
Tag cpu
[OUTPUT]
Name udp
Match *
Host 192.168.2.3
Port 5170
Format json_linespipeline:
inputs:
- name: cpu
tag: cpu
outputs:
- name: udp
match: '*'
host: 127.0.0.1
port: 5170
format: json_lines
json_date_key: timestamp
json_date_format: iso8601[INPUT]
Name cpu
Tag cpu
[OUTPUT]
Name udp
Match *
Host 127.0.0.1
Port 5170
Format json_lines
Json_Date_Key timestamp
Json_Date_Format iso8601nc -u -l 5170{"timestamp":"2024-01-15T10:30:45.123456Z","cpu_p":1.1875,"user_p":0.5625,"system_p":0.625}
{"timestamp":"2024-01-15T10:30:46.123456Z","cpu_p":2.25,"user_p":2.0,"system_p":0.25}pipeline:
inputs:
- name: tail
path: /var/log/app.log
tag: app
outputs:
- name: udp
match: '*'
host: 127.0.0.1
port: 5170
raw_message_key: message[INPUT]
Name tail
Path /var/log/app.log
Tag app
[OUTPUT]
Name udp
Match *
Host 127.0.0.1
Port 5170
Raw_Message_Key messagenc -u -l 5170socat UDP-RECV:5170 STDOUT