Reduce log size and detail

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
xeonz
OpenVpn Newbie
Posts: 10
Joined: Mon Jan 17, 2022 1:06 pm

Reduce log size and detail

Post by xeonz » Tue Oct 18, 2022 2:12 pm

By the way, is it any way to reduce log size and detail? I am getting openvpnas.log rotation every 15-20 sec and it looks like this:

Code: Select all

-rw-r--r--. 1 root   root    1000102 Oct 18 14:37 openvpnas.log.960
-rw-r--r--. 1 root   root    1000087 Oct 18 14:37 openvpnas.log.961
-rw-r--r--. 1 root   root    1000122 Oct 18 14:37 openvpnas.log.962
-rw-r--r--. 1 root   root    1000160 Oct 18 14:37 openvpnas.log.963
-rw-r--r--. 1 root   root    1000077 Oct 18 14:36 openvpnas.log.964
-rw-r--r--. 1 root   root    1000038 Oct 18 14:36 openvpnas.log.965
-rw-r--r--. 1 root   root    1000319 Oct 18 14:36 openvpnas.log.966
-rw-r--r--. 1 root   root    1000076 Oct 18 14:36 openvpnas.log.967
-rw-r--r--. 1 root   root    1000042 Oct 18 14:35 openvpnas.log.968
-rw-r--r--. 1 root   root    1000115 Oct 18 14:35 openvpnas.log.969

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Reduce log size and detail

Post by openvpn_inc » Tue Oct 18, 2022 3:05 pm

Hello xeonz,

You can;
- increase the size at which AS splits off the log files, to reduce the amount of files generated
- set up a rotation job in your operating system's log daemon to archive/delete older logs
- set AS to log to syslog, and rely on the usually already present log rotation of syslog
- set AS to log to syslog, and forward that to another logging solution, where you can there deal with it

This page contains all the relevant information:
https://openvpn.net/vpn-server-resource ... ss-server/

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Post Reply