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

Incorrect bandwidth calculations from dual homed servers #5695

Closed
tcfdev opened this issue Mar 31, 2021 · 1 comment · Fixed by #5730
Closed

Incorrect bandwidth calculations from dual homed servers #5695

tcfdev opened this issue Mar 31, 2021 · 1 comment · Fixed by #5730
Assignees
Labels
bug something isn't working as intended Traffic Monitor related to Traffic Monitor
Milestone

Comments

@tcfdev
Copy link
Collaborator

tcfdev commented Mar 31, 2021

I'm submitting a ...

  • bug report

Traffic Control components affected ...

  • Traffic Monitor

Current behavior:

Traffic Monitor indiscrimantly sums up bandwidth calculations from all reported interfaces, whether the interface is marked as "Monitor this interface" or not. When more than 1 interface is returned for a cache server it is assumed to be part of the calculations. This results in inaccurate numbers as some interfaces are "nested" / children interfaces or loopback which result in 2x calculations at a minimum.

Expected behavior:

Only the interfaces marked with "Monitor this interface" should be included in the calculations.

Minimal reproduction of the problem with instructions:

Query a Traffic Server cache where the /_stats endpoint returns multiple interfaces, including those that may not necessarily be noted in the TP/TO. These additional interfaces will be included in the bandwidth calculation that can then be seen in the Traffic Monitor endpoint /CacheStats or /CacheStatsNew. The bandwidth should be based only on the interfaces marked as "Monitor this interface" as can be seen in the Traffic Portal web application.

@tcfdev tcfdev added the bug something isn't working as intended label Mar 31, 2021
@tcfdev
Copy link
Collaborator Author

tcfdev commented Mar 31, 2021

I'll take this one on!

@mitchell852 mitchell852 added the Traffic Monitor related to Traffic Monitor label Mar 31, 2021
tcfdev pushed a commit to tcfdev/trafficcontrol that referenced this issue Apr 1, 2021
Per bug report apache#5695, any and all interfaces returned in polling
were used to calculate vitals, such as bytes in or out, bandwidth
and more. However, only designated interfaces should be used for
calculating such metrics and vitals. As such, this commit will
check for monitored interfaces and only use those for the calculations.
@ocket8888 ocket8888 added this to the 5.1.2 milestone Apr 13, 2021
ocket8888 pushed a commit that referenced this issue Apr 15, 2021
…uded in the vitals (bandwidth) (#5730)

* Normalizing README.md for MacOS case insensitive discrepancies

* Removed whitespace at end of line

* Only use monitored interfaces for vitals

Per bug report #5695, any and all interfaces returned in polling
were used to calculate vitals, such as bytes in or out, bandwidth
and more. However, only designated interfaces should be used for
calculating such metrics and vitals. As such, this commit will
check for monitored interfaces and only use those for the calculations.

* Normalized README.md file

* Normalized README file

* Add bugfix info to CHANGELOG

* Check monitor config for nil

Ensure callers for GetVitals must include a valid config
and the config should contain interfaces

* Fix merge issue with CHANGELOG

* Address PR feedback.

Remove extra blank line from CHANGELOG
Condense test structs for sake of clarity
Change log levels to reflect actual logging issues
Add logging clarity to missing or empty caches and interfaces

Co-authored-by: Taylor Frey <[email protected]>
ocket8888 pushed a commit that referenced this issue Apr 26, 2021
…uded in the vitals (bandwidth) (#5730)

* Normalizing README.md for MacOS case insensitive discrepancies

* Removed whitespace at end of line

* Only use monitored interfaces for vitals

Per bug report #5695, any and all interfaces returned in polling
were used to calculate vitals, such as bytes in or out, bandwidth
and more. However, only designated interfaces should be used for
calculating such metrics and vitals. As such, this commit will
check for monitored interfaces and only use those for the calculations.

* Normalized README.md file

* Normalized README file

* Add bugfix info to CHANGELOG

* Check monitor config for nil

Ensure callers for GetVitals must include a valid config
and the config should contain interfaces

* Fix merge issue with CHANGELOG

* Address PR feedback.

Remove extra blank line from CHANGELOG
Condense test structs for sake of clarity
Change log levels to reflect actual logging issues
Add logging clarity to missing or empty caches and interfaces

Co-authored-by: Taylor Frey <[email protected]>
(cherry picked from commit 89669fd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended Traffic Monitor related to Traffic Monitor
Projects
None yet
3 participants