Skip to content

alkalim/wireguard-zabbix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wireguard-zabbix

wireguard-zabbix is a Zabbix template to monitor Wireguard peers on Linux. It automatically discovers all your Wireguard peers and collects incoming/outgoing traffic usage.

This template assumes you have installed Wireguard with wireguard-install.sh script (see this repo). It should work with vanilla Wireguard, but I didn't test it.

Installation

The instructions below are valid for Debian/Ubuntu but the principle should be applicable for other Linuxes as well.

  1. Add user zabbix to sudoers by adding the file zabbix to /etc/sudoers.d with the following line:
    zabbix ALL=(root) NOPASSWD: /usr/bin/wg
    
  2. Add access rights to user zabbix for /etc/wireguard/wg0.conf:
    setfacl -m 'u:zabbix:--x' /etc/wireguard
    setfacl -m 'u:zabbix:r--' /etc/wireguard/wg0.conf
    
  3. Add UserParameter to zabbix by adding the file user_parameters.conf to /etc/zabbix/zabbix_agentd.d:
    UserParameter=wireguard.peers,/usr/share/zabbix/wg-json-zbx
    
  4. Copy script wg-json-zbx (based on wg-json) from this repo to /usr/share/zabbix, make sure it's readable by the user zabbix
  5. Restart the agent:
    service zabbix-agent restart
    
  6. Import the template

About

Zabbix template to monitor Wireguard peers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages