Allow Zabbix to always receive value from UserParameter, even zero

UserParameter=custom.key,pslist=$(ps -caux|grep [z]abbix) && echo ${pslist:-0}
Another aproach by delivering the result code:
echo "Blah" > /dev/null 2>&1 ; echo $?
Or:
grep denied /var/log/audit/audit.log > /dev/null 2>&1 ; echo $?

No comments: