Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] device override with type: sat,auto not working #418

Closed
gerohaug opened this issue Jan 2, 2023 · 2 comments
Closed

[BUG] device override with type: sat,auto not working #418

gerohaug opened this issue Jan 2, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@gerohaug
Copy link

gerohaug commented Jan 2, 2023

Describe the bug
Overriding device type with a list in collector.yaml leads to commands being run for each list parameter.

device override in collector.yaml:

devices:
  - device: /dev/sdc
    type: sat,auto

resulting smartctl commands from logfile:

time="2023-01-02T09:48:17Z" level=info msg="Executing command: smartctl --info --json --device sat /dev/sdc" type=metrics
time="2023-01-02T09:48:17Z" level=error msg="Could not retrieve device information for sdc: exit status 2" type=metrics
time="2023-01-02T09:48:17Z" level=info msg="Executing command: smartctl --info --json --device auto /dev/sdc" type=metrics
time="2023-01-02T09:48:17Z" level=error msg="Could not retrieve device information for sdc: exit status 2" type=metrics

Using ghcr.io/analogj/scrutiny:master-omnibus (dev-0.5.0) with docker 20.10.12 on Ubuntu 20.04.5 LTS

Expected behavior
Setting device type override for a disk to 'sat,auto' should run smartctl commands with --device sat,auto

@gerohaug gerohaug added the bug Something isn't working label Jan 2, 2023
@AnalogJ
Copy link
Owner

AnalogJ commented Jan 12, 2023

weird. It's almost like its treating the string like a list. Scrutiny does support that mode for RAID devices, but it shouldn't apply here. Let me see if I can replicate this.

@AnalogJ
Copy link
Owner

AnalogJ commented Jan 12, 2023

Hey @gerohaug
I was able to replicate your issue locally, and its related to the config file parsing library that I'm using -- meaning this is going to be difficult to fix.

However, there is a workaround that you can use (I've confirmed it works):

devices:
  - device: /dev/sdc
    type: ['sat,auto']

I'll close this issue for now, but feel free to comment/reopen if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants