Project: Grafana Mimir (Observability and Analysis / Observability)
File: requirements.md

aliases: ../../operators-guide/monitoring-grafana-mimir/requirements/ ../../operators-guide/visualizing-metrics/requirements/ ../../operators-guide/monitor-grafana-mimir/requirements/ description: Requirements for installing Grafana Mimir dashboards and alerts. menuTitle: About dashboards and alerts requirements title: About Grafana Mimir dashboards and alerts requirements weight: 10 Grafana Mimir dashboards and alerts require certain labels to exist on metrics scraped from Grafana Mimir. The `mimir-distributed` Helm chart provides metamonitoring support, which takes care of these labels. For more information about Helm chart metamonitoring, refer to . If you are using Helm chart metamonitoring, go to . If you are not, then continue reading. Your Prometheus or Grafana Agent must be configured to add these labels in order for the dashboards and alerts to function. The following table shows the required label names and whether they can be customized when . | Label name | Configurable? | Description | | :- | : | :- | | | `cluster` | Yes | The Kubernetes cluster or datacenter where the Mimir cluster is running. You can configure the cluster label via the `perclusterlabel` field in the mixin configuration. | | `namespace` | Yes | The Kubernetes namespace where the Mimir cluster is running. You can configure the namespace label via the `pernamespacelabel` field in the mixin configuration. | | | `job` | Yes | A prefix (by default `<namespace>/`) followed by the Mimir component. When running in monolithic mode, make sure that the `<component>` is `mimir`. When running in microservices mode, make sure that the `<component>` is the name of the specific Mimir component (singular), such as `distributor`, `ingester`, or `store-gateway`. Similarly, in read-write mode, make sure the `<component>` is either `mimir-read`, `mimir-write`, or `mimir-backend`. In the mixin configuration, you can configure the prefix via the `jobprefix` field, the label name via the `perjoblabel` field, and the regular expressions that are used to match components via the `jobnames` field. | | `pod` | Yes | The unique identifier of a Mimir replica, for example the Pod ID when running on Kubernetes. You can configure the instance label via the `perinstancelabel` field in the mixin configuration. | | `instance` | Yes | The unique identifier of the node or machine where the Mimir replica is running, for example the node when running on Kubernetes. You can configure the node label via the `pernodelabel` field in the mixin configuration. | For rules and alerts to function properly, you must configure your Prometheus or Grafana Agent to scrape metrics from Grafana Mimir at an interval of `15s` or shorter. By default, Grafana Mimir dashboards assume Mimir is deployed in containers orchestrated by Kubernetes. If you're running Mimir on baremetal, set the configuration field `deployment_type: 'baremetal'` and . A metric could be exposed by multiple Grafana Mimir components, or even different applications running in the same namespace. To provide accurate dashboards and alerts, the job label (by default `job`) selects a metric from specific

A job is a combination of a prefix and component. The default prefix is the Kubernetes namespace followed by a slash, for example `<namespace>/` in `<namespace>/ingester`. Pre-compiled dashboards and alerts are shipped with a default configuration. If you compile dashboards and alerts from source, you have the option to customize a) the label used for the job selection via the `perjoblabel` field, b) the prefix expected in the label value, which you can omit by setting it to `''` via the `jobprefix` field, and c) the regular expression used to select each Mimir component via the `jobnames` field in the mixin configuration. When running Grafana Mimir in monolithic mode and using the pre-compiled dashboards and alerts, the `job` label should be set to `<namespace>/mimir`. When running Grafana Mimir in microservices mode and using the pre-compiled dashboards and alerts, the `job` label should be set according to the following table. | Mimir service | Expected `job` label | | :-- | :- | | Distributor | `<namespace>/distributor` | | Ingester | `<namespace>/ingester` | | Querier | `<namespace>/querier` | | Ruler | `<namespace>/ruler` | | Query-frontend | `<namespace>/query-frontend` | | Query-scheduler | `<namespace>/query-scheduler` | | Store-gateway | `<namespace>/store-gateway` | | Compactor | `<namespace>/compactor` | When running Grafana Mimir in read-write mode and using the pre-compiled dashboards and alerts, set the `job` label accordingly: | Mimir service | Expected `job` label | | : | :-- | | Mimir Read | `<namespace>/mimir-read` | | Mimir Write | `<namespace>/mimir-write` | | Mimir Backend | `<namespace>/mimir-backend` | The Grafana Mimir dashboards displaying CPU, memory, disk, and network resources utilization require Prometheus metrics scraped from the following endpoints: exporter For more information about the kubelet metrics and cAdvisor metrics exported by the kubelet, refer to . Metrics from kubelet, kube-state-metrics, and cAdvisor must all have a `cluster` label with the same value as in the Mimir metrics. Metrics from Node Exporter and cAdvisor must all have an `instance` label on them that has the same value as the `instance` label on Mimir metrics. The Slow queries dashboard uses a Loki data source with the logs from Grafana Mimir to visualize slow queries. The query-frontend component logs query statistics when the `-query-frontend.query-stats-enabled` parameter is set to `true`. These logs need to have specific labels in order for the dashboard to work. | Label name | Configurable? | Description | | :- | : | :- | | `cluster` | Yes | The Kubernetes cluster or datacenter where the Mimir cluster is running. You can configure the cluster label via the `perclusterlabel` field in the mixin configuration. | | `namespace` | No | The Kubernetes namespace where the Mimir cluster is running. | | `name` | Yes | Name of the component. For example, `query-frontend`. You can configure the cluster label via the `percomponentloki_label` field in the mixin configuration. |