test: remote: start a receiver syslogd to manually verify rfc3164
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
9f6fbb3301
commit
d297a23e5a
@ -96,6 +96,7 @@ setup()
|
|||||||
cat <<-EOF > ${CONFD}/bar.conf
|
cat <<-EOF > ${CONFD}/bar.conf
|
||||||
# For remote logging
|
# For remote logging
|
||||||
*.* @127.0.0.2
|
*.* @127.0.0.2
|
||||||
|
*.* @127.0.0.2:${PORT2} ;RFC3164
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
../src/syslogd -m1 -b :${PORT} -d -sF -f ${CONF} -p ${SOCK} -p ${ALTSOCK} -C ${CACHE} -P ${PID} &
|
../src/syslogd -m1 -b :${PORT} -d -sF -f ${CONF} -p ${SOCK} -p ${ALTSOCK} -C ${CACHE} -P ${PID} &
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Verify that the sending to a remote IP:PORT works, note not receiving,
|
||||||
|
# there's a test fwd.sh that verifies that.
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
if [ x"${srcdir}" = x ]; then
|
if [ x"${srcdir}" = x ]; then
|
||||||
@ -7,11 +9,20 @@ fi
|
|||||||
. ${srcdir}/lib.sh
|
. ${srcdir}/lib.sh
|
||||||
setup
|
setup
|
||||||
|
|
||||||
MSG="kilroy"
|
export MSG="kilroy"
|
||||||
|
|
||||||
|
# Only needed for verifying correct RFC3164 parsing
|
||||||
|
cat <<-EOF >${CONFD2}/50-default.conf
|
||||||
|
*.* ${LOG2}
|
||||||
|
EOF
|
||||||
|
../src/syslogd -a 127.0.0.2:* -b :${PORT2} -d -F -f ${CONF2} -p ${SOCK2} -m1 -C ${CACHE2} -P ${PID2} &
|
||||||
|
sleep 3
|
||||||
|
cat ${PID2} >> "$DIR/PIDs"
|
||||||
|
kill -USR1 `cat ${PID2}`
|
||||||
|
|
||||||
# Start collector in background, note: might need sudo!
|
# Start collector in background, note: might need sudo!
|
||||||
#tshark -Qni lo -w ${CAP} port ${PORT} &
|
#tshark -Qni lo -w ${CAP} port ${PORT} &
|
||||||
tshark -Qni lo -w ${CAP} port 514 &
|
tshark -Qni lo -w ${CAP} port 514 2>/dev/null &
|
||||||
TPID="$!"
|
TPID="$!"
|
||||||
echo "$TPID" >> "$DIR/PIDs"
|
echo "$TPID" >> "$DIR/PIDs"
|
||||||
|
|
||||||
@ -29,5 +40,4 @@ wait ${TPID}
|
|||||||
|
|
||||||
# Analyze content, should have $MSG now ...
|
# Analyze content, should have $MSG now ...
|
||||||
#tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG}
|
#tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG}
|
||||||
tshark -r ${CAP} | grep ${MSG} || FAIL "Cannot find: ${MSG}"
|
tshark -r ${CAP} 2>/dev/null | grep ${MSG} || FAIL "Cannot find: ${MSG}"
|
||||||
rm ${CAP}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user