Home Directory Plugins Operating Systems Linux check_smart_attributes

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_smart_attributes

Rating
1 vote
Favoured:
0
Hits
162322
Files:
FileDescription
check_smart_attributescheck_smart_attributes

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

Check disk drives for s.m.a.r.t. attributes failures.
This plug-in relies on smartctl tools. It checks the smart attributes
table and It raises a critical if any pre-fail attribute is on.
If any other attribute fails it returns a warning.
Reviews (1)
byjacco, January 13, 2015
Plugin autodetects just mounted drives of 'hd*' type. I made some changes to autodetect hda|sda|vda drives, and they don't have to be mounted too:

]# diff check_smart_attributes check_smart_attributes.new
27c27,30
# 0.91 - jacco
> # - added detection of more kinds of drives (hdx,sdx,vdx)
> # - drives don't need to be mounted for autodetection (using blkid instead of mount)
> #
56c59
my $BLKID = "/usr/sbin/blkid";
61d63
use lib '/usr/lib64/nagios/plugins';
77c80
" [--drive=/dev/hda [--drive=/dev/sdb [...]]] \n";
132c135
sub detect_all_drives {
135c138
open CMD, $BLKID."|"
139c142
if(m#^(/dev/[hvs]d\w)\d*:\s+#) {
216c219
@DRIVE = detect_all_drives();