{"id":18596611,"url":"https://github.com/sergiotocalini/zaovpn","last_synced_at":"2026-02-02T20:10:47.705Z","repository":{"id":83054597,"uuid":"124522775","full_name":"sergiotocalini/zaovpn","owner":"sergiotocalini","description":"Zabbix Agent - OpenVPN","archived":false,"fork":false,"pushed_at":"2021-03-24T22:33:16.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T02:41:17.506Z","etag":null,"topics":["monitoring","openvpn","openvpn-server","shell","zabbix","zabbix-templates"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergiotocalini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-09T10:01:18.000Z","updated_at":"2021-03-24T22:44:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"188817a5-2002-4760-82a5-b12a5d03ff33","html_url":"https://github.com/sergiotocalini/zaovpn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sergiotocalini/zaovpn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiotocalini%2Fzaovpn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiotocalini%2Fzaovpn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiotocalini%2Fzaovpn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiotocalini%2Fzaovpn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergiotocalini","download_url":"https://codeload.github.com/sergiotocalini/zaovpn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiotocalini%2Fzaovpn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263909039,"owners_count":23528568,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["monitoring","openvpn","openvpn-server","shell","zabbix","zabbix-templates"],"created_at":"2024-11-07T01:25:02.885Z","updated_at":"2026-02-02T20:10:42.672Z","avatar_url":"https://github.com/sergiotocalini.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zaovpn\nOpenVPN Monitoring\n\nThis script is part of a monitoring solution that allows to monitor several\nservices and applications.\n\nFor more information about this monitoring solution please check out this post\non my [site](https://sergiotocalini.github.io/project/monitoring).\n\n# Dependencies\n## Packages\n* ksh\n\n### Debian/Ubuntu\n\n```\n~# sudo apt install ksh\n~#\n```\n\n### Red Hat\n\n```\n#~ sudo yum install ksh\n~#\n```\n\n# Usage\n\n```bash\n~# ./zaovpn.sh -h\nUsage: zaovpn [Options]\n\nOptions:\n  -a            Query arguments.\n  -h            Displays this help message.\n  -j            Jsonify output.\n  -s ARG(str)   Section (status or service).\n  -v            Show the script version.\n\nExamples:\n\n  ~# zaovpn.sh -s certs -j ID:STATUS\n  {\n     \"data\":[\n         { \"{#ID}\":\"sergio.tocalini.sha256.2048\", \"{#STATUS}\":\"0\" }\n      ]\n  }\n  ~# zaovpn.sh -s cert -a p=\"sergio.tocalini.sha256.2048\" -a p=after \n  1580550683\n  ~# zaovpn.sh -s cert -a p=\"sergio.tocalini.sha256.2048\" -a p=expires\n  317\n  ~#\n\nPlease send any bug reports to https://github.com/sergiotocalini/zaovpn/issues\n~#\n```\n\n# Deploy\n## Sudoers\nThe deploy script is not intended to advise which approach you should implemented nor\ndeploy the sudoers configuration but the user that will run the script needs to have\nsudo privileges for some checks.\n\nThere are two options to setting up sudoers for the user:\n1. Provided sudo all\n```bash\n~# cat /etc/sudoers.d/user_zabbix\nDefaults:zabbix !syslog\nDefaults:zabbix !requiretty\n\nzabbix\tALL=(ALL)  NOPASSWD:ALL\n~#\n```\n2. Limited acccess to run command with sudo\n```bash\n~# cat /etc/sudoers.d/user_zabbix\nDefaults:zabbix !syslog\nDefaults:zabbix !requiretty\n\nzabbix ALL=(ALL) NOPASSWD: /usr/bin/lsof *\nzabbix ALL=(ALL) NOPASSWD: /bin/ps *\nzabbix ALL=(ALL) NOPASSWD: /usr/bin/find *\nzabbix ALL=(ALL) NOPASSWD: /usr/bin/grep *\nzabbix ALL=(ALL) NOPASSWD: /usr/bin/openssl *\n~#\n```\n## Parameters\nDefault variables:\n\nNAME|VALUE\n----|-----\nOPENVPN_BIND|0.0.0.0:1194\nOPENVPN_CONF|/etc/openvpn/server.conf\nOPENVPN_STATS|/etc/openvpn/openvpn-status.log\nOPENVPN_CCD|/etc/openvpn/ccd\nOPENVPN_PKI|/etc/openvpn/pki\nOPENVPN_CERTS|/etc/openvpn/pki/certs\nOPENVPN_CERTS_ALLOW|/etc/openvpn/pki/user-cert-list.txt\n\n*__Note:__ these variables have to be saved in the config file (zaovpn.conf) in\nthe same directory than the script.*\n\n## Zabbix\n```bash\n~# git clone https://github.com/sergiotocalini/zaovpn.git\n~# ./zaovpn/deploy_zabbix.sh --help\nUsage:  [Options]\n\nOptions:\n  -h | --help            Displays this help message.\n  --force                Force configuration overwrite.\n  --prefix               Installation prefix (SCRIPT_DIR).\n  --zabbix-include       Zabbix agent include files directory (ZABBIX_INC).\n  -b | --openvpn-bind    Configuration key OPENVPN_BIND.\n  -c | --openvpn-config  Configuration key OPENVPN_CONF.\n  -s | --openvpn-status  Configuration key OPENVPN_STATS.\n  --openvpn-ccd          Configuration key OPENVPN_CCD.\n  --openvpn-certs        Configuration key OPENVPN_CERTS.\n  --openvpn-certs-allow  Configuration key OPENVPN_CERTS_ALLOW.\n\nPlease send any bug reports to https://github.com/sergiotocalini/zaovpn/issues\n~# sudo ./zaovpn/deploy_zabbix.sh \\\n\t--prefix=\"/etc/zabbix/scripts/agentd\" \\\n\t--zabbix-include=\"/etc/zabbix/zabbix_agentd.d\" \\\n\t--openvpn-bind=\"0.0.0.0:1194\" \\\n\t--openvpn-config=\"/etc/openvpn/server.conf\" \\\n\t--openvpn-ccd=\"/etc/openvpn/ccd\" \\\n\t--openvpn-certs=\"/etc/openvpn/pki/certs\" \\\n\t--openvpn-certs-allow=\"/etc/openvpn/pki/user-cert-list.txt\" \\\n\t--openvpn-status=\"/etc/openvpn/openvpn-status.log\"\n~# sudo systemctl restart zabbix-agent\n```\n\n*__Note:__ the installation has to be executed on the zabbix agent host and you have\nto import the template on the zabbix web. The default installation directory is\n/etc/zabbix/scripts/agentd/zaovpn*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiotocalini%2Fzaovpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergiotocalini%2Fzaovpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiotocalini%2Fzaovpn/lists"}