Storage Subsystem

check_drive_health.py

Description:

Check health of SSD and magnetic drives: examines SMART attributes and software-RAID status.

Current Version

0.1.2

Last Release Date

2020-10-28

Compatible With

  • Nagios 4.x
  • Nagios XI

Owner

License

Apache


Project Files
Project Notes
Check health of SSD and magnetic drives. Examines SMART attributes and software-RAID status. As a drive ages, reallocated sector counts may be recorded in SMART attributes - this plugin provides a way to define per-drive tolerance for nonzero values reported in SMART attributes, and to warn when new events occur. Dependencies: python >= 3.6, smartmontools >=7.0, click >= 6.0, mdstat >= 1.0.4 Usage example: $ check_drive_health.py -w 45 -e drive_tolerate.yaml /dev/sda OK: temp=38 serial=7E3020001587 cap=0.064T /dev/sdb OK: temp=42 serial=1632137A883D cap=1.050T RAID OK: 1 array clean Error-list example: Top-level key in drive_tolerate.yaml is drive serial number, second-level keys are attribute names as reported by smartctl -A: ``` --- PN1338P4J8MT49: Reallocated_Sector_Ct: 20 Reallocated_Event_Count: 45 ``` Setup: # install smartmontools package if 7.1 is available in distro # or download smartmontools-7.1.tar.gz from # https://sourceforge.net/projects/smartmontools/files/smartmontools/7.1/ tar xf smartmontools.7.1.tar.gz cd smartmontools-7.1 && ./configure && make install pip3 install click==7.1.2 mdstat==1.0.4 Grant this plugin sudo (for smartctl) with an entry in /etc/sudoers.d: nagios ALL=NOPASSWD: /usr/local/lib/nagios/check_drive_health.py created 25 oct 2020 by richb at instantlinux.net
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
0 (0)
Favorites
0
Views
3,440