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

     1  <!--startmeta
     2  custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/wireguard/README.md"
     3  meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/wireguard/metadata.yaml"
     4  sidebar_label: "WireGuard"
     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  # WireGuard
    12  
    13  
    14  <img src="https://netdata.cloud/img/wireguard.svg" width="150"/>
    15  
    16  
    17  Plugin: go.d.plugin
    18  Module: wireguard
    19  
    20  <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
    21  
    22  ## Overview
    23  
    24  This collector monitors WireGuard VPN devices and peers traffic.
    25  
    26  
    27  It connects to the local WireGuard instance using [wireguard-go client](https://github.com/WireGuard/wireguard-go).
    28  
    29  
    30  This collector is supported on all platforms.
    31  
    32  This collector supports collecting metrics from multiple instances of this integration, including remote instances.
    33  
    34  This collector requires the CAP_NET_ADMIN capability, but it is set automatically during installation, so no manual configuration is needed.
    35  
    36  
    37  ### Default Behavior
    38  
    39  #### Auto-Detection
    40  
    41  It automatically detects instances running on localhost.
    42  
    43  
    44  #### Limits
    45  
    46  Doesn't work if Netdata or WireGuard is installed in the container.
    47  
    48  
    49  #### Performance Impact
    50  
    51  The default configuration for this integration is not expected to impose a significant performance impact on the system.
    52  
    53  
    54  ## Metrics
    55  
    56  Metrics grouped by *scope*.
    57  
    58  The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
    59  
    60  
    61  
    62  ### Per device
    63  
    64  These metrics refer to the VPN network interface.
    65  
    66  Labels:
    67  
    68  | Label      | Description     |
    69  |:-----------|:----------------|
    70  | device | VPN network interface |
    71  
    72  Metrics:
    73  
    74  | Metric | Dimensions | Unit |
    75  |:------|:----------|:----|
    76  | wireguard.device_network_io | receive, transmit | B/s |
    77  | wireguard.device_peers | peers | peers |
    78  
    79  ### Per peer
    80  
    81  These metrics refer to the VPN peer.
    82  
    83  Labels:
    84  
    85  | Label      | Description     |
    86  |:-----------|:----------------|
    87  | device | VPN network interface |
    88  | public_key | Public key of a peer |
    89  
    90  Metrics:
    91  
    92  | Metric | Dimensions | Unit |
    93  |:------|:----------|:----|
    94  | wireguard.peer_network_io | receive, transmit | B/s |
    95  | wireguard.peer_latest_handshake_ago | time | seconds |
    96  
    97  
    98  
    99  ## Alerts
   100  
   101  There are no alerts configured by default for this integration.
   102  
   103  
   104  ## Setup
   105  
   106  ### Prerequisites
   107  
   108  No action required.
   109  
   110  ### Configuration
   111  
   112  #### File
   113  
   114  The configuration file name for this integration is `go.d/wireguard.conf`.
   115  
   116  
   117  You can edit the configuration file using the `edit-config` script from the
   118  Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory).
   119  
   120  ```bash
   121  cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
   122  sudo ./edit-config go.d/wireguard.conf
   123  ```
   124  #### Options
   125  
   126  The following options can be defined globally: update_every, autodetection_retry.
   127  
   128  
   129  <details><summary>Config options</summary>
   130  
   131  | Name | Description | Default | Required |
   132  |:----|:-----------|:-------|:--------:|
   133  | update_every | Data collection frequency. | 1 | no |
   134  | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |
   135  
   136  </details>
   137  
   138  #### Examples
   139  There are no configuration examples.
   140  
   141  
   142  
   143  ## Troubleshooting
   144  
   145  ### Debug Mode
   146  
   147  To troubleshoot issues with the `wireguard` collector, run the `go.d.plugin` with the debug option enabled. The output
   148  should give you clues as to why the collector isn't working.
   149  
   150  - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
   151    your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
   152  
   153    ```bash
   154    cd /usr/libexec/netdata/plugins.d/
   155    ```
   156  
   157  - Switch to the `netdata` user.
   158  
   159    ```bash
   160    sudo -u netdata -s
   161    ```
   162  
   163  - Run the `go.d.plugin` to debug the collector:
   164  
   165    ```bash
   166    ./go.d.plugin -d -m wireguard
   167    ```
   168  
   169