Skip to content

Dylariz/OpenVPN-LogMonitor

Repository files navigation

English | Русский

OpenVPN-LogMonitor

Requirements

This project requires Python 3.x and the web.py module. You can install it using the following command:

pip3 install web.py

Installation

To install OpenVPN-LogMonitor on your server, follow these steps:

  1. Clone the repository:
    git clone https://github.com/Dylariz/OpenVPN-LogMonitor.git
    cd OpenVPN-LogMonitor
  2. Ensure the OpenVPN status log file is located at /var/log/openvpn/status.log. If it's located elsewhere, modify the STATUS variable in both script files or specify the log path in your server.conf file using:
    status /var/log/openvpn/status.log
  3. Run the setup script to create and enable systemd services:
    bash setup_openvpn_services.sh
  4. (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
  5. By default, connect to:
    http://{SERVER_IP}:8075/

Screenshot

Screenshot

Configuration

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"

About

Linux OpenVPN Server connections analysing tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors