I scheduled following cron job:
root@alexus:~# crontab -l | grep ^\@hourly
@hourly OUT=`/usr/lib/nagios/plugins/check_disk --include-type=ext4 --warning=10% --critical=5%` ; if [ $? != 0 ] ; then echo $OUT ; fi
root@alexus:~# OUT=`/usr/lib/nagios/plugins/check_disk --include-type=ext4 --warning=10% --critical=5%` ; if [ $? != 0 ] ; then echo $OUT ; fi
root@alexus:~# cat /etc/issue.net
Ubuntu 14.04.3 LTS
root@alexus:~#
Run Code Online (Sandbox Code Playgroud)
and even though I'm able to run EXACTLY same one liner within shell, whenever job gets executed via cron, I get following email:
主题:Cron OUT=`/usr/lib/nagios/plugins/check_disk --include-type=ext4 …