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

Grafana and Prometheus doesn't present haproxy result #4429

Closed
rlinux57 opened this Issue Jul 27, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@rlinux57
Copy link

rlinux57 commented Jul 27, 2018

Hi,

I am using haproxy_exporter in prometheus and add prometheus as a datasource in grafana and the haproxy plugin using prometheus as a datasource in order to fetch haproxy stats and shown in grafana server. And i am not able to get the output on prometheus as well as grafana No datapoints found. . But when i used curl command, It gives me actual output:

curl http://localhost:9101/metrics

# TYPE haproxy_up gauge
haproxy_up 1

Environment

  • System information:

    Linux 2.6.32-754.2.1.el6.x86_64 x86_64

  • Prometheus version:

    prometheus, version 2.3.2

  • Prometheus configuration file:

scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'
#  - job_name: 'haproxy'

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.
#    metrics_path: 
    static_configs:
    - targets: ['localhost:9090']

  - job_name: 'haproxy'
    static_configs:
      - targets: ['localhost:9101']
        labels:
          instance: haproxy

Prometheus gives following log when it is runnning:

  • Logs:
level=warn ts=2018-07-27T13:03:49.526337583Z caller=scrape.go:948 component="scrape manager" scrape_pool=haproxy target=http://localhost:9101/metrics msg="Error on ingesting samples that are too old or are too far into the future" num_dropped=263
@grobie

This comment has been minimized.

Copy link
Member

grobie commented Jul 27, 2018

It seems you have a huge clock drift between your Prometheus HAProxy servers. Check the time on all servers and consider using chrony/ntpd to sync your clocks.

@rlinux57

This comment has been minimized.

Copy link
Author

rlinux57 commented Jul 30, 2018

It is automatically working next day, I don't know how it is fixed.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.