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

[receiver/vcenter] vcenter.vm.disk.utilization was inproperly calculated #12342

Closed
schmikei opened this issue Jul 12, 2022 · 4 comments · Fixed by #12343
Closed

[receiver/vcenter] vcenter.vm.disk.utilization was inproperly calculated #12342

schmikei opened this issue Jul 12, 2022 · 4 comments · Fixed by #12343
Labels
bug Something isn't working

Comments

@schmikei
Copy link
Contributor

schmikei commented Jul 12, 2022

Describe the bug

  • Metric was improperly calculated like this:
diskUtilization := float64(diskUsed) / float64(diskFree) * 100

when it should be calculated like

diskUtilization := float64(diskUsed) / float64(diskFree+diskUsed) * 100

Steps to reproduce
Looking at a live environment in Google Cloud noticed the value was incorrect.

image

What did you expect to see?

For our example storage uncommitted was 10539597824 bytes and committed was 139787059517 bytes which should be calculated as

$$139787059517 bytes ÷ (10539597824 bytes + 139787059517 bytes) * 100% = 92.9888696985 %$$

image

What did you see instead?

The value was rather
139787059517 bytes ÷ (10539597824 bytes) * 100% = 1398 %

Additional context

Will have a PR shortly to fix calculation.

@djaglowski
Copy link
Member

@schmikei, please create separate issues for the various changes you are proposing.

@djaglowski
Copy link
Member

There appear to be three unrelated changes here, so an issue for the cpu metric, and another for the resource label.

@schmikei
Copy link
Contributor Author

Alright I'll separate them out 👍

@schmikei
Copy link
Contributor Author

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
2 participants