Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
Monitor ATA and S-ATA drive temperature.
Current Version
Last Release Date
June 4, 2009
Owner
Nagios Exchange
Compatible With
Version 1.0 (8 sept. 2008)
A very simple script that gets the harddrive temperature from S.M.A.R.T. by using hddtemp syntax and example: ./check_hddtemp.sh ./check_hddtemp.sh /dev/sda 40 50 since hddtemp needs superuser access you will need to set up sudo: nagios ALL=(root) NOPASSWD:/usr/lib/nagios/plugins/check_hddtemp.sh I have only testet it on nagios 2 and debian etch
Good Plugin. I use it to monitor different servers within the rack to validate our climate control monitoring system. To get results in Fahrenheit, make the following edit (line 70) HEAT=`$HDDTEMP $DEVICE -n -uF`
Just to hopefully save someone else some heartache, if you have your command defined and sudo privileges granted, make sure to use "getenforce" and verify SELinux isn't interfering with your plans!
You need to define nagios command with sudo prefix, for example: define command{ command_name check_hddtemp command_line sudo $USER1$/contrib/check_hddtemp.sh /dev/$ARG1$ 40 50 } And you will also probbly need to do not require tty for nagios user sudo. Add following line into /etc/sudoers: Defaults:nagios !requiretty
Check location of the script in sudoers file. I had the same problem because my installation is under /usr/local/nagios/ The correct line in sudoers file is: nagios ALL=(root) NOPASSWD:/usr/local/nagios/libexec/check_hddtemp.sh this works for me!
This plugin is working from command line. Please have a look. root@localhost/]#./check_hddtemp.sh /dev/sda 40 50 OK: Temperature is below warn treshold (/dev/sda is 34) But, it is giving below error in "Nagios Web Interface". UNKNOWN: please make sure script is running as root I have set it up in "sudoers" file, but still no luck.
You must be logged in to submit a review.
To:
From: