I keep getting: "Zabbix agent item [custom.mdstat] on host [myhost.mydomain.com] failed: another network error, wait for 15 seconds" in my server log, I dont know why. On the host I have:
in /usr/local/etc/zabbix_agentd.conf, and it appears to be working:
The '1' is the return value I expect and want to see triggered if it comes back 0. I have a similar setup with linux software raids that is working perfectly. I have this line in the /etc/sudoers:
which appears to be effective when I run with user zabbix on a command line:
What am I missing here??
Code:
UserParameter=custom.mdstat,sudo /opt/megaraid/check_lsi_raid.py | grep -c "All arrays OK"
Code:
root@myhost:/usr/local/etc# zabbix_agentd -t custom.mdstat custom.mdstat [t|1]
Code:
zabbix ALL=(ALL) NOPASSWD:/opt/megaraid/check_lsi_raid.py
Code:
root@myhost:/usr/local/etc# su - zabbix -c "sudo /opt/megaraid/check_lsi_raid.py" No directory, logging in with HOME=/ RAID OK: All arrays OK [1 array checked on 1 controller]
Comment