openvpn_status_log

package
v0.32.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2022 License: GPL-3.0 Imports: 9 Imported by: 1

README

OpenVPN monitoring with Netdata

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

  • If you are running multiple OpenVPN instances out of the same directory, MAKE SURE TO EDIT DIRECTIVES which create output files so that multiple instances do not overwrite each other's output files.

  • Make sure NETDATA USER CAN READ openvpn-status.log

  • Update_every interval MUST MATCH interval on which OpenVPN writes operational status to log file.

Charts

It produces the following charts:

  • Total Number Of Active Clients in clients
  • Total Traffic in kilobits/s

Per user charts (disabled by default, see per_user_stats in the module config file):

  • User Traffic in kilobits/s
  • User Connection Time in seconds

Configuration

Edit the go.d/openvpn_status.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.conf

Samples:

default
 log_path     : '/var/log/openvpn-status.log'
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 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.

First, navigate to your plugins directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the setting plugins directory. Once you're in the plugin's directory, switch to the netdata user.

cd /usr/libexec/netdata/plugins.d/
sudo -u netdata -s

You can now run the go.d.plugin to debug the collector:

./go.d.plugin -d -m openvpn_status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	StatusPath   string             `yaml:"log_path"`
	PerUserStats matcher.SimpleExpr `yaml:"per_user_stats"`
}

Config is the OpenVPNStatusLog module configuration.

type OpenVPNStatusLog

type OpenVPNStatusLog struct {
	module.Base
	Config `yaml:",inline"`
	// contains filtered or unexported fields
}

OpenVPNStatusLog OpenVPNStatusLog module.

func New

func New() *OpenVPNStatusLog

New creates OpenVPNStatusLog with default values.

func (OpenVPNStatusLog) Charts

func (o OpenVPNStatusLog) Charts() *module.Charts

Charts creates Charts.

func (*OpenVPNStatusLog) Check

func (o *OpenVPNStatusLog) Check() bool

Check makes check.

func (*OpenVPNStatusLog) Cleanup

func (o *OpenVPNStatusLog) Cleanup()

Cleanup makes cleanup.

func (*OpenVPNStatusLog) Collect

func (o *OpenVPNStatusLog) Collect() map[string]int64

Collect collects metrics.

func (*OpenVPNStatusLog) Init

func (o *OpenVPNStatusLog) Init() bool

Init makes initialization.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL