Skip to content

Zabbix bash script + template for OpenVPN statistics

Notifications You must be signed in to change notification settings

Medd1er/openvpn-statistic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

zabbix-openvpn-statistic

A shell script to grab statistic of OpenVPN connections

How to Use:

  1. Place script wherever in accessible directory for Zabbix user(i.e. '/etc/zabbix/scripts') on the remote OpenVPN server with working zabbix agent

  2. Configure paths for variables (if necessary) (by default script ueses default directory for openvpn logs)

  3. Grant access for Zabbix user to openvpn logfile

  4. Grant access for Zabbix user to script directory and script itself

    chown root:zabbix /etc/zabbix/scripts

    chmod 550 -R /etc/zabbix/scripts

  5. Add UserParameter in zabbix_agent.conf (you can place it as well after "UnsafeUserParameters")

    UserParameter=openvpn[*],/etc/zabbix/scripts/openvpn_statistic.sh $1

  6. Restart the Zabbix agent (according to your installation)

    systemctl restart zabbix-agent

  7. Import template-openvpn-statistic.xml

  8. Enjoy!

About

Zabbix bash script + template for OpenVPN statistics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages