Quote:
Originally Posted by saeeddeep
hello
Configuring rsyslog on Centos 7 to forward logs to a centralized syslog server.
rsyslog forwards new log lines fine as expected. But the old existing lines in /var/log/messages are not forwarded. I see this is the normal behavior, only new lines will be forwarded. Any way I can forward all existing lines from /var/log/messages ?
|
Is there a reason you need those lines? If it's only about archiving purposes, you can just copy the file to the central syslog server and be done.
Alternatively, you can use either the logger command, or even something like:
Code:
cat <FILE NAME> | nc -4u -w1 <SYSLOG HOST> <SYSLOG PORT>
Have you searched for any solutions on your own? After thirteen years, you should know to do basic research first.