0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-17 19:22:40 +00:00
netdata_netdata/collectors/charts.d.plugin/libreswan
Promise Akpan f5006d51e8 Fix Markdown Lint warnings ()
* make remark access all directories

* detailed fix after autofix by remark lint

* cross check autofix for this set of files

* crosscheck more files

* crosschecking and small fixes

* crosscheck autofixed md files
2019-08-15 13:06:39 +02:00
..
libreswan.chart.sh lint all shell collectors code () 2018-11-26 11:54:01 +02:00
libreswan.conf modularized all source code () 2018-10-15 23:16:42 +03:00
Makefile.inc Fix make dist () 2018-10-16 15:26:28 +03:00
README.md Fix Markdown Lint warnings () 2019-08-15 13:06:39 +02:00

libreswan

The plugin will collects bytes-in, bytes-out and uptime for all established libreswan IPSEC tunnels.

The following charts are created, per tunnel:

  1. Uptime
  • the uptime of the tunnel
  1. Traffic
  • bytes in
  • bytes out

configuration

Its config file is /etc/netdata/charts.d/libreswan.conf.

The plugin executes 2 commands to collect all the information it needs:

ipsec whack --status
ipsec whack --trafficstatus

The first command is used to extract the currently established tunnels, their IDs and their names. The second command is used to extract the current uptime and traffic.

Most probably user netdata will not be able to query libreswan, so the ipsec commands will be denied. The plugin attempts to run ipsec as sudo ipsec ..., to get access to libreswan statistics.

To allow user netdata execute sudo ipsec ..., create the file /etc/sudoers.d/netdata with this content:

netdata ALL = (root) NOPASSWD: /sbin/ipsec whack --status
netdata ALL = (root) NOPASSWD: /sbin/ipsec whack --trafficstatus

Make sure the path /sbin/ipsec matches your setup (execute which ipsec to find the right path).


analytics