mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 17:20:42 +01:00
28 lines
865 B
Bash
Executable File
28 lines
865 B
Bash
Executable File
#!/bin/bash
|
|
# add 2018-04-04 by Pascal Withopf, released under ASL 2.0
|
|
. $srcdir/diag.sh init
|
|
. $srcdir/diag.sh generate-conf
|
|
. $srcdir/diag.sh add-conf '
|
|
module(load="../plugins/imtcp/.libs/imtcp")
|
|
input(type="imtcp" port="13514")
|
|
|
|
set $!var = int2hex(61);
|
|
set $!var2 = int2hex(-13);
|
|
|
|
template(name="outfmt" type="string" string="-%$!var%- -%$!var2%-\n")
|
|
:syslogtag, contains, "tag" action(type="omfile" template="outfmt"
|
|
file="rsyslog.out.log")
|
|
'
|
|
. $srcdir/diag.sh startup
|
|
. $srcdir/diag.sh tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: msgnum:1\""
|
|
. $srcdir/diag.sh shutdown-when-empty
|
|
. $srcdir/diag.sh wait-shutdown
|
|
echo '-3d- -fffffffffffffff3-' | cmp - rsyslog.out.log
|
|
if [ ! $? -eq 0 ]; then
|
|
echo "invalid response generated, rsyslog.out.log is:"
|
|
cat rsyslog.out.log
|
|
. $srcdir/diag.sh error-exit 1
|
|
fi;
|
|
|
|
. $srcdir/diag.sh exit
|