To use tools like multipath
in zabbix, you have to check the sudo-settings for the zabbixuser. Use visudo
to change the permissions for zabbix. Zabbix will not use a Terminal tty
, so you should deactivate that in sudo… You can do this by comment the line Defaults requiretty
out, or you put that line Defaults:zabbix !requiretty
into the visudo
-configfile. If you take method one, it is a globalsetting and no connection needs a tty
. Method two will only deactivate that for the zabbix
user. I recommend method two! Now you can allow the commands you want to use with zabbix. According to the maxim: “as little as possible, as much as necessary” . So you can use a line like that:
1
zabbix ALL=NOPASSWD: /sbin/multipathd -k
If you want to use more Tools/Commands or even acces to files, you can put them after the command above, comma seperated.