Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a way to share S.M.A.R.T. data over SNMP? I'd like to be able to make cacti graphs of it and hook it up to Nagios.

What I want to do is be able to get some statistics on my harddisks accessible over SNMP. This will allow me to graph the number of $SMART_MEASUREMENT_VALUE against time.

share|improve this question
    
You need to elaborate a lot more if you want a decent answer. –  chankster Jul 31 '09 at 13:30

3 Answers 3

up vote 4 down vote accepted

Maybe this will suit your needs: Quoted from this link:

You'll need the SmartMonTools package and use *check_smart.pl* perl script (nagios plugin) to check hard drive health by running S.M.A.R.T. self-tests using the smartctl command, add to your snmpd.conf:

exec CheckSmart /path/to/check_smart.pl -t -d /dev/hda

share|improve this answer
    
It is interesting to see SMART parameters changing in time. And this plugin only tests current value. –  lexsys Jul 31 '09 at 14:12
3  
@exquisitor: SNMP commonly only supplies the current value; it is usually the task of the management server collecting the data to store old data for analysis. –  sleske Nov 30 '10 at 1:31

There are patches that add SNMP support to smartd (in smartmontools-devel@ list); none were integrated, as far as I remember.

share|improve this answer

Maxwell answer is right, but is missing the download a url for the script:

http://git.recluse.de/?p=users/bzed/nagios-plugins.git;a=blob_plain;f=plugins/check_smart

i also add this line below on line 109 of the script, to avoid a warning

if (!defined($number)) { $number = 0; }

For those without nagios, the script requires a util.pm lib. Debian users can get it from nagios-plugins package and other users can grab it from here:

https://github.com/Elbandi/nagios-plugins/blob/master/plugins-scripts/utils.pm.in

the usage is simple:

./check_smart.pl  -i scsi  -d /dev/sda

but i agree with exquisitor comment, a way to graph all (or at least some important) smart values would be great

UPDATE: the script DO output other smart values, but only if you choose the ata interface (-i ata). As today all drivers (even ata/sata) are seem as scsi devices, this create confusion (and its probably a bug) So i recommend for those with ata/sata drivers to edit the script and on line 209 replace the check from "ata" to "scsi"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.