Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
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
Owner
Rich Braun
Website
https://github.com/instantlinux/docker-tools
Download URL
https://raw.githubusercontent.com/instantlinux/docker-tools/master/ansible/roles/monitoring_agent/files/plugins/check_drive_health.py
License
Apache
Compatible With
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
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!