openvpn

package
v0.0.0-...-6ade924 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

README

OpenVPN monitoring with Netdata

OpenVPN is an open-source commercial software that implements virtual private network techniques to create secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities.

This module will monitor one or more OpenVPN instances via Management Interface.

Requirements

Metrics

All metrics have "openvpn." prefix.

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

Metric Scope Dimensions Units
active_clients global clients clients
total_traffic global in, out kilobits/s
user_traffic user in, out kilobits/s
user_connection_time user time seconds

Configuration

This collector is disabled by default. Should be explicitly enabled in go.d.conf.

Reason:

Currently, the OpenVPN daemon can at most support a single management client any one time.

We disabled it to not break other tools which uses Management Interface.

Edit the go.d/openvpn.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
sudo ./edit-config go.d/openvpn.conf

Needs only address of OpenVPN Management Interface. Here is an example for 2 OpenVPN instances:

jobs:
  - name: local
    address: /dev/openvpn

  - name: remote
    address: 203.0.113.10:7505

For all available options please see module configuration file.

Troubleshooting

To troubleshoot issues with the openvpn 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
    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Charts

type Charts = module.Charts

Charts is an alias for module.Charts

type Config

type Config struct {
	Address        string
	ConnectTimeout web.Duration       `yaml:"connect_timeout"`
	ReadTimeout    web.Duration       `yaml:"read_timeout"`
	WriteTimeout   web.Duration       `yaml:"write_timeout"`
	PerUserStats   matcher.SimpleExpr `yaml:"per_user_stats"`
}

Config is the OpenVPN module configuration.

type Dims

type Dims = module.Dims

Dims is an alias for module.Dims

type OpenVPN

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

OpenVPN OpenVPN module.

func New

func New() *OpenVPN

New creates OpenVPN with default values.

func (OpenVPN) Charts

func (o OpenVPN) Charts() *Charts

Charts creates Charts.

func (*OpenVPN) Check

func (o *OpenVPN) Check() bool

Check makes check.

func (*OpenVPN) Cleanup

func (o *OpenVPN) Cleanup()

Cleanup makes cleanup.

func (*OpenVPN) Collect

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

Collect collects metrics.

func (*OpenVPN) Init

func (o *OpenVPN) Init() bool

Init makes initialization.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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