node-exporter-textfile-collector-scripts
node-exporter-textfile-collector-scripts copied to clipboard
Update storcli.py to work with older cards without ROC temp sensor or…
… Cachevault_info
Also:
- updates URL to storcli documentation and bumps version number
- adds "megaraid_bbu_temperature", analagous to "megaraid_cv_temperature" but for devices with BBU rather than Cachevault
- suppresses "megaraid_battery_backup_healthy" metric for devices where BBU is not present
Fixes #19, #27
Signed-off-by: Brian Candler [email protected]
@dswarbrick, I'll let you finish the review.
I can confirm on an AVAGO 3108 MegaRAID controller, current master is stopping early as soon as the script tries to probe Cachevault_info
, while revised script in this PR works as expected.
Rebased onto master
It gives me "megaraid_bbu_temperature{}" but no temperatures for the drives. Intended? I'd be happy to provide logs etc to improve this.
@candlerb Can you please rebase this on master and fix the merge conflicts?
I'm wondering if we need to look into adding a collection of fixtures (i.e. third-party tool command outputs) to this repo, so that we can write some mock scripts and ultimately implement tests. It would make it easier for maintainers without access to relevant hardware / environments to review PRs and troubleshoot bugs.
I've rebased it and tweaked it to work in the same way as some previous patches, but since I no longer work at the place that has these cards, I've not been able to test.
(I agree with your comment about fixtures and test cases)
phew, action! I'll try to test the latest version a bit later. thanks.
I am not sure if that helps, my temperature issue isn't the initial question in here, right?
I share the output on my debian11 system using this:
/opt/hpe/storcli/storcli64 -v
StorCli SAS Customization Utility Ver 007.1616.0000.0000 Dec 24, 2020
# storcli.py
# HELP megaraid_controller_info MegaRAID controller info
# TYPE megaraid_controller_info gauge
megaraid_controller_info{controller="0",model="PRAID EP420i",serial="0000000061913681",fwversion="4.680.00-8417"} 1.0
# HELP megaraid_temperature MegaRAID temperature
# TYPE megaraid_temperature gauge
megaraid_temperature{controller="0"} 52.0
# HELP megaraid_battery_backup_healthy MegaRAID battery backup healthy
# TYPE megaraid_battery_backup_healthy gauge
megaraid_battery_backup_healthy{controller="0"} 1.0
# HELP megaraid_degraded MegaRAID degraded
# TYPE megaraid_degraded gauge
megaraid_degraded{controller="0"} 0.0
# HELP megaraid_failed MegaRAID failed
# TYPE megaraid_failed gauge
megaraid_failed{controller="0"} 0.0
# HELP megaraid_healthy MegaRAID healthy
# TYPE megaraid_healthy gauge
megaraid_healthy{controller="0"} 1.0
# HELP megaraid_ports MegaRAID ports
# TYPE megaraid_ports gauge
megaraid_ports{controller="0"} 8.0
# HELP megaraid_scheduled_patrol_read MegaRAID scheduled patrol read
# TYPE megaraid_scheduled_patrol_read gauge
megaraid_scheduled_patrol_read{controller="0"} 1.0
# HELP megaraid_cv_temperature MegaRAID cv temperature
# TYPE megaraid_cv_temperature gauge
megaraid_cv_temperature{controller="0",cvidx="0"} 18.0
# HELP megaraid_time_difference MegaRAID time difference
# TYPE megaraid_time_difference gauge
megaraid_time_difference{controller="0"} 7190.0
# HELP megaraid_drive_groups MegaRAID drive groups
# TYPE megaraid_drive_groups gauge
megaraid_drive_groups{controller="0"} 1.0
# HELP megaraid_virtual_drives MegaRAID virtual drives
# TYPE megaraid_virtual_drives gauge
megaraid_virtual_drives{controller="0"} 1.0
# HELP megaraid_vd_info MegaRAID vd info
# TYPE megaraid_vd_info gauge
megaraid_vd_info{controller="0",DG="0",VG="0",name="",cache="RWBD",type="RAID6",state="Optl"} 1.0
# HELP megaraid_physical_drives MegaRAID physical drives
# TYPE megaraid_physical_drives gauge
megaraid_physical_drives{controller="0"} 4.0
# HELP megaraid_pd_shield_counter MegaRAID pd shield counter
# TYPE megaraid_pd_shield_counter gauge
megaraid_pd_shield_counter{controller="0",enclosure="252",slot="0"} 0.0
megaraid_pd_shield_counter{controller="0",enclosure="252",slot="1"} 0.0
megaraid_pd_shield_counter{controller="0",enclosure="252",slot="4"} 0.0
megaraid_pd_shield_counter{controller="0",enclosure="252",slot="5"} 0.0
# HELP megaraid_pd_media_errors MegaRAID pd media errors
# TYPE megaraid_pd_media_errors gauge
megaraid_pd_media_errors{controller="0",enclosure="252",slot="0"} 0.0
megaraid_pd_media_errors{controller="0",enclosure="252",slot="1"} 0.0
megaraid_pd_media_errors{controller="0",enclosure="252",slot="4"} 0.0
megaraid_pd_media_errors{controller="0",enclosure="252",slot="5"} 0.0
# HELP megaraid_pd_other_errors MegaRAID pd other errors
# TYPE megaraid_pd_other_errors gauge
megaraid_pd_other_errors{controller="0",enclosure="252",slot="0"} 0.0
megaraid_pd_other_errors{controller="0",enclosure="252",slot="1"} 0.0
megaraid_pd_other_errors{controller="0",enclosure="252",slot="4"} 0.0
megaraid_pd_other_errors{controller="0",enclosure="252",slot="5"} 0.0
# HELP megaraid_pd_predictive_errors MegaRAID pd predictive errors
# TYPE megaraid_pd_predictive_errors gauge
megaraid_pd_predictive_errors{controller="0",enclosure="252",slot="0"} 0.0
megaraid_pd_predictive_errors{controller="0",enclosure="252",slot="1"} 0.0
megaraid_pd_predictive_errors{controller="0",enclosure="252",slot="4"} 0.0
megaraid_pd_predictive_errors{controller="0",enclosure="252",slot="5"} 0.0
# HELP megaraid_pd_smart_alerted MegaRAID pd smart alerted
# TYPE megaraid_pd_smart_alerted gauge
megaraid_pd_smart_alerted{controller="0",enclosure="252",slot="0"} 0.0
megaraid_pd_smart_alerted{controller="0",enclosure="252",slot="1"} 0.0
megaraid_pd_smart_alerted{controller="0",enclosure="252",slot="4"} 0.0
megaraid_pd_smart_alerted{controller="0",enclosure="252",slot="5"} 0.0
# HELP megaraid_pd_link_speed_gbps MegaRAID pd link speed gbps
# TYPE megaraid_pd_link_speed_gbps gauge
megaraid_pd_link_speed_gbps{controller="0",enclosure="252",slot="0"} 6.0
megaraid_pd_link_speed_gbps{controller="0",enclosure="252",slot="1"} 6.0
megaraid_pd_link_speed_gbps{controller="0",enclosure="252",slot="4"} 6.0
megaraid_pd_link_speed_gbps{controller="0",enclosure="252",slot="5"} 6.0
# HELP megaraid_pd_device_speed_gbps MegaRAID pd device speed gbps
# TYPE megaraid_pd_device_speed_gbps gauge
megaraid_pd_device_speed_gbps{controller="0",enclosure="252",slot="0"} 6.0
megaraid_pd_device_speed_gbps{controller="0",enclosure="252",slot="1"} 6.0
megaraid_pd_device_speed_gbps{controller="0",enclosure="252",slot="4"} 6.0
megaraid_pd_device_speed_gbps{controller="0",enclosure="252",slot="5"} 6.0
# HELP megaraid_pd_commissioned_spare MegaRAID pd commissioned spare
# TYPE megaraid_pd_commissioned_spare gauge
megaraid_pd_commissioned_spare{controller="0",enclosure="252",slot="0"} 0.0
megaraid_pd_commissioned_spare{controller="0",enclosure="252",slot="1"} 0.0
megaraid_pd_commissioned_spare{controller="0",enclosure="252",slot="4"} 0.0
megaraid_pd_commissioned_spare{controller="0",enclosure="252",slot="5"} 0.0
# HELP megaraid_pd_emergency_spare MegaRAID pd emergency spare
# TYPE megaraid_pd_emergency_spare gauge
megaraid_pd_emergency_spare{controller="0",enclosure="252",slot="0"} 0.0
megaraid_pd_emergency_spare{controller="0",enclosure="252",slot="1"} 0.0
megaraid_pd_emergency_spare{controller="0",enclosure="252",slot="4"} 0.0
megaraid_pd_emergency_spare{controller="0",enclosure="252",slot="5"} 0.0
# HELP megaraid_pd_info MegaRAID pd info
# TYPE megaraid_pd_info gauge
megaraid_pd_info{controller="0",enclosure="252",slot="0",disk_id="2",interface="SATA",media="SSD",model="Micron_5200_MTFDDAK960TDC",DG="0",state="Onln",firmware="D1MU004",serial="20032656D641"} 1.0
megaraid_pd_info{controller="0",enclosure="252",slot="1",disk_id="3",interface="SATA",media="SSD",model="Micron_5200_MTFDDAK960TDC",DG="0",state="Onln",firmware="D1MU004",serial="20032656D63C"} 1.0
megaraid_pd_info{controller="0",enclosure="252",slot="4",disk_id="7",interface="SATA",media="SSD",model="Micron_5200_MTFDDAK960TDC",DG="0",state="Onln",firmware="D1MU004",serial="20032656D649"} 1.0
megaraid_pd_info{controller="0",enclosure="252",slot="5",disk_id="6",interface="SATA",media="SSD",model="Micron_5200_MTFDDAK960TDC",DG="0",state="Onln",firmware="D1MU004",serial="20032656D5D1"} 1.0
# storcli.py | grep temperature
# HELP megaraid_temperature MegaRAID temperature
# TYPE megaraid_temperature gauge
megaraid_temperature{controller="0"} 52.0
# HELP megaraid_cv_temperature MegaRAID cv temperature
# TYPE megaraid_cv_temperature gauge
megaraid_cv_temperature{controller="0",cvidx="0"} 18.0
I see no individual pd temperatures :-( (that's what I primarily want to monitor). Thanks.
Then I think that's a different issue: it's the controller BBU temperature that I was patching for.
PD temperatures will come from SMART info. I think smartmon.sh or smartmon.py should be able to do this, but could need patching to fetch that info via the smartctl CLI with a Megaraid card. An example of a command I have in my notes:
smartctl -a -d sat+megaraid,0 /dev/sda
Try smartmon.sh, this may work OOTB: https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/blob/master/smartmon.sh#L193
smartmon.py might also work. There was some reason why I deployed smartmon.sh instead, but I can't remember why (might have been to do with old versions of python in some systems)
@stefangweichinger Although this PR doesn't address your specific issue, it would be immensely helpful if you could attach the output of storcli /cALL show all J
and storcli /cALL/eALL/sALL show all J
to help us start a base of fixtures for the collector. Sanitize / obfuscate device serial numbers & hostnames at your discretion.
Try smartmon.sh, this may work OOTB: https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/blob/master/smartmon.sh#L193
smartmon.py might also work. There was some reason why I deployed smartmon.sh instead, but I can't remember why (might have been to do with old versions of python in some systems)
Thanks for the pointer. Both work somehow (I get metrics), but I have to check if the metrics fit this dashboard, for example: https://grafana.com/grafana/dashboards/10664-smart-disk-data/ The metrics names differ...
@dswarbrick no problem, I am happy if I can help
output 1
# /opt/hpe/storcli/storcli64 /cALL show all J
{
"Controllers":[
{
"Command Status" : {
"CLI Version" : "007.1616.0000.0000 Dec 24, 2020",
"Operating system" : "Linux 5.10.0-23-amd64",
"Controller" : 0,
"Status" : "Success",
"Description" : "None"
},
"Response Data" : {
"Basics" : {
"Controller" : 0,
"Model" : "PRAID EP420i",
"Serial Number" : "0000000061913681",
"Current Controller Date/Time" : "05/19/2023, 19:18:24",
"Current System Date/time" : "05/19/2023, 21:18:13",
"SAS Address" : "500300570256f130",
"PCI Address" : "00:02:00:00",
"Mfg Date" : "00/00/00",
"Rework Date" : "00/00/00",
"Revision No" : " "
},
"Version" : {
"Firmware Package Build" : "24.21.0-0076",
"Firmware Version" : "4.680.00-8417",
"CPLD Version" : "26515-01A",
"Bios Version" : "6.36.00.3_4.19.08.00_0x06180203",
"HII Version" : "03.25.05.10",
"Ctrl-R Version" : "5.19-0603",
"Preboot CLI Version" : "01.07-05:#%0000",
"NVDATA Version" : "3.1705.00-0018",
"Boot Block Version" : "3.07.00.00-0003",
"Driver Name" : "megaraid_sas",
"Driver Version" : "07.714.04.00-rc1"
},
"Bus" : {
"Vendor Id" : 4096,
"Device Id" : 93,
"SubVendor Id" : 5940,
"SubDevice Id" : 4626,
"Host Interface" : "PCI-E",
"Device Interface" : "SAS-12G",
"Bus Number" : 2,
"Device Number" : 0,
"Function Number" : 0,
"Domain ID" : 0
},
"Pending Images in Flash" : {
"Image name" : "No pending images"
},
"Status" : {
"Controller Status" : "Optimal",
"Memory Correctable Errors" : 0,
"Memory Uncorrectable Errors" : 0,
"ECC Bucket Count" : 0,
"Any Offline VD Cache Preserved" : "No",
"BBU Status" : 0,
"PD Firmware Download in progress" : "No",
"Support PD Firmware Download" : "Yes",
"Lock Key Assigned" : "No",
"Failed to get lock key on bootup" : "No",
"Lock key has not been backed up" : "No",
"Bios was not detected during boot" : "No",
"Controller must be rebooted to complete security operation" : "No",
"A rollback operation is in progress" : "No",
"At least one PFK exists in NVRAM" : "Yes",
"SSC Policy is WB" : "No",
"Controller has booted into safe mode" : "No",
"Controller shutdown required" : "No",
"Controller has booted into certificate provision mode" : "No"
},
"Supported Adapter Operations" : {
"Rebuild Rate" : "Yes",
"CC Rate" : "Yes",
"BGI Rate " : "Yes",
"Reconstruct Rate" : "Yes",
"Patrol Read Rate" : "Yes",
"Alarm Control" : "No",
"Cluster Support" : "No",
"BBU" : "Yes",
"Spanning" : "Yes",
"Dedicated Hot Spare" : "Yes",
"Revertible Hot Spares" : "Yes",
"Foreign Config Import" : "Yes",
"Self Diagnostic" : "Yes",
"Allow Mixed Redundancy on Array" : "No",
"Global Hot Spares" : "Yes",
"Deny SCSI Passthrough" : "No",
"Deny SMP Passthrough" : "No",
"Deny STP Passthrough" : "No",
"Support more than 8 Phys" : "Yes",
"FW and Event Time in GMT" : "No",
"Support Enhanced Foreign Import" : "Yes",
"Support Enclosure Enumeration" : "Yes",
"Support Allowed Operations" : "Yes",
"Abort CC on Error" : "Yes",
"Support Multipath" : "Yes",
"Support Odd & Even Drive count in RAID1E" : "No",
"Support Security" : "No",
"Support Config Page Model" : "Yes",
"Support the OCE without adding drives" : "Yes",
"Support EKM" : "No",
"Snapshot Enabled" : "No",
"Support PFK" : "Yes",
"Support PI" : "Yes",
"Support LDPI Type1" : "No",
"Support LDPI Type2" : "No",
"Support LDPI Type3" : "No",
"Support Ld BBM Info" : "No",
"Support Shield State" : "Yes",
"Block SSD Write Disk Cache Change" : "No",
"Support Suspend Resume BG ops" : "Yes",
"Support Emergency Spares" : "No",
"Support Set Link Speed" : "Yes",
"Support Boot Time PFK Change" : "No",
"Support JBOD" : "Yes",
"Disable Online PFK Change" : "No",
"Support Perf Tuning" : "Yes",
"Support SSD PatrolRead" : "Yes",
"Real Time Scheduler" : "Yes",
"Support Reset Now" : "Yes",
"Support Emulated Drives" : "Yes",
"Headless Mode" : "Yes",
"Dedicated HotSpares Limited" : "No",
"Point In Time Progress" : "Yes",
"Extended LD" : "Yes",
"Support Uneven span " : "No",
"Support Config Auto Balance" : "No",
"Support Maintenance Mode" : "No",
"Support Diagnostic results" : "Yes",
"Support Ext Enclosure" : "Yes",
"Support Sesmonitoring" : "Yes",
"Support SecurityonJBOD" : "Yes",
"Support ForceFlash" : "Yes",
"Support DisableImmediateIO" : "Yes",
"Support LargeIOSupport" : "Yes",
"Support DrvActivityLEDSetting" : "Yes",
"Support FlushWriteVerify" : "Yes",
"Support CPLDUpdate" : "Yes",
"Support ForceTo512e" : "Yes",
"Support discardCacheDuringLDDelete" : "Yes",
"Support JBOD Write cache" : "No",
"Support Large QD Support" : "No",
"Support Ctrl Info Extended" : "No",
"Support IButton less" : "No",
"Support AES Encryption Algorithm" : "No",
"Support Encrypted MFC" : "No",
"Support Snapdump" : "No",
"Support Force Personality Change" : "No",
"Support Dual Fw Image" : "No",
"Support PSOC Update" : "No",
"Support Secure Boot" : "No",
"Support Debug Queue" : "Yes",
"Support Least Latency Mode" : "Yes",
"Support OnDemand Snapdump" : "No",
"Support Clear Snapdump" : "No",
"Support PHY current speed" : "No",
"Support Lane current speed" : "No",
"Support NVMe Width" : "No",
"Support Lane DeviceType" : "No",
"Support Extended Drive performance Monitoring" : "No",
"Support NVMe Repair" : "No",
"Support Platform Security" : "No",
"Support None Mode Params" : "No",
"Support Extended Controller Property" : "No",
"Support Smart Poll Interval for DirectAttached" : "No",
"Support Write Journal Pinning" : "No",
"Support SMP Passthru with Port Number" : "No",
"Support NVMe Init Error Device ConnectorIndex" : "No"
},
"Supported PD Operations" : {
"Force Online" : "Yes",
"Force Offline" : "Yes",
"Force Rebuild" : "Yes",
"Deny Force Failed" : "No",
"Deny Force Good/Bad" : "No",
"Deny Missing Replace" : "No",
"Deny Clear" : "No",
"Deny Locate" : "No",
"Support Power State" : "Yes",
"Set Power State For Cfg" : "No",
"Support T10 Power State" : "No",
"Support Temperature" : "Yes",
"NCQ" : "Yes",
"Support Max Rate SATA" : "No",
"Support Degraded Media" : "No",
"Support Parallel FW Update" : "Yes",
"Support Drive Crypto Erase" : "Yes",
"Support SSD Wear Gauge" : "No"
},
"Supported VD Operations" : {
"Read Policy" : "Yes",
"Write Policy" : "Yes",
"IO Policy" : "Yes",
"Access Policy" : "Yes",
"Disk Cache Policy" : "Yes",
"Reconstruction" : "Yes",
"Deny Locate" : "No",
"Deny CC" : "No",
"Allow Ctrl Encryption" : "No",
"Enable LDBBM" : "Yes",
"Support FastPath" : "Yes",
"Performance Metrics" : "Yes",
"Power Savings" : "No",
"Support Powersave Max With Cache" : "No",
"Support Breakmirror" : "Yes",
"Support SSC WriteBack" : "No",
"Support SSC Association" : "No",
"Support VD Hide" : "Yes",
"Support VD Cachebypass" : "Yes",
"Support VD discardCacheDuringLDDelete" : "Yes",
"Support VD Scsi Unmap" : "No"
},
"Advanced Software Option" : [
{
"Adv S/W Opt" : "MegaRAID FastPath",
" Time Remaining" : " Unlimited",
" Mode" : " -"
},
{
"Adv S/W Opt" : "MegaRAID RAID6",
" Time Remaining" : " Unlimited",
" Mode" : " -"
},
{
"Adv S/W Opt" : "MegaRAID RAID5",
" Time Remaining" : " Unlimited",
" Mode" : " -"
}
],
"Safe ID" : " JT7NM98TL2LU1UQ3TRWVCU8N97FB79EGK7P4H12Z",
"HwCfg" : {
"ChipRevision" : " C0",
"BatteryFRU" : "N/A",
"Front End Port Count" : 0,
"Backend Port Count" : 8,
"BBU" : "Present",
"Alarm" : "Absent",
"Serial Debugger" : "Present",
"NVRAM Size" : "32KB",
"Flash Size" : "16MB",
"On Board Memory Size" : "2048MB",
"CacheVault Flash Size" : "8.000 GB",
"TPM" : "Absent",
"Upgrade Key" : "Absent",
"On Board Expander" : "Absent",
"Temperature Sensor for ROC" : "Present",
"Temperature Sensor for Controller" : "Absent",
"Upgradable CPLD" : "Present",
"Upgradable PSOC" : "Absent",
"Current Size of CacheCade (GB)" : 0,
"Current Size of FW Cache (MB)" : 1715,
"ROC temperature(Degree Celsius)" : 52
},
"Policies" : {
"Policies Table" : [
{
"Policy" : "Predictive Fail Poll Interval",
"Current" : "300 sec",
"Default" : ""
},
{
"Policy" : "Interrupt Throttle Active Count",
"Current" : "16",
"Default" : ""
},
{
"Policy" : "Interrupt Throttle Completion",
"Current" : "50 us",
"Default" : ""
},
{
"Policy" : "Rebuild Rate",
"Current" : "30 %",
"Default" : "30%"
},
{
"Policy" : "PR Rate",
"Current" : "20 %",
"Default" : "30%"
},
{
"Policy" : "BGI Rate",
"Current" : "30 %",
"Default" : "30%"
},
{
"Policy" : "Check Consistency Rate",
"Current" : "30 %",
"Default" : "30%"
},
{
"Policy" : "Reconstruction Rate",
"Current" : "30 %",
"Default" : "30%"
},
{
"Policy" : "Cache Flush Interval",
"Current" : "4s",
"Default" : ""
}
],
"Flush Time(Default)" : "4s",
"Drive Coercion Mode" : "none",
"Auto Rebuild" : "On",
"Battery Warning" : "On",
"ECC Bucket Size" : 15,
"ECC Bucket Leak Rate (hrs)" : 24,
"Restore Hot Spare on Insertion" : "On",
"Expose Enclosure Devices" : "Off",
"Maintain PD Fail History" : "On",
"Reorder Host Requests" : "On",
"Auto detect BackPlane" : "SGPIO/i2c SEP",
"Load Balance Mode" : "Auto",
"Security Key Assigned" : "Off",
"Disable Online Controller Reset" : "Off",
"Use drive activity for locate" : "Off"
},
"Boot" : {
"BIOS Enumerate VDs" : 1,
"Stop BIOS on Error" : "Off",
"Delay during POST" : 0,
"Spin Down Mode" : "None",
"Enable Ctrl-R" : "Yes",
"Enable Web BIOS" : "No",
"Enable PreBoot CLI" : "No",
"Enable BIOS" : "Yes",
"Max Drives to Spinup at One Time" : 2,
"Maximum number of direct attached drives to spin up in 1 min" : 20,
"Delay Among Spinup Groups (sec)" : 6,
"Allow Boot with Preserved Cache" : "Off"
},
"High Availability" : {
"Topology Type" : "None",
"Cluster Permitted" : "No",
"Cluster Active" : "No"
},
"Defaults" : {
"Phy Polarity" : 0,
"Phy PolaritySplit" : 0,
"Strip Size" : "256 KB",
"Write Policy" : "WB",
"Read Policy" : "RA",
"Cache When BBU Bad" : "Off",
"Cached IO" : "Off",
"VD PowerSave Policy" : "Controller Defined",
"Default spin down time (mins)" : 30,
"Coercion Mode" : "None",
"ZCR Config" : "Unknown",
"Max Chained Enclosures" : 16,
"Direct PD Mapping" : "No",
"Restore Hot Spare on Insertion" : "Yes",
"Expose Enclosure Devices" : "No",
"Maintain PD Fail History" : "Yes",
"Zero Based Enclosure Enumeration" : "No",
"Disable Puncturing" : "No",
"EnableLDBBM" : "Yes",
"DisableHII" : "No",
"Un-Certified Hard Disk Drives" : "Allow",
"SMART Mode" : "Mode 6",
"Enable LED Header" : "No",
"LED Show Drive Activity" : "Yes",
"Dirty LED Shows Drive Activity" : "No",
"EnableCrashDump" : "Yes",
"Disable Online Controller Reset" : "No",
"Treat Single span R1E as R10" : "No",
"Power Saving option" : "Enabled",
"TTY Log In Flash" : "Yes",
"Auto Enhanced Import" : "No",
"BreakMirror RAID Support" : "single span R1",
"Disable Join Mirror" : "Yes",
"Enable Shield State" : "Yes",
"Time taken to detect CME" : "60 sec"
},
"Capabilities" : {
"Supported Drives" : "SAS, SATA",
"RAID Level Supported" : "RAID0, RAID1(2 or more drives), RAID5, RAID6, RAID00, RAID10(2 or more drives per span), RAID50, RAID60",
"Enable JBOD" : "No",
"Mix in Enclosure" : "Allowed",
"Mix of SAS/SATA of HDD type in VD" : "Not Allowed",
"Mix of SAS/SATA of SSD type in VD" : "Not Allowed",
"Mix of SSD/HDD in VD" : "Not Allowed",
"SAS Disable" : "No",
"Max Arms Per VD" : 32,
"Max Spans Per VD" : 8,
"Max Arrays" : 128,
"Max VD per array" : 16,
"Max Number of VDs" : 64,
"Max Parallel Commands" : 928,
"Max SGE Count" : 60,
"Max Data Transfer Size" : "8192 sectors",
"Max Strips PerIO" : 128,
"Max Configurable CacheCade Size(GB)" : 0,
"Max Transportable DGs" : 0,
"Enable Snapdump" : "No",
"Enable SCSI Unmap" : "Yes",
"FDE Drive Mix Support" : "No",
"Min Strip Size" : "64 KB",
"Max Strip Size" : "1.000 MB"
},
"Scheduled Tasks" : {
"Consistency Check Reoccurrence" : "168 hrs",
"Next Consistency check launch" : "NA",
"Patrol Read Reoccurrence" : "168 hrs",
"Next Patrol Read launch" : "05/20/2023, 03:00:00",
"Battery learn Reoccurrence" : "670 hrs",
"Next Battery Learn" : "06/03/2023, 10:00:00",
"OEMID" : "FSC"
},
"Security Protocol properties" : {
"Security Protocol" : "None"
},
"Drive Groups" : 1,
"TOPOLOGY" : [
{
"DG" : 0,
"Arr" : "-",
"Row" : "-",
"EID:Slot" : "-",
"DID" : "-",
"Type" : "RAID6",
"State" : "Optl",
"BT" : "N",
"Size" : "1.745 TB",
"PDC" : "dflt",
"PI" : "N",
"SED" : "N",
"DS3" : "none",
"FSpace" : "N",
"TR" : "N"
},
{
"DG" : 0,
"Arr" : 0,
"Row" : "-",
"EID:Slot" : "-",
"DID" : "-",
"Type" : "RAID6",
"State" : "Optl",
"BT" : "N",
"Size" : "1.745 TB",
"PDC" : "dflt",
"PI" : "N",
"SED" : "N",
"DS3" : "none",
"FSpace" : "N",
"TR" : "N"
},
{
"DG" : 0,
"Arr" : 0,
"Row" : 0,
"EID:Slot" : "252:0",
"DID" : 2,
"Type" : "DRIVE",
"State" : "Onln",
"BT" : "N",
"Size" : "893.750 GB",
"PDC" : "dflt",
"PI" : "N",
"SED" : "N",
"DS3" : "none",
"FSpace" : "-",
"TR" : "N"
},
{
"DG" : 0,
"Arr" : 0,
"Row" : 1,
"EID:Slot" : "252:1",
"DID" : 3,
"Type" : "DRIVE",
"State" : "Onln",
"BT" : "N",
"Size" : "893.750 GB",
"PDC" : "dflt",
"PI" : "N",
"SED" : "N",
"DS3" : "none",
"FSpace" : "-",
"TR" : "N"
},
{
"DG" : 0,
"Arr" : 0,
"Row" : 2,
"EID:Slot" : "252:5",
"DID" : 6,
"Type" : "DRIVE",
"State" : "Onln",
"BT" : "N",
"Size" : "893.750 GB",
"PDC" : "dflt",
"PI" : "N",
"SED" : "N",
"DS3" : "none",
"FSpace" : "-",
"TR" : "N"
},
{
"DG" : 0,
"Arr" : 0,
"Row" : 3,
"EID:Slot" : "252:4",
"DID" : 7,
"Type" : "DRIVE",
"State" : "Onln",
"BT" : "N",
"Size" : "893.750 GB",
"PDC" : "dflt",
"PI" : "N",
"SED" : "N",
"DS3" : "none",
"FSpace" : "-",
"TR" : "N"
}
],
"Virtual Drives" : 1,
"VD LIST" : [
{
"DG/VD" : "0/0",
"TYPE" : "RAID6",
"State" : "Optl",
"Access" : "RW",
"Consist" : "Yes",
"Cache" : "RWBD",
"Cac" : "-",
"sCC" : "OFF",
"Size" : "1.745 TB",
"Name" : ""
}
],
"Physical Drives" : 4,
"PD LIST" : [
{
"EID:Slt" : "252:0",
"DID" : 2,
"State" : "Onln",
"DG" : 0,
"Size" : "893.750 GB",
"Intf" : "SATA",
"Med" : "SSD",
"SED" : "N",
"PI" : "N",
"SeSz" : "512B",
"Model" : "Micron_5200_MTFDDAK960TDC",
"Sp" : "U",
"Type" : "-"
},
{
"EID:Slt" : "252:1",
"DID" : 3,
"State" : "Onln",
"DG" : 0,
"Size" : "893.750 GB",
"Intf" : "SATA",
"Med" : "SSD",
"SED" : "N",
"PI" : "N",
"SeSz" : "512B",
"Model" : "Micron_5200_MTFDDAK960TDC",
"Sp" : "U",
"Type" : "-"
},
{
"EID:Slt" : "252:4",
"DID" : 7,
"State" : "Onln",
"DG" : 0,
"Size" : "893.750 GB",
"Intf" : "SATA",
"Med" : "SSD",
"SED" : "N",
"PI" : "N",
"SeSz" : "512B",
"Model" : "Micron_5200_MTFDDAK960TDC",
"Sp" : "U",
"Type" : "-"
},
{
"EID:Slt" : "252:5",
"DID" : 6,
"State" : "Onln",
"DG" : 0,
"Size" : "893.750 GB",
"Intf" : "SATA",
"Med" : "SSD",
"SED" : "N",
"PI" : "N",
"SeSz" : "512B",
"Model" : "Micron_5200_MTFDDAK960TDC",
"Sp" : "U",
"Type" : "-"
}
],
"Enclosures" : 1,
"Enclosure LIST" : [
{
"EID" : 252,
"State" : "OK",
"Slots" : 8,
"PD" : 4,
"PS" : 0,
"Fans" : 0,
"TSs" : 0,
"Alms" : 0,
"SIM" : 1,
"Port#" : "-",
"ProdID" : "SGPIO",
"VendorSpecific" : " "
}
],
"Cachevault_Info" : [
{
"Model" : "CVPM02",
"State" : "Optimal",
"Temp" : "18C",
"Mode" : "-",
"MfgDate" : "2019/07/06"
}
]
}
}
]
}
output 2
# /opt/hpe/storcli/storcli64 /cALL/eALL/sALL show all J
{
"Controllers":[
{
"Command Status" : {
"CLI Version" : "007.1616.0000.0000 Dec 24, 2020",
"Operating system" : "Linux 5.10.0-23-amd64",
"Controller" : 0,
"Status" : "Success",
"Description" : "Show Drive Information Succeeded."
},
"Response Data" : {
"Drive /c0/e252/s0" : [
{
"EID:Slt" : "252:0",
"DID" : 2,
"State" : "Onln",
"DG" : 0,
"Size" : "893.750 GB",
"Intf" : "SATA",
"Med" : "SSD",
"SED" : "N",
"PI" : "N",
"SeSz" : "512B",
"Model" : "Micron_5200_MTFDDAK960TDC",
"Sp" : "U",
"Type" : "-"
}
],
"Drive /c0/e252/s0 - Detailed Information" : {
"Drive /c0/e252/s0 State" : {
"Shield Counter" : 0,
"Media Error Count" : 0,
"Other Error Count" : 0,
"Drive Temperature" : " 21C (69.80 F)",
"Predictive Failure Count" : 0,
"S.M.A.R.T alert flagged by drive" : "No"
},
"Drive /c0/e252/s0 Device attributes" : {
"SN" : "20032656D641",
"Manufacturer Id" : "ATA ",
"Model Number" : "Micron_5200_MTFDDAK960TDC",
"NAND Vendor" : "NA",
"WWN" : "500A07512656D641",
"Firmware Revision" : " D1MU004",
"Raw size" : "894.252 GB [0x6fc81ab0 Sectors]",
"Coerced size" : "893.750 GB [0x6fb80000 Sectors]",
"Non Coerced size" : "893.752 GB [0x6fb81ab0 Sectors]",
"Device Speed" : "6.0Gb/s",
"Link Speed" : "6.0Gb/s",
"NCQ setting" : "Enabled",
"Write Cache" : "N/A",
"Logical Sector Size" : "512B",
"Physical Sector Size" : "4 KB",
"Connector Name" : "Port 0 - 3 x1"
},
"Drive /c0/e252/s0 Policies/Settings" : {
"Drive position" : "DriveGroup:0, Span:0, Row:0",
"Enclosure position" : "1",
"Connected Port Number" : "0(path0) ",
"Sequence Number" : 2,
"Commissioned Spare" : "No",
"Emergency Spare" : "No",
"Last Predictive Failure Event Sequence Number" : 0,
"Successful diagnostics completion on" : "N/A",
"FDE Type" : "None",
"SED Capable" : "No",
"SED Enabled" : "No",
"Secured" : "No",
"Cryptographic Erase Capable" : "Yes",
"Sanitize Support" : "Not supported",
"Locked" : "No",
"Needs EKM Attention" : "No",
"PI Eligible" : "No",
"Certified" : "No",
"Wide Port Capable" : "No",
"Multipath" : "No",
"Port Information" : [
{
"Port" : 0,
"Status" : "Active",
"Linkspeed" : "6.0Gb/s",
"SAS address" : "0x4433221102000000"
}
]
},
"Inquiry Data" : "40 04 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00 00 00 00 00 20 20 20 20 20 20 20 20 30 32 33 30 36 32 36 35 36 44 31 34 00 00 00 00 00 00 44 20 4d 31 30 55 34 30 69 4d 72 63 6e 6f 35 5f 30 32 5f 30 54 4d 44 46 41 44 39 4b 30 36 44 54 20 43 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 80 00 40 00 2f 01 40 00 00 00 00 06 00 ff 3f 10 00 3f 00 10 fc fb 00 10 fd ff ff ff 0f 00 00 07 00 "
},
"Drive /c0/e252/s1" : [
{
"EID:Slt" : "252:1",
"DID" : 3,
"State" : "Onln",
"DG" : 0,
"Size" : "893.750 GB",
"Intf" : "SATA",
"Med" : "SSD",
"SED" : "N",
"PI" : "N",
"SeSz" : "512B",
"Model" : "Micron_5200_MTFDDAK960TDC",
"Sp" : "U",
"Type" : "-"
}
],
"Drive /c0/e252/s1 - Detailed Information" : {
"Drive /c0/e252/s1 State" : {
"Shield Counter" : 0,
"Media Error Count" : 0,
"Other Error Count" : 0,
"Drive Temperature" : " 21C (69.80 F)",
"Predictive Failure Count" : 0,
"S.M.A.R.T alert flagged by drive" : "No"
},
"Drive /c0/e252/s1 Device attributes" : {
"SN" : "20032656D63C",
"Manufacturer Id" : "ATA ",
"Model Number" : "Micron_5200_MTFDDAK960TDC",
"NAND Vendor" : "NA",
"WWN" : "500A07512656D63C",
"Firmware Revision" : " D1MU004",
"Raw size" : "894.252 GB [0x6fc81ab0 Sectors]",
"Coerced size" : "893.750 GB [0x6fb80000 Sectors]",
"Non Coerced size" : "893.752 GB [0x6fb81ab0 Sectors]",
"Device Speed" : "6.0Gb/s",
"Link Speed" : "6.0Gb/s",
"NCQ setting" : "Enabled",
"Write Cache" : "N/A",
"Logical Sector Size" : "512B",
"Physical Sector Size" : "4 KB",
"Connector Name" : "Port 0 - 3 x1"
},
"Drive /c0/e252/s1 Policies/Settings" : {
"Drive position" : "DriveGroup:0, Span:0, Row:1",
"Enclosure position" : "0",
"Connected Port Number" : "1(path0) ",
"Sequence Number" : 2,
"Commissioned Spare" : "No",
"Emergency Spare" : "No",
"Last Predictive Failure Event Sequence Number" : 0,
"Successful diagnostics completion on" : "N/A",
"FDE Type" : "None",
"SED Capable" : "No",
"SED Enabled" : "No",
"Secured" : "No",
"Cryptographic Erase Capable" : "Yes",
"Sanitize Support" : "Not supported",
"Locked" : "No",
"Needs EKM Attention" : "No",
"PI Eligible" : "No",
"Certified" : "No",
"Wide Port Capable" : "No",
"Multipath" : "No",
"Port Information" : [
{
"Port" : 0,
"Status" : "Active",
"Linkspeed" : "6.0Gb/s",
"SAS address" : "0x4433221103000000"
}
]
},
"Inquiry Data" : "40 04 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00 00 00 00 00 20 20 20 20 20 20 20 20 30 32 33 30 36 32 36 35 36 44 43 33 00 00 00 00 00 00 44 20 4d 31 30 55 34 30 69 4d 72 63 6e 6f 35 5f 30 32 5f 30 54 4d 44 46 41 44 39 4b 30 36 44 54 20 43 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 80 00 40 00 2f 01 40 00 00 00 00 06 00 ff 3f 10 00 3f 00 10 fc fb 00 10 fd ff ff ff 0f 00 00 07 00 "
},
"Drive /c0/e252/s4" : [
{
"EID:Slt" : "252:4",
"DID" : 7,
"State" : "Onln",
"DG" : 0,
"Size" : "893.750 GB",
"Intf" : "SATA",
"Med" : "SSD",
"SED" : "N",
"PI" : "N",
"SeSz" : "512B",
"Model" : "Micron_5200_MTFDDAK960TDC",
"Sp" : "U",
"Type" : "-"
}
],
"Drive /c0/e252/s4 - Detailed Information" : {
"Drive /c0/e252/s4 State" : {
"Shield Counter" : 0,
"Media Error Count" : 0,
"Other Error Count" : 0,
"Drive Temperature" : " 21C (69.80 F)",
"Predictive Failure Count" : 0,
"S.M.A.R.T alert flagged by drive" : "No"
},
"Drive /c0/e252/s4 Device attributes" : {
"SN" : "20032656D649",
"Manufacturer Id" : "ATA ",
"Model Number" : "Micron_5200_MTFDDAK960TDC",
"NAND Vendor" : "NA",
"WWN" : "500A07512656D649",
"Firmware Revision" : " D1MU004",
"Raw size" : "894.252 GB [0x6fc81ab0 Sectors]",
"Coerced size" : "893.750 GB [0x6fb80000 Sectors]",
"Non Coerced size" : "893.752 GB [0x6fb81ab0 Sectors]",
"Device Speed" : "6.0Gb/s",
"Link Speed" : "6.0Gb/s",
"NCQ setting" : "Enabled",
"Write Cache" : "N/A",
"Logical Sector Size" : "512B",
"Physical Sector Size" : "4 KB",
"Connector Name" : "Port 4 - 7 x1"
},
"Drive /c0/e252/s4 Policies/Settings" : {
"Drive position" : "DriveGroup:0, Span:0, Row:3",
"Enclosure position" : "0",
"Connected Port Number" : "2(path0) ",
"Sequence Number" : 2,
"Commissioned Spare" : "No",
"Emergency Spare" : "No",
"Last Predictive Failure Event Sequence Number" : 0,
"Successful diagnostics completion on" : "N/A",
"FDE Type" : "None",
"SED Capable" : "No",
"SED Enabled" : "No",
"Secured" : "No",
"Cryptographic Erase Capable" : "Yes",
"Sanitize Support" : "Not supported",
"Locked" : "No",
"Needs EKM Attention" : "No",
"PI Eligible" : "No",
"Certified" : "No",
"Wide Port Capable" : "No",
"Multipath" : "No",
"Port Information" : [
{
"Port" : 0,
"Status" : "Active",
"Linkspeed" : "6.0Gb/s",
"SAS address" : "0x4433221106000000"
}
]
},
"Inquiry Data" : "40 04 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00 00 00 00 00 20 20 20 20 20 20 20 20 30 32 33 30 36 32 36 35 36 44 39 34 00 00 00 00 00 00 44 20 4d 31 30 55 34 30 69 4d 72 63 6e 6f 35 5f 30 32 5f 30 54 4d 44 46 41 44 39 4b 30 36 44 54 20 43 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 80 00 40 00 2f 01 40 00 00 00 00 06 00 ff 3f 10 00 3f 00 10 fc fb 00 10 fd ff ff ff 0f 00 00 07 00 "
},
"Drive /c0/e252/s5" : [
{
"EID:Slt" : "252:5",
"DID" : 6,
"State" : "Onln",
"DG" : 0,
"Size" : "893.750 GB",
"Intf" : "SATA",
"Med" : "SSD",
"SED" : "N",
"PI" : "N",
"SeSz" : "512B",
"Model" : "Micron_5200_MTFDDAK960TDC",
"Sp" : "U",
"Type" : "-"
}
],
"Drive /c0/e252/s5 - Detailed Information" : {
"Drive /c0/e252/s5 State" : {
"Shield Counter" : 0,
"Media Error Count" : 0,
"Other Error Count" : 0,
"Drive Temperature" : " 21C (69.80 F)",
"Predictive Failure Count" : 0,
"S.M.A.R.T alert flagged by drive" : "No"
},
"Drive /c0/e252/s5 Device attributes" : {
"SN" : "20032656D5D1",
"Manufacturer Id" : "ATA ",
"Model Number" : "Micron_5200_MTFDDAK960TDC",
"NAND Vendor" : "NA",
"WWN" : "500A07512656D5D1",
"Firmware Revision" : " D1MU004",
"Raw size" : "894.252 GB [0x6fc81ab0 Sectors]",
"Coerced size" : "893.750 GB [0x6fb80000 Sectors]",
"Non Coerced size" : "893.752 GB [0x6fb81ab0 Sectors]",
"Device Speed" : "6.0Gb/s",
"Link Speed" : "6.0Gb/s",
"NCQ setting" : "Enabled",
"Write Cache" : "N/A",
"Logical Sector Size" : "512B",
"Physical Sector Size" : "4 KB",
"Connector Name" : "Port 4 - 7 x1"
},
"Drive /c0/e252/s5 Policies/Settings" : {
"Drive position" : "DriveGroup:0, Span:0, Row:2",
"Enclosure position" : "0",
"Connected Port Number" : "3(path0) ",
"Sequence Number" : 2,
"Commissioned Spare" : "No",
"Emergency Spare" : "No",
"Last Predictive Failure Event Sequence Number" : 0,
"Successful diagnostics completion on" : "N/A",
"FDE Type" : "None",
"SED Capable" : "No",
"SED Enabled" : "No",
"Secured" : "No",
"Cryptographic Erase Capable" : "Yes",
"Sanitize Support" : "Not supported",
"Locked" : "No",
"Needs EKM Attention" : "No",
"PI Eligible" : "No",
"Certified" : "No",
"Wide Port Capable" : "No",
"Multipath" : "No",
"Port Information" : [
{
"Port" : 0,
"Status" : "Active",
"Linkspeed" : "6.0Gb/s",
"SAS address" : "0x4433221107000000"
}
]
},
"Inquiry Data" : "40 04 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00 00 00 00 00 20 20 20 20 20 20 20 20 30 32 33 30 36 32 36 35 35 44 31 44 00 00 00 00 00 00 44 20 4d 31 30 55 34 30 69 4d 72 63 6e 6f 35 5f 30 32 5f 30 54 4d 44 46 41 44 39 4b 30 36 44 54 20 43 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 80 00 40 00 2f 01 40 00 00 00 00 06 00 ff 3f 10 00 3f 00 10 fc fb 00 10 fd ff ff ff 0f 00 00 07 00 "
}
}
}
]
}
Thank you @stefangweichinger, that is a huge help. I have added those fixtures and a simple storcli
mock script to the repo, such that the collector can be tested via ./storcli.py --storcli_path mock/storcli
With that said, this PR LGTM and does not appear to cause any regressions :tada: