<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Monitor on Grafana Labs</title><link>https://grafana.com/docs/enterprise-metrics/v2.16.x/manage/monitor/</link><description>Recent content in Monitor on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/enterprise-metrics/v2.16.x/manage/monitor/index.xml" rel="self" type="application/rss+xml"/><item><title>Monitor GEM using Grafana Cloud</title><link>https://grafana.com/docs/enterprise-metrics/v2.16.x/manage/monitor/metamonitoring/</link><pubDate>Thu, 01 May 2025 09:53:19 +0000</pubDate><guid>https://grafana.com/docs/enterprise-metrics/v2.16.x/manage/monitor/metamonitoring/</guid><content><![CDATA[&lt;h1 id=&#34;monitor-gem-using-grafana-cloud&#34;&gt;Monitor GEM using Grafana Cloud&lt;/h1&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;Monitoring with Grafana Cloud is required for all GEM installations.
Refer to 
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/monitor-system-health/&#34;&gt;Monitor the health of your system&lt;/a&gt; for more information.
Professional services will assist you in configuring monitoring for your GEM installation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div data-shared=&#34;gex-metamonitoring.md&#34;&gt;
            &lt;!-- # Metamonitoring using Grafana Cloud --&gt;
&lt;p&gt;Grafana Labs champions the value of observability for your software applications and infrastructure.
This extends to the Database solutions offered as part of the Grafana Enterprise Stack: namely Grafana Enterprise Metrics, Logs, and Traces.
Successful operation of these databases requires comprehensive monitoring and alerting.
This allows the teams managing these Databases to swiftly identify issues and diagnose their root causes.
Grafana Labs itself maintains robust observability for the Grafana Enterprise Metrics, Logs, and Traces Databases it operates to power &lt;a href=&#34;/products/cloud/&#34;&gt;Grafana Cloud&lt;/a&gt;, our hosted observability-as-a-service offering.&lt;/p&gt;
&lt;p&gt;Our recommended approach for monitoring your Grafana Enterprise Databases is to use Grafana Cloud.
This approach is the easiest, most robust way to observe your database in accordance with Grafana Labs best practices and is included free of charge with your purchase of a Grafana Enterprise Database.&lt;/p&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;How it works&lt;/h2&gt;
&lt;p&gt;Each Grafana Enterprise Database is instrumented for observability by default.
Each Database component exposes metrics on a scrapable Prometheus compatible &lt;code&gt;/metrics&lt;/code&gt; endpoint and emits logs and traces.&lt;/p&gt;
&lt;p&gt;The Helm chart for each Enterprise Database includes an option for meta monitoring.
When enabled, the Helm chart deploys Grafana Alloy alongside the Enterprise Database.
Alloy is configured to collect metrics and logs from all database components and apply additional metadata, such as extra labels to indicate where the metrics or logs were scraped from.
&lt;em&gt;Alloy ONLY collects logs and metrics relevant to the internal system state of the Grafana Enterprise Databases; no other information is collected.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;From there, Grafana Alloy forwards the telemetry data to your Grafana Cloud account, where it can be stored and queried to help you understand the health of your Grafana Enterprise Database.
You can access this account at any time, and have complete control over who has access to it using Grafana Cloud’s &lt;a href=&#34;/docs/grafana-cloud/account-management/authentication-and-permissions/&#34;&gt;identity and access management&lt;/a&gt; functionality.
Availability and uptime adhere to the Grafana Cloud SLA.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/loki/gex-metamonitoring-alloy.svg&#34;
  alt=&#34;Overview of monitoring a Grafana Enterprise Database product using Grafana Cloud&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Additionally, this Grafana Cloud account is preconfigured with Grafana Labs’ recommended dashboards for visualizing the telemetry data collected from your Grafana Enterprise Database.
Should you choose, you can also create alerts on the data in this account to notify you when the telemetry data collected from your Grafana Enterprise Database is no longer within expected parameters.
Grafana Labs can provide a recommended set of alerts to configure.&lt;/p&gt;
&lt;p&gt;If you need to file a support escalation, you can choose to give the Grafana Labs support team access to the telemetry data in your Grafana Cloud account.
Historically, Grafana Labs has found that faster access to telemetry data radically reduces the time needed to resolve escalations.&lt;/p&gt;
&lt;/div&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;You can also use 
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/self-monitoring/&#34;&gt;self-monitoring&lt;/a&gt; with GEM.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

]]></content><description>&lt;h1 id="monitor-gem-using-grafana-cloud">Monitor GEM using Grafana Cloud&lt;/h1>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>Monitoring with Grafana Cloud is required for all GEM installations.
Refer to
&lt;a href="/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/monitor-system-health/">Monitor the health of your system&lt;/a> for more information.
Professional services will assist you in configuring monitoring for your GEM installation.&lt;/p></description></item><item><title>Self-monitoring</title><link>https://grafana.com/docs/enterprise-metrics/v2.16.x/manage/monitor/self-monitoring/</link><pubDate>Thu, 12 Jun 2025 13:03:13 +0000</pubDate><guid>https://grafana.com/docs/enterprise-metrics/v2.16.x/manage/monitor/self-monitoring/</guid><content><![CDATA[&lt;h1 id=&#34;self-monitoring&#34;&gt;Self monitoring&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Starting with GEM version 2.16, self-monitoring is deprecated and set to be removed in a future release. As of May 2025, you must use metamonitoring. Refer to 
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/monitor-system-health/&#34;&gt;Monitor the health of your system&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;Since version 1.4, Grafana Enterprise Metrics (GEM) includes the ability to directly record self-monitoring metrics to
allow you to easily monitor the health and stability of GEM itself. The metrics GEM collects about itself are written to
a built-in &lt;code&gt;__system__&lt;/code&gt; tenant. The metrics written can be queried as usual using tokens created under the
built-in &lt;code&gt;__system__&lt;/code&gt; access policy. Since version 1.8, GEM directly records 
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/exemplars/&#34;&gt;exemplars&lt;/a&gt;
as part of self-monitoring metrics.&lt;/p&gt;
&lt;p&gt;The way self-monitoring works ensures that any metrics available from GEM via &lt;code&gt;/metrics&lt;/code&gt; endpoints are available
directly in GEM without needing to be scraped by an external process. While these metrics would ordinarily need to be
scraped using &lt;a href=&#34;https://prometheus.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus&lt;/a&gt; or 
    &lt;a href=&#34;/docs/alloy/latest/&#34;&gt;Grafana Alloy&lt;/a&gt;, with self-monitoring, they are available after the
following setup.&lt;/p&gt;
&lt;p&gt;This feature provides a simple, out-of-the-box way to monitor GEM itself with a minimum amount of
configuration or extra dependencies. To get the maximum value of this feature, we recommend you install
&lt;a href=&#34;/grafana/plugins/grafana-metrics-enterprise-app/&#34;&gt;GEM&amp;rsquo;s Grafana plug-in&lt;/a&gt;, which automatically
provisions a set of dashboards that use the self-monitoring metrics. The dashboards are in line with Grafana
Labs&amp;rsquo; best practices for understanding GEM system health. Self-monitoring is compatible with plugin versions &amp;gt;= 3.0.4
(which require Grafana 8). Grafana 7.5 users should use version 2.1.1.&lt;/p&gt;
&lt;h2 id=&#34;configuration&#34;&gt;Configuration&lt;/h2&gt;
&lt;p&gt;The sections below describe the steps needed to set up self monitoring.&lt;/p&gt;
&lt;h3 id=&#34;single-binary-mode&#34;&gt;Single binary mode&lt;/h3&gt;
&lt;p&gt;Self-monitoring is enabled by default - no action is necessary in single binary mode!&lt;/p&gt;
&lt;h3 id=&#34;microservices-mode&#34;&gt;Microservices mode&lt;/h3&gt;
&lt;p&gt;In order to use self-monitoring in microservices mode, you&amp;rsquo;ll need a hostname that you can use to
address the gRPC port (9095 by default) of each of the GEM distributors. This could be a load balancer that balances
between each distributor, a DNS &lt;code&gt;A&lt;/code&gt; record that includes IPs for each distributor, or a Kubernetes service that balances
between each gRPC port of the distributor pods. For the purposes of this example, we&amp;rsquo;ll assume that you are using a
Kubernetes service and GEM is running in a namespace called &lt;code&gt;enterprise-metrics&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Add the following section to your GEM configuration file used by each GEM pod or process.&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;instrumentation:
  distributor_client:
    address: dns:///distributor.enterprise-metrics.svc.cluster.local:9095&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Or&lt;/strong&gt;, you can alternatively add the command line flag to the arguments passed to each GEM pod or process.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-instrumentation.distributor-client.address=&#39;dns:///distributor.enterprise-metrics.svc.cluster.local:9095&#39;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What is described above will give you system health metrics about the entire GEM cluster. To better understand GEM
behavior, you also want to understand resource usage at a per-tenant level. In order to get the self-monitoring metrics
you need to understand this behavior (and populate the &amp;ldquo;Per Tenant Usage&amp;rdquo; dashboards provisioned by the GEM plugin),
you must also deploy the &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/self-monitoring/overrides-exporter/&#34;&gt;overrides-exporter&lt;/a&gt; component.&lt;/p&gt;
&lt;h3 id=&#34;exemplars&#34;&gt;Exemplars&lt;/h3&gt;
&lt;p&gt;Since GEM 1.8, self-monitoring has the ability to directly record 
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/exemplars/&#34;&gt;exemplars&lt;/a&gt;.
However, recording of the exemplars under the &lt;code&gt;__system__&lt;/code&gt; tenant is still controlled by the same
&lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/tenant-management/limits/&#34;&gt;limits&lt;/a&gt; applied to all other tenants. This means that recording of
exemplars for the &lt;code&gt;__system__&lt;/code&gt; tenant is disabled by default (as it is for all tenants) and must be enabled using the
runtime configuration file or enabled globally.&lt;/p&gt;
&lt;p&gt;Since the &lt;code&gt;__system__&lt;/code&gt; tenant is built into GEM itself and immutable, limits for it (such as enabling exemplars)
cannot be set using the Admin API. Instead, if you wish to emit exemplars for the &lt;code&gt;__system__&lt;/code&gt; tenant you must override
the &lt;code&gt;max_global_exemplars_per_user&lt;/code&gt; setting for the &lt;code&gt;__system__&lt;/code&gt; tenant using
the 
    &lt;a href=&#34;/docs/mimir/v2.16.x/configure/about-runtime-configuration/&#34;&gt;runtime configuration file&lt;/a&gt; or
enable exemplars globally.&lt;/p&gt;
&lt;p&gt;Here is an example of using the runtime configuration 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;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;overrides:
  __system__:
    max_global_exemplars_per_user: 300000&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;verification&#34;&gt;Verification&lt;/h3&gt;
&lt;p&gt;After you&amp;rsquo;ve deployed the configuration changes above, you&amp;rsquo;ll need to verify that self-monitoring is working correctly.
We&amp;rsquo;ll learn how to query the self-monitoring metrics later, but to verify they&amp;rsquo;re working we can check a simple counter
incremented when self-monitoring metrics are emitted.&lt;/p&gt;
&lt;p&gt;Pick a single pod or process that is part of your GEM cluster. For this example, we&amp;rsquo;ll assume that you have picked an
ingester.&lt;/p&gt;
&lt;p&gt;Make a &lt;code&gt;curl&lt;/code&gt; request to the &lt;code&gt;/metrics&lt;/code&gt; endpoint of the ingester.&lt;/p&gt;

&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;$ curl -s &amp;#39;http://ingester-01.example.com/metrics&amp;#39; | grep &amp;#39;cortex_self_monitoring_pushes_total&amp;#39;
# HELP cortex_self_monitoring_pushes_total Number of successes pushing self-monitoring metrics
# TYPE cortex_self_monitoring_pushes_total counter
cortex_self_monitoring_pushes_total 15&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; If you are running GEM in a Kubernetes cluster, individual pods might not be directly accessible from outside
the Kubernetes cluster. In this case you can make the request from another pod running in the Kubernetes cluster, or you
can make use of the
&lt;a href=&#34;https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;kubectl port-forward&lt;/a&gt;
command.&lt;/p&gt;
&lt;p&gt;If the metric above is &lt;code&gt;0&lt;/code&gt; or doesn&amp;rsquo;t exist, check the logs for each GEM component looking for errors or warnings
related to pushing metrics to a distributor.&lt;/p&gt;
&lt;h2 id=&#34;querying&#34;&gt;Querying&lt;/h2&gt;
&lt;p&gt;In order to query self-monitoring metrics directly, you&amp;rsquo;ll need to

    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/api/admin-api/&#34;&gt;create a token&lt;/a&gt; associated with the &lt;code&gt;__system__&lt;/code&gt; access policy. The steps
below assume you have already done this and copied down the token. The following examples further assume that your GEM
cluster is available at the host &lt;code&gt;gem.example.com&lt;/code&gt; over HTTPS.&lt;/p&gt;
&lt;p&gt;First, set the token as a variable to use for the subsequent commands.&lt;/p&gt;

&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;$ export API_TOKEN=&amp;#34;the long token string you copied&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Next, we&amp;rsquo;ll make a request to the Prometheus query endpoint of GEM looking for a particular metric. In this case,
&lt;code&gt;grafana_metrics_enterprise_build_info&lt;/code&gt;&lt;/p&gt;

&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;$ curl -s -u &amp;#34;__system__:$API_TOKEN&amp;#34; &amp;#34;https://gem.example.com/prometheus/api/v1/query?query=grafana_metrics_enterprise_build_info&amp;#34; | jq
{
  &amp;#34;status&amp;#34;: &amp;#34;success&amp;#34;,
  &amp;#34;data&amp;#34;: {
    &amp;#34;resultType&amp;#34;: &amp;#34;vector&amp;#34;,
    &amp;#34;result&amp;#34;: [
      {
        &amp;#34;metric&amp;#34;: {
          &amp;#34;__name__&amp;#34;: &amp;#34;grafana_metrics_enterprise_build_info&amp;#34;,
          &amp;#34;branch&amp;#34;: &amp;#34;gem-release-1.4&amp;#34;,
          &amp;#34;goversion&amp;#34;: &amp;#34;go1.16.3&amp;#34;,
          &amp;#34;instance&amp;#34;: &amp;#34;ingester-01:80&amp;#34;,
          &amp;#34;revision&amp;#34;: &amp;#34;ccd12b7a&amp;#34;,
          &amp;#34;target&amp;#34;: &amp;#34;ingester&amp;#34;,
          &amp;#34;version&amp;#34;: &amp;#34;v1.4.1&amp;#34;
        },
        &amp;#34;value&amp;#34;: [
          1622833381.751,
          &amp;#34;1&amp;#34;
        ]
      },
      {
        &amp;#34;metric&amp;#34;: {
          &amp;#34;__name__&amp;#34;: &amp;#34;grafana_metrics_enterprise_build_info&amp;#34;,
          &amp;#34;branch&amp;#34;: &amp;#34;gem-release-1.4&amp;#34;,
          &amp;#34;goversion&amp;#34;: &amp;#34;go1.16.3&amp;#34;,
          &amp;#34;instance&amp;#34;: &amp;#34;distributor-01:80&amp;#34;,
          &amp;#34;revision&amp;#34;: &amp;#34;ccd12b7a&amp;#34;,
          &amp;#34;target&amp;#34;: &amp;#34;distributor&amp;#34;,
          &amp;#34;version&amp;#34;: &amp;#34;v1.4.1&amp;#34;
        },
        &amp;#34;value&amp;#34;: [
          1622833381.751,
          &amp;#34;1&amp;#34;
        ]
      },

      &amp;lt;...snip...&amp;gt;
    ]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As you can see, querying self-monitoring metrics with GEM is the same process as querying any other type of metrics.&lt;/p&gt;
&lt;h2 id=&#34;implementation&#34;&gt;Implementation&lt;/h2&gt;
&lt;p&gt;Though you don&amp;rsquo;t &lt;em&gt;need&lt;/em&gt; to be familiar with how self-monitoring works at a technical level, it&amp;rsquo;s detailed below in the
hopes that it&amp;rsquo;s useful.&lt;/p&gt;
&lt;h3 id=&#34;gathering&#34;&gt;Gathering&lt;/h3&gt;
&lt;p&gt;Self-monitoring metrics are gathered internally the same way metrics exposed via the &lt;code&gt;/metrics&lt;/code&gt;
endpoint are: they are registered with a
Prometheus &lt;a href=&#34;https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#Registerer&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Registerer&lt;/a&gt;
on application start up. The metrics are updated during the normal course of running the application and periodically (
every 15 seconds by default) flushed directly to a distributor. Any metric available from the &lt;code&gt;/metrics&lt;/code&gt; endpoint of a
GEM component will also be available in the self-monitoring system.&lt;/p&gt;
&lt;p&gt;The metrics are written to the distributor over its gRPC interface. This allows the self-monitoring system control over
the exact tenant the metrics are stored under. This enables it to cleanly separate system metrics (under
the &lt;code&gt;__system__&lt;/code&gt; tenant) from user data.&lt;/p&gt;
&lt;h3 id=&#34;injected-labels&#34;&gt;Injected labels&lt;/h3&gt;
&lt;p&gt;Normally, when metrics are scraped by Prometheus, labels
are &lt;a href=&#34;https://prometheus.io/docs/concepts/jobs_instances/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;automatically added by Prometheus&lt;/a&gt;
that identify where the metrics came from. Since self-monitoring metrics are not scraped by any external system, labels
are automatically added internally to help identify which component the metrics came from.&lt;/p&gt;
&lt;p&gt;The following labels are added to metrics emitted by the self-monitoring system.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;instance&lt;/code&gt;: this label is made up of the node or host name a component is running on in combination with the HTTP port
used. For example a value for this label in a GEM cluster running on Kubernetes might be &lt;code&gt;ingester-1:80&lt;/code&gt;
or &lt;code&gt;querier-5bf6ddccd7-hzbtn:80&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;target&lt;/code&gt;: this label is made of a comma separated list of the targets a GEM process is running as
(&lt;code&gt;ingester&lt;/code&gt;, &lt;code&gt;querier&lt;/code&gt;, etc.) or &lt;code&gt;all&lt;/code&gt; in single binary mode.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;system-tenant-and-access-policy&#34;&gt;System tenant and access policy&lt;/h3&gt;
&lt;p&gt;In order to cleanly separate self-monitoring data from user data, GEM comes with a built-in &lt;code&gt;__system__&lt;/code&gt; tenant
and &lt;code&gt;__system__&lt;/code&gt; access policy. All self-monitoring data is written to the &lt;code&gt;__system__&lt;/code&gt; tenant. The self-monitoring
data may be queried using tokens associated with the&lt;code&gt;__system__&lt;/code&gt; access policy. Because these are built into GEM itself,
they cannot be removed. However, writing self-monitoring metrics to the system tenant can be turned off using the
flag &lt;code&gt;-instrumentation.enabled=false&lt;/code&gt; or the associated configuration setting.&lt;/p&gt;
&lt;h3 id=&#34;recording-rules&#34;&gt;Recording rules&lt;/h3&gt;
&lt;p&gt;In order to use self-monitoring metrics to power associated self-monitoring dashboards, the GEM ruler also includes
built-in recording rules. These recording rules perform aggregations of self-monitoring metrics they same way the ruler
aggregates other metrics. Because these recording rules are built-in to GEM itself, they cannot be removed. However,
they can be turned off using the same flag that enables or disables self-monitoring &lt;code&gt;-instrumentation.enabled=false&lt;/code&gt; or
the associated configuration setting.&lt;/p&gt;
&lt;h3 id=&#34;overhead&#34;&gt;Overhead&lt;/h3&gt;
&lt;p&gt;Self-monitoring metrics are stored in GEM itself. Like any other metrics, they consume space in object storage. When
enabled in microservices mode, each GEM component (ingester, querier, etc) will emit &lt;strong&gt;approximately 2000 series per
component&lt;/strong&gt;. These series are emitted for each component and GEM duplicates them based on the replication factor
in the ingesters.&lt;/p&gt;
&lt;p&gt;To understand how many series will be written under the &lt;code&gt;__system__&lt;/code&gt; tenant as part of self-monitoring, you can use
the following formula:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;2000 * $NUMBER_OF_GEM_PROCESSES * $REPLICATION_FACTOR&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Since these series are written to GEM in a similar way to other series, they&amp;rsquo;ll be deduplicated by the compactor in
object storage to reduce space required. To understand how many series will end up in object storage via
the &lt;code&gt;__system__&lt;/code&gt; tenant, you can use the following formula:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;2000 * $NUMBER_OF_GEM_PROCESSES&lt;/code&gt;&lt;/p&gt;
]]></content><description>&lt;h1 id="self-monitoring">Self monitoring&lt;/h1>
&lt;div class="admonition admonition-caution">&lt;blockquote>&lt;p class="title text-uppercase">Caution&lt;/p>&lt;p>Starting with GEM version 2.16, self-monitoring is deprecated and set to be removed in a future release. As of May 2025, you must use metamonitoring. Refer to
&lt;a href="/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/monitor-system-health/">Monitor the health of your system&lt;/a>.&lt;/p></description></item><item><title>Monitor Grafana Mimir</title><link>https://grafana.com/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/</link><pubDate>Tue, 22 Apr 2025 16:36:44 +0000</pubDate><guid>https://grafana.com/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/</guid><content><![CDATA[&lt;!-- Note: This topic is mounted in the GEM documentation. Ensure that all updates are also applicable to GEM. --&gt;
&lt;h1 id=&#34;monitor-grafana-mimir&#34;&gt;Monitor Grafana Mimir&lt;/h1&gt;
&lt;p&gt;The following topics guide you in preparing your environment to display dashboards that you can use to monitor Grafana Mimir.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/monitor-system-health/&#34;&gt;Monitor system health&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/requirements/&#34;&gt;About dashboards and alerts requirements&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/deploying-monitoring-mixin/&#34;&gt;Deploying the monitoring mixin&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/installing-dashboards-and-alerts/&#34;&gt;Installing dashboards and alerts&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/dashboards/&#34;&gt;Viewing dashboards&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/manage/monitor/monitor-mimir/collecting-metrics-and-logs/&#34;&gt;Collecting metrics and logs&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
]]></content><description>&lt;!-- Note: This topic is mounted in the GEM documentation. Ensure that all updates are also applicable to GEM. -->
&lt;h1 id="monitor-grafana-mimir">Monitor Grafana Mimir&lt;/h1>
&lt;p>The following topics guide you in preparing your environment to display dashboards that you can use to monitor Grafana Mimir.&lt;/p></description></item><item><title>Monitor compactor health</title><link>https://grafana.com/docs/enterprise-metrics/v2.16.x/manage/monitor/compactor/</link><pubDate>Tue, 22 Apr 2025 16:43:47 +0000</pubDate><guid>https://grafana.com/docs/enterprise-metrics/v2.16.x/manage/monitor/compactor/</guid><content><![CDATA[&lt;h2 id=&#34;monitor-compactor-health&#34;&gt;Monitor compactor health&lt;/h2&gt;
&lt;p&gt;Grafana Enterprise Metrics emits several metrics related to compactor health.
The following queries are useful to get a high-level view of compactor
activity. For users with self-monitoring enabled, please see the &lt;code&gt;GEM system monitoring / compactor&lt;/code&gt; dashboard, which includes panels built from these queries.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Successful compactor jobs run per hour&lt;/strong&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;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(cortex_compactor_runs_completed_total[1h]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This value should be relatively stable when viewed over a long enough period of
time, for example hours or days.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Failed compactor jobs run per hour&lt;/strong&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;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(cortex_compactor_runs_failed_total[1h]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Restarting the compactor process will interrupt in process
compaction jobs. This will increase the value of
&lt;code&gt;cortex_compactor_runs_failed_total&lt;/code&gt;, but it is not cause for concern as long
as these restarts are expected. In the event of a compactor crash, this metric
will not be incremented. Compactor process crash events should be monitored
separately.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Number of blocks per tenant&lt;/strong&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;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 (user) (cortex_bucket_blocks_count - cortex_bucket_blocks_marked_for_deletion_count)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This value should be relatively stable over a long enough period of time, for
example several days. If the compactor is lagging behind, it will increase over
time.&lt;/p&gt;
&lt;h2 id=&#34;monitoring-bucket-index-health&#34;&gt;Monitoring bucket index health&lt;/h2&gt;
&lt;p&gt;Before enabling the 
    &lt;a href=&#34;/docs/enterprise-metrics/v2.16.x/reference/mimir-arch/bucket-index/&#34;&gt;bucket index&lt;/a&gt;, the index health can
be verified by monitoring the
&lt;code&gt;cortex_bucket_index_last_successful_update_timestamp_seconds&lt;/code&gt; metric. This
metric tracks the last successful bucket index update per tenant. The following
query can be used to determine the index age for each tenant:&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() - cortex_bucket_index_last_successful_update_timestamp_seconds&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The maximum index age should generally line up with the value of the
&lt;code&gt;-compactor.cleanup-interval&lt;/code&gt; flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Some jitter is added to the cleanup interval to prevent all
compactor replicas from running at the same moment every time the interval
elapses. Additionally, the cleanup takes some time to perform. Because of
this, you may see the index age slightly older than the cleanup interval. This
is not cause for concern. We recommend configuring an alerting threshold when
the index age exceeds (2 * &lt;code&gt;compactor.cleanup-interval&lt;/code&gt;) &#43; 5 minutes.&lt;/p&gt;&lt;/blockquote&gt;
]]></content><description>&lt;h2 id="monitor-compactor-health">Monitor compactor health&lt;/h2>
&lt;p>Grafana Enterprise Metrics emits several metrics related to compactor health.
The following queries are useful to get a high-level view of compactor
activity. For users with self-monitoring enabled, please see the &lt;code>GEM system monitoring / compactor&lt;/code> dashboard, which includes panels built from these queries.&lt;/p></description></item></channel></rss>