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

Inaccurate data collected by prometheus receiver #3161

Closed
GlowingRuby opened this issue May 13, 2021 · 4 comments · Fixed by #3310
Closed

Inaccurate data collected by prometheus receiver #3161

GlowingRuby opened this issue May 13, 2021 · 4 comments · Fixed by #3310
Labels
bug Something isn't working

Comments

@GlowingRuby
Copy link
Contributor

GlowingRuby commented May 13, 2021

Describe the bug
Use prometheus receiver to scrape node_exporter data and expose the data to native prometheus through prometheus exporter. The CPU usage rate obtained on the node exporter dashboard is inaccurate, which is much different from directly using prometheus to scrape node_exporter.
image
The flat part is to use native prometheus, and the severe jitter part is to use otelcol.
I make sure that my environment is stable and the phenomenon can be reproduced stably.

Steps to reproduce
Use prometheus receiver to scrape node_exporter data and expose the data to native prometheus through prometheus exporter.

What did you expect to see?
Correct cpu usage

What did you see instead?
Wrong cpu usage

What version did you use?
Version: 0.26.0

What config did you use?
otelcol config:

receivers:
  otlp:
    protocols:
      grpc:

  prometheus:
      config:
        global:
          scrape_interval: 15s
        scrape_configs:
          #- job_name: 'prometheus'
          #  static_configs:
          #    - targets: ['192.168.101.209:9090']
          - job_name: 'node'
            static_configs:
              - targets: ['192.168.101.200:9100']
  prometheus:
    endpoint: "192.168.101.209:9111"
    send_timestamps: true
    resource_to_telemetry_conversion:
      enabled: true
  jaeger: 
    endpoint: "192.168.101.209:14250"
    insecure: true
processors: 
  batch:    
extensions:
  health_check:
  pprof:      
    endpoint: :1888
  zpages:
    endpoint: :55679
service: 
  extensions: [pprof, zpages, health_check]
  pipelines:
    traces: 
      receivers: [otlp] 
      processors: [batch]
      exporters: [jaeger]
    metrics/1:
      receivers: [otlp,prometheus]
      processors: []
      exporters: [prometheus]

native prometheus config:

global:
  scrape_interval: 15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: 'otel-collector'
    honor_labels: true
    static_configs:
    - targets: ['192.168.101.209:9111']

Environment
OS: CentOS Linux release 7.4.1708 (Core)

@GlowingRuby GlowingRuby added the bug Something isn't working label May 13, 2021
@GlowingRuby
Copy link
Contributor Author

The version of node_exporter is 1.0.1.linux-amd64, and the version of prometheus is 2.25.0.linux-amd64.

In addition, while investigating this problem, I found another interesting problem. Otelcol seems to discard some samples.

Link to similar issue: https://github.com/open-telemetry/opentelemetry-collector/issues/3118

@bogdandrutu
Copy link
Member

Can you give a try to head? #3047 may fix your main issue

@GlowingRuby
Copy link
Contributor Author

Can you give a try to head? #3047 may fix your main issue

@bogdandrutu sure,reply later.

@GlowingRuby
Copy link
Contributor Author

Are there any configuration item changes? The package I recompiled from the head does not take effect
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants