Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
You can still use the dashboards and rules in the monitoring-mixin,
even if Mimir or GEM is not deployed via the Helm chart.
If you are not using the Helm chart, start by using the Agent configuration
from Collect metrics and logs via Grafana Agent.
You might need to modify it. For
more information, see dashboards and alerts requirements.
Service discovery
The Agent configuration relies on Kubernetes service discovery and Pod labels to constrain the collected metrics and
logs to ones that are strictly related to the Grafana Mimir deployment. If you are deploying Grafana Mimir on something other than Kubernetes,
then replace the kubernetes_sd_configs block with a block from
the Agent configuration that can discover the Mimir processes.
Collect metrics and logs via Grafana Agent
Set up a Grafana Agent that collects logs and metrics from Mimir or GEM. To set up Grafana Agent,
see Set up Grafana Agent. After your Agent is deployed, use the example Agent configuration to configure the Agent to scrape Mimir or GEM.
Caveats
Managing your own Agent comes with some caveats:
You will have to keep the Agent configuration up to date manually as you update the Mimir Helm chart. While we will
try to keep this article up to date, we cannot guarantee that
the example Agent configuration will always work.
The static configuration makes some assumptions about the naming of the chart, such as that you have not overridden
the fullnameOverride in the Helm chart.
The static configuration cannot be selective in the PersistentVolumes metrics it collects from Kubelet, so it will
scrape metrics for all PersistentVolumes.
The static configuration hardcodes the value of the cluster label on all metrics and logs. This means that the
configuration cannot account for multiple installations of the Helm chart.
If possible, upgrade the Mimir Helm chart to version 3.0 or higher and use
the built-in Grafana Agent operator. Using the Agent operator allows the
chart to automatically configure the Agent, eliminating the aforementioned caveats.
Example Agent configuration
In the following example Grafana Agent configuration file for collecting logs and metrics, replace url, password, and username in
the logs and metrics blocks with the details of your Prometheus and Loki clusters.