mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 20:20:41 +01:00
and do not fail just because journalctl is missing on the system. The latter e.g. is the case for example on Ubuntu 14.04, which has journal support inside the OS, but no journalctl.
27 lines
851 B
Bash
Executable File
27 lines
851 B
Bash
Executable File
#!/bin/bash
|
|
# a basic test for omjournal.
|
|
# addd 2016-03-18 by RGerhards, released under ASL 2.0
|
|
. $srcdir/diag.sh init
|
|
. $srcdir/diag.sh require-journalctl
|
|
. $srcdir/diag.sh generate-conf
|
|
. $srcdir/diag.sh add-conf '
|
|
module(load="../plugins/imtcp/.libs/imtcp")
|
|
module(load="../plugins/omjournal/.libs/omjournal")
|
|
input(type="imtcp" port="13514")
|
|
|
|
action(type="omjournal")
|
|
'
|
|
. $srcdir/diag.sh startup
|
|
. $srcdir/diag.sh tcpflood -m1 -M "\"<133>2011-03-01T11:22:12Z host tag msgh RsysLoG-TESTBENCH $COOKIE\""
|
|
./msleep 500
|
|
. $srcdir/diag.sh shutdown-when-empty
|
|
. $srcdir/diag.sh wait-shutdown
|
|
# if we reach this, we have at least not aborted
|
|
journalctl -r -t rsyslogd: |grep "RsysLoG-TESTBENCH $COOKIE"
|
|
if [ $? -ne 1 ]; then
|
|
echo "error: cookie $COOKIE not found. Head of journal:"
|
|
journalctrl -r -t rsyslogd: | head
|
|
exit 1
|
|
fi
|
|
. $srcdir/diag.sh exit
|