rsyslog/tests/no-parser-errmsg.sh
Rainer Gerhards 5a4ea1dd91 bugfix: parser subsystem did not report first 1000 errors...
... when no matching parser could be found. From then on, it reported
all remaining occurences of this incident. This was right the counter
of what was intended, happend due to invalid check condition.
2017-05-11 12:48:08 +02:00

26 lines
943 B
Bash
Executable File

#!/bin/bash
# add 2017-03-06 by Rainer Gerhards, 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" ruleset="ruleset")
template(name="test" type="string" string="tag: %syslogtag%, pri: %pri%, syslogfacility: %syslogfacility%, syslogseverity: %syslogseverity% msg: %msg%\n")
ruleset(name="ruleset" parser="rsyslog.rfc5424") {
action(type="omfile" file="rsyslog2.out.log" template="test")
}
action(type="omfile" file="rsyslog.out.log")
'
. $srcdir/diag.sh startup
. $srcdir/diag.sh tcpflood -m1
. $srcdir/diag.sh shutdown-when-empty
. $srcdir/diag.sh wait-shutdown
grep 'one message could not be processed by any parser' rsyslog.out.log > /dev/null
if [ $? -ne 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