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

Pebbles - mean not correct #14

Closed
ltagliamonte opened this issue Jul 17, 2022 · 2 comments
Closed

Pebbles - mean not correct #14

ltagliamonte opened this issue Jul 17, 2022 · 2 comments

Comments

@ltagliamonte
Copy link

The result of using mean5m seems not correct.
To reproduce run the gateway locally and send:

echo '# TYPE test_value gauge
test_value{clearmode="mean5m"} 22' | curl --data-binary @- localhost:4278/metrics/job/testjob

expected 22, returns 0

curl localhost:4278/metrics
# TYPE test_value gauge
test_value{job="testjob"} 0

the result is wrong for all successive submissions.

@ltagliamonte
Copy link
Author

@sinkingpoint i tested latest master and it seems fixed.
One thing i would add in the documentation is that every5m the mean resets and it doesn't take into account the prev value.

curl localhost:4278/metrics
echo '# TYPE test_value gauge
test_value{clearmode="mean5m"} 1' | curl --data-binary @- localhost:4278/metrics/job/testjob
echo '# TYPE test_value gauge
test_value{clearmode="mean5m"} 2' | curl --data-binary @- localhost:4278/metrics/job/testjob
echo '# TYPE test_value gauge
test_value{clearmode="mean5m"} 3' | curl --data-binary @- localhost:4278/metrics/job/testjob
curl localhost:4278/metrics

sleep 330

curl localhost:4278/metrics
echo '# TYPE test_value gauge
test_value{clearmode="mean5m"} 10' | curl --data-binary @- localhost:4278/metrics/job/testjob
curl localhost:4278/metrics

@sinkingpoint
Copy link
Owner

One thing i would add in the documentation is that every5m the mean resets and it doesn't take into account the prev value.

What was the behavior you were expecting? Pebbles discard data outside the time frame (5 minutes in this case), so this is expected on our end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants