vector
vector copied to clipboard
host_metrics reports incorrect memory stats (assumes kB instead of kiB)
A note for the community
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Problem
/proc/meminfo is used as a source to report host_metrics' memory stats.
/proc/meminfo values are exposed in kiB (1024) but the prefix used is kB(1000).
As can be seen
here: https://github.com/torvalds/linux/blob/master/fs/proc/meminfo.c#L66
and here: https://github.com/torvalds/linux/blob/master/fs/proc/meminfo.c#L30-L31
vector relies on heim-rs to gather these metrics which relies on uom to parse values. uom does what would be expected and interprets kB as kilobytes instead of kibibytes. https://github.com/iliekturtles/uom/blob/85b665e8e574ff9b5ab91163f5b95c0e10412b9b/src/si/information.rs#L56
Configuration
No response
Version
0.35.0
Debug Output
No response
Example Data
No response
Additional Context
No response
References
No response