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(inputs.smart): Add a "device_type" tag to differentiate disks behind a RAID controller #14613

Merged

Conversation

Maxi-Mega
Copy link
Contributor

@Maxi-Mega Maxi-Mega commented Jan 23, 2024

Summary

When multiple disks are standing behind the same controller, we currently cannot tell them apart.
With these changes, an extra tag device_type can be added to help differentiate them.
This tag can be enabled from the config with the tag_with_device_type property, and is disabled by default to preserve backward compatibility.

Sample output of a Dell server with 8 physical disks:

# smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device
/dev/bus/0 -d megaraid,1 # /dev/bus/0 [megaraid_disk_01], SCSI device
/dev/bus/0 -d megaraid,2 # /dev/bus/0 [megaraid_disk_02], SCSI device
/dev/bus/0 -d megaraid,3 # /dev/bus/0 [megaraid_disk_03], SCSI device
/dev/bus/0 -d megaraid,4 # /dev/bus/0 [megaraid_disk_04], SCSI device
/dev/bus/0 -d megaraid,5 # /dev/bus/0 [megaraid_disk_05], SCSI device
/dev/bus/0 -d megaraid,6 # /dev/bus/0 [megaraid_disk_06], SCSI device
/dev/bus/0 -d megaraid,7 # /dev/bus/0 [megaraid_disk_07], SCSI device

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #4881, #13090

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger telegraf-tiger bot added area/smart feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jan 23, 2024
Thomas Delbende added 2 commits January 23, 2024 11:01
@Maxi-Mega Maxi-Mega force-pushed the add-device-type-tag-to-smart-devices branch from e0f3dd4 to 1540b53 Compare January 23, 2024 10:02
@telegraf-tiger
Copy link
Contributor

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to put this together!

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jan 23, 2024
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for the nice improvement @Maxi-Mega!

@srebhan srebhan merged commit 439df81 into influxdata:master Jan 23, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.30.0 milestone Jan 23, 2024
hhiroshell pushed a commit to hhiroshell/telegraf that referenced this pull request Feb 1, 2024
…hind a RAID controller (influxdata#14613)

Co-authored-by: Thomas Delbende <thomas.delbende@bleemeo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/smart feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SMART does not found device behind Raid-Controller
3 participants