Skip to content

fix drive collection using partial scrape and getAllDriveEndpoints func#159

Merged
ibrahimkk-moideen merged 13 commits intomainfrom
fix-storage-drive-scrapes
Jan 6, 2026
Merged

fix drive collection using partial scrape and getAllDriveEndpoints func#159
ibrahimkk-moideen merged 13 commits intomainfrom
fix-storage-drive-scrapes

Conversation

@ibrahimkk-moideen
Copy link
Collaborator

@ibrahimkk-moideen ibrahimkk-moideen commented Dec 1, 2025

fix drive collection when "--collector.drives.modules-exclude" flag is not provided - complete

drive collection not happening with partial scrapes - fix in progress

@ibrahimkk-moideen
Copy link
Collaborator Author

Validation results:

Running without "collector.drives.modules-exclude" flag

  1. complete scrape with truncated output only for drives & storage controller
curl -s 'http://localhost:10023/scrape?target=yourhost.yourdomain.com&model=dl380' | egrep 'drive|controller'
# HELP redfish_disk_drive_status Current Disk Drive status 1 = OK, 0 = BAD, -1 = DISABLED
# TYPE redfish_disk_drive_status gauge
redfish_disk_drive_status{capacityMiB="3052360",chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",failurePredicted="false",id="0",location="1I:2:1",name="HpeSmartStorageDiskDrive",serialnumber="xxxxxxxxx"} 1
redfish_disk_drive_status{capacityMiB="3052360",chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",failurePredicted="false",id="0",location="1I:3:1",name="HpeSmartStorageDiskDrive",serialnumber="xxxxxxxxx"} 1
redfish_disk_drive_status{capacityMiB="3052360",chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",failurePredicted="false",id="1",location="1I:2:2",name="HpeSmartStorageDiskDrive",serialnumber="xxxxxxxxx"} 1
# HELP redfish_logical_drive_status Current Logical Drive Raid 1 = OK, 0 = BAD, -1 = DISABLED
# TYPE redfish_logical_drive_status gauge
redfish_logical_drive_status{capacityMiB="457830",chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",logicaldrivename="xxxxxxxxx",name="HpeSmartStorageLogicalDrive",raid="1",volumeuniqueidentifier="xxxxxxxxx"} 1
# HELP redfish_storage_controller_status Current storage controller status 1 = OK, 0 = BAD
# TYPE redfish_storage_controller_status gauge
redfish_storage_controller_status{chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",firmwareVersion="5.00",location="Slot 0",model="HPE Smart Array P408i-a SR Gen10",name="Hpe Smart Storage Array Controller"} 1
redfish_storage_controller_status{chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",firmwareVersion="5.00",location="Slot 1",model="HPE Smart Array P408i-p SR Gen10",name="Hpe Smart Storage Array Controller"} 1
redfish_storage_controller_status{chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",firmwareVersion="5.00",location="Slot 2",model="HPE Smart Array P408i-p SR Gen10",name="Hpe Smart Storage Array Controller"} 1
  1. Partial scrape with components drives & storage controller
curl -s 'http://localhost:10023/scrape/partial?target=yourhost.yourdomain.com&model=dl380&components=drives,storage_controller'
# HELP redfish_disk_drive_status Current Disk Drive status 1 = OK, 0 = BAD, -1 = DISABLED
# TYPE redfish_disk_drive_status gauge
redfish_disk_drive_status{capacityMiB="3052360",chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",failurePredicted="false",id="0",location="1I:2:1",name="HpeSmartStorageDiskDrive",serialnumber="xxxxxxxxx"} 1
redfish_disk_drive_status{capacityMiB="3052360",chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",failurePredicted="false",id="0",location="1I:3:1",name="HpeSmartStorageDiskDrive",serialnumber="xxxxxxxxx"} 1
redfish_disk_drive_status{capacityMiB="3052360",chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",failurePredicted="false",id="1",location="1I:2:2",name="HpeSmartStorageDiskDrive",serialnumber="xxxxxxxxx"} 1
# HELP redfish_logical_drive_status Current Logical Drive Raid 1 = OK, 0 = BAD, -1 = DISABLED
# TYPE redfish_logical_drive_status gauge
redfish_logical_drive_status{capacityMiB="457830",chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",logicaldrivename="xxxxxxxxx",name="HpeSmartStorageLogicalDrive",raid="1",volumeuniqueidentifier="xxxxxxxxx"} 1
# HELP redfish_storage_controller_status Current storage controller status 1 = OK, 0 = BAD
# TYPE redfish_storage_controller_status gauge
redfish_storage_controller_status{chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",firmwareVersion="5.00",location="Slot 0",model="HPE Smart Array P408i-a SR Gen10",name="Hpe Smart Storage Array Controller"} 1
redfish_storage_controller_status{chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",firmwareVersion="5.00",location="Slot 1",model="HPE Smart Array P408i-p SR Gen10",name="Hpe Smart Storage Array Controller"} 1
redfish_storage_controller_status{chassisModel="dl380",chassisSerialNumber="xxxxxxxxx",firmwareVersion="5.00",location="Slot 2",model="HPE Smart Array P408i-p SR Gen10",name="Hpe Smart Storage Array Controller"} 1
# HELP redfish_up was the last scrape of fishymetrics successful.
# TYPE redfish_up gauge
redfish_up 1

@ibrahimkk-moideen
Copy link
Collaborator Author

Go Test results:

PASS
ok  	github.com/comcast/fishymetrics/exporter	0.729s

@ibrahimkk-moideen ibrahimkk-moideen marked this pull request as ready for review January 5, 2026 21:09
Copy link
Collaborator

@derrick-dacosta derrick-dacosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ibrahimkk-moideen ibrahimkk-moideen merged commit d9726b0 into main Jan 6, 2026
3 checks passed
@ibrahimkk-moideen ibrahimkk-moideen deleted the fix-storage-drive-scrapes branch January 21, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants