<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tutorials on Grafana Labs</title><link>https://grafana.com/docs/mimir/v2.3.x/tutorials/</link><description>Recent content in Tutorials on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/mimir/v2.3.x/tutorials/index.xml" rel="self" type="application/rss+xml"/><item><title>Play with Grafana Mimir</title><link>https://grafana.com/docs/mimir/v2.3.x/tutorials/play-with-grafana-mimir/</link><pubDate>Tue, 17 Mar 2026 11:20:23 +0000</pubDate><guid>https://grafana.com/docs/mimir/v2.3.x/tutorials/play-with-grafana-mimir/</guid><content><![CDATA[&lt;h1 id=&#34;play-with-grafana-mimir&#34;&gt;Play with Grafana Mimir&lt;/h1&gt;
&lt;p&gt;Grafana Mimir is a distributed, horizontally scalable, and highly available long term storage for &lt;a href=&#34;https://prometheus.io&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this tutorial, you&amp;rsquo;ll:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Run Grafana Mimir locally with Docker Compose&lt;/li&gt;
&lt;li&gt;Run Prometheus to scrape some metrics and remote write to Grafana Mimir&lt;/li&gt;
&lt;li&gt;Run Grafana to explore Grafana Mimir dashboards&lt;/li&gt;
&lt;li&gt;Configure a testing recording rule and alert in Grafana Mimir&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.docker.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Docker&lt;/a&gt; and &lt;a href=&#34;https://docs.docker.com/compose/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Docker Compose&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Availability of both ports &lt;code&gt;9000&lt;/code&gt; and &lt;code&gt;9009&lt;/code&gt; on your host machine&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;download-tutorial-configuration&#34;&gt;Download tutorial configuration&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Create a copy of the Grafana Mimir repository using the Git command line:

&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/mimir.git
cd mimir&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to the tutorial directory:

&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 docs/sources/tutorials/play-with-grafana-mimir/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: the instructions in this tutorial assume that your working directory is &lt;code&gt;docs/sources/tutorials/play-with-grafana-mimir/&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;start-grafana-mimir-and-dependencies&#34;&gt;Start Grafana Mimir and dependencies&lt;/h2&gt;
&lt;p&gt;Start running your local setup with the following Docker command:&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;docker-compose up -d&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This command starts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grafana Mimir
&lt;ul&gt;
&lt;li&gt;Three instances of monolithic-mode Mimir to provide high availability&lt;/li&gt;
&lt;li&gt;Multi-tenancy enabled (tenant ID is &lt;code&gt;demo&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://min.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Minio&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;S3-compatible persistent storage for blocks, rules, and alerts&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Prometheus
&lt;ul&gt;
&lt;li&gt;Scrapes Grafana Mimir metrics, then writes them back to Grafana Mimir to ensure availability of ingested metrics&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Grafana
&lt;ul&gt;
&lt;li&gt;Includes a preinstalled datasource to query Grafana Mimir&lt;/li&gt;
&lt;li&gt;Includes preinstalled dashboards for monitoring Grafana Mimir&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Load balancer
&lt;ul&gt;
&lt;li&gt;A simple NGINX-based load balancer that exposes Grafana Mimir endpoints on the host&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The diagram below illustrates the relationship between these components:
&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;tutorial-architecture.png&#34;
  alt=&#34;Architecture diagram for this Grafana Mimir tutorial&#34;/&gt;&lt;/p&gt;
&lt;p&gt;The following ports will be exposed on the host:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grafana on &lt;a href=&#34;http://localhost:9000&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;http://localhost:9000&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Grafana Mimir on &lt;a href=&#34;http://localhost:9009&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;http://localhost:9009&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To learn more about the Grafana Mimir configuration, you can review the configuration file &lt;code&gt;config/mimir.yaml&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;explore-grafana-mimir-dashboards&#34;&gt;Explore Grafana Mimir dashboards&lt;/h2&gt;
&lt;p&gt;Open Grafana on your local host &lt;a href=&#34;http://localhost:9000&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;http://localhost:9000&lt;/code&gt;&lt;/a&gt; and view dashboards showing the status
and health of your Grafana Mimir cluster. The dashboards query Grafana Mimir for the metrics they display.&lt;/p&gt;
&lt;p&gt;To start, we recommend looking at these dashboards:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://localhost:9000/d/8280707b8f16e7b87b840fc1cc92d4c5/mimir-writes&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Writes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://localhost:9000/d/e327503188913dc38ad571c647eef643/mimir-reads&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Reads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://localhost:9000/d/b3abe8d5c040395cc36615cb4334c92d/mimir-queries&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Queries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://localhost:9000/d/e1324ee2a434f4158c00a9ee279d3292/mimir-object-store&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Object Store&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A couple of caveats:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It typically takes a few minutes after Grafana Mimir starts to display meaningful metrics in the dashboards.&lt;/li&gt;
&lt;li&gt;Because this tutorial runs Grafana Mimir without any query-scheduler, or memcached, the related panels are expected to be empty.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The dashboards installed in the Grafana are taken from the Grafana Mimir mixin which packages up Grafana Labs&amp;rsquo; best practice dashboards, recording rules, and alerts for monitoring Grafana Mimir. To learn more about the mixin, check out the Grafana Mimir mixin documentation. To learn more about how Grafana is connecting to Grafana Mimir, review the &lt;a href=&#34;http://localhost:9000/datasources&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Mimir datasource&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;configure-your-first-recording-rule&#34;&gt;Configure your first recording rule&lt;/h2&gt;
&lt;p&gt;Recording rules allow you to precompute frequently needed or computationally expensive expressions and save their result
as a new set of time series. In this section you&amp;rsquo;re going to configure a recording rule in Grafana Mimir using tooling
offered by Grafana.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;a href=&#34;http://localhost:9000/alerting/list&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Alerting&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Click &amp;ldquo;New alert rule&amp;rdquo;, which also allows you to configure recording rules.&lt;/li&gt;
&lt;li&gt;Configure the recording rule:
&lt;ol&gt;
&lt;li&gt;Select &lt;code&gt;Mimir or Loki recording rule&lt;/code&gt; in the top selector.&lt;/li&gt;
&lt;li&gt;Choose &lt;code&gt;Mimir&lt;/code&gt; in the &amp;ldquo;Select data source&amp;rdquo; field.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;sum(up)&lt;/code&gt; in the &amp;ldquo;Metrics browser&amp;rdquo; query field.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;sum:up&lt;/code&gt; in the &amp;ldquo;Rule name&amp;rdquo; field.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;example-namespace&lt;/code&gt; in the &amp;ldquo;Namespace&amp;rdquo; field.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;example-group&lt;/code&gt; in the &amp;ldquo;Group&amp;rdquo; field.&lt;/li&gt;
&lt;li&gt;From the upper-right corner, click the &lt;strong&gt;Save and exit&lt;/strong&gt; button.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Your &lt;code&gt;sum:up&lt;/code&gt; recording rule will show the number of Mimir instances that are &lt;code&gt;up&lt;/code&gt;, meaning reachable to be scraped. The
rule is now being created in Grafana Mimir ruler and will be soon available for querying:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;a href=&#34;http://localhost:9000/explore?orgId=1&amp;amp;left=%7B%22datasource%22:%22Mimir%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22instant%22:true,%22range%22:true,%22exemplar%22:true,%22expr%22:%22sum:up%22%7D%5D,%22range%22:%7B%22from%22:%22now-1h%22,%22to%22:%22now%22%7D%7D&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Explore&lt;/a&gt;
and query the resulting series from the recording rule, which may require up to one minute to display after configuration:

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;sum:up&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Confirm the query returns a value of &lt;code&gt;3&lt;/code&gt; which is the number of Mimir instances currently running in your local setup.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;configure-your-first-alert-rule&#34;&gt;Configure your first alert rule&lt;/h2&gt;
&lt;p&gt;Alerting rules allow you to define alert conditions based on PromQL expressions and to send notifications about firing
alerts to Grafana Mimir Alertmanager. In this section you&amp;rsquo;re going to configure an alerting rule in Grafana Mimir using
tooling offered by Grafana.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;a href=&#34;http://localhost:9000/alerting/list&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Alerting&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Click to &amp;ldquo;New alert rule&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;Configure the alert rule:
&lt;ol&gt;
&lt;li&gt;Select &lt;code&gt;Mimir or Loki alert&lt;/code&gt; in the top selector.&lt;/li&gt;
&lt;li&gt;Choose &lt;code&gt;Mimir&lt;/code&gt; in the &amp;ldquo;Select data source&amp;rdquo; field.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;up == 0&lt;/code&gt; in the &amp;ldquo;Metrics browser&amp;rdquo; query field.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;MimirNotRunning&lt;/code&gt; in the &amp;ldquo;Rule name&amp;rdquo; field.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;example-namespace&lt;/code&gt; in the &amp;ldquo;Namespace&amp;rdquo; field.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;example-group&lt;/code&gt; in the &amp;ldquo;Group&amp;rdquo; field.&lt;/li&gt;
&lt;li&gt;From the upper-right corner, click the &lt;strong&gt;Save and exit&lt;/strong&gt; button.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Your &lt;code&gt;MimirNotRunning&lt;/code&gt; alert rule is now being created in Grafana Mimir ruler and is expected to fire when the number of
Grafana Mimir instances is less than three. You can check its status by opening the &lt;a href=&#34;http://localhost:9000/alerting/list&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Alerting&lt;/a&gt;
page and expanding the &amp;ldquo;example-namespace &amp;gt; example-group&amp;rdquo; row. The status should be &amp;ldquo;Normal&amp;rdquo; since all three instances are currently running.&lt;/p&gt;
&lt;p&gt;To see the alert firing we can introduce an outage in the Grafana Mimir cluster:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Abruptly terminate one of the three Grafana Mimir instances:

&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;docker-compose kill mimir-3&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Open &lt;a href=&#34;http://localhost:9000/alerting/list&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Alerting&lt;/a&gt; and check out the state of the alert &lt;code&gt;MimirNotRunning&lt;/code&gt;,
which should switch to &amp;ldquo;Pending&amp;rdquo; state in about one minute and to &amp;ldquo;Firing&amp;rdquo; state after another minute. &lt;em&gt;Note: since we abruptly
terminated a Mimir instance, Grafana Alerting UI may temporarily show an error when querying rules: the error will
auto resolve shortly, as soon as Grafana Mimir internal health checking detects the terminated instance as unhealthy.&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Grafana Mimir Alertmanager has not been configured yet to notify alerts through a notification channel. To configure the
Alertmanager you can open the &lt;a href=&#34;http://localhost:9000/alerting/notifications&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Contact points&lt;/a&gt; page in Grafana and
set your preferred notification channel. Note the email receiver doesn&amp;rsquo;t work in this example because there&amp;rsquo;s no
SMTP server running.&lt;/p&gt;
&lt;p&gt;Before adding back our terminated Mimir instance to resolve the alert, go into the Grafana Explore page and query your &lt;code&gt;sum:up&lt;/code&gt;
recording rule. You should see that value of &lt;code&gt;sum:up&lt;/code&gt; should have dropped to &lt;code&gt;2&lt;/code&gt;, now that one instance is down. You&amp;rsquo;ll also notice
that querying for this rule and all other metrics continues to work even though one instance is down. This demonstrates that highly
available Grafana Mimir setups like the three instance deployment in this demo are resilient to outages of individual nodes.&lt;/p&gt;
&lt;p&gt;To resolve the alert and recover from the outage, restart the Grafana Mimir instance that was abruptly terminated:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Start the Grafana Mimir instances:

&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;docker-compose start mimir-3&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Open &lt;a href=&#34;http://localhost:9000/alerting/list&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Alerting&lt;/a&gt; and check out the state of the alert &lt;code&gt;MimirNotRunning&lt;/code&gt;,
which should switch to &amp;ldquo;Normal&amp;rdquo; state in about one minute.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;In this tutorial you started Grafana Mimir locally in a high-available setup as well as a Prometheus instance that remote wrote
some metrics to Grafana Mimir. You then queried those metrics stored in Mimir using Grafana, and visualized them in some Grafana dashboards.
Lastly, you configured a recording rule and an alert via the Grafana Alerting UI and verified that the alert fired as expected when the condition was met.&lt;/p&gt;
&lt;p&gt;Once you&amp;rsquo;ve completed the tutorial, release all Docker resources by running this Docker command:&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;docker-compose down -v&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="play-with-grafana-mimir">Play with Grafana Mimir&lt;/h1>
&lt;p>Grafana Mimir is a distributed, horizontally scalable, and highly available long term storage for &lt;a href="https://prometheus.io" target="_blank" rel="noopener noreferrer">Prometheus&lt;/a>.&lt;/p>
&lt;p>In this tutorial, you&amp;rsquo;ll:&lt;/p>
&lt;ul>
&lt;li>Run Grafana Mimir locally with Docker Compose&lt;/li>
&lt;li>Run Prometheus to scrape some metrics and remote write to Grafana Mimir&lt;/li>
&lt;li>Run Grafana to explore Grafana Mimir dashboards&lt;/li>
&lt;li>Configure a testing recording rule and alert in Grafana Mimir&lt;/li>
&lt;/ul>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>Git&lt;/li>
&lt;li>&lt;a href="https://docs.docker.com/" target="_blank" rel="noopener noreferrer">Docker&lt;/a> and &lt;a href="https://docs.docker.com/compose/" target="_blank" rel="noopener noreferrer">Docker Compose&lt;/a>&lt;/li>
&lt;li>Availability of both ports &lt;code>9000&lt;/code> and &lt;code>9009&lt;/code> on your host machine&lt;/li>
&lt;/ul>
&lt;h2 id="download-tutorial-configuration">Download tutorial configuration&lt;/h2>
&lt;ol>
&lt;li>Create a copy of the Grafana Mimir repository using the Git command line:
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Bash&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-bash">git clone https://github.com/grafana/mimir.git
cd mimir&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;/li>
&lt;li>Navigate to the tutorial directory:
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Bash&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-bash">cd docs/sources/tutorials/play-with-grafana-mimir/&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Note&lt;/strong>: the instructions in this tutorial assume that your working directory is &lt;code>docs/sources/tutorials/play-with-grafana-mimir/&lt;/code>.&lt;/p></description></item></channel></rss>