Skip to main content

OpenVPN monitoring with Netdata(based on status log)

Parses server log files and provides summary (client, traffic) metrics. Please note that this collector is similar to another OpenVPN collector. However, this collector requires status logs from OpenVPN in contrast to another collector that requires Management Interface enabled.

Requirements

  • make sure netdata user can read openvpn-status.log.

  • update_every interval must match the interval on which OpenVPN writes the operational status to the log file.

Metrics

All metrics have "openvpn." prefix.

user_* stats are disabled by default, see per_user_stats in the module config file.

MetricScopeDimensionsUnits
active_clientsglobalclientsclients
total_trafficglobalin, outkilobits/s
user_trafficuserin, outkilobits/s
user_connection_timeusertimeseconds

Configuration

Edit the go.d/openvpn_status_log.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata   # Replace this path with your Netdata config directory, if different
sudo ./edit-config go.d/openvpn_status_log.conf

Configuration example:

jobs:
- name: local
log_path: '/var/log/openvpn/status.log'
per_user_stats:
includes:
- "* *"

For all available options please see module configuration file.

Troubleshooting

To troubleshoot issues with the openvpn_status_log collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
  • Switch to the netdata user.

    sudo -u netdata -s
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m openvpn_status_log

Was this page helpful?

Contribute