-
Notifications
You must be signed in to change notification settings - Fork 116
Improve output from metrics summary #1131
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
Conversation
We were calculating the percentage as free space / total space. We should instead calculate it as used space / total space.
cli/dcoscli/metrics.py
Outdated
@@ -125,7 +127,7 @@ def _node_summary_data(datapoints): | |||
disk_free = _get_datapoint_value( | |||
datapoints, 'filesystem.capacity.used', {'path': '/'}) |
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.
the variable is called disk_free while it seems to be disk_used (filesystem.capacity.used
).
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.
Fixed :)
@@ -98,6 +98,8 @@ def _node_summary_json(datapoints): | |||
summary_datapoints = [ | |||
_get_datapoint(datapoints, 'cpu.total'), | |||
_get_datapoint(datapoints, 'memory.total'), | |||
_get_datapoint(datapoints, 'memory.free'), |
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.
here for consistency, could we have memory.used
? A few lines below there is filesystem.capacity.used
. So that'd make datapoint pairs of used
and total
.
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.
Hey @bamarni I do agree that this would make more sense! Unfortunately memory.used
isn't available in our stats - we only have memory.free
.
@bamarni any 8000 other comments or can we start the CI on this one? |
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.
LGTM
run linux integration tests |
Previously, as an outcome of
dcos node metrics summary
, the CLI reported the percentage of the disk that was available, eg 1GB (99%) for a 100GB disk.This PR updates that calculation so we now see the used percentage, so in the above case the user would now see a disk entry of 1GB (1%).
Additionally, I expanded the output from the --json endpoint after noticing that it only reported the total system memory and disk usage.