Closed usergoodvery closed 7 years ago
You will need to allow zabbix to execute the script with sudo. In /etc/sudoers.d I have azabbix_ipsec file which contains:
Defaults:zabbix !requiretty
Defaults:zabbix !syslog
zabbix ALL = (root) NOPASSWD: /usr/local/lib/zabbix/externalscripts/check_ipsec.sh
I already have zabbix on my sudoers and I tested that in the command line environment...
Now oddly enough, the thing started working... i did not touch it since I opened this issue, so I cannot explain what fixed it... anyway thanks for replying and congrats on such a concise and useful template. I hope it continues working :)
Hi, I installed the template on 3.2 and assigned it to relevant gw's, but all the items are indicating tunnel is down or unreachable. I can see the macros have been rendered correctly as per my ipsec.conf.
I ran the shell script manually against the vpn name and that returned 1. i also ran it with ping params and that also returned 1, but for some reason zabbix isn't able to work with that.
In the script I noticed that you have "USE_SUDO=0 ". i set that to 1, but did not make any difference.
regards