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

Cumulative Counters - Prometheus receiver- Magnitude of the metrics is lost #4982

Closed
vishiy opened this issue Mar 30, 2021 · 5 comments
Closed
Labels
comp:prometheus Prometheus related issues

Comments

@vishiy
Copy link

vishiy commented Mar 30, 2021

In using prometheus receiver, i see prometheus counters are being re-calculated from the first data point, which loses the actual value/magnitude of the metric. Is there a way to pass on the initial value in the pipeline so that it can be added back before ingesting to backends like prometheus ?

Also tracking this on proto - open-telemetry/opentelemetry-proto#289
Related on proto - open-telemetry/opentelemetry-proto#229

@gillg
Copy link
Contributor

gillg commented Apr 15, 2021

Does this issue is what I see with a windows exporter ?
I was ready to open an issue without really understand what heppens on counters...

Windows exporter :

# HELP windows_cpu_cstate_seconds_total Time spent in low-power idle state
# TYPE windows_cpu_cstate_seconds_total counter
windows_cpu_cstate_seconds_total{core="0,0",state="c1"} 49.7483432
windows_cpu_cstate_seconds_total{core="0,0",state="c2"} 5927.9149455
windows_cpu_cstate_seconds_total{core="0,0",state="c3"} 0
windows_cpu_cstate_seconds_total{core="0,1",state="c1"} 27.6260123
windows_cpu_cstate_seconds_total{core="0,1",state="c2"} 6286.831386899999
windows_cpu_cstate_seconds_total{core="0,1",state="c3"} 0
windows_cpu_cstate_seconds_total{core="0,10",state="c1"} 48.573301699999995
windows_cpu_cstate_seconds_total{core="0,10",state="c2"} 6167.8695403
windows_cpu_cstate_seconds_total{core="0,10",state="c3"} 0
windows_cpu_cstate_seconds_total{core="0,11",state="c1"} 26.8574585
windows_cpu_cstate_seconds_total{core="0,11",state="c2"} 6285.0095218999995
windows_cpu_cstate_seconds_total{core="0,11",state="c3"} 0

Otel collector which scraps windows exporter :

# HELP windows_cpu_cstate_seconds_total Time spent in low-power idle state
# TYPE windows_cpu_cstate_seconds_total counter
windows_cpu_cstate_seconds_total{core="0,0",otel_job_name="windows-exporter",state="c1"} 1.7922842000000045
windows_cpu_cstate_seconds_total{core="0,0",otel_job_name="windows-exporter",state="c2"} 329.0006407999999
windows_cpu_cstate_seconds_total{core="0,0",otel_job_name="windows-exporter",state="c3"} 0
windows_cpu_cstate_seconds_total{core="0,1",otel_job_name="windows-exporter",state="c1"} 1.5600093999999984
windows_cpu_cstate_seconds_total{core="0,1",otel_job_name="windows-exporter",state="c2"} 346.34727849999945
windows_cpu_cstate_seconds_total{core="0,1",otel_job_name="windows-exporter",state="c3"} 0
windows_cpu_cstate_seconds_total{core="0,10",otel_job_name="windows-exporter",state="c1"} 1.9609340000000017
windows_cpu_cstate_seconds_total{core="0,10",otel_job_name="windows-exporter",state="c2"} 337.7597593999999
windows_cpu_cstate_seconds_total{core="0,10",otel_job_name="windows-exporter",state="c3"} 0
windows_cpu_cstate_seconds_total{core="0,11",otel_job_name="windows-exporter",state="c1"} 0.8394881000000005
windows_cpu_cstate_seconds_total{core="0,11",otel_job_name="windows-exporter",state="c2"} 347.4449079999995
windows_cpu_cstate_seconds_total{core="0,11",otel_job_name="windows-exporter",state="c3"} 0

@ZhouZhongzhi
Copy link
Contributor

I had the same problem.
The data I've collected so far looks a little strange, and I wonder if it's caused by this problem.
The old version of Collector before March of this year collected all the points, but the new version only collects the first one. What is the reason for this design?

@bogdandrutu

@bogdandrutu bogdandrutu transferred this issue from open-telemetry/opentelemetry-collector Aug 30, 2021
@alolita alolita added the comp:prometheus Prometheus related issues label Sep 2, 2021
@gouthamve
Copy link
Member

Hi, is this still an issue? I've run a node_exporter and then start scraping using the OTel Collector, and I can see the absolute values. I am not sure this issue is still relevant.

@gillg
Copy link
Contributor

gillg commented Apr 12, 2022

I think it has been addressed since the refactoring. I agree I never had a new issue in recent versions.

@vishiy
Copy link
Author

vishiy commented Apr 12, 2022

This was fixed. Can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:prometheus Prometheus related issues
Projects
None yet
Development

No branches or pull requests

6 participants