Hi!
Added two UserParameter strings into zabbix_agentd.conf:
First string works great and returns real values,
and in log
but the second always returns "0"
but in log
Why? (the second value should be 1)
Added two UserParameter strings into zabbix_agentd.conf:
Code:
UserParameter=mdstat[*],grep -A1 $1 /proc/mdstat | grep -c UU UserParameter=smartd[*],/usr/bin/sudo /usr/sbin/smartctl -H /dev/$1|/bin/grep -c PASSED
Code:
52sh-3.2$ whoami zabbix sh-3.2$ grep -A1 md0 /proc/mdstat | grep -c U 1
Code:
88:20100723:201620.808 Requested [mdstat[md0]] 5288:20100723:201620.814 Run remote command [grep -A1 md0 /proc/mdstat | grep -c U] Result [1] [1]...
Code:
sh-3.2$ /usr/bin/sudo /usr/sbin/smartctl -H /dev/sda|/bin/grep -c PASSED 1
Code:
5288:20100723:201846.891 Requested [smartd[sda]] 5288:20100723:201846.898 Run remote command [/usr/bin/sudo /usr/sbin/smartctl -H /dev/sda|/bin/grep -c PASSED] Result [1] [0]...
Comment