check_smartmon - IndexError: list index out ofrange

Jake Solid richardsolid at gmail.com
Mon Aug 4 18:47:02 CEST 2008


I had to change the folowing line:

elif line == "=== START OF READ SMART DATA SECTION ===":

to:

elif line == "":

Now I get the following output:

[root at vhost3 plugins]# /usr/sbin/smartctl -c /dev/sda
smartctl version 5.36 [x86_64-redhat-linux-gnu] Copyright (C) 2002-6 Bruce
Allen
Home page is http://smartmontools.sourceforge.net/

[root@ plugins]# ./check_smartmon -d /dev/sda -v 3
Get device name
Device: /dev/sda
Check device
Check if /dev/sda does exist and can be read
Check if /usr/sbin/smartctl does exist and can be read
Path to smartctl: /usr/sbin/smartctl
Call smartctl
Get device health status: /usr/sbin/smartctl -H /dev/sda
Get device temperature: /usr/sbin/smartctl -A /dev/sda
Parse smartctl output
Health status: OK
Temperature: 0
Generate return information
CRITICAL: device does not pass health status


When I run /usr/sbin/smartctl -A /dev/sda i get no output. My smartctl -h
mentions that -A should showdevice SMART vendor-specific Attributes and
values.


Is there a patch for this plugin?





On Wed, Jul 30, 2008 at 4:14 PM, Jake Solid <richardsolid at gmail.com> wrote:

> I have tried all devices and still get the same error. This is the list of
> devices I also get from the /proc/diskstats
>
>  8    0 sda 25734471 16602821 1339905462 54354327 36018237 36524677
> 652113254 274984492 0 160612328 329502850
>    8    1 sda1 120903 7083070 18598 56558
>    8    2 sda2 1907458 15256829 4964528 39716224
>    8    3 sda3 40329953 1317565059 67589119 540712952
>    8   16 sdb 25722132 16706560 1343758934 54666871 36005484 36537227
> 652113254 305156743 0 161636686 359918726
>    8   17 sdb1 118130 6980908 18598 56558
>    8   18 sdb2 1909458 15272829 4964528 39716224
>    8   19 sdb3 40421862 1321504693 67589119 540712952
>    8   32 sdc 103143421 58436289 6265866314 369891692 1094774888 9800463910
> 87446851840 3608291566 0 3654056035 3980408429
>    8   33 sdc1 161602126 1970898506 2305878568 1267159360
>    8   48 sdd 100633389 57176799 6123123524 423999064 1094595052 9800655254
> 87446851840 1018639266 0 3474247903 1443740264
>    8   49 sdd1 157833088 1828155724 2305878568 1267159360
>    9    1 md1 80751227 0 2639069150 0 58671609 0 469372872 0 0 0 0
>    9    3 md3 319434916 0 12388988218 0 10860769840 0 86886158720 0 0 0 0
>    9    0 md0 3816104 0 30528832 0 4931824 0 39454592 0 0 0 0
>    9    2 md2 238621 0 14063142 0 15372 0 30750 0 0 0 0
>  253    0 dm-0 65594847 0 1744222050 176603169 25553210 0 204425680
> 641619548 0 71511076 818228479
>  253    1 dm-1 3458 0 27658 47456 441531 0 3532248 983248835 0 265318
> 983319188
>  253    2 dm-2 15152647 0 894817242 35982441 32676868 0 261414944 871216263
> 0 58218351 907204904
>   22   64 hdd 0 0 0 0 0 0 0 0 0 0 0
>  253    3 dm-3 319434773 0 12388987074 1393510146 10860769840 0 86886158720
> 3778348986 0 3762294749 897218213
>
>
>
>
>
> On Wed, Jul 30, 2008 at 11:35 AM, Marc Powell <marc at ena.com> wrote:
>
>> My last attempt... More below.
>>
>> On Jul 30, 2008, at 9:25 AM, Jake Solid wrote:
>>
>> > Same error message. I tested using sdb1, sdb2, sdd1, sdb3 .
>> >
>> > Here is the output:
>> >
>> > [root@ proc]# more mdstat
>> > Personalities : [raid1]
>> > md2 : active raid1 sdb1[1] sda1[0]
>>
>>
>> > [root@ plugins]# ./check_smartmon -d /dev/sdb1 -v 3
>>
>> As indicated a few different ways in previous e-mails, I expect you
>> should use '-d /dev/sda' or '-d /dev/sdb', not '-d /dev/sdb1' since
>> that is a specific partition on a disk, and not the disk device itself.
>>
>> --
>> Marc
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Nagios-users mailing list
>> Nagios-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>> ::: Please include Nagios version, plugin version (-v) and OS when
>> reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080804/6621f6c7/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list