-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Hi There,
This script does not seem to be working in RHEL or it's just me :)
When I have the following setting (with SUDO) in zabbix_agentd.conf:
UserParameter=mdraid[*], sudo /usr/local/bin/zabbix_mdraid.sh -m'$1' -$2'$3'
UserParameter=mdraid.discovery, sudo /usr/local/bin/zabbix_mdraid.sh -D
And execute the following from Zabbix proxy:
zabbix_get -s HOSTNAME -k mdraid[/dev/md0,d,1]
I am getting the following error ("sorry, you must have a tty to run sudo") in zabbix_agentd.log:
25547:20141229:090259.961 Requested [mdraid[/dev/md0,d,1]]
25547:20141229:090259.961 In zbx_popen() command:' sudo /usr/local/bin/zabbix_mdraid.sh -m'/dev/md0' -d'1''
25547:20141229:090259.962 End of zbx_popen():7
25552:20141229:090259.962 zbx_popen(): executing script
sudo 25546:20141229:090259.970 listener #1 [processing request]
25546:20141229:090259.970 Requested [system.cpu.util[,steal]]
25546:20141229:090259.970 Sending back [0.000000]
25546:20141229:090259.970 listener #1 [waiting for connection]
: sorry, you must have a tty to run sudo
Yes, I have already tweaked /etc/sudoers file:
/etc/sudoers:
zabbix ALL=(ALL) NOPASSWD: ALL
Defaults:zabbix !requiretty
Any ideas how to make this work?