I'm using Canonical Landscape, and I wondered if there is a way to be automatically notified if the SMART status of a disk deteriorates. I just noticed by chance that the disks started failing in one of my boxes, and I somehow expected Landscape to alert me to this condition.

Do I need to just enable that somewhere, or is there a way to add a custom sensor? If so, how to make sure I will get alerted in time?

  • 1
    HowToGeek has an article that you might find useful howtogeek.com/51848/… – Scott Goodgame May 28 '13 at 15:57
  • @Scott Is it possible to integrate this with Landscape? – likeitlikeit May 28 '13 at 16:09
  • You can definitely deploy that script to all machines using Landscape. – 0xF2 May 30 '13 at 19:52

There is no way to add a custom alert. You could graph some SMART value, but you would have to keep checking that graph to notice something is wrong.


Here is how'd you do this with Landscape:

  1. create a package profile or simply install smartmontools on all devices with a given tag (say, "smart")

  2. create a custom graph charting the following:

/usr/sbin/smartctl -A /dev/sda | grep Reallocated_Sector_Ct |tr -s ' '|cut -d' ' -f11

Assign it to all the machines tagged "smart" to execute.

  1. Examine the custom graph, and look for numbers too high for your class of hard disks to tolerate (big difference between consumer and enterprise drives here).

Graphs do not trigger alerts in the current Landscape release, so you would have to review the graphs for irregularities. It looks like this monitoring my laptop:

Custom Chart, SMART sector reallocation

  • +1 While this is not exactly what I was looking for, it's really cool! – likeitlikeit May 31 '13 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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