| 1 | plugin_name: charts.d.plugin |
| 2 | modules: |
| 3 | - meta: |
| 4 | plugin_name: charts.d.plugin |
| 5 | module_name: libreswan |
| 6 | monitored_instance: |
| 7 | name: Libreswan |
| 8 | link: "https://libreswan.org/" |
| 9 | categories: |
| 10 | - data-collection.networking |
| 11 | icon_filename: "libreswan.png" |
| 12 | related_resources: |
| 13 | integrations: |
| 14 | list: [] |
| 15 | info_provided_to_referring_integrations: |
| 16 | description: "" |
| 17 | keywords: |
| 18 | - vpn |
| 19 | - libreswan |
| 20 | - network |
| 21 | - ipsec |
| 22 | overview: |
| 23 | data_collection: |
| 24 | metrics_description: "Monitor Libreswan performance for optimal IPsec VPN operations. Improve your VPN operations with Netdata''s real-time metrics and built-in alerts." |
| 25 | method_description: "The collector uses the `ipsec` command to collect the information it needs." |
| 26 | supported_platforms: |
| 27 | include: [] |
| 28 | exclude: [] |
| 29 | multi_instance: true |
| 30 | additional_permissions: |
| 31 | description: "" |
| 32 | default_behavior: |
| 33 | auto_detection: |
| 34 | description: "" |
| 35 | limits: |
| 36 | description: "" |
| 37 | performance_impact: |
| 38 | description: "" |
| 39 | setup: |
| 40 | prerequisites: |
| 41 | list: |
| 42 | - title: "Install charts.d plugin" |
| 43 | description: | |
| 44 | If [using our official native DEB/RPM packages](/packaging/installer/UPDATE.md#determine-which-installation-method-you-used), make sure `netdata-plugin-chartsd` is installed. |
| 45 | - title: "Permissions to execute `ipsec`" |
| 46 | description: | |
| 47 | The plugin executes 2 commands to collect all the information it needs: |
| 48 | |
| 49 | ```sh |
| 50 | ipsec whack --status |
| 51 | ipsec whack --trafficstatus |
| 52 | ``` |
| 53 | |
| 54 | The first command is used to extract the currently established tunnels, their IDs and their names. |
| 55 | The second command is used to extract the current uptime and traffic. |
| 56 | |
| 57 | Most probably user `netdata` will not be able to query libreswan, so the `ipsec` commands will be denied. |
| 58 | The plugin attempts to run `ipsec` as `sudo ipsec ...`, to get access to libreswan statistics. |
| 59 | |
| 60 | To allow user `netdata` execute `sudo ipsec ...`, create the file `/etc/sudoers.d/netdata` with this content: |
| 61 | |
| 62 | ``` |
| 63 | netdata ALL = (root) NOPASSWD: /sbin/ipsec whack --status |
| 64 | netdata ALL = (root) NOPASSWD: /sbin/ipsec whack --trafficstatus |
| 65 | ``` |
| 66 | |
| 67 | Make sure the path `/sbin/ipsec` matches your setup (execute `which ipsec` to find the right path). |
| 68 | configuration: |
| 69 | file: |
| 70 | name: charts.d/libreswan.conf |
| 71 | options: |
| 72 | description: | |
| 73 | The config file is sourced by the charts.d plugin. It's a standard bash file. |
| 74 | |
| 75 | The following collapsed table contains all the options that can be configured for the libreswan collector. |
| 76 | folding: |
| 77 | title: "Config options" |
| 78 | enabled: true |
| 79 | list: |
| 80 | - name: libreswan_update_every |
| 81 | description: The data collection frequency. If unset, will inherit the netdata update frequency. |
| 82 | default_value: 1 |
| 83 | required: false |
| 84 | - name: libreswan_priority |
| 85 | description: The charts priority on the dashboard |
| 86 | default_value: 90000 |
| 87 | required: false |
| 88 | - name: libreswan_retries |
| 89 | description: The number of retries to do in case of failure before disabling the collector. |
| 90 | default_value: 10 |
| 91 | required: false |
| 92 | - name: libreswan_sudo |
| 93 | description: Whether to run `ipsec` with `sudo` or not. |
| 94 | default_value: 1 |
| 95 | required: false |
| 96 | examples: |
| 97 | folding: |
| 98 | enabled: false |
| 99 | title: "Config" |
| 100 | list: |
| 101 | - name: Run `ipsec` without sudo |
| 102 | description: Run the `ipsec` utility without sudo |
| 103 | config: | |
| 104 | # the data collection frequency |
| 105 | # if unset, will inherit the netdata update frequency |
| 106 | #libreswan_update_every=1 |
| 107 | |
| 108 | # the charts priority on the dashboard |
| 109 | #libreswan_priority=90000 |
| 110 | |
| 111 | # the number of retries to do in case of failure |
| 112 | # before disabling the module |
| 113 | #libreswan_retries=10 |
| 114 | |
| 115 | # set to 1, to run ipsec with sudo (the default) |
| 116 | # set to 0, to run ipsec without sudo |
| 117 | libreswan_sudo=0 |
| 118 | troubleshooting: |
| 119 | problems: |
| 120 | list: [] |
| 121 | alerts: [] |
| 122 | metrics: |
| 123 | folding: |
| 124 | title: Metrics |
| 125 | enabled: false |
| 126 | description: "" |
| 127 | availability: [] |
| 128 | scopes: |
| 129 | - name: IPSEC tunnel |
| 130 | description: "Metrics related to IPSEC tunnels. Each tunnel provides its own set of the following metrics." |
| 131 | labels: [] |
| 132 | metrics: |
| 133 | - name: libreswan.net |
| 134 | description: LibreSWAN Tunnel ${name} Traffic |
| 135 | unit: "kilobits/s" |
| 136 | chart_type: area |
| 137 | dimensions: |
| 138 | - name: in |
| 139 | - name: out |
| 140 | - name: libreswan.uptime |
| 141 | description: LibreSWAN Tunnel ${name} Uptime |
| 142 | unit: "seconds" |
| 143 | chart_type: line |
| 144 | dimensions: |
| 145 | - name: uptime |