github.com/netdata/go.d.plugin@v0.58.1/modules/openvpn/integrations/openvpn.md (about)

     1  <!--startmeta
     2  custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/openvpn/README.md"
     3  meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/openvpn/metadata.yaml"
     4  sidebar_label: "OpenVPN"
     5  learn_status: "Published"
     6  learn_rel_path: "Data Collection/VPNs"
     7  most_popular: False
     8  message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
     9  endmeta-->
    10  
    11  # OpenVPN
    12  
    13  
    14  <img src="https://netdata.cloud/img/openvpn.svg" width="150"/>
    15  
    16  
    17  Plugin: go.d.plugin
    18  Module: openvpn
    19  
    20  <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
    21  
    22  ## Overview
    23  
    24  This collector monitors OpenVPN servers.
    25  
    26  It uses OpenVPN [Management Interface](https://openvpn.net/community-resources/management-interface/) to collect metrics.
    27  
    28  
    29  
    30  
    31  This collector is supported on all platforms.
    32  
    33  This collector supports collecting metrics from multiple instances of this integration, including remote instances.
    34  
    35  
    36  ### Default Behavior
    37  
    38  #### Auto-Detection
    39  
    40  This integration doesn't support auto-detection.
    41  
    42  #### Limits
    43  
    44  The default configuration for this integration does not impose any limits on data collection.
    45  
    46  #### Performance Impact
    47  
    48  The default configuration for this integration is not expected to impose a significant performance impact on the system.
    49  
    50  
    51  ## Metrics
    52  
    53  Metrics grouped by *scope*.
    54  
    55  The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
    56  
    57  
    58  
    59  ### Per OpenVPN instance
    60  
    61  These metrics refer to the entire monitored application.
    62  
    63  This scope has no labels.
    64  
    65  Metrics:
    66  
    67  | Metric | Dimensions | Unit |
    68  |:------|:----------|:----|
    69  | openvpn.active_clients | clients | clients |
    70  | openvpn.total_traffic | in, out | kilobits/s |
    71  
    72  ### Per user
    73  
    74  These metrics refer to the VPN user.
    75  
    76  Labels:
    77  
    78  | Label      | Description     |
    79  |:-----------|:----------------|
    80  | username | VPN username |
    81  
    82  Metrics:
    83  
    84  | Metric | Dimensions | Unit |
    85  |:------|:----------|:----|
    86  | openvpn.user_traffic | in, out | kilobits/s |
    87  | openvpn.user_connection_time | time | seconds |
    88  
    89  
    90  
    91  ## Alerts
    92  
    93  There are no alerts configured by default for this integration.
    94  
    95  
    96  ## Setup
    97  
    98  ### Prerequisites
    99  
   100  #### Enable in go.d.conf.
   101  
   102  This collector is disabled by default. You need to explicitly enable it in [go.d.conf](https://github.com/netdata/go.d.plugin/blob/master/config/go.d.conf).
   103  
   104  From the documentation for the OpenVPN Management Interface:
   105  > Currently, the OpenVPN daemon can at most support a single management client any one time.
   106  
   107  It is disabled to not break other tools which use `Management Interface`.
   108  
   109  
   110  
   111  ### Configuration
   112  
   113  #### File
   114  
   115  The configuration file name for this integration is `go.d/openvpn.conf`.
   116  
   117  
   118  You can edit the configuration file using the `edit-config` script from the
   119  Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory).
   120  
   121  ```bash
   122  cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
   123  sudo ./edit-config go.d/openvpn.conf
   124  ```
   125  #### Options
   126  
   127  The following options can be defined globally: update_every, autodetection_retry.
   128  
   129  
   130  <details><summary>Config options</summary>
   131  
   132  | Name | Description | Default | Required |
   133  |:----|:-----------|:-------|:--------:|
   134  | update_every | Data collection frequency. | 1 | no |
   135  | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |
   136  | address | Server address in IP:PORT format. | 127.0.0.1:7505 | yes |
   137  | per_user_stats | User selector. Determines which user metrics will be collected. |  | no |
   138  | connect_timeout | Connection timeout in seconds. The timeout includes name resolution, if required. | 2 | no |
   139  | read_timeout | Read timeout in seconds. Sets deadline for read calls. | 2 | no |
   140  | write_timeout | Write timeout in seconds. Sets deadline for write calls. | 2 | no |
   141  
   142  </details>
   143  
   144  #### Examples
   145  
   146  ##### Basic
   147  
   148  A basic example configuration.
   149  
   150  <details><summary>Config</summary>
   151  
   152  ```yaml
   153  jobs:
   154    - name: local
   155      address: 127.0.0.1:7505
   156  
   157  ```
   158  </details>
   159  
   160  ##### With user metrics
   161  
   162  Collect metrics of all users.
   163  
   164  <details><summary>Config</summary>
   165  
   166  ```yaml
   167  jobs:
   168    - name: local
   169      address: 127.0.0.1:7505
   170      per_user_stats:
   171        includes:
   172          - "* *"
   173  
   174  ```
   175  </details>
   176  
   177  ##### Multi-instance
   178  
   179  > **Note**: When you define multiple jobs, their names must be unique.
   180  
   181  Collecting metrics from local and remote instances.
   182  
   183  
   184  <details><summary>Config</summary>
   185  
   186  ```yaml
   187  jobs:
   188    - name: local
   189      address: 127.0.0.1:7505
   190  
   191    - name: remote
   192      address: 203.0.113.0:7505
   193  
   194  ```
   195  </details>
   196  
   197  
   198  
   199  ## Troubleshooting
   200  
   201  ### Debug Mode
   202  
   203  To troubleshoot issues with the `openvpn` collector, run the `go.d.plugin` with the debug option enabled. The output
   204  should give you clues as to why the collector isn't working.
   205  
   206  - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
   207    your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
   208  
   209    ```bash
   210    cd /usr/libexec/netdata/plugins.d/
   211    ```
   212  
   213  - Switch to the `netdata` user.
   214  
   215    ```bash
   216    sudo -u netdata -s
   217    ```
   218  
   219  - Run the `go.d.plugin` to debug the collector:
   220  
   221    ```bash
   222    ./go.d.plugin -d -m openvpn
   223    ```
   224  
   225