...

Text file src/github.com/linkerd/linkerd2/grafana/README.md

Documentation: github.com/linkerd/linkerd2/grafana

     1# Using Grafana with Linkerd
     2
     3You can install Grafana in various ways, like using the [Grafana official Helm
     4chart](https://github.com/grafana/helm-charts/tree/main/charts/grafana), or the
     5[Grafana Operator](https://github.com/grafana-operator/grafana-operator). Hosted
     6solutions are also available, like [Grafana
     7Cloud](https://grafana.com/products/cloud/).
     8
     9The file `grafana/values.yaml` provides a default Helm config for the [Grafana
    10official Helm
    11chart](https://github.com/grafana/helm-charts/tree/main/charts/grafana), which
    12pulls the Linkerd dashboards published at
    13<https://grafana.com/orgs/linkerd/dashboards>.
    14
    15You can install the chart like this:
    16
    17```shell
    18helm repo add grafana https://grafana.github.io/helm-charts
    19helm install grafana -n grafana --create-namespace grafana/grafana \
    20  -f https://raw.githubusercontent.com/linkerd/linkerd2/main/grafana/values.yaml
    21```
    22
    23Please make sure to update the entries in `grafana/values.yaml` before using the
    24file; in particular:
    25
    26- auth and log settings under `grafana.ini`
    27- `datasources.datasources.yaml.datasources[0].url` should point to your
    28  Prometheus service
    29
    30The other installation methods can easily import those same dashboards using
    31their IDs, as listed in `grafana/values.yaml`.
    32
    33In order to have the Linkerd Viz Dashboard show the Grafana icon there where
    34relevant, and have it link to the appropriate Grafana dashboard, make sure you
    35have a proper location set up in the `grafana.url` setting in Linkerd Viz's
    36`values.yaml`.
    37
    38## Granting access
    39
    40As of linkerd `stable-2.13.0` (or `edge-23.1.1`), the access to Linkerd Viz'
    41Prometheus instance has been restricted through the `prometheus-admin`
    42AuthorizationPolicy, granting access only to the `metrics-api` ServiceAccount.
    43In order to grant access to Grafana, you need to add an AuthorizationPolicy
    44pointing to its ServiceAccount. You can apply
    45[authzpolicy-grafana.yaml](grafana/authzpolicy-grafana.yaml) which grants
    46permission for the `grafana` ServiceAccount.
    47
    48## Note to developers
    49
    50The `grafana/dashboards` directory contains the same dashboard definitions
    51published under <https://grafana.com/orgs/linkerd>. Please keep them in sync when
    52making any changes. After logging into grafana.com (using the linkerd account),
    53the dashboards can be managed under Org Settings -> My Dashboards.

View as plain text