Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_drive_health.py
0.1.2
2020-10-28
- Nagios 4.x
- Nagios XI
Apache
3388
File | Description |
---|---|
check_drive_health.py | check_drive_health.py |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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
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)
Be the first to review this listing!