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

[FEAT] Improve Configuration File: disable scan & per device binary #747

Open
lars18th opened this issue Feb 5, 2025 · 0 comments
Open

Comments

@lars18th
Copy link

lars18th commented Feb 5, 2025

Is your feature request related to a problem? Please describe.
This is partially related to #746 . After reading the example.collector.yaml I see two questions that cuold be improved:

  1. How to disable the scanning process? If we use the devices: section to customize the configuration then the scanning process can be disabled. So in case of using a custom smartctl binary this proces meaningless and could be overridden. However, the custom config file doesn't have this option.
  2. The smartctl binary override (metrics_smartctl_bin) is only global wide. And not per device. This could be a problem if we want to mix multiple binaries.

Describe the solution you'd like
Add these two changes to the configuration file:

devices:
#  # example to show how to override the smartctl command args (per device), see below for how to override these globally.
#  - device: /dev/sda
#    commands:
#      metrics_info_args: '--info --json -T permissive' # used to determine device unique ID & register device with Scrutiny
#      metrics_smart_args: '--xall --json -T permissive' # used to retrieve smart data for each device.
# NEW:
#      metrics_smartctl_bin: 'smartctl' # change to provide custom `smartctl` binary path, eg. `/usr/sbin/smartctl`

# example to show how to override the smartctl command args globally
#commands:
#  metrics_scan_args: '--scan --json' # used to detect devices
# NEW:
#  metrics_scan_args: '' # use '' or 'disabled' to not execute the scanning process

That's very simple: the metrics_smartctl_bin will have per device value. And if the metrics_scan_args is empty or disabled the process will not be executed.

Additional context
I hope you accept to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant