Enable checking of multiple mpt controllers #177
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
we have a few boxes with LSI controllers with two ids. mpt-status -p only shows the first ID:
root@osiris[
]# mpt-status -p]# mpt-status -i 0Checking for SCSI ID:0
Found SCSI id=0, use ''mpt-status -i 0`` to get more information.
root@osiris[
ioc0 vol_id 0 type IM, 2 phy, 33 GB, state OPTIMAL, flags ENABLED
ioc0 phy 2 scsi_id 5 FUJITSU MAY2036RCSUN36G 0401, 33 GB, state ONLINE, flags NONE
ioc0 phy 3 scsi_id 1 FUJITSU MAY2036RCSUN36G 0401, 33 GB, state ONLINE, flags NONE
But there is also ID 2:
root@osiris[~]# mpt-status -i 2
ioc0 vol_id 2 type IM, 2 phy, 58 GB, state OPTIMAL, flags ENABLED
ioc0 phy 1 scsi_id 4 ATA SSDSA2SH064G1GC 8860, 59 GB, state ONLINE, flags NONE
ioc0 phy 0 scsi_id 3 ATA SSDSA2SH064G1GC 8860, 59 GB, state ONLINE, flags NONE
I therefore added the possibility to give check_raid the controller id as an option, just as
root@osiris[nagios-plugin-check_raid]# ./check_raid.sh
OK: mpt:[Volume 0 (RAID-1, 2 disks, 33 GiB): OPTIMAL]
root@osiris[nagios-plugin-check_raid]# ./check_raid.sh --plugin-option=mpt-id=2
OK: mpt:[Volume 2 (RAID-1, 2 disks, 58 GiB): OPTIMAL]
Thanks for the good work!