Grafana Dashboard for multiple endpoints

  • What Grafana version and what operating system are you using?
    Ubuntu running Grafana 11.5.2

  • What are you trying to achieve?
    I have multiple endpoints sending data to Grafana-Loki, I want to monitor each endpoint separately in a specified dashboard. I want to move across each endpoint to see its dashboard.

  • How are you trying to achieve it?
    Each Endpoint is sending its rsyslog data to Grfana-Loki using promtail. From Loki this data will be pulled and displayed in a dashboard (one for each endpoint)

Also I would like to know any better ways of achieving this outcome. Essentially I would want to monitor and view logs of each endpoint in isolation.

Thanks

Use labels.

To expand a bit on the above answer. You can add a label e.g. endpoint with unique values for each endpoint and filer by the endpoint label in your dashboard.

You add the label as part of the Promtail config. You can use relabel_configs or for your use case also external_labels.

Here is an example how we set external_labels using environment variables as the values.

Partial Promtail config

clients:
  - basic_auth:
      password: ${LOKI_BASIC_AUTH_PW}
      username: ${LOKI_BASIC_AUTH_USER}
    external_labels:
      cluster_name: ${CLUSTER}
    url: ${LOKI_URL}

Hope that helps.