rfmoz / grafana-dashboards

Grafana dashboards
Apache License 2.0
1.17k stars 445 forks source link

How to use with multiple scrape_configs? #23

Closed tholu closed 4 years ago

tholu commented 6 years ago

My prometheus.yml looks like this:

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
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: 'node'

    # Override the global default and scrape targets from this job every 10 seconds.
    scrape_interval: 10s

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
        - targets: ['localhost:9090','cadvisor:8080','node-exporter:9100']

  - job_name: 'servers'
    static_configs:
        - targets: ['server1','server2']
          labels:
            group: 'production'

When I import the dashboard, I can only select the Prometheus node itself. How can I view server1 and server2 stats with this dashboard?

aekondratiev commented 5 years ago

Hello, what node exporter version you have ?

tholu commented 5 years ago
node_exporter, version 0.13.0+ds (branch: debian/sid, revision: 0.13.0+ds-1+b2)
  build user:       pkg-go-maintainers@lists.alioth.debian.org
  build date:       20170429-09:20:49
  go version:       go1.7.4
aekondratiev commented 5 years ago

Try to use 0.16, should work