ar51an / unbound-dashboard

Unbound Dashboard In Grafana With Prometheus & Loki
Apache License 2.0
225 stars 16 forks source link

Multiple hosts in a single dashboard #16

Open rwjack opened 1 month ago

rwjack commented 1 month ago

2.3 is looking great, thank you @ar51an!

I have multiple unbound hosts, so I figure I might document this here in case someone needs it.

Step 1: Add the Unbound Host Variable: (Name, Label, Query Option fields)

image

Step 2: Set the label in the promtail config:

 - job_name: unbound
    static_configs:
    - targets:
        - localhost
      labels:
        job: unbound
        host: <DESIRED_HOSTNAME_LABEL> #######################
.... SNIP ....

Step 3: Modify the dashboard JSON

Replace all occurences of job=\"unbound\" -> with: job=\"unbound\", host=\"${unbound_host}\"

image

Make sure to save the dashboard and voila!

Before: image

After: image