openvpn

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: GPL-3.0 Imports: 6 Imported by: 1

README

openvpn

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

Requirements:

It produces the following charts:

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

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

  1. User Traffic in kilobits/s
  • received
  • sent
  1. User Connection Time in seconds
  • time
configuration

openvpn 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.

So to not break other tools that uses Management Interface we decided to disable it by default.

For all available options please see module configuration file.


Needs only address of OpenVPN Management Interface.

Here is an example for 2 OpenVPN instances:

jobs:
  - name: local
    address : /dev/openvpn
      
  - name: remote
    address : 100.64.0.1:7505

Without configuration, module attempts to connect to 127.0.0.1:7505


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