papertrail / remote_syslog2

To install, see "Releases" tab. Self-contained daemon for reading local files and emitting remote syslog (without using local syslogd).
http://help.papertrailapp.com/
MIT License
637 stars 157 forks source link

Using rsyslog imudp/imtcp #247

Closed larytet closed 2 years ago

larytet commented 2 years ago

Is the following expected to work? rsyslog configuration

module(load="imtcp")
input(type="imtcp" port="8011" address="127.0.0.1")

Run remote_syslog

/usr/local/bin/remote_syslog -D -d 127.0.0.1 -p 8011 --tcp --poll /var/log/ctrd/ctrd.log

I see

2022-07-12 14:22:23 INFO  remote_syslog.go:51 Connecting to 127.0.0.1:8011 over tcp
2022-07-12 14:22:23 ERROR  remote_syslog.go:188 Cannot forward locallog.txt, it may not exist
2022-07-12 14:22:23 INFO  remote_syslog.go:198 Forwarding file: /var/log/ctrd/ctrd.log

I don't see rsyslog producing output.

If I use imfile and tail instead everything works fine

module(load="imfile")
input(type="imfile" file="/var/log/rsyslog.ctrd.log")
tail -v --sleep-interval=1 --retry --lines=10000 --max-unchanged-stats=5  ---disable-inotify -F /var/log/ctrd/ctrd.log >> /var/log/rsyslog.ctrd.log

What am I missing?