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/hostmetricsreceiver] wrong 5m and 15m normalized load - using 1m normalized load and normalizing it again #8267

Closed
lchayoun opened this issue Mar 6, 2022 · 5 comments · Fixed by #10301
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lchayoun
Copy link

lchayoun commented Mar 6, 2022

Describe the bug
When using the cpu_average option introduced in 6999 the 5 minute load and 15 minute load are using the normalized 1 minute load and normalizing it again

This is the current implementation:

	if s.config.CPUAverage {
		divisor := float64(runtime.NumCPU())
		avgLoadValues.Load1 = avgLoadValues.Load1 / divisor
		avgLoadValues.Load5 = avgLoadValues.Load1 / divisor
		avgLoadValues.Load15 = avgLoadValues.Load1 / divisor
	}

Steps to reproduce
Run the agent with hostmetricsreceiver and cpu_average set to tru

What did you expect to see?
The 5m and 15m normalized load

What did you see instead?
The 1m double normalized load

What version did you use?
v0.43.0

What config did you use?
load

@lchayoun lchayoun added the bug Something isn't working label Mar 6, 2022
@jpkrohling
Copy link
Member

cc @dmitryax

@dmitryax dmitryax added help wanted Extra attention is needed good first issue Good for newcomers labels Mar 7, 2022
@dmitryax
Copy link
Member

dmitryax commented Mar 7, 2022

@lchayoun thanks for reporting the this

@shree007
Copy link
Contributor

@dmitryax I am willing to look into it.

@dmitryax
Copy link
Member

@shree007 thanks. It just needs two lines to be corrected and tests written to validate the fix

@shree007
Copy link
Contributor

shree007 commented Mar 13, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
4 participants