<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Loki meta-monitoring on Grafana Labs</title><link>https://grafana.com/docs/loki/v3.7.x/operations/meta-monitoring/</link><description>Recent content in Loki meta-monitoring on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/loki/v3.7.x/operations/meta-monitoring/index.xml" rel="self" type="application/rss+xml"/><item><title>Deploy Loki meta-monitoring</title><link>https://grafana.com/docs/loki/v3.7.x/operations/meta-monitoring/deploy/</link><pubDate>Thu, 09 Apr 2026 02:28:18 +0000</pubDate><guid>https://grafana.com/docs/loki/v3.7.x/operations/meta-monitoring/deploy/</guid><content><![CDATA[&lt;h1 id=&#34;deploy-loki-meta-monitoring&#34;&gt;Deploy Loki meta-monitoring&lt;/h1&gt;
&lt;p&gt;The primary method for collecting and monitoring a Loki cluster is to use the &lt;a href=&#34;https://github.com/grafana/k8s-monitoring-helm/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes Monitoring Helm&lt;/a&gt; chart. This chart provides a comprehensive monitoring solution for Kubernetes clusters and includes direct integrations for monitoring the full LGTM (Loki, Grafana, Tempo, and Mimir) stack. This procedure will walk you through deploying the Kubernetes Monitoring Helm chart to monitor your Loki cluster.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;We recommend running a production cluster of Loki in distributed mode using Kubernetes. This procedure assumes you have a running Kubernetes cluster and a running Loki deployment. There are other methods for deploying Loki, such as using Docker or VM installations. meta-monitoring is still possible when using these deployment methods but not covered in this procedure.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/kubectl/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;kubectl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Helm 3 or above. See &lt;a href=&#34;https://helm.sh/docs/intro/install/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Installing Helm&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A running Kubernetes cluster with a running Loki deployment.&lt;/li&gt;
&lt;li&gt;A Grafana Cloud account or a separate LGTM stack for monitoring.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;preparing-your-environment&#34;&gt;Preparing your environment&lt;/h2&gt;
&lt;p&gt;Before deploying the Kubernetes Monitoring Helm chart, you need to set up several components in your environment.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Add the Grafana Helm repository:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;helm repo add grafana https://grafana.github.io/helm-charts&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Update your Helm repositories:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;helm repo update&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a namespace for the monitoring stack:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;kubectl create namespace meta&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;authentication&#34;&gt;Authentication&lt;/h3&gt;
&lt;p&gt;The Kubernetes Monitoring Helm chart requires a Grafana Cloud account or a separate LGTM stack for monitoring. You will need to provide the necessary credentials to the Helm chart to authenticate with your Grafana Cloud account or LGTM stack. In this procedure, we will use Grafana Cloud as an example.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new Cloud Access Policy in Grafana Cloud.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Sign into &lt;a href=&#34;/auth/sign-in/&#34;&gt;Grafana Cloud&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;In the main menu, select &lt;strong&gt;Security &amp;gt; Access Policies&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create access policy&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Give the policy a &lt;strong&gt;Name&lt;/strong&gt; and select the following permissions:
&lt;ul&gt;
&lt;li&gt;Metrics: Write&lt;/li&gt;
&lt;li&gt;Logs: Write&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add Token&lt;/strong&gt;. Give the token a name and click &lt;strong&gt;Create&lt;/strong&gt;.
Save the token for later use.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Collect &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;username&lt;/code&gt; for Prometheus and Loki.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to the Grafana Cloud Portal &lt;strong&gt;Overview&lt;/strong&gt; page.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Details&lt;/strong&gt; button for your Prometheus instance.
&lt;ol&gt;
&lt;li&gt;From the &lt;strong&gt;Sending metrics using Grafana Alloy&lt;/strong&gt; section, collect the instance &lt;strong&gt;username&lt;/strong&gt; and &lt;strong&gt;url&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Navigate back to the &lt;strong&gt;Overview&lt;/strong&gt; page.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Details&lt;/strong&gt; button for your Loki instance.
&lt;ol&gt;
&lt;li&gt;From the &lt;strong&gt;Sending Logs to Grafana Cloud using Grafana Alloy&lt;/strong&gt; section, collect the instance &lt;strong&gt;username&lt;/strong&gt; and &lt;strong&gt;url&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Navigate back to the &lt;strong&gt;Overview&lt;/strong&gt; page.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the Kubernetes Secrets with the collected credentials from Grafana Cloud.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;kubectl create secret generic metrics -n meta \
 --from-literal=username=&amp;lt;PROMETHEUS-USER&amp;gt; \
 --from-literal=password=&amp;lt;CLOUD-TOKEN&amp;gt;

kubectl create secret generic logs -n meta \
 --from-literal=username=&amp;lt;LOKI-USER&amp;gt; \
 --from-literal=password=&amp;lt;CLOUD-TOKEN&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that the Kubernetes Monitoring Helm supports many different authentication methods based upon your requirements including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bearer Tokens&lt;/li&gt;
&lt;li&gt;OAuth2&lt;/li&gt;
&lt;li&gt;SigV4&lt;/li&gt;
&lt;li&gt;External Secrets&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For further information on how to configure these methods, see the &lt;a href=&#34;https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/docs/examples/auth&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes Monitoring Helm examples&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;deploy-the-kubernetes-monitoring-helm-chart&#34;&gt;Deploy the Kubernetes Monitoring Helm chart&lt;/h2&gt;
&lt;p&gt;Now that you have prepared your environment and collected the necessary credentials, you can deploy the Kubernetes Monitoring Helm chart to monitor your Loki cluster. To do this we need to copy a &lt;code&gt;values.yaml&lt;/code&gt; file to our local machine and modify it to include the necessary configuration.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;code&gt;values.yaml&lt;/code&gt; file from the Kubernetes Monitoring Helm chart repository:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;curl -O https://raw.githubusercontent.com/grafana/loki/main/production/helm/meta-monitoring/values.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open the &lt;code&gt;values.yaml&lt;/code&gt; file in a text editor of your choosing and add the Prometheus and Loki endpoints.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;destinations:
  - name: prometheus
    type: prometheus
    url: https://&amp;lt;PROMETHEUS-ENDPOINT&amp;gt;/api/prom/push
    auth:
      type: basic
      usernameKey: username
      passwordKey: password
    secret:
      create: false
      name: metrics
      namespace: meta

  - name: loki
    type: loki
    url: https://&amp;lt;LOKI-ENDPOINT&amp;gt;/loki/api/v1/push
    auth:
      type: basic
      usernameKey: username
      passwordKey: password
    secret:
      create: false
      name: logs
      namespace: meta&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;(Optional) Update the cluster name to a human-readable name to identify your cluster in Grafana Cloud.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;# Global Label to be added to all telemetry data. Should reflect a recognizable name for the cluster.
cluster:
  name: loki-meta-monitoring-cluster&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The default values file assumes that you have deployed Loki in the &lt;code&gt;loki&lt;/code&gt; namespace and will deploy the Kubernetes monitoring stack in the &lt;code&gt;meta&lt;/code&gt; namespace. If you have deployed Loki in a different namespace, you will need to update &lt;code&gt;namespaces&lt;/code&gt; in the &lt;code&gt;values.yaml&lt;/code&gt; file to match the namespace where Loki is deployed. Here is an example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;namespaces:
    - loki&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note if you would like to collect from all available namespaces, you can remove the &lt;code&gt;namespaces&lt;/code&gt; key from the &lt;code&gt;values.yaml&lt;/code&gt; file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deploy the Kubernetes Monitoring Helm chart using the modified &lt;code&gt;values.yaml&lt;/code&gt; file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;helm install meta-loki grafana/k8s-monitoring \
 --namespace meta \
 -f values.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify that the Kubernetes Monitoring Helm chart has been deployed successfully:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt; kubectl get pods -n meta&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You should see a list of pods running in the &lt;code&gt;meta&lt;/code&gt; namespace.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;console&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-console&#34;&gt;NAME                                           READY   STATUS    RESTARTS ...        
meta-loki-alloy-singleton-6d7f8d8b86-sg4wx     2/2     Running   0        ...       
meta-loki-kube-state-metrics-64bdcfcbd-5snqz   1/1     Running   0        ...       
meta-loki-node-exporter-855l5                  1/1     Running   0        ...       
meta-loki-node-exporter-b976b                  1/1     Running   0        ...       
meta-loki-node-exporter-vsm4s                  1/1     Running   0        ...&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next Steps&lt;/h2&gt;
&lt;p&gt;You have successfully deployed the Kubernetes Monitoring Helm chart to monitor your Loki cluster. You can now move onto the next step of deploying the Loki mixin to visualize the metrics and logs from your Loki cluster. For more information, see 
    &lt;a href=&#34;/docs/loki/v3.7.x/operations/meta-monitoring/mixins/&#34;&gt;Install the Loki Mixin&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="deploy-loki-meta-monitoring">Deploy Loki meta-monitoring&lt;/h1>
&lt;p>The primary method for collecting and monitoring a Loki cluster is to use the &lt;a href="https://github.com/grafana/k8s-monitoring-helm/" target="_blank" rel="noopener noreferrer">Kubernetes Monitoring Helm&lt;/a> chart. This chart provides a comprehensive monitoring solution for Kubernetes clusters and includes direct integrations for monitoring the full LGTM (Loki, Grafana, Tempo, and Mimir) stack. This procedure will walk you through deploying the Kubernetes Monitoring Helm chart to monitor your Loki cluster.&lt;/p></description></item><item><title>Install dashboards, alerts, and recording rules</title><link>https://grafana.com/docs/loki/v3.7.x/operations/meta-monitoring/mixins/</link><pubDate>Thu, 09 Apr 2026 02:28:18 +0000</pubDate><guid>https://grafana.com/docs/loki/v3.7.x/operations/meta-monitoring/mixins/</guid><content><![CDATA[&lt;h1 id=&#34;install-dashboards-alerts-and-recording-rules&#34;&gt;Install dashboards, alerts, and recording rules&lt;/h1&gt;
&lt;p&gt;Loki is instrumented to expose metrics about itself via the &lt;code&gt;/metrics&lt;/code&gt; endpoint, designed to be scraped by Prometheus. Each Loki release includes a mixin. The Loki mixin provides a set of Grafana dashboards, Prometheus recording rules and alerts for monitoring Loki.&lt;/p&gt;
&lt;p&gt;To set up monitoring using the mixin, you need to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Deploy the Kubernetes Monitoring Helm chart. Follow the instructions in the &lt;a href=&#34;/docs/loki/latest/operations/meta-monitoring/deploy/&#34;&gt;Deploy Loki Meta-monitoring&lt;/a&gt; documentation.&lt;/li&gt;
&lt;li&gt;Be actively storing metrics from your Loki cluster in Grafana Cloud or a separate LGTM stack.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This procedure assumes that you have set up Loki using the Helm chart.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Be sure to update the commands and configuration to match your own deployment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;install-loki-dashboards-in-grafana&#34;&gt;Install Loki dashboards in Grafana&lt;/h2&gt;
&lt;p&gt;After Loki metrics are scraped by the Kubernetes Monitoring Helm chart and stored in a Prometheus compatible time-series database, you can monitor Loki’s operation using the Loki mixin.&lt;/p&gt;
&lt;p&gt;Each Loki release includes a mixin that includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Relevant dashboards for overseeing the health of Loki as a whole, as well as its individual Loki components&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/docs/loki/latest/alert/#recording-rules&#34;&gt;Recording rules&lt;/a&gt; that compute metrics that are used in the dashboards&lt;/li&gt;
&lt;li&gt;Alerts that trigger when Loki generates metrics that are outside of normal parameters&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To install the mixins in Grafana and Mimir, the general steps are as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the mixin dashboards from the Loki repository.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the dashboards in your Grafana instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Upload &lt;code&gt;alerts.yaml&lt;/code&gt; and &lt;code&gt;rules.yaml&lt;/code&gt; files to Prometheus or Mimir with &lt;code&gt;mimirtool&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;download-the-loki-mixin-dashboards&#34;&gt;Download the &lt;code&gt;loki-mixin&lt;/code&gt; dashboards&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First, clone the Loki repository from Github:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;git clone https://github.com/grafana/loki
cd loki&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you have a local copy of the repository, navigate to the &lt;code&gt;production/loki-mixin-compiled&lt;/code&gt; directory.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;cd production/loki-mixin-compiled&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This directory contains a compiled version of the alert and recording rules, as well as the dashboards.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If you want to change any of the mixins, make your updates in the &lt;code&gt;production/loki-mixin&lt;/code&gt; directory.
Use the instructions in the &lt;a href=&#34;https://github.com/grafana/loki/tree/main/production/loki-mixin&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;README&lt;/a&gt; in that directory to regenerate the files.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;import-the-dashboards-to-grafana&#34;&gt;Import the dashboards to Grafana&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;dashboards&lt;/code&gt; directory includes the monitoring dashboards that can be installed into your Grafana instance.
Refer to &lt;a href=&#34;/docs/grafana/latest/dashboards/build-dashboards/import-dashboards/&#34;&gt;Import a dashboard&lt;/a&gt; in the Grafana documentation.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-tip&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Tip&lt;/p&gt;&lt;p&gt;Install all dashboards.
You can only import one dashboard at a time.
Create a new folder in the Dashboards area, for example “Loki Monitoring”, as an easy location to save the imported dashboards.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;To create a folder:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open your Grafana instance and select &lt;strong&gt;Dashboards&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;New&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;New folder&lt;/strong&gt; from the &lt;strong&gt;New&lt;/strong&gt; menu.&lt;/li&gt;
&lt;li&gt;Name your folder, for example, “Loki Monitoring”.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To import a dashboard:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open your Grafana instance and select &lt;strong&gt;Dashboards&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;New&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Import&lt;/strong&gt; from the &lt;strong&gt;New&lt;/strong&gt; menu.&lt;/li&gt;
&lt;li&gt;On the &lt;strong&gt;Import dashboard&lt;/strong&gt; screen, select &lt;strong&gt;Upload dashboard JSON file.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Browse to &lt;code&gt;production/loki-mixin-compiled/dashboards&lt;/code&gt; and select the dashboard to import. Or, drag the dashboard file, for example, &lt;code&gt;loki-operational.json&lt;/code&gt;, onto the &lt;strong&gt;Upload&lt;/strong&gt; area of the &lt;strong&gt;Import dashboard&lt;/strong&gt; screen.&lt;/li&gt;
&lt;li&gt;Select a folder in the &lt;strong&gt;Folder&lt;/strong&gt; menu where you want to save the imported dashboard. For example, select &amp;ldquo;Loki Monitoring&amp;rdquo; created in the earlier steps.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Import&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The imported files are listed in the Loki Monitoring dashboard folder.&lt;/p&gt;
&lt;p&gt;To view the dashboards in Grafana:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select &lt;strong&gt;Dashboards&lt;/strong&gt; in your Grafana instance.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Loki Monitoring&lt;/strong&gt;, or the folder where you uploaded the imported dashboards.&lt;/li&gt;
&lt;li&gt;Select any file in the folder to view the dashboard.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;add-alerts-and-recording-rules-to-prometheus-or-mimir&#34;&gt;Add alerts and recording rules to Prometheus or Mimir&lt;/h3&gt;
&lt;p&gt;The rules and alerts need to be installed into a Prometheus instance, Mimir or a Grafana Enterprise Metrics cluster.&lt;/p&gt;
&lt;p&gt;You can find the YAML files for alerts and rules in the following directories in the Loki repo:&lt;/p&gt;
&lt;p&gt;For microservices mode:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;production/loki-mixin-compiled/alerts.yaml&lt;/code&gt; (Optional)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;production/loki-mixin-compiled/rules.yaml&lt;/code&gt; (Required)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You use &lt;code&gt;mimirtool&lt;/code&gt; to load the mixin alerts and rules definitions into a Prometheus instance, Mimir, or a Grafana Enterprise Metrics cluster. The following examples show how to load the mixin alerts and rules into a Grafana Cloud instance.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download &lt;a href=&#34;https://github.com/grafana/mimir/releases&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mimirtool&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Export the authentication credentials for connecting to your Grafana Cloud Mimir instance.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;export MIMIR_ADDRESS=&amp;lt;CLOUD-MIMIR-URL&amp;gt;
export MIMIR_API_USER=&amp;lt;CLOUD-MIMIR-USER&amp;gt;
export MIMIR_API_KEY=&amp;lt;CLOUD-MIMIR-API-KEY&amp;gt;
export MIMIR_TENANT_ID=&amp;lt;CLOUD-MIMIR-USER&amp;gt; # Same as MIMIR_API_USER when using Grafana Cloud&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The best place to locate these credentials is to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Sign into &lt;a href=&#34;/auth/sign-in/&#34;&gt;Grafana Cloud&lt;/a&gt; and create a new access policy.
&lt;ol&gt;
&lt;li&gt;In the main menu, select &lt;strong&gt;Security &amp;gt; Access Policies&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create access policy&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Give the policy a &lt;strong&gt;Name&lt;/strong&gt; and select the following permissions:
&lt;ul&gt;
&lt;li&gt;Alerts: Write &amp;amp; Read&lt;/li&gt;
&lt;li&gt;Rules: Write &amp;amp; Read&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add Token&lt;/strong&gt;. Give the token a name and click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Collect &lt;code&gt;URL&lt;/code&gt; and &lt;code&gt;user&lt;/code&gt; for Prometheus
&lt;ol&gt;
&lt;li&gt;Navigate to the Grafana Cloud Portal &lt;strong&gt;Overview&lt;/strong&gt; page.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Details&lt;/strong&gt; button for your Alerts instance.&lt;/li&gt;
&lt;li&gt;From the &lt;strong&gt;Configuring your Alerting Stacks&lt;/strong&gt; section, collect the instance &lt;strong&gt;User&lt;/strong&gt; and &lt;strong&gt;URL&lt;/strong&gt; for &lt;strong&gt;Metrics Authentication Settings&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using the same terminal we exported the Mimir environment variables into earlier, run the following command to load the recording rules:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;mimirtool rules load rules.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;(Optional) Load the alert rules:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;mimirtool rules load alerts.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Refer to the &lt;a href=&#34;/docs/mimir/latest/manage/tools/mimirtool/&#34;&gt;mimirtool&lt;/a&gt; documentation for more information.&lt;/p&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;
&lt;p&gt;After you have installed the Loki mixin dashboards, alerts, and recording rules, you can now monitor your production Loki cluster using Grafana. Make sure you review the mixins when you upgrade Loki to make sure you are using the latest version of the mixin.&lt;/p&gt;
&lt;p&gt;You can now move onto:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Send Logs:&lt;/strong&gt; Ready to start sending your own logs to Loki, there a several methods you can use. For more information, refer to 
    &lt;a href=&#34;/docs/loki/v3.7.x/send-data/&#34;&gt;send data&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Query Logs:&lt;/strong&gt; LogQL is an extensive query language for logs and contains many tools to improve log retrival and generate insights. For more information see the 
    &lt;a href=&#34;/docs/loki/v3.7.x/query/&#34;&gt;Query section&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Alert:&lt;/strong&gt; Lastly you can use the ruler component of Loki to create alerts based on log queries. For more information refer to 
    &lt;a href=&#34;/docs/loki/v3.7.x/alert/&#34;&gt;Alerting&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="install-dashboards-alerts-and-recording-rules">Install dashboards, alerts, and recording rules&lt;/h1>
&lt;p>Loki is instrumented to expose metrics about itself via the &lt;code>/metrics&lt;/code> endpoint, designed to be scraped by Prometheus. Each Loki release includes a mixin. The Loki mixin provides a set of Grafana dashboards, Prometheus recording rules and alerts for monitoring Loki.&lt;/p></description></item><item><title>Single binary meta-monitoring</title><link>https://grafana.com/docs/loki/v3.7.x/operations/meta-monitoring/single-binary/</link><pubDate>Thu, 09 Apr 2026 02:28:18 +0000</pubDate><guid>https://grafana.com/docs/loki/v3.7.x/operations/meta-monitoring/single-binary/</guid><content><![CDATA[&lt;h1 id=&#34;single-binary-meta-monitoring&#34;&gt;Single binary meta-monitoring&lt;/h1&gt;
&lt;p&gt;Meta monitoring for 
    &lt;a href=&#34;/docs/loki/v3.7.x/get-started/deployment-modes/#monolithic-mode&#34;&gt;monolithic mode&lt;/a&gt; deployments involves some additional configuration. This approach does not use the Kubernetes Monitoring Helm chart.&lt;/p&gt;
&lt;h2 id=&#34;metrics&#34;&gt;Metrics&lt;/h2&gt;
&lt;p&gt;Configure Alloy or Prometheus to scrape the Loki metrics endpoint, adding the additional labels that are expected by the 
    &lt;a href=&#34;/docs/loki/v3.7.x/operations/meta-monitoring/mixins/&#34;&gt;mixin&lt;/a&gt; dashboards, alerts, and recording rules:&lt;/p&gt;
&lt;h3 id=&#34;alloy&#34;&gt;Alloy&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.scrape &amp;#34;loki&amp;#34; {
  targets = [{
    __address__ = &amp;#34;localhost:3100&amp;#34;,
    cluster     = &amp;#34;prod&amp;#34;,
    namespace   = &amp;#34;default&amp;#34;,
    job         = &amp;#34;default/loki-single-binary&amp;#34;,
    pod         = &amp;#34;loki-single-binary&amp;#34;,
    container   = &amp;#34;loki&amp;#34;,
  }]
  forward_to = [prometheus.remote_write.default.receiver]
}

prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {  
    url = &amp;#34;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&amp;#34;
  }  
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;prometheus&#34;&gt;Prometheus&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;scrape_configs:
  - job_name: loki
    static_configs:
      - targets: [&amp;#39;localhost:3100&amp;#39;]
        labels:
          cluster: prod
          namespace: default
          job: default/loki-single-binary
          pod: loki-single-binary
          container: loki&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;mixins&#34;&gt;Mixins&lt;/h2&gt;
&lt;p&gt;To generate the 
    &lt;a href=&#34;/docs/loki/v3.7.x/operations/meta-monitoring/mixins/&#34;&gt;mixins&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install &lt;a href=&#34;https://github.com/jsonnet-bundler/jsonnet-bundler&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;jb&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install &lt;a href=&#34;https://github.com/monitoring-mixins/mixtool&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mixtool&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Clone the Loki repository from Github.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;git clone https://github.com/grafana/loki
cd loki&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the output directory.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;mkdir loki/production/loki-mixin-compiled-single-binary&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to the mixin directory.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;cd loki/production/loki-mixin&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use &lt;code&gt;jb&lt;/code&gt; to install mixin dependencies and generate the &lt;code&gt;vender&lt;/code&gt; directory.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;jb install&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the mixin configuration file &lt;code&gt;single-binary.libsonnet&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;cat &amp;lt;&amp;lt;EOF &amp;gt; single-binary.libsonnet
local loki = import &amp;#39;mixin.libsonnet&amp;#39;;

loki &amp;#43; {
  _config&amp;#43;:: {
    meta_monitoring: {
      enabled: true,
    },
    canary&amp;#43;: {
      // Whether or not to include the loki-canary dashboard
      enabled: true
    },
    promtail: {
      // Whether or not to include promtail specific dashboards
      enabled: false,
    },
    // Tunes histogram recording rules to aggregate over this interval.
    // Set to at least twice the scrape interval; otherwise, recording rules will output no data.
    // Set to four times the scrape interval to account for edge cases: https://www.robustperception.io/what-range-should-i-use-with-rate/        
    recording_rules_range_interval: &amp;#39;5m&amp;#39;
  }  
}
EOF&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Generate dashboards, alerts, and recording rules.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;mixtool generate all \
  --output-alerts ../loki-mixin-compiled-single/alerts.yaml \
  --output-rules ../loki-mixin-compiled-single/rules.yaml \
  --directory ../loki-mixin-compiled-single/dashboards \
  single-binary.libsonnet&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;See the generated dashboards, alerts, and recording rules in the &lt;code&gt;loki/production/loki-mixin-compiled-single-binary&lt;/code&gt; directory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Follow the instructions in the 
    &lt;a href=&#34;/docs/loki/v3.7.x/operations/meta-monitoring/mixins/&#34;&gt;Install Mixins&lt;/a&gt; documentation to set up the dashboards, alerts, and recordings.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="single-binary-meta-monitoring">Single binary meta-monitoring&lt;/h1>
&lt;p>Meta monitoring for
&lt;a href="/docs/loki/v3.7.x/get-started/deployment-modes/#monolithic-mode">monolithic mode&lt;/a> deployments involves some additional configuration. This approach does not use the Kubernetes Monitoring Helm chart.&lt;/p>
&lt;h2 id="metrics">Metrics&lt;/h2>
&lt;p>Configure Alloy or Prometheus to scrape the Loki metrics endpoint, adding the additional labels that are expected by the
&lt;a href="/docs/loki/v3.7.x/operations/meta-monitoring/mixins/">mixin&lt;/a> dashboards, alerts, and recording rules:&lt;/p></description></item><item><title>Key metrics for monitoring Loki</title><link>https://grafana.com/docs/loki/v3.7.x/operations/meta-monitoring/metrics/</link><pubDate>Thu, 09 Apr 2026 02:28:18 +0000</pubDate><guid>https://grafana.com/docs/loki/v3.7.x/operations/meta-monitoring/metrics/</guid><content><![CDATA[&lt;h1 id=&#34;key-metrics-for-monitoring-loki&#34;&gt;Key metrics for monitoring Loki&lt;/h1&gt;
&lt;p&gt;Loki exposes many metrics, and each component behaves differently under load. This page focuses on the highest-signal metrics for detecting negative trends early.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The example queries on this page are PromQL. Run them against the Prometheus-compatible data source where your Loki metrics are stored (for example, Prometheus, Mimir, or Grafana Cloud Metrics).&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;For setup and prebuilt dashboards and alerts, refer to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/loki/v3.7.x/operations/meta-monitoring/deploy/&#34;&gt;Deploy Loki meta-monitoring&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/loki/v3.7.x/operations/meta-monitoring/mixins/&#34;&gt;Install dashboards, alerts, and recording rules&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;request-error-rate&#34;&gt;Request error rate&lt;/h2&gt;
&lt;p&gt;Watch request failures first. A sustained increase in 5xx responses is usually the earliest sign of user-visible impact.&lt;/p&gt;
&lt;p&gt;Key metric:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_request_duration_seconds_count&lt;/code&gt; (counter with labels including &lt;code&gt;status_code&lt;/code&gt;, &lt;code&gt;job&lt;/code&gt;, and &lt;code&gt;route&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;100 * sum(rate(loki_request_duration_seconds_count{status_code=~&amp;#34;5..&amp;#34;}[2m])) by (cluster, namespace, job, route)
/
sum(rate(loki_request_duration_seconds_count[2m])) by (cluster, namespace, job, route)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Any sustained increase in 5xx ratio.&lt;/li&gt;
&lt;li&gt;The Loki mixin alert &lt;code&gt;LokiRequestErrors&lt;/code&gt; fires when this ratio is greater than 10% for 15 minutes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;request-latency-p99&#34;&gt;Request latency (p99)&lt;/h2&gt;
&lt;p&gt;Latency degradation can appear before hard failures. Track p99 for read and write routes.&lt;/p&gt;
&lt;p&gt;Key metric:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_request_duration_seconds_bucket&lt;/code&gt; (histogram buckets)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, cluster, namespace, job, route))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rising p99 over time, especially in query-frontend and distributor paths.&lt;/li&gt;
&lt;li&gt;The Loki mixin alert &lt;code&gt;LokiRequestLatency&lt;/code&gt; fires when p99 exceeds 1 second for 15 minutes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;panics&#34;&gt;Panics&lt;/h2&gt;
&lt;p&gt;Panics are high-severity faults and should stay at zero.&lt;/p&gt;
&lt;p&gt;Key metric:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_panic_total&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;sum(increase(loki_panic_total[10m])) by (cluster, namespace, job)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Any value above zero. The Loki mixin alert &lt;code&gt;LokiRequestPanics&lt;/code&gt; treats this as critical.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;discarded-samples&#34;&gt;Discarded samples&lt;/h2&gt;
&lt;p&gt;Discarded samples indicate data that Loki rejected or dropped. This is one of the most important ingestion-quality signals.&lt;/p&gt;
&lt;p&gt;Key metric:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_discarded_samples_total&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;topk(10, sum by (tenant, reason) (rate(loki_discarded_samples_total{cluster=&amp;#34;$cluster&amp;#34;, namespace=&amp;#34;$namespace&amp;#34;}[$__rate_interval])))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Increasing discard rate.&lt;/li&gt;
&lt;li&gt;New or growing &lt;code&gt;reason&lt;/code&gt; values (for example, tenant limits or stream limits).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;compaction-health&#34;&gt;Compaction health&lt;/h2&gt;
&lt;p&gt;Compaction issues can silently degrade read performance and retention behavior over time.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The compaction and retention metrics use a &lt;code&gt;loki_boltdb_shipper_&lt;/code&gt; prefix for historical reasons. The compactor emits these metrics regardless of which index type you use, including TSDB.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Key metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_boltdb_shipper_compactor_running&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_boltdb_shipper_compact_tables_operation_last_successful_run_timestamp_seconds&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_boltdb_shipper_compact_tables_operation_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_boltdb_shipper_compact_tables_operation_duration_seconds&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example queries:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;sum(loki_boltdb_shipper_compactor_running) by (cluster, namespace)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;time() - (loki_boltdb_shipper_compact_tables_operation_last_successful_run_timestamp_seconds &amp;gt; 0)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More than one compactor running.&lt;/li&gt;
&lt;li&gt;No successful compaction for multiple hours (the mixin alert threshold is 3 hours).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;ingester-health-and-flush-behavior&#34;&gt;Ingester health and flush behavior&lt;/h2&gt;
&lt;p&gt;Ingester pressure often appears as memory growth, poor chunk utilization, or flush backlog.&lt;/p&gt;
&lt;p&gt;Key metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_ingester_memory_streams&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_ingester_memory_chunks&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_ingester_flush_queue_length&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_ingester_chunk_utilization&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_ingester_chunks_flushed_total&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example queries:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;sum(loki_ingester_memory_streams{cluster=&amp;#34;$cluster&amp;#34;, namespace=&amp;#34;$namespace&amp;#34;})&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;sum(loki_ingester_flush_queue_length{cluster=&amp;#34;$cluster&amp;#34;, namespace=&amp;#34;$namespace&amp;#34;})&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Persistent growth in in-memory streams or chunks.&lt;/li&gt;
&lt;li&gt;Increasing flush queue length.&lt;/li&gt;
&lt;li&gt;Low chunk utilization for long periods.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;distributor-throughput&#34;&gt;Distributor throughput&lt;/h2&gt;
&lt;p&gt;Throughput changes help identify upstream sender issues, sudden traffic shifts, or ingestion bottlenecks.&lt;/p&gt;
&lt;p&gt;Key metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_distributor_bytes_received_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_distributor_lines_received_total&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example queries:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;sum(rate(loki_distributor_bytes_received_total{cluster=&amp;#34;$cluster&amp;#34;, namespace=&amp;#34;$namespace&amp;#34;}[$__rate_interval]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;sum(rate(loki_distributor_lines_received_total{cluster=&amp;#34;$cluster&amp;#34;, namespace=&amp;#34;$namespace&amp;#34;}[$__rate_interval]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sharp drops (possible data path interruption).&lt;/li&gt;
&lt;li&gt;Unexpected spikes (possible overload or noisy tenants).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;object-store-operations&#34;&gt;Object store operations&lt;/h2&gt;
&lt;p&gt;Object store latency and failures directly impact query and retention workflows.&lt;/p&gt;
&lt;p&gt;Key metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_objstore_bucket_operations_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_objstore_bucket_operation_failures_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_objstore_bucket_operation_duration_seconds&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example queries:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;sum by (operation) (rate(loki_objstore_bucket_operation_failures_total{cluster=&amp;#34;$cluster&amp;#34;, namespace=&amp;#34;$namespace&amp;#34;}[$__rate_interval]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;histogram_quantile(0.99, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{cluster=&amp;#34;$cluster&amp;#34;, namespace=&amp;#34;$namespace&amp;#34;}[$__rate_interval])) by (le, operation))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Growing failure rates by operation.&lt;/li&gt;
&lt;li&gt;Increasing p99 latency for &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;get_range&lt;/code&gt;, or &lt;code&gt;upload&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;resource-and-runtime-health&#34;&gt;Resource and runtime health&lt;/h2&gt;
&lt;p&gt;Resource pressure can explain or predict service degradation before alert thresholds are crossed.&lt;/p&gt;
&lt;p&gt;Common signals to track:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Container CPU usage&lt;/li&gt;
&lt;li&gt;Container memory working set&lt;/li&gt;
&lt;li&gt;Go heap in use&lt;/li&gt;
&lt;li&gt;Disk read and write rates&lt;/li&gt;
&lt;li&gt;Container restarts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Repeated restart spikes.&lt;/li&gt;
&lt;li&gt;Sustained CPU saturation.&lt;/li&gt;
&lt;li&gt;Memory growth without recovery.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;loki-canary-end-to-end-data-verification&#34;&gt;Loki Canary (end-to-end data verification)&lt;/h2&gt;
&lt;p&gt;If you run Loki Canary, use it as an end-to-end correctness signal, not only a performance signal.&lt;/p&gt;
&lt;p&gt;Key metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_canary_missing_entries_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_canary_spot_check_missing_entries_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_canary_response_latency_seconds_bucket&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;sum(increase(loki_canary_missing_entries_total{cluster=~&amp;#34;$cluster&amp;#34;, namespace=~&amp;#34;$namespace&amp;#34;}[$__range]))
/
sum(increase(loki_canary_entries_total{cluster=~&amp;#34;$cluster&amp;#34;, namespace=~&amp;#34;$namespace&amp;#34;}[$__range]))
* 100&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Any non-zero missing rate sustained over time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;internal-error-log-rate&#34;&gt;Internal error log rate&lt;/h2&gt;
&lt;p&gt;Internal logs provide fast context when metrics indicate degradation.&lt;/p&gt;
&lt;p&gt;Key metric:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_internal_log_messages_total&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use this metric with component logs to correlate where failures begin.&lt;/p&gt;
&lt;h2 id=&#34;retention-and-sweeper-progress&#34;&gt;Retention and sweeper progress&lt;/h2&gt;
&lt;p&gt;Retention and sweeper lag can cause storage growth and delayed data lifecycle actions.&lt;/p&gt;
&lt;p&gt;Key metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_compactor_apply_retention_last_successful_run_timestamp_seconds&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_boltdb_shipper_retention_sweeper_marker_file_processing_current_time&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;promql&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;time() - (loki_boltdb_shipper_retention_sweeper_marker_file_processing_current_time{cluster=&amp;#34;$cluster&amp;#34;, namespace=&amp;#34;$namespace&amp;#34;} &amp;gt; 0)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Abnormal behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Increasing sweeper lag.&lt;/li&gt;
&lt;li&gt;Falling delete throughput or sustained delete failures.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Install and keep the latest Loki mixin dashboards and alerts.&lt;/li&gt;
&lt;li&gt;Build component-specific alerts on top of these baseline signals.&lt;/li&gt;
&lt;li&gt;Pair metrics with Loki component logs, including &lt;code&gt;metrics.go&lt;/code&gt;, during incident response.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="key-metrics-for-monitoring-loki">Key metrics for monitoring Loki&lt;/h1>
&lt;p>Loki exposes many metrics, and each component behaves differently under load. This page focuses on the highest-signal metrics for detecting negative trends early.&lt;/p></description></item></channel></rss>