Logging/logrotate settings for management plugin?

113 views
Skip to first unread message

Rainer Plischke

unread,
Dec 1, 2022, 5:40:38 AM12/1/22
to rabbitmq-users
Hello there,

After enabling the management plugin's HTTP Request Logging, the log folder is getting filled with hourly log files like "access.log.2022_11_30_15". Being on Ubuntu/Debian the standard log files are being rotated with logrotate; but I did not find a way to use logrotate with the access logs. Version is 3.11.0.
Writing a special cleanup script is an option, but I would like to use standard means for log rotation, so I am wondering if there are any additional logging settings for the management plugin (e.g. to prevent automatic logging) or a way to use logrotate.

Thanks!
Rainer

Luke Bakken

unread,
Dec 5, 2022, 5:48:11 PM12/5/22
to rabbitmq-users
Hi Rainer,

You'll want to configure logrotate to rotate those files. I just checked the RabbitMQ source and rotation of the HTTP log files is not provided at this time.

This seems to be a good document for configuring logrotate -


Thanks,
Luke

Rainer Plischke

unread,
Dec 13, 2022, 11:36:44 AM12/13/22
to rabbitmq-users
Thanks for your feedback. I tried logrotate before, but was (and still am) not able to get it working on these files though. I have tried several variations of

/var/log/rabbitmq/http/access.log {
        hourly
        missingok
        rotate 5
        nocreate
        compress
        delaycompress
        dateext
        dateformat .%Y_%m_%d_%H
        su rabbitmq adm
}


but to no prevail. Using wildcards in the log file name makes everything even worse (compressing already compressed files, etc.).
If the log file would simply be "access.log" without any automatic date added, everything would be fine, but I also could not find any means of disabling this "feature" in the RabbitMQ configuration. It seems that I will have to stick with a manual script for the time being.

Thanks,
Rainer

Luke Bakken

unread,
Dec 13, 2022, 11:38:14 AM12/13/22
to rabbitmq-users
Hi Rainier,

Thanks for letting me know what you have tried. I will find time to see if I can figure this out.

Thanks,
Luke
Reply all
Reply to author
Forward
0 new messages