<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Self-monitoring on Grafana Labs</title><link>https://grafana.com/docs/enterprise-metrics/v1.7.x/self-monitoring/</link><description>Recent content in Self-monitoring on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/enterprise-metrics/v1.7.x/self-monitoring/index.xml" rel="self" type="application/rss+xml"/><item><title>Overrides exporter</title><link>https://grafana.com/docs/enterprise-metrics/v1.7.x/self-monitoring/overrides-exporter/</link><pubDate>Mon, 17 Mar 2025 14:18:51 +0100</pubDate><guid>https://grafana.com/docs/enterprise-metrics/v1.7.x/self-monitoring/overrides-exporter/</guid><content><![CDATA[&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; Self-monitoring is an experimental feature. As such, the configuration settings, command line flags, or
specifics of the implementation are subject to change.&lt;/p&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. One of the key features of self-monitoring is being
able to tell what resources tenants in your cluster are using and when they are getting close to exceeding limits
on those resources.&lt;/p&gt;
&lt;p&gt;In order to be able to tell how close tenants are to exceeding their limits, you&amp;rsquo;ll need to run the GEM
&lt;code&gt;overrides-exporter&lt;/code&gt; component. This component makes per-tenant limits applied by
&lt;a href=&#34;https://cortexmetrics.io/docs/configuration/arguments/#runtime-configuration-file&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;runtime configuration file&lt;/a&gt; or
using the &lt;a href=&#34;../../admin-api/&#34;&gt;admin API&lt;/a&gt; available as metrics. If you are using
&lt;a href=&#34;https://github.com/grafana/jsonnet-libs&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Jsonnet&lt;/a&gt; or &lt;a href=&#34;https://github.com/grafana/helm-charts/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm&lt;/a&gt; to run GEM,
the &lt;code&gt;overrides-exporter&lt;/code&gt; is already run by default. Otherwise, instructions
to run the exporter are given below.&lt;/p&gt;
&lt;h2 id=&#34;configuration&#34;&gt;Configuration&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;overrides-exporter&lt;/code&gt; requires the following settings in the GEM configuration file (or their corresponding
CLI flags). Note that if you are already using self-monitoring the &lt;code&gt;overrides-exporter&lt;/code&gt; should be able to
use the same configuration file you are using for all other GEM components.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;enterprise-metrics.yaml&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;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;# NOTE: This is a minimal configuration file, more settings are needed to correctly run GEM! 

# Enable self-monitoring so that the overrides-exporter can write metrics directly to GEM
instrumentation:
  enabled: true
  distributor_client:
    address: &amp;#34;dns:///enterprise-metrics:9095&amp;#34;

# Limits set via the &amp;#34;runtime config&amp;#34; file are a potential source of limits for the exporter to expose as metrics
runtime_config:
  file: /etc/enterprise-metrics/runtime-config.yaml

# Limits set via the Admin API are a potential source of limits for the exporter to expose as metrics
admin_client:
  storage:
    type: s3
    s3:
      endpoint: s3.example.com
      bucket_name: admin
      access_key_id: enterprise-metrics
      secret_access_key: supersecret&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After ensuring your GEM configuration has the sections required for the &lt;code&gt;overrides-exporter&lt;/code&gt; (in addition to the
other sections required to run GEM), the overrides-exporter can be started using the following command.&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;metrics-enterprise -target=overrides-exporter -config.file=/etc/enterprise-metrics/enterprise-metrics.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;testing&#34;&gt;Testing&lt;/h2&gt;
&lt;p&gt;You can ensure the overrides exporter is making tenant limits available by making an HTTP request to its metrics
endpoint.&lt;/p&gt;
&lt;p&gt;Ensure default limits are being exported:&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 http://example/metrics | grep cortex_limits_defaults
# HELP cortex_limits_defaults Resource limit defaults for tenants without overrides
# TYPE cortex_limits_defaults gauge
cortex_limits_defaults{limit_name=&amp;#34;ingestion_burst_size&amp;#34;} 350000
cortex_limits_defaults{limit_name=&amp;#34;ingestion_rate&amp;#34;} 350000
cortex_limits_defaults{limit_name=&amp;#34;max_fetched_chunk_bytes_per_query&amp;#34;} 0
cortex_limits_defaults{limit_name=&amp;#34;max_fetched_series_per_query&amp;#34;} 0
cortex_limits_defaults{limit_name=&amp;#34;max_global_series_per_metric&amp;#34;} 300000
cortex_limits_defaults{limit_name=&amp;#34;max_global_series_per_user&amp;#34;} 300000
cortex_limits_defaults{limit_name=&amp;#34;max_local_series_per_metric&amp;#34;} 0
cortex_limits_defaults{limit_name=&amp;#34;max_local_series_per_user&amp;#34;} 0
cortex_limits_defaults{limit_name=&amp;#34;max_series_per_query&amp;#34;} 100000
cortex_limits_defaults{limit_name=&amp;#34;ruler_max_rule_groups_per_tenant&amp;#34;} 0
cortex_limits_defaults{limit_name=&amp;#34;ruler_max_rules_per_rule_group&amp;#34;} 0&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Ensure per-tenant limit overrides are being exported:&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 http://example/metrics | grep cortex_limits_overrides
# HELP cortex_limits_overrides Resource limit overrides applied to tenants
# TYPE cortex_limits_overrides gauge
cortex_limits_overrides{limit_name=&amp;#34;ingestion_burst_size&amp;#34;,user=&amp;#34;team-b&amp;#34;} 350000
cortex_limits_overrides{limit_name=&amp;#34;ingestion_rate&amp;#34;,user=&amp;#34;team-b&amp;#34;} 350000
cortex_limits_overrides{limit_name=&amp;#34;max_fetched_chunk_bytes_per_query&amp;#34;,user=&amp;#34;team-b&amp;#34;} 0
cortex_limits_overrides{limit_name=&amp;#34;max_fetched_series_per_query&amp;#34;,user=&amp;#34;team-b&amp;#34;} 0
cortex_limits_overrides{limit_name=&amp;#34;max_global_series_per_metric&amp;#34;,user=&amp;#34;team-b&amp;#34;} 300000
cortex_limits_overrides{limit_name=&amp;#34;max_global_series_per_user&amp;#34;,user=&amp;#34;team-b&amp;#34;} 300001
cortex_limits_overrides{limit_name=&amp;#34;max_local_series_per_metric&amp;#34;,user=&amp;#34;team-b&amp;#34;} 0
cortex_limits_overrides{limit_name=&amp;#34;max_local_series_per_user&amp;#34;,user=&amp;#34;team-b&amp;#34;} 0
cortex_limits_overrides{limit_name=&amp;#34;max_series_per_query&amp;#34;,user=&amp;#34;team-b&amp;#34;} 100000
cortex_limits_overrides{limit_name=&amp;#34;ruler_max_rule_groups_per_tenant&amp;#34;,user=&amp;#34;team-b&amp;#34;} 0
cortex_limits_overrides{limit_name=&amp;#34;ruler_max_rules_per_rule_group&amp;#34;,user=&amp;#34;team-b&amp;#34;} 0&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After the &lt;code&gt;overrides-exporter&lt;/code&gt; is running, your per-tenant self-monitoring dashboards
should be fully functional!&lt;/p&gt;
]]></content><description>&lt;p>&lt;strong>NOTE&lt;/strong> Self-monitoring is an experimental feature. As such, the configuration settings, command line flags, or
specifics of the implementation are subject to change.&lt;/p>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>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. One of the key features of self-monitoring is being
able to tell what resources tenants in your cluster are using and when they are getting close to exceeding limits
on those resources.&lt;/p></description></item></channel></rss>