LoginSignup
1

More than 5 years have passed since last update.

nagios設定が面倒な環境用の素案

Last updated at Posted at 2014-09-18
bin/cron_check_diskfree.sh
HDD_FREE=`df -hm /mnt/target | awk '/\//{print $4}'`
if [ $HDD_FREE -lt 1000 ];then
    echo disk free space is too small: $HDD_FREE \
     | mail -s "hdd space warning" mymobile@domain.com -- -f nagios@`hostname`
fi

fcrontab -e

cron登録
9 0 * * *           $HOME/bin/cron_check_diskfree.sh

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1