I am running an apache server which is creating log files using rotatelogs. It creates a new file every day with the date appended to it (e.g. filename.yyyy.mm.dd format).

I want to use rsyslog to transfer these logs to a common server but the problem is that variable $InputFileName of Module imFile requires the actual path and doesn't accept any variable or template name.

How do I provide a variable name to $InputFileName so that it automatically sends the log of the new file generated by rotatelogs everyday?


You could have Apache write to a file at a set path, have rsyslog read that file, and occasionally rotate that file using logrotate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.