1*b7a9a499Sbluhm# The client writes a message to Sys::Syslog native method.
2*b7a9a499Sbluhm# The syslogd writes it into a file and through a pipe and to tty.
3*b7a9a499Sbluhm# The syslogd passes it via UDP non exising loghost with reject route
4*b7a9a499Sbluhm# Find dropped udp loghost message in log file.
5*b7a9a499Sbluhm
6*b7a9a499Sbluhmuse strict;
7*b7a9a499Sbluhmuse warnings;
8*b7a9a499Sbluhmuse Socket;
9*b7a9a499Sbluhm
10*b7a9a499Sbluhmour %args = (
11*b7a9a499Sbluhm    syslogd => {
12*b7a9a499Sbluhm	loghost => '@udp://127.1.2.3:4567',
13*b7a9a499Sbluhm	loggrep => {
14*b7a9a499Sbluhm	    # more messages after 'dropped 4 messages' are dropped
15*b7a9a499Sbluhm	    qr/Logging to FORWUDP .* \(dropped send error\)/ => '>=4',
16*b7a9a499Sbluhm	},
17*b7a9a499Sbluhm    },
18*b7a9a499Sbluhm    server => {
19*b7a9a499Sbluhm	noserver => 1,
20*b7a9a499Sbluhm    },
21*b7a9a499Sbluhm    file => {
22*b7a9a499Sbluhm	loggrep => {
23*b7a9a499Sbluhm	    qr/syslogd\[\d+\]: dropped 4 messages to udp loghost/ => 1,
24*b7a9a499Sbluhm	},
25*b7a9a499Sbluhm    },
26*b7a9a499Sbluhm);
27*b7a9a499Sbluhm
28*b7a9a499Sbluhm1;
29