1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Test UDP with rsyslogd as sender.
# The client writes a message to rsyslogd UDP socket.
# The rsyslogd forwards the message to syslogd UDP bind socket.
# The syslogd writes it into a file and through a pipe.
# The syslogd passes it via UDP to the rsyslogd.
# The rsyslogd receives the message on its UDP socket.
# Find the message in rsyslogd, file, pipe, syslogd, server log.
# Check that the message is in rsyslogd, syslogd, server log.
use strict;
use warnings;
use Socket;
our %args = (
client => {
connect => { domain => AF_INET, proto => "udp", addr => "127.0.0.1" },
},
rsyslogd => {
listen => { domain => AF_INET, proto => "udp", addr => "127.0.0.1" },
connect => { domain => AF_INET, proto => "udp", addr => "127.0.0.1",
port => 514 },
},
syslogd => {
options => ["-U", "127.0.0.1:514"],
},
);
1;
|