-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Disk] Collect disk latency metrics for non-Windows OS #1018
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny comment, feel free to merge after addressing it.
disk/datadog_checks/disk/disk.py
Outdated
except AttributeError: | ||
# Some OS don't return read_time/write_time fields | ||
# http://psutil.readthedocs.io/en/latest/#psutil.disk_io_counters | ||
self.log.debug("Latency metrics not collected for {0}".format(disk_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should log why it's not being collected. Like: `Latency metrics not available for {0}" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @hush-hush. I added the error when logging to be more clear why it's not collected. let me know what you think
What does this PR do?
Allows the check to pull disk latency metrics (
system.disk.read_time_pct
,system.disk.write_time_pct
) from non-windows OS. Also updatescollect_latency_metrics()
function to not fail in case the fields aren't available to pull these metrics, which is expected for some operating systems.Motivation
Customer reached out wanting to be able to collect these disk latency metrics and previously the check only collected for Windows hosts
Testing Guidelines
An overview on testing
is available in our contribution guidelines.
Versioning
manifest.json
datadog_checks/{integration}/__init__.py
CHANGELOG.md
. Please useUnreleased
as the date in the titlefor the new section.
Additional Notes
Anything else we should know when reviewing?