AnalogJ / scrutiny

Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds
MIT License
5.41k stars 172 forks source link

[BUG] Cant acess drives in HPE Smart Array P212 #594

Open Sprinter05 opened 8 months ago

Sprinter05 commented 8 months ago

Describe the bug Getting "No Data" when using HPE Smart Array Controller, i'm using the solution described in issue 312 for the collector configuration but when the smartctl command is ran in the container it skips the ,0 after cciss even when specifying it in the collector config, causing the output JSON to be empty. I tried accessing the drive by ID, running with privileges changing the format of the collector config to no avail.

Expected behavior Should show information about the device

Screenshots imagen

SaraDark commented 8 months ago

mee too

oathboundFamiliar commented 2 months ago

Confirming I can replicate this in Scrutiny 0.8.1 on my ProLiant DL360p G8, the collector ignores cciss index and simply invokes smartctl with --device cciss which doesn't work. Manually pulling SMART data with the correct command works, and Scrutiny successfully uses the correct device type when polling for info, but not SMART data.

Relevant config:

devices:
  - device: /dev/sda
    type: ['cciss,0']
  - device: /dev/sdb
    type: ['cciss,1']
  - device: /dev/sdc
    type: ['cciss,2']

Log:

time="2024-08-31T16:39:40Z" level=info msg="Executing command: smartctl --info --json --device cciss,0 /dev/sda" type=metrics
...
time="2024-08-31T16:39:40Z" level=info msg="Generating WWN" type=metrics
time="2024-08-31T16:39:40Z" level=info msg="Sending detected devices to API, for filtering & validation" type=metrics
time="2024-08-31T16:39:40Z" level=info msg="Collecting smartctl results for sda\n" type=metrics
time="2024-08-31T16:39:40Z" level=info msg="Executing command: smartctl --xall --json --device cciss /dev/sda" type=metrics
time="2024-08-31T16:39:40Z" level=error msg="smartctl returned an error code (1) while processing sda\n" type=metrics