Grafana dashboard question

hi all,

I hope this finds you well. I have a grafana dashboard, fed by prometheus scraping two relay nodes. ATM it shows data correctly, but for each metric the data are on the same panel.

The prometheus job look like this:

  • job_name: ‘Cardano relays’ # To scrape data from the cardano node
    scrape_interval: 5s
    static_configs:
    • targets: [‘x.x.x.x:port’]
    • targets: [‘x.x.x.x:port’]

I don’t mind clicking on the data source to show only individual time series, but I was wondering if there is a way to scrape the same metric from multiple places and show it in different panels.

Any suggestions are greatly appreciated.

All the best,

A

You could create separate jobs, one for each relay. You can also add custom labels for each job or use job name to filter each panel.

Update prometheus.yml

  - targets: ['<relay1 ip address>:port']
    labels:
      alias: 'relay1'
      type:  'cardano-node'
  - targets: ['<relay2 ip address>:port']
    labels:
      alias: 'relay2'
      type:  'cardano-node'

In grafana, specify ailias and instants for each panel.
ex)
cardano_node_BlockFetchDecision_peers_connectedPeers_int{alias=“relay1”, instance=<“relay1 IP>:port”, job=“prometheus”, type=“cardano-node”}

1 Like

Thank you for your contributions! I’ll let you know how I go.

Cheers A

1 Like

Your suggestions worked a treat, it’ll take some time to make it all nice and tidy, but now I have data split the way I want them!

Thank you!

Cheers

A

1 Like

That’s great! I’m happy!