Answer the question
In order to leave comments, you need to log in
How to change date and time in rsyslog?
We use rsyslog to receive logs from remote devices. In some connected devices, time synchronization does not work, as a result, incorrect time is poured into the logs.
At the moment, we use the breakdown of logs by source fromhost-ip:
$template FILENAME,"/var/log/%fromhost-ip%/syslog.log"
*.* ?FILENAME
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
...
$template RSYSLOG_TraditionalFileFormat,"%timegenerated% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question