check_smart v 6.1 allows using pseudo device /dev/bus/N

Written by - 0 comments

Published on - Listed in Monitoring Hardware

A new version of the monitoring plugin is available. Version 6.1 is a minor release which allows to use the /dev/bus/N pseudo-device. This pseudo device is not a real device (it doesn't show up in /dev/bus/) but is a helper inside smartctl to identify physical drives behind a MegaRaid controller, even when the physical drives were not configured yet.

Practical example: smartctl --scan may show the /dev/bus/N device with the megaraid controller position of the physical drives:

# smartctl  --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device
/dev/bus/0 -d megaraid,1 # /dev/bus/0 [megaraid_disk_01], SCSI device
/dev/bus/0 -d megaraid,2 # /dev/bus/0 [megaraid_disk_02], SCSI device
/dev/bus/0 -d megaraid,3 # /dev/bus/0 [megaraid_disk_03], SCSI device
/dev/bus/0 -d megaraid,4 # /dev/bus/0 [megaraid_disk_04], SCSI device

Using this information, the monitoring check can be scripted with whatever configuration management tool or even by hand:

# smartctl --scan | grep megaraid | while read device param interface comment; do echo "/usr/lib/nagios/plugins/ -d $device -i $interface"; done
/usr/lib/nagios/plugins/ -d /dev/bus/0 -i megaraid,0
/usr/lib/nagios/plugins/ -d /dev/bus/0 -i megaraid,1
/usr/lib/nagios/plugins/ -d /dev/bus/0 -i megaraid,2
/usr/lib/nagios/plugins/ -d /dev/bus/0 -i megaraid,3
/usr/lib/nagios/plugins/ -d /dev/bus/0 -i megaraid,4

I hope you get what I'm trying to show here ;-).

Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.