English | Русский
This project requires Python 3.x and the web.py module. You can install it using the following command:
pip3 install web.pyTo install OpenVPN-LogMonitor on your server, follow these steps:
- Clone the repository:
git clone https://github.com/Dylariz/OpenVPN-LogMonitor.git cd OpenVPN-LogMonitor - Ensure the OpenVPN status log file is located at
/var/log/openvpn/status.log. If it's located elsewhere, modify theSTATUSvariable in both script files or specify the log path in yourserver.conffile using:status /var/log/openvpn/status.log - Run the setup script to create and enable systemd services:
bash setup_openvpn_services.sh - (Optional) To reload the monitoring services, you can use the following commands:
systemctl disable --now openvpn_stats.service systemctl disable --now openvpn_display_html.service systemctl enable --now openvpn_stats.service systemctl enable --now openvpn_display_html.service - By default, connect to:
http://{SERVER_IP}:8075/
You can modify certain settings at the beginning of the script files:
- openvpn_stats.py and openvpn_display_html.py:
STATUS = "/var/log/openvpn/status.log" # OpenVPN status log path LOG_UPDATE_INTERVAL = 60 # Backup time interval - setup_openvpn_services.sh:
SERVICE_NAME_HTML="openvpn_display_html" SERVICE_NAME_STATS="openvpn_stats" SCRIPT_HTML_PATH="$SCRIPT_DIR/openvpn_display_html.py" SCRIPT_STATS_PATH="$SCRIPT_DIR/openvpn_stats.py" PYTHON_PATH="/usr/bin/python3"
