Ad Widget

Collapse

monitoring S.M.A.R.T. status of hard drives?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • c0mputernick
    Junior Member
    • Aug 2009
    • 13

    #1

    monitoring S.M.A.R.T. status of hard drives?

    Ive looked around the forum and wiki and cant seem to find a way to monitor the SMART status of a hard driveif its enabled. Can Zabbix do this?
    This would be a great little tool to alert you to an upcoming drive failure.
    Anyone know how this can be done, or if there is an add on script or anything?

    Thanks.
  • c0mputernick
    Junior Member
    • Aug 2009
    • 13

    #2
    Wow really? nothing? does the lack of response mean it cant be done? or no one knows how to do it?

    I expected that functionality to be a pretty common requirement, who wouldn't want to know when a drive is dying in a machine?

    Comment

    • nelsonab
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2006
      • 1233

      #3
      Here's what I use

      In the zabbix_agentd.conf file
      Code:
      UserParameter=system.smartd[*],sudo smartctl -A $1| grep $2| tail -1| cut -c 88-|cut -f1 -d' '
      In my sudoers file:
      Code:
      zabbix ALL= (ALL) NOPASSWD: /usr/sbin/smartctl
      In my syslog-ng conf file I added the following to prevent an overload of messages
      Code:
      destination zbx_smartd { file("/dev/null" perm(0666)); };
      filter f_zbx_smartd { match("sudo:   zabbix : TTY=unknown ; PWD=\/ ; USER=root ; COMMAND=\/usr\/sbin\/smartctl -A \/dev\/"); };
      log { source(src); filter(f_zbx_smartd); destination(zbx_smartd); flags(final);};
      Attached is the template I use

      This is running on OpenSuSE 10.x and 11.x and the template was exported from Zabbix 1.6.5
      Attached Files
      RHCE, author of zbxapi
      Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
      Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

      Comment

      Working...