Huge openvas.log

Hello
I have a 80GB /var/lib/docker/volumes/greenbone-community-edition_openvas_log_data_vol/_data/openvas.log.
Should I simply use logrotate? Should any container be restarted after that? I could not find any log settings using the GUI.
Thank you.

Here’s what I do to manage that

docker compose -f ~/greenbone-community-container/docker-compose.yml -p greenbone-community-edition exec    openvas  bash  -c "cat /dev/null > /var/log/openvas/openvas.log"

Hi, ChanScan
I believe you have this command in a script called from cron.
To completely erase the log seems to be too radical. I think the log rotation is still a better option. But I am happy to know that you don’t need to restart the openvas container.
Thanks for your suggestion.

I recommend changing the log level by editing the compose file

configure-openvas:
...
    command:
         sed "s/127/16/" /etc/openvas/openvas_log.conf | sed 's/gvm/openvas/' > /mnt/openvas_log.conf
  4  Errors.
  8  Critical situation.
 16  Warnings.
 32  Messages.
 64  Information.
128  Debug.  (Lots of output.)

Hi PiRomant

Do you mean
sed "s/128/16/" ?
All sections of my openvas_log.conf have level=128 (Debug).
That’s a good idea to reduce the log file size. But it still would have to be rotated or deleted.
Thanks

I created a file named /etc/logrotate.d/openvas and it seems to be working.

/var/lib/docker/volumes/greenbone-community-edition_openvas_log_data_vol/_data/openvas.log {
    daily
    rotate 5
    compress
    missingok
    notifempty
    create 0640 root root
    postrotate
        /usr/bin/chmod ug+rw /var/lib/docker/volumes/greenbone-community-edition_openvas_log_data_vol/_data/openvas.log
    endscript
}