<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Components on Grafana Labs</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/</link><description>Recent content in Components on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/agent/v0.31/flow/reference/components/index.xml" rel="self" type="application/rss+xml"/><item><title>discovery.docker</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/discovery.docker/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/discovery.docker/</guid><content><![CDATA[&lt;h1 id=&#34;discoverydocker&#34;&gt;discovery.docker&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.docker&lt;/code&gt; discovers &lt;a href=&#34;https://docs.docker.com/engine/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Docker Engine&lt;/a&gt; containers and exposes them as targets.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;discovery.docker &amp;#34;LABEL&amp;#34; {
  host = &amp;#34;DOCKER_ENGINE_HOST&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address of the Docker Daemon to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port to use for collecting metrics when containers don&amp;rsquo;t have any port mappings.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;80&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;host_networking_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Host to use if the container is in host networking mode.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;localhost&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Frequency to refresh list of containers.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;discovery.docker&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;filter&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#filter-block&#34;&gt;filter&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Filters discoverable resources.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http_client_config-block&#34;&gt;http_client_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client configuration for docker requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; basic_auth&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;basic_auth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic_auth for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; authorization&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authorization-block&#34;&gt;authorization&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;oauth2&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2 &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example,
&lt;code&gt;http_client_config &amp;gt; basic_auth&lt;/code&gt; refers to a &lt;code&gt;basic_auth&lt;/code&gt; block defined inside
an &lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;filter-block&#34;&gt;filter block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;filter&lt;/code&gt; block configures a filter to pass to the Docker Engine to limit
the amount of containers returned. The &lt;code&gt;filter&lt;/code&gt; block can be specified multiple
times to provide more than one filter.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter name to use.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Values to pass to the filter.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Refer to &lt;a href=&#34;https://docs.docker.com/engine/api/v1.41/#tag/Container/operation/ContainerList&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;List containers&lt;/a&gt; from the Docker Engine API
documentation for the list of supported filters and their meaning.&lt;/p&gt;
&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; block configures settings used to connect to the
Docker Engine API server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth-block&#34;&gt;basic_auth block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/basic-auth-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mututally exclusive and only one can be
provided inside of a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;authorization-block&#34;&gt;authorization block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/authorization-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credential&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive and only one can be
provided inside of an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2-block&#34;&gt;oauth2 block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/oauth2-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional proxy URL for OAuth2 requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mututally exclusive and only one
can be provided inside of an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain its own separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The set of targets discovered from the docker API.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Each target includes the following labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_id&lt;/code&gt;: ID of the container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_name&lt;/code&gt;: Name of the container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_network_mode&lt;/code&gt;: Network mode of the container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: Each label from the container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_network_id&lt;/code&gt;: ID of the Docker network the container is in.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_network_name&lt;/code&gt;: Name of the Docker network the container is in.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_network_ingress&lt;/code&gt;: Set to &lt;code&gt;true&lt;/code&gt; if the Docker network is an
ingress network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_network_internal&lt;/code&gt;: Set to &lt;code&gt;true&lt;/code&gt; if the Docker network is an
internal network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_network_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: Each label from the network the
container is in.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_network_scope&lt;/code&gt;: The scope of the network the container is in.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_network_ip&lt;/code&gt;: The IP of the container in the network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_port_private&lt;/code&gt;: The private port on the container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_port_public&lt;/code&gt;: The publicly exposed port from the container,
if a port mapping exists.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_port_public_ip&lt;/code&gt;: The public IP of the container, if a port
mapping exists.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each discovered container maps to one target per unique combination of networks
and port mappings used by the container.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.docker&lt;/code&gt; is only reported as unhealthy when given an invalid
configuration. In those cases, exported fields retain their last healthy
values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.docker&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h3 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;discovery.docker&lt;/code&gt; does not expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;linux-or-macos-hosts&#34;&gt;Linux or macOS hosts&lt;/h3&gt;
&lt;p&gt;This example discovers Docker containers when the host machine is macOS or
Linux:&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;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;discovery.docker &amp;#34;containers&amp;#34; {
  host = &amp;#34;unix:///var/run/docker.sock&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;windows-hosts&#34;&gt;Windows hosts&lt;/h3&gt;
&lt;p&gt;This example discovers Docker containers when the host machine is Windows:&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;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;discovery.docker &amp;#34;containers&amp;#34; {
  host = &amp;#34;tcp://localhost:2375&amp;#34;
}&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;: This example requires the &amp;ldquo;Expose daemon on tcp://localhost:2375
without TLS&amp;rdquo; setting to be enabled in the Docker Engine settings.&lt;/p&gt;&lt;/blockquote&gt;
]]></content><description>&lt;h1 id="discoverydocker">discovery.docker&lt;/h1>
&lt;p>&lt;code>discovery.docker&lt;/code> discovers &lt;a href="https://docs.docker.com/engine/" target="_blank" rel="noopener noreferrer">Docker Engine&lt;/a> containers and exposes them as targets.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&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-alloy">discovery.docker &amp;#34;LABEL&amp;#34; {
host = &amp;#34;DOCKER_ENGINE_HOST&amp;#34;
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>The following arguments are supported:&lt;/p></description></item><item><title>discovery.file</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/discovery.file/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/discovery.file/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryfile&#34;&gt;discovery.file&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.file&lt;/code&gt; discovers files on the local filesystem using glob patterns and the &lt;a href=&#34;https://github.com/bmatcuk/doublestar&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;doublestar&lt;/a&gt; library.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;discovery.file &amp;#34;LABEL&amp;#34; {
  path_targets = [{&amp;#34;__path__&amp;#34; = &amp;#34;DOUBLESTAR_PATH&amp;#34;}]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path_targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Targets to expand; looks for glob patterns on the  &lt;code&gt;__path__&lt;/code&gt; and &lt;code&gt;__path_exclude__&lt;/code&gt; keys.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sync_period&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to sync filesystem and targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;path_targets&lt;/code&gt; uses &lt;a href=&#34;https://github.com/bmatcuk/doublestar&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;doublestar&lt;/a&gt; style paths.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/tmp/**/*.log&lt;/code&gt; will match all subfolders of &lt;code&gt;tmp&lt;/code&gt; and include any files that end in &lt;code&gt;*.log&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/tmp/apache/*.log&lt;/code&gt; will match only files in &lt;code&gt;/tmp/apache/&lt;/code&gt; that end in &lt;code&gt;*.log&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/tmp/**&lt;/code&gt; will match all subfolders of &lt;code&gt;tmp&lt;/code&gt;, &lt;code&gt;tmp&lt;/code&gt; itself, and all files.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The set of targets discovered from the filesystem.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Each target includes the following labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__path__&lt;/code&gt;: Absolute path to the file.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.file&lt;/code&gt; is only reported as unhealthy when given an invalid
configuration. In those cases, exported fields retain their last healthy
values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.file&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h3 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;discovery.file&lt;/code&gt; does not expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;This example discovers all files and folders under &lt;code&gt;/tmp/logs&lt;/code&gt;. The absolute paths are
used by &lt;code&gt;loki.source.file.files&lt;/code&gt; targets.&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;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;discovery.file &amp;#34;tmp&amp;#34; {
    path_targets = [{&amp;#34;__path__&amp;#34; = &amp;#34;/tmp/logs/**/*.log&amp;#34;}]
}

loki.source.file &amp;#34;files&amp;#34; {
    targets    = discovery.file.tmp.targets
    forward_to = [ /* ... */ ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;kubernetes&#34;&gt;Kubernetes&lt;/h3&gt;
&lt;p&gt;This example finds all the logs on pods and monitors them.&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;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;discovery.kubernetes &amp;#34;k8s&amp;#34; {
  role = &amp;#34;pod&amp;#34;
}

discovery.relabel &amp;#34;k8s&amp;#34; {
  targets = discovery.kubernetes.k8s.targets
 
  rule {
    source_labels = [&amp;#34;__meta_kubernetes_namespace&amp;#34;, &amp;#34;__meta_kubernetes_pod_label_name&amp;#34;]
    target_label  = &amp;#34;job&amp;#34;
    separator     = &amp;#34;/&amp;#34;
  }

  rule {
    source_labels = [&amp;#34;__meta_kubernetes_pod_uid&amp;#34;, &amp;#34;__meta_kubernetes_pod_container_name&amp;#34;]
    target_label  = &amp;#34;__path__&amp;#34;
    separator     = &amp;#34;/&amp;#34; 
    replacement   = &amp;#34;/var/log/pods/*$1/*.log&amp;#34;
  } 
}

discovery.file &amp;#34;pods&amp;#34; {
    path_targets = discovery.relabel.k8s.output
}

loki.source.file &amp;#34;pods&amp;#34; {
    targets = discovery.file.pods.targets
    forward_to = [loki.write.endpoint.receiver]
}

loki.write &amp;#34;endpoint&amp;#34; {
    endpoint {
        url = &amp;#34;LOKI_PATH&amp;#34;
        http_client_config {
            basic_auth {
                username = USERNAME
                password = &amp;#34;PASSWORD&amp;#34;
            }
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="discoveryfile">discovery.file&lt;/h1>
&lt;p>&lt;code>discovery.file&lt;/code> discovers files on the local filesystem using glob patterns and the &lt;a href="https://github.com/bmatcuk/doublestar" target="_blank" rel="noopener noreferrer">doublestar&lt;/a> library.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&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-alloy">discovery.file &amp;#34;LABEL&amp;#34; {
path_targets = [{&amp;#34;__path__&amp;#34; = &amp;#34;DOUBLESTAR_PATH&amp;#34;}]
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>The following arguments are supported:&lt;/p></description></item><item><title>discovery.kubernetes</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/discovery.kubernetes/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/discovery.kubernetes/</guid><content><![CDATA[&lt;h1 id=&#34;discoverykubernetes&#34;&gt;discovery.kubernetes&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.kubernetes&lt;/code&gt; allows you to find scrape targets from Kubernetes
resources. It watches cluster state, and ensures targets are continually synced
with what is currently running in your cluster.&lt;/p&gt;
&lt;p&gt;If you supply no connection information, this component defaults to an
in-cluster config. A kubeconfig file or manual connection settings can be used
to override the defaults.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;discovery.kubernetes &amp;#34;LABEL&amp;#34; {
  role = &amp;#34;DISCOVERY_ROLE&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL of Kubernetes API server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;role&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Type of Kubernetes resource to query.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kubeconfig_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of kubeconfig file to use for connecting to Kubernetes.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;role&lt;/code&gt; argument is required to specify what type of targets to discover.
&lt;code&gt;role&lt;/code&gt; must be one of &lt;code&gt;node&lt;/code&gt;, &lt;code&gt;pod&lt;/code&gt;, &lt;code&gt;service&lt;/code&gt;, &lt;code&gt;endpoints&lt;/code&gt;, &lt;code&gt;endpointslice&lt;/code&gt;,
or &lt;code&gt;ingress&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;node-role&#34;&gt;node role&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;node&lt;/code&gt; role discovers one target per cluster node with the address
defaulting to the HTTP port of the Kubelet daemon. The target address defaults
to the first existing address of the Kubernetes node object in the address type
order of &lt;code&gt;NodeInternalIP&lt;/code&gt;, &lt;code&gt;NodeExternalIP&lt;/code&gt;, &lt;code&gt;NodeLegacyHostIP&lt;/code&gt;, and
&lt;code&gt;NodeHostName&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following labels are included for discovered nodes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_node_name&lt;/code&gt;: The name of the node object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_node_provider_id&lt;/code&gt;: The cloud provider&amp;rsquo;s name for the node object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_node_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: Each label from the node object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_node_labelpresent_&amp;lt;labelname&amp;gt;&lt;/code&gt;: Set to &lt;code&gt;true&lt;/code&gt; for each label from the node object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_node_annotation_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: Each annotation from the node object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_node_annotationpresent_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: Set to &lt;code&gt;true&lt;/code&gt;
for each annotation from the node object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_node_address_&amp;lt;address_type&amp;gt;&lt;/code&gt;: The first address for each
node address type, if it exists.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition, the &lt;code&gt;instance&lt;/code&gt; label for the node will be set to the node name as
retrieved from the API server.&lt;/p&gt;
&lt;h3 id=&#34;service-role&#34;&gt;service role&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;service&lt;/code&gt; role discovers a target for each service port for each service.
This is generally useful for externally monitoring a service. The address will
be set to the Kubernetes DNS name of the service and respective service port.&lt;/p&gt;
&lt;p&gt;The following labels are included for discovered services:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt;: The namespace of the service object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_annotation_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: Each annotation from
the service object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_annotationpresent_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for
each annotation of the service object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_cluster_ip&lt;/code&gt;: The cluster IP address of the
service. This does not apply to services of type &lt;code&gt;ExternalName&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_external_name&lt;/code&gt;: The DNS name of the service.
This only applies to services of type &lt;code&gt;ExternalName&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: Each label from the service
object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_labelpresent_&amp;lt;labelname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for each label
of the service object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_name&lt;/code&gt;: The name of the service object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_port_name&lt;/code&gt;: Name of the service port for the
target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_port_number&lt;/code&gt;: Number of the service port for the
target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_port_protocol&lt;/code&gt;: Protocol of the service port for
the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_service_type&lt;/code&gt;: The type of the service.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;pod-role&#34;&gt;pod role&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;pod&lt;/code&gt; role discovers all pods and exposes their containers as targets. For
each declared port of a container, a single target is generated.&lt;/p&gt;
&lt;p&gt;If a container has no specified ports, a port-free target per container is
created. These targets must have a port manually injected using a
&lt;a href=&#34;../discovery.relabel/&#34;&gt;&lt;code&gt;discovery.relabel&lt;/code&gt; component&lt;/a&gt; before metrics can be
collected from them.&lt;/p&gt;
&lt;p&gt;The following labels are included for discovered pods:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt;: The namespace of the pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_name&lt;/code&gt;: The name of the pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_ip&lt;/code&gt;: The pod IP of the pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: Each label from the pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_labelpresent_&amp;lt;labelname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for each label from
the pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_annotation_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: Each annotation from the
pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_annotationpresent_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for each
annotation from the pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_init&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; if the container is an
&lt;code&gt;InitContainer&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_name&lt;/code&gt;: Name of the container the target
address points to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_image&lt;/code&gt;: The image the container is using.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_port_name&lt;/code&gt;: Name of the container port.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_port_number&lt;/code&gt;: Number of the container port.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_port_protocol&lt;/code&gt;: Protocol of the container
port.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_ready&lt;/code&gt;: Set to &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; for the pod&amp;rsquo;s ready
state.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_phase&lt;/code&gt;: Set to &lt;code&gt;Pending&lt;/code&gt;, &lt;code&gt;Running&lt;/code&gt;, &lt;code&gt;Succeeded&lt;/code&gt;, &lt;code&gt;Failed&lt;/code&gt; or
&lt;code&gt;Unknown&lt;/code&gt; in the lifecycle.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_node_name&lt;/code&gt;: The name of the node the pod is scheduled
onto.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_host_ip&lt;/code&gt;: The current host IP of the pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_uid&lt;/code&gt;: The UID of the pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_controller_kind&lt;/code&gt;: Object kind of the pod controller.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_controller_name&lt;/code&gt;: Name of the pod controller.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;endpoints-role&#34;&gt;endpoints role&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;endpoints&lt;/code&gt; role discovers targets from listed endpoints of a service. For
each endpoint address one target is discovered per port. If the endpoint is
backed by a pod, all container ports of a pod are discovered as targets even if
they are not bound to an endpoint port.&lt;/p&gt;
&lt;p&gt;The following labels are included for discovered endpoints:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace:&lt;/code&gt; The namespace of the endpoints object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoints_name:&lt;/code&gt; The names of the endpoints object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoints_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: Each label from the
endpoints object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoints_labelpresent_&amp;lt;labelname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for each label
from the endpoints object.&lt;/li&gt;
&lt;li&gt;The following labels are attached for all targets discovered directly from
the endpoints list:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoint_hostname&lt;/code&gt;: Hostname of the endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoint_node_name&lt;/code&gt;: Name of the node hosting the
endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoint_ready&lt;/code&gt;: Set to &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; for the
endpoint&amp;rsquo;s ready state.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoint_port_name&lt;/code&gt;: Name of the endpoint port.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoint_port_protocol&lt;/code&gt;: Protocol of the endpoint port.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoint_address_target_kind&lt;/code&gt;: Kind of the endpoint
address target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpoint_address_target_name&lt;/code&gt;: Name of the endpoint
address target.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If the endpoints belong to a service, all labels of the &lt;code&gt;service&lt;/code&gt; role
discovery are attached.&lt;/li&gt;
&lt;li&gt;For all targets backed by a pod, all labels of the &lt;code&gt;pod&lt;/code&gt; role discovery are
attached.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;endpointslice-role&#34;&gt;endpointslice role&lt;/h3&gt;
&lt;p&gt;The endpointslice role discovers targets from existing Kubernetes endpoint
slices. For each endpoint address referenced in the &lt;code&gt;EndpointSlice&lt;/code&gt; object, one
target is discovered. If the endpoint is backed by a pod, all container ports
of a pod are discovered as targets even if they are not bound to an endpoint
port.&lt;/p&gt;
&lt;p&gt;The following labels are included for discovered endpoint slices:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt;: The namespace of the endpoints object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_name&lt;/code&gt;: The name of endpoint slice object.&lt;/li&gt;
&lt;li&gt;The following labels are attached for all targets discovered directly from
the endpoint slice list:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_address_target_kind&lt;/code&gt;: Kind of the
referenced object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_address_target_name&lt;/code&gt;: Name of referenced
object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_address_type&lt;/code&gt;: The IP protocol family of
the address of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_endpoint_conditions_ready&lt;/code&gt;: Set to &lt;code&gt;true&lt;/code&gt;
or &lt;code&gt;false&lt;/code&gt; for the referenced endpoint&amp;rsquo;s ready state.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_endpoint_topology_kubernetes_io_hostname&lt;/code&gt;:
Name of the node hosting the referenced endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_endpoint_topology_present_kubernetes_io_hostname&lt;/code&gt;:
&lt;code&gt;true&lt;/code&gt; if the referenced object has a &lt;code&gt;kubernetes.io/hostname&lt;/code&gt; annotation.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_port&lt;/code&gt;: Port of the referenced endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_port_name&lt;/code&gt;: Named port of the referenced
endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_endpointslice_port_protocol&lt;/code&gt;: Protocol of the referenced
endpoint.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If the endpoints belong to a service, all labels of the &lt;code&gt;service&lt;/code&gt; role
discovery are attached.&lt;/li&gt;
&lt;li&gt;For all targets backed by a pod, all labels of the &lt;code&gt;pod&lt;/code&gt; role discovery are
attached.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;ingress-role&#34;&gt;ingress role&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;ingress&lt;/code&gt; role discovers a target for each path of each ingress. This is
generally useful for externally monitoring an ingress. The address will be set
to the host specified in the Kubernetes &lt;code&gt;Ingress&lt;/code&gt;&amp;rsquo;s &lt;code&gt;spec&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The following labels are included for discovered ingress objects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt;: The namespace of the ingress object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_ingress_name&lt;/code&gt;: The name of the ingress object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_ingress_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: Each label from the ingress
object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_ingress_labelpresent_&amp;lt;labelname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for each label
from the ingress object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_ingress_annotation_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: Each annotation from
the ingress object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_ingress_annotationpresent_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for each
annotation from the ingress object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_ingress_class_name&lt;/code&gt;: Class name from ingress spec, if
present.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_ingress_scheme&lt;/code&gt;: Protocol scheme of ingress, &lt;code&gt;https&lt;/code&gt; if TLS
config is set. Defaults to &lt;code&gt;http&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_ingress_path&lt;/code&gt;: Path from ingress spec. Defaults to /.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;discovery.kubernetes&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;namespaces&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#namespaces-block&#34;&gt;namespaces&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Information about which Kubernetes namespaces to search.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;selectors&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#selectors-block&#34;&gt;selectors&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Information about which Kubernetes namespaces to search.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http_client_config-block&#34;&gt;http_client_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client configuration for Kubernetes requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; basic_auth&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;basic_auth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic_auth for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; authorization&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authorization-block&#34;&gt;authorization&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;oauth2&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2 &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example,
&lt;code&gt;http_client_config &amp;gt; basic_auth&lt;/code&gt; refers to a &lt;code&gt;basic_auth&lt;/code&gt; block defined inside
an &lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;namespaces-block&#34;&gt;namespaces block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;namespaces&lt;/code&gt; block limits the namespaces to discover resources in. If
omitted, all namespaces are searched.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;own_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Include the namespace the agent is running in.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;names&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of namespaces to search.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;selectors-block&#34;&gt;selectors block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;selectors&lt;/code&gt; block contains optional label and field selectors to limit the
discovery process to a subset of resources.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;role&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Role of the selector.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label selector string.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;field&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Field selector string.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;See Kubernetes&amp;rsquo; documentation for &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Field selectors&lt;/a&gt; and [Labels and
selectors][] to learn more about the possible filters that can be used.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Using multiple &lt;code&gt;discovery.kubernetes&lt;/code&gt; components with different
selectors may result in a bigger load against the Kubernetes API.&lt;/p&gt;
&lt;p&gt;Selectors are recommended for retrieving a small set of resources in a very
large cluster. Smaller clusters are recommended to avoid selectors in favor
of filtering with &lt;a href=&#34;../discovery.relabel/&#34;&gt;a &lt;code&gt;discovery.relabel&lt;/code&gt; component&lt;/a&gt;
instead.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; block configures settings used to connect to the
Kubernetes API server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth-block&#34;&gt;basic_auth block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/basic-auth-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mututally exclusive and only one can be
provided inside of a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;authorization-block&#34;&gt;authorization block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/authorization-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credential&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive and only one can be
provided inside of an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2-block&#34;&gt;oauth2 block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/oauth2-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional proxy URL for OAuth2 requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mututally exclusive and only one
can be provided inside of an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain its own separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The set of targets discovered from the Kubernetes API.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.kubernetes&lt;/code&gt; is reported as unhealthy when given an invalid
configuration. In those cases, exported fields retain their last healthy
values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.kubernetes&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h3 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;discovery.kubernetes&lt;/code&gt; does not expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;in-cluster-discovery&#34;&gt;In-cluster discovery&lt;/h3&gt;
&lt;p&gt;This example uses in-cluster authentication to discover all pods:&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;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;discovery.kubernetes &amp;#34;k8s_pods&amp;#34; {
  role = &amp;#34;pod&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;kubeconfig-authentication&#34;&gt;Kubeconfig authentication&lt;/h3&gt;
&lt;p&gt;This example uses a kubeconfig file to authenticate to the Kubernetes API:&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;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;discovery.kubernetes &amp;#34;k8s_pods&amp;#34; {
  role = &amp;#34;pod&amp;#34;
  kubeconfig_file = &amp;#34;/etc/k8s/kubeconfig.yaml&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;limit-searched-namespaces&#34;&gt;Limit searched namespaces&lt;/h3&gt;
&lt;p&gt;This example limits the namespaces where pods are discovered using the &lt;code&gt;namespaces&lt;/code&gt; block:&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;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;discovery.kubernetes &amp;#34;k8s_pods&amp;#34; {
  role = &amp;#34;pod&amp;#34;
  namespaces {
    names = [&amp;#34;myapp&amp;#34;]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="discoverykubernetes">discovery.kubernetes&lt;/h1>
&lt;p>&lt;code>discovery.kubernetes&lt;/code> allows you to find scrape targets from Kubernetes
resources. It watches cluster state, and ensures targets are continually synced
with what is currently running in your cluster.&lt;/p></description></item><item><title>discovery.relabel</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/discovery.relabel/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/discovery.relabel/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryrelabel&#34;&gt;discovery.relabel&lt;/h1&gt;
&lt;p&gt;In Flow, targets are defined as sets of key-value pairs called &lt;em&gt;labels&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;discovery.relabel&lt;/code&gt; rewrites the label set of the input targets by applying one
or more relabeling rules. If no rules are defined, then the input targets are
exported as-is.&lt;/p&gt;
&lt;p&gt;The most common use of &lt;code&gt;discovery.relabel&lt;/code&gt; is to filter targets or standardize
the target label set that is passed to a downstream component. The &lt;code&gt;rule&lt;/code&gt;
blocks are applied to the label set of each target in order of their appearance
in the configuration file. The configured rules can be retrieved by calling the
function in the &lt;code&gt;rules&lt;/code&gt; export field.&lt;/p&gt;
&lt;p&gt;Target labels which start with a double underscore &lt;code&gt;__&lt;/code&gt; are considered
internal, and may be removed by other Flow components prior to telemetry
collection. To retain any of these labels, use a &lt;code&gt;labelmap&lt;/code&gt; action to remove
the prefix, or remap them to a different name. Service discovery mechanisms
usually group their labels under &lt;code&gt;__meta_*&lt;/code&gt;. For example, the
discovery.kubernetes component populates a set of &lt;code&gt;__meta_kubernetes_*&lt;/code&gt; labels
to provide information about the discovered Kubernetes resources. If a
relabeling rule needs to store a label value temporarily, for example as the
input to a subsequent step, use the &lt;code&gt;__tmp&lt;/code&gt; label name prefix, as it is
guaranteed to never be used.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;discovery.relabel&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;discovery.relabel &amp;#34;LABEL&amp;#34; {
  targets = TARGET_LIST

  rule {
    ...
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Targets to relabel&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;discovery.relabel&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;rule&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#rule-block&#34;&gt;rule&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;rule-block&#34;&gt;rule block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/rule-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;rule&lt;/code&gt; block contains the definition of any relabeling rules that can be
applied to an input metric. If more than one &lt;code&gt;rule&lt;/code&gt; block is defined, the
transformations are applied in top-down order.&lt;/p&gt;
&lt;p&gt;The following arguments can be used to configure a &lt;code&gt;rule&lt;/code&gt;. All arguments are
optional. Omitted fields take their default values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of labels whose values are to be selected. Their content is concatenated using the &lt;code&gt;separator&lt;/code&gt; and matched against &lt;code&gt;regex&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The separator used to concatenate the values present in &lt;code&gt;source_labels&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A valid RE2 expression with support for parenthesized capture groups. Used to match the extracted value from the combination of the &lt;code&gt;source_label&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt; fields or filter labels during the &lt;code&gt;labelkeep/labeldrop/labelmap&lt;/code&gt; actions.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;(.*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;modulus&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A positive integer used to calculate the modulus of the hashed source label values.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;target_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label to which the resulting value will be written to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replacement&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value against which a regex replace is performed, if the regex matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;$1&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;action&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The relabeling action to perform.&lt;/td&gt;
              &lt;td&gt;replace&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Here&amp;rsquo;s a list of the available actions, along with a brief description of their usage.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;replace&lt;/code&gt;   - Matches &lt;code&gt;regex&lt;/code&gt; to the concatenated labels. If there&amp;rsquo;s a match, it replaces the content of the &lt;code&gt;target_label&lt;/code&gt; using the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;keep&lt;/code&gt;      - Keeps metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;drop&lt;/code&gt;      - Drops metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hashmod&lt;/code&gt;   - Hashes the concatenated labels, calculates its modulo &lt;code&gt;modulus&lt;/code&gt; and writes the result to the &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelmap&lt;/code&gt;  - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are renamed according to the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labeldrop&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelkeep&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that don&amp;rsquo;t match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, note that the regex capture groups can be referred to using either the
&lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;output&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The set of targets after applying relabeling.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;RelabelRules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The currently configured relabeling rules.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.relabel&lt;/code&gt; is only reported as unhealthy when given an invalid
configuration. In those cases, exported fields retain their last healthy
values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.relabel&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h3 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;discovery.relabel&lt;/code&gt; does not expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&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;discovery.relabel &amp;#34;keep_backend_only&amp;#34; {
  targets = [
    { &amp;#34;__meta_foo&amp;#34; = &amp;#34;foo&amp;#34;, &amp;#34;__address__&amp;#34; = &amp;#34;localhost&amp;#34;, &amp;#34;instance&amp;#34; = &amp;#34;one&amp;#34;,   &amp;#34;app&amp;#34; = &amp;#34;backend&amp;#34;  },
    { &amp;#34;__meta_bar&amp;#34; = &amp;#34;bar&amp;#34;, &amp;#34;__address__&amp;#34; = &amp;#34;localhost&amp;#34;, &amp;#34;instance&amp;#34; = &amp;#34;two&amp;#34;,   &amp;#34;app&amp;#34; = &amp;#34;database&amp;#34; },
    { &amp;#34;__meta_baz&amp;#34; = &amp;#34;baz&amp;#34;, &amp;#34;__address__&amp;#34; = &amp;#34;localhost&amp;#34;, &amp;#34;instance&amp;#34; = &amp;#34;three&amp;#34;, &amp;#34;app&amp;#34; = &amp;#34;frontend&amp;#34; },
  ]

  rule {
    source_labels = [&amp;#34;__address__&amp;#34;, &amp;#34;instance&amp;#34;]
    separator     = &amp;#34;/&amp;#34;
    target_label  = &amp;#34;destination&amp;#34;
    action        = &amp;#34;replace&amp;#34;
  }

  rule {
    source_labels = [&amp;#34;app&amp;#34;]
    action        = &amp;#34;keep&amp;#34;
    regex         = &amp;#34;backend&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="discoveryrelabel">discovery.relabel&lt;/h1>
&lt;p>In Flow, targets are defined as sets of key-value pairs called &lt;em>labels&lt;/em>.&lt;/p>
&lt;p>&lt;code>discovery.relabel&lt;/code> rewrites the label set of the input targets by applying one
or more relabeling rules. If no rules are defined, then the input targets are
exported as-is.&lt;/p></description></item><item><title>local.file</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/local.file/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/local.file/</guid><content><![CDATA[&lt;h1 id=&#34;localfile&#34;&gt;local.file&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;local.file&lt;/code&gt; exposes the contents of a file on disk to other components. The
file will be watched for changes so that its latest content is always exposed.&lt;/p&gt;
&lt;p&gt;The most common use of &lt;code&gt;local.file&lt;/code&gt; is to load secrets (e.g., API keys) from
files.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;local.file&lt;/code&gt; components can be specified by giving them different
labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;local.file &amp;#34;LABEL&amp;#34; {
  filename = FILE_NAME
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;filename&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of the file on disk to watch&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;detector&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Which file change detector to use (fsnotify, poll)&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;fsnotify&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;poll_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to poll for file changes&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;is_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Marks the file as containing a &lt;a href=&#34;../../../config-language/expressions/types_and_values/#secrets&#34;&gt;secret&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;file-change-detectors&#34;&gt;File change detectors&lt;/h3&gt;
&lt;p&gt;File change detectors are used for detecting when the file needs to be re-read
from disk. &lt;code&gt;local.file&lt;/code&gt; supports two detectors: &lt;code&gt;fsnotify&lt;/code&gt; and &lt;code&gt;poll&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&#34;fsnotify&#34;&gt;fsnotify&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;fsnotify&lt;/code&gt; detector subscribes to filesystem events which indicate when the
watched file had been updated. This requires a filesystem which supports events
at the Operating System level: network-based filesystems like NFS or FUSE won&amp;rsquo;t
work.&lt;/p&gt;
&lt;p&gt;When a filesystem event is received, the component will reread the watched
file. This will happen for any filesystem event to the file, including a change
of permissions.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;fsnotify&lt;/code&gt; also polls for changes to the file with the configured
&lt;code&gt;poll_frequency&lt;/code&gt; as a fallback.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;fsnotify&lt;/code&gt; will stop receiving filesystem events if the watched file has been
deleted, renamed, or moved. The subscription will be re-established on the next
poll once the watched file exists again.&lt;/p&gt;
&lt;h4 id=&#34;poll&#34;&gt;poll&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;poll&lt;/code&gt; file change detector will cause the watched file to be reread
every &lt;code&gt;poll_frequency&lt;/code&gt;, regardless of whether the file changed.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;content&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt; or &lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The contents of the file from the most recent read&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;content&lt;/code&gt; field will have the &lt;code&gt;secret&lt;/code&gt; type only if the &lt;code&gt;is_secret&lt;/code&gt;
argument was true.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;local.file&lt;/code&gt; will be reported as healthy whenever if the watched file was read
successfully.&lt;/p&gt;
&lt;p&gt;Failing to read the file whenever an update is detected (or after the poll
period elapses) will cause the component to be reported as unhealthy. When
unhealthy, exported fields will be kept at the last healthy value. The read
error will be exposed as a log message and in the debug information for the
component.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;local.file&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h3 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;agent_local_file_timestamp_last_accessed_unix_seconds&lt;/code&gt; (gauge): The
timestamp, in Unix seconds, that the file was last sucessfully accessed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&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;local.file &amp;#34;secret_key&amp;#34; {
  filename  = &amp;#34;/var/secrets/password.txt&amp;#34;
  is_secret = true
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="localfile">local.file&lt;/h1>
&lt;p>&lt;code>local.file&lt;/code> exposes the contents of a file on disk to other components. The
file will be watched for changes so that its latest content is always exposed.&lt;/p></description></item><item><title>loki.process</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.process/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.process/</guid><content><![CDATA[&lt;h1 id=&#34;lokiprocess&#34;&gt;loki.process&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.process&lt;/code&gt; receives log entries from other loki components, applies one or
more processing &lt;em&gt;stages&lt;/em&gt;, and forwards the results to the list of receivers
in the component&amp;rsquo;s arguments.&lt;/p&gt;
&lt;p&gt;A stage is a multi-purpose block that can parse, transform, and filter log
entries before they&amp;rsquo;re passed to a downstream component. These stages are
applied to each log entry in order of their appearance in the configuration
file. All stages within a &lt;code&gt;loki.process&lt;/code&gt; block have access to the log entry&amp;rsquo;s
label set, the log line, the log timestamp, as well as a shared map of
&amp;rsquo;extracted&amp;rsquo; values so that the results of one stage can be used in a subsequent
one.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.process&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.process &amp;#34;LABEL&amp;#34; {
  forward_to = RECEIVER_LIST

  stage {
    ...
  }
  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.process&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Where to forward log entries after processing.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;loki.process&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;stage&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stage-block&#34;&gt;stage&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Processing stage to run.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; docker&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#docker-block&#34;&gt;docker&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a pre-defined Docker log format pipeline.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; cri&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#cri-block&#34;&gt;cri&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a pre-defined CRI-format pipeline.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; json&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#json-block&#34;&gt;json&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a JSON processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; logfmt&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#logfmt-block&#34;&gt;logfmt&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a logfmt processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; labels&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#labels-block&#34;&gt;labels&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a labels processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; label_keep&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#label_keep-block&#34;&gt;label_keep&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;label_keep&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; label_drop&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#label_drop-block&#34;&gt;label_drop&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;label_drop&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; static_labels&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#static_labels-block&#34;&gt;static_labels&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;static_labels&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; regex&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#regex-block&#34;&gt;regex&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;regex&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; timestamp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#timestamp-block&#34;&gt;timestamp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;timestamp&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures an &lt;code&gt;output&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; replace&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#replace-block&#34;&gt;replace&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;replace&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; multiline&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#multiline-block&#34;&gt;multiline&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;multiline&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; match&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#match-block&#34;&gt;match&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;match&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage &amp;gt; drop&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#drop-block&#34;&gt;drop&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;drop&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;stage &amp;gt; json&lt;/code&gt;
refers to a &lt;code&gt;json&lt;/code&gt; block defined inside of a &lt;code&gt;stage&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;stage-block&#34;&gt;stage block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage&lt;/code&gt; block describes a single processing step to run log entries
through. As such, each block must have exactly &lt;em&gt;one&lt;/em&gt; inner block to match the
type of stage to configure. Multiple processing stages must be defined in
different blocks and are applied on the incoming log entries in top-down order.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;stage&lt;/code&gt; block does not support any arguments and is configured only via
inner blocks.&lt;/p&gt;
&lt;h3 id=&#34;docker-block&#34;&gt;docker block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;docker&lt;/code&gt; inner block enables a predefined pipeline which reads log lines in
the standard format of Docker log files.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;docker&lt;/code&gt; block does not support any arguments or inner blocks, so it is
always empty.&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;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;stage {
	docker {}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Docker log entries are formatted as JSON with the following keys:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;log&lt;/code&gt;: The content of log line&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stream&lt;/code&gt;: Either &lt;code&gt;stdout&lt;/code&gt; or &lt;code&gt;stderr&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;time&lt;/code&gt;: The timestamp string of the log line&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Given the following log line, the subsequent key-value pairs are created in the
shared map of extracted data:&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;{&amp;#34;log&amp;#34;:&amp;#34;log message\n&amp;#34;,&amp;#34;stream&amp;#34;:&amp;#34;stderr&amp;#34;,&amp;#34;time&amp;#34;:&amp;#34;2019-04-30T02:12:41.8443515Z&amp;#34;}

output: log message\n
stream: stderr
timestamp: 2019-04-30T02:12:41.8443515&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;cri-block&#34;&gt;cri block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;cri&lt;/code&gt; inner block enables a predefined pipeline which reads log lines using
the CRI logging format.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;cri&lt;/code&gt; block does not support any arguments or inner blocks, so it is always
empty.&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;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;stage {
	cri {}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;CRI specifies log lines as single space-delimited values with the following
components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;time&lt;/code&gt;: The timestamp string of the log&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stream&lt;/code&gt;: Either &lt;code&gt;stdout&lt;/code&gt; or &lt;code&gt;stderr&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;flags&lt;/code&gt;: CRI flags including &lt;code&gt;F&lt;/code&gt; or &lt;code&gt;P&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;log&lt;/code&gt;: The contents of the log line&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Given the following log line, the subsequent key-value pairs are created in the
shared map of extracted data:&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;&amp;#34;2019-04-30T02:12:41.8443515Z stdout F message&amp;#34;

content: message
stream: stdout
timestamp: 2019-04-30T02:12:41.8443515&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;json-block&#34;&gt;json block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;json&lt;/code&gt; inner block configures a JSON processing stage that parses incoming
log lines or previously extracted values as JSON and uses
&lt;a href=&#34;https://jmespath.org/tutorial.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;JMESPath expressions&lt;/a&gt; to extract new
values from them.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;expressions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key-value pairs of JMESPath expressions.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Source of the data to parse as JSON.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drop_malformed&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Drop lines whose input cannot be parsed as valid JSON.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When configuring a JSON stage, the &lt;code&gt;source&lt;/code&gt; field defines the source of data to
parse as JSON. By default, this is the log line itself, but it can also be a
previously extracted value.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;expressions&lt;/code&gt; field is the set of key-value pairs of MESPath expressions to
run. The map key defines the name with which the data is extracted, while the
map value is the expression used to populate the value.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a given log line and two JSON stages to run.&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;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;{&amp;#34;log&amp;#34;:&amp;#34;log message\n&amp;#34;,&amp;#34;extra&amp;#34;:&amp;#34;{\&amp;#34;user\&amp;#34;:\&amp;#34;agent\&amp;#34;}&amp;#34;}

loki.process &amp;#34;username&amp;#34; {
	stage {
		json {
			expressions = {output = log, extra = &amp;#34;&amp;#34;}
		}
	}

	stage {
		json {
			source      = &amp;#34;extra&amp;#34;
			expressions = {username = &amp;#34;user&amp;#34;}
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this example, the first stage uses the log line as the source and populates
these values in the shared map. An empty expression means using the same value
as the key (so &lt;code&gt;extra=&amp;quot;extra&amp;quot;&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;output: log message\n
extra: {&amp;#34;user&amp;#34;: &amp;#34;agent&amp;#34;}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The second stage uses the value in &lt;code&gt;extra&lt;/code&gt; as the input and appends the
following key-value pair to the set of extracted data.&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;username: agent&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;logfmt-block&#34;&gt;logfmt block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;logfmt&lt;/code&gt; inner block configures a processing stage that reads incoming log
lines as logfmt and extracts values from them.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mapping&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key-value pairs of logmft fields to extract.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Source of the data to parse as logfmt.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;source&lt;/code&gt; field defines the source of data to parse as logfmt. When &lt;code&gt;source&lt;/code&gt;
is missing or empty, the stage parses the log line itself, but it can also be
used to parse a previously extracted value.&lt;/p&gt;
&lt;p&gt;This stage uses the &lt;a href=&#34;https://github.com/go-logfmt/logfmt&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;go-logfmt&lt;/a&gt;
unmarshaler, so that numeric or boolean types are unmarshalled into their
correct form. The stage does not perform any other type conversions. If the
extracted value is a complex type, it is treated as a string.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how this works on the following log line and stages.&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;time=2012-11-01T22:08:41&amp;#43;00:00 app=loki level=WARN duration=125 message=&amp;#34;this is a log line&amp;#34; extra=&amp;#34;user=foo&amp;#34;

stage {
	logfmt {
		mapping = { &amp;#34;extra&amp;#34; = &amp;#34;&amp;#34; }
	}
}

stage {
	logfmt {
		mapping = { &amp;#34;username&amp;#34; = &amp;#34;user&amp;#34; }
		source  = &amp;#34;extra&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The first stage parses the log line itself and inserts the &lt;code&gt;extra&lt;/code&gt; key in the
set of extracted data, with the value of &lt;code&gt;user=foo&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The second stage parses the contents of &lt;code&gt;extra&lt;/code&gt; and appends the &lt;code&gt;username: foo&lt;/code&gt;
key-value pair to the set of extracted data.&lt;/p&gt;
&lt;h3 id=&#34;labels-block&#34;&gt;labels block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;labels&lt;/code&gt; inner block configures a labels processing stage that can read
data from the extracted values map and set new labels on incoming log entries.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;labels&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;In a labels stage, the map&amp;rsquo;s keys define the label to set and the values are
how to look them up.  If the value is empty, it is inferred to be the same as
the key.&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;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;stage {
	labels {
		values = {
			env  = &amp;#34;&amp;#34;,         // Sets up an &amp;#39;env&amp;#39; label, based on the &amp;#39;env&amp;#39; extracted value.
			user = &amp;#34;username&amp;#34;, // Sets up a &amp;#39;user&amp;#39; label, based on the &amp;#39;username&amp;#39; extracted value.
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;label_keep-block&#34;&gt;label_keep block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;label_keep&lt;/code&gt; inner block configures a processing stage that filters the
label set of an incoming log entry down to a subset.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;label_keep&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;stage {
	label_keep {
		values = [ &amp;#34;kubernetes_pod_name&amp;#34;, &amp;#34;kubernetes_container_name&amp;#34; ]
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;label_drop-block&#34;&gt;label_drop block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;label_drop&lt;/code&gt; inner block configures a processing stage that drops labels
from incoming log entries.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;label_drop&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;stage {
	label_drop {
		values = [ &amp;#34;kubernetes_node_name&amp;#34;, &amp;#34;kubernetes_namespace&amp;#34; ]
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;static_labels-block&#34;&gt;static_labels block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;static_labels&lt;/code&gt; inner block configures a static_labels processing stage
that adds a static set of labels to incoming log entries.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;static_labels&lt;/code&gt; processing stage.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;stage {
	static_labels {
		values = {
			foo = &amp;#34;fooval&amp;#34;,
			bar = &amp;#34;barval&amp;#34;,
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;regex-block&#34;&gt;regex block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;regex&lt;/code&gt; inner block configures a processing stage that parses log lines
using regular expressions and uses named capture groups for adding data into
the shared extracted map of values.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;expression&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A valid RE2 regular expression. Each capture group must be named.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to parse. If empty, uses the log message.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;expression&lt;/code&gt; field needs to be a RE2 regex string. Every matched capture
group is added to the extracted map, so it must be named like: &lt;code&gt;(?P&amp;lt;name&amp;gt;re)&lt;/code&gt;.
The name of the capture group is then used as the key in the extracted map for
the matched value.&lt;/p&gt;
&lt;p&gt;Because of how River strings work, any backslashes in &lt;code&gt;expression&lt;/code&gt; must be
escaped with a double backslash; for example &lt;code&gt;&amp;quot;\\w&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;\\S&#43;&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;source&lt;/code&gt; is empty or missing, then the stage parses the log line itself.
If it&amp;rsquo;s set, the stage parses a previously extracted value with the same name.&lt;/p&gt;
&lt;p&gt;Given the following log line and regex stage, the extracted values are shown
below:&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;2019-01-01T01:00:00.000000001Z stderr P i&amp;#39;m a log message!

stage {
  regex {
    expression = &amp;#34;^(?s)(?P&amp;lt;time&amp;gt;\\S&amp;#43;?) (?P&amp;lt;stream&amp;gt;stdout|stderr) (?P&amp;lt;flags&amp;gt;\\S&amp;#43;?) (?P&amp;lt;content&amp;gt;.*)$&amp;#34;
  }
}


time: 2019-01-01T01:00:00.000000001Z,
stream: stderr,
flags: P,
content: i&amp;#39;m a log message&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;On the other hand, if the &lt;code&gt;source&lt;/code&gt; value is set, then the regex is applied to
the value stored in the shared map under that name.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see what happens when the following log line is put through this
two-stage pipeline:&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;{&amp;#34;timestamp&amp;#34;:&amp;#34;2022-01-01T01:00:00.000000001Z&amp;#34;}

stage {
  json {
    expressions = { time = &amp;#34;timestamp&amp;#34; }
  }
}
stage {
  regex {
    expression = &amp;#34;^(?P&amp;lt;year&amp;gt;\\d&amp;#43;)&amp;#34;
    source     = &amp;#34;time&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The first stage adds the following key-value pair into the extracted map:&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;time: 2022-01-01T01:00:00.000000001Z&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then, the regex stage parses the value for time from the shared values and
appends the subsequent key-value pair back into the extracted values map:&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;year: 2022&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;timestamp-block&#34;&gt;timestamp block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;timestamp&lt;/code&gt; inner block configures a processing stage that sets the
timestamp of log entries before they&amp;rsquo;re forwarded to the next component. When
no timestamp stage is set, the log entry timestamp defaults to the time when
the log entry was scraped.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted values map to use for the timestamp.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;format&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Determines how to parse the source string.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fallback_formats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Fallback formats to try if the &lt;code&gt;format&lt;/code&gt; field fails.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;location&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;IANA Timezone Database location to use when parsing.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;action_on_failure&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;What to do when the timestamp can&amp;rsquo;t be extracted or parsed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;fudge&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;source&lt;/code&gt; field defines which value from the shared map of extracted values
the stage should attempt to parse as a timestamp.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;format&lt;/code&gt; field defines &lt;em&gt;how&lt;/em&gt; that source should be parsed.&lt;/p&gt;
&lt;p&gt;First off, the &lt;code&gt;format&lt;/code&gt; can be set to one of the following shorthand values for
commonly-used forms:&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;ANSIC: Mon Jan _2 15:04:05 2006
UnixDate: Mon Jan _2 15:04:05 MST 2006
RubyDate: Mon Jan 02 15:04:05 -0700 2006
RFC822: 02 Jan 06 15:04 MST
RFC822Z: 02 Jan 06 15:04 -0700
RFC850: Monday, 02-Jan-06 15:04:05 MST
RFC1123: Mon, 02 Jan 2006 15:04:05 MST
RFC1123Z: Mon, 02 Jan 2006 15:04:05 -0700
RFC3339: 2006-01-02T15:04:05-07:00
RFC3339Nano: 2006-01-02T15:04:05.999999999-07:00&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Additionally, support for common Unix timestamps is supported with the
following format values:&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;Unix: 1562708916 or with fractions 1562708916.000000123
UnixMs: 1562708916414
UnixUs: 1562708916414123
UnixNs: 1562708916000000123&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Otherwise, the field accepts a custom format string that defines how an
arbitrary reference point in history should
be interpreted by the stage. The arbitrary reference point is Mon Jan 2 15:04:05 -0700 MST 2006.&lt;/p&gt;
&lt;p&gt;The string value of the field is passed directly to the layout parameter in
Go&amp;rsquo;s &lt;a href=&#34;https://pkg.go.dev/time#Parse&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;time.Parse&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;If the custom format has no year component, the stage uses the current year,
according to the system&amp;rsquo;s clock.&lt;/p&gt;
&lt;p&gt;The following table shows the supported reference values to use when defining a
custom format.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Timestamp Component&lt;/th&gt;
              &lt;th&gt;Format value&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Year&lt;/td&gt;
              &lt;td&gt;06, 2006&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Month&lt;/td&gt;
              &lt;td&gt;1, 01, Jan, January&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Day&lt;/td&gt;
              &lt;td&gt;2, 02, _2 (two digits right justified)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Day of the week&lt;/td&gt;
              &lt;td&gt;Mon, Monday&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Hour&lt;/td&gt;
              &lt;td&gt;3 (12-hour), 03 (12-hour zero prefixed), 15 (24-hour)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Minute&lt;/td&gt;
              &lt;td&gt;4, 04&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Second&lt;/td&gt;
              &lt;td&gt;5, 05&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Fraction of second&lt;/td&gt;
              &lt;td&gt;.000 (ms zero prefixed), .000000 (μs), .000000000 (ns), .999 (ms without trailing zeroes), .999999 (μs), .999999999 (ns)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;12-hour period&lt;/td&gt;
              &lt;td&gt;pm, PM&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Timezone name&lt;/td&gt;
              &lt;td&gt;MST&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Timezone offset&lt;/td&gt;
              &lt;td&gt;-0700, -070000 (with seconds), -07, 07:00, -07:00:00 (with seconds)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Timezone ISO-8601&lt;/td&gt;
              &lt;td&gt;Z0700 (Z for UTC or time offset), Z070000, Z07, Z07:00, Z07:00:00&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;fallback_formats&lt;/code&gt; field defines one or more format fields to try and parse
the timestamp with, if parsing with &lt;code&gt;format&lt;/code&gt; fails.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;location&lt;/code&gt; field must be a valid IANA Timezone Database location and
determines in which timezone the timestamp value is interpreted to be in.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;action_on_failure&lt;/code&gt; field defines what should happen when the source field
doesn&amp;rsquo;t exist in the shared extracted map, or if the timestamp parsing fails.&lt;/p&gt;
&lt;p&gt;The supported actions are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;fudge (default): Change the timestamp to the last known timestamp, summing up
1 nanosecond (to guarantee log entries ordering).&lt;/li&gt;
&lt;li&gt;skip: Do not change the timestamp and keep the time when the log entry was
scraped.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following stage fetches the &lt;code&gt;time&lt;/code&gt; value from the shared values map, parses
it as a RFC3339 format, and sets it as the log entry&amp;rsquo;s timestamp.&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;stage {
	timestamp {
		source = &amp;#34;time&amp;#34;
		format = &amp;#34;RFC3339&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; inner block configures a processing stage that reads from the
extracted map and changes the content of the log entry that is forwarded
to the next component.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to use for the log entry.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Let&amp;rsquo;s see how this works for the following log line and three-stage pipeline:&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;{&amp;#34;user&amp;#34;: &amp;#34;John Doe&amp;#34;, &amp;#34;message&amp;#34;: &amp;#34;hello, world!&amp;#34;}

stage {
	json {
		expressions = { &amp;#34;user&amp;#34; = &amp;#34;user&amp;#34;, &amp;#34;message&amp;#34; = &amp;#34;message&amp;#34; }
	}
}

stage {
	labels {
		values = { &amp;#34;user&amp;#34; = &amp;#34;user&amp;#34; }
	}
}

stage {
	output {
		source = &amp;#34;message&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The first stage extracts the following key-value pairs into the shared map:&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;user: John Doe
message: hello, world!&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then, the second stage adds &lt;code&gt;user=&amp;quot;John Doe&amp;quot;&lt;/code&gt; to the label set of the log
entry, and the final output stage changes the log line from the original
JSON to &lt;code&gt;hello, world!&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;replace-block&#34;&gt;replace block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;replace&lt;/code&gt; inner block configures a stage that parses a log line using a
regular expression and replaces the log line contents. Named capture groups in
the regex also support adding data into the shared extracted map.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;expression&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to use for the log entry.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Source of the data to parse. If empty, it uses the log message.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Value replaced by the capture group.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;source&lt;/code&gt; field defines the source of data to parse using &lt;code&gt;expression&lt;/code&gt;. When
&lt;code&gt;source&lt;/code&gt; is missing or empty, the stage parses the log line itself, but it can
also be used to parse a previously extracted value. The replaced value is
assigned back to the &lt;code&gt;source&lt;/code&gt; key.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;expression&lt;/code&gt; must be a valid RE2 regex. Every named capture group
&lt;code&gt;(?P&amp;lt;name&amp;gt;re)&lt;/code&gt; is set into the extracted map with its name.&lt;/p&gt;
&lt;p&gt;Because of how River treats backslashes in double-quoted strings, note that all
backslashes in a regex expression must be escaped like &lt;code&gt;&amp;quot;\\w*&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how this works with the following log line and stage. Since &lt;code&gt;source&lt;/code&gt;
is omitted, the replacement occurs  on the log line itself.&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;2023-01-01T01:00:00.000000001Z stderr P i&amp;#39;m a log message who has sensitive information with password xyz!

stage {
	replace {
		expression = &amp;#34;password (\\S&amp;#43;)&amp;#34;
		replace    = &amp;#34;*****&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The log line is transformed to&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;2023-01-01T01:00:00.000000001Z stderr P i&amp;#39;m a log message who has sensitive information with password *****!&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If &lt;code&gt;replace&lt;/code&gt; is empty, then the captured value is omitted instead.&lt;/p&gt;
&lt;p&gt;In the following example, &lt;code&gt;source&lt;/code&gt; is defined.&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;{&amp;#34;time&amp;#34;:&amp;#34;2023-01-01T01:00:00.000000001Z&amp;#34;, &amp;#34;level&amp;#34;: &amp;#34;info&amp;#34;, &amp;#34;msg&amp;#34;:&amp;#34;11.11.11.11 - \&amp;#34;POST /loki/api/push/ HTTP/1.1\&amp;#34; 200 932 \&amp;#34;-\&amp;#34; \&amp;#34;Mozilla/5.0\&amp;#34;}

stage {
	json {
		expressions = { &amp;#34;level&amp;#34; = &amp;#34;&amp;#34;, &amp;#34;msg&amp;#34; = &amp;#34;&amp;#34; }
	}
}

stage {
	replace {
		expression = &amp;#34;\\S&amp;#43; - \&amp;#34;POST (\\S&amp;#43;) .*&amp;#34;
		source     = &amp;#34;msg&amp;#34;
		replace    = &amp;#34;redacted_url&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The JSON stage adds the following key-value pairs into the extracted map:&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;time: 2023-01-01T01:00:00.000000001Z
level: info
msg: &amp;#34;11.11.11.11 - &amp;#34;POST /loki/api/push/ HTTP/1.1&amp;#34; 200 932 &amp;#34;-&amp;#34; &amp;#34;Mozilla/5.0&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;replace&lt;/code&gt; stage acts on the &lt;code&gt;msg&lt;/code&gt; value. The capture group matches against
&lt;code&gt;/loki/api/push&lt;/code&gt; and is replaced by &lt;code&gt;redacted_url&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;msg&lt;/code&gt; value is finally transformed into:&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;msg: &amp;#34;11.11.11.11 - &amp;#34;POST redacted_url HTTP/1.1&amp;#34; 200 932 &amp;#34;-&amp;#34; &amp;#34;Mozilla/5.0&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;replace&lt;/code&gt; field can use a set of templating functions, by utilizing Go&amp;rsquo;s
&lt;a href=&#34;https://pkg.go.dev/text/template&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;text/template&lt;/a&gt; package.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how this works with named capture groups with a sample log line
and stage.&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;11.11.11.11 - agent [01/Jan/2023:00:00:01 &amp;#43;0200]

stage {
	replace {
		expression = &amp;#34;^(?P&amp;lt;ip&amp;gt;\\S&amp;#43;) (?P&amp;lt;identd&amp;gt;\\S&amp;#43;) (?P&amp;lt;user&amp;gt;\\S&amp;#43;) \\[(?P&amp;lt;timestamp&amp;gt;[\\w:/]&amp;#43;\\s[&amp;#43;\\-]\\d{4})\\]&amp;#34;
		replace    = &amp;#34;{{ .Value | ToUpper }}&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Since &lt;code&gt;source&lt;/code&gt; is empty, the regex parses the log line itself and extracts the
named capture groups to the shared map of values. The &lt;code&gt;replace&lt;/code&gt; field acts on
these extracted values and converts them to uppercase:&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;ip: 11.11.11.11
identd: -
user: FRANK
timestamp: 01/JAN/2023:00:00:01 &amp;#43;0200&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;and the log line becomes:&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;11.11.11.11 - FRANK [01/JAN/2023:00:00:01 &amp;#43;0200] &lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following list contains available functions with examples of
more complex &lt;code&gt;replace&lt;/code&gt; fields.&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;ToLower, ToUpper, Replace, Trim, TrimLeftTrimRight, TrimPrefix, TrimSuffix, TrimSpace, Hash, Sha2Hash, regexReplaceAll, regexReplaceAllLiteral

&amp;#34;{{ if eq .Value \&amp;#34;200\&amp;#34; }}{{ Replace .Value \&amp;#34;200\&amp;#34; \&amp;#34;HttpStatusOk\&amp;#34; -1 }}{{ else }}{{ .Value | ToUpper }}{{ end }}&amp;#34;
&amp;#34;*IP4*{{ .Value | Hash &amp;#34;salt&amp;#34; }}*&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;multiline-block&#34;&gt;multiline block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;multiline&lt;/code&gt; inner block merges multiple lines into a single block before
passing it on to the next stage in the pipeline.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;firstline&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to use for the log entry.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_wait_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum time to wait for a multiline block.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;3s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_lines&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of lines a block can have.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;128&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;A new block is identified by the RE2 regular expression passed in &lt;code&gt;firstline&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Any line that does &lt;em&gt;not&lt;/em&gt; match the expression is considered to be part of the
block of the previous match. If no new logs arrive with &lt;code&gt;max_wait_time&lt;/code&gt;, the
block is sent on. The &lt;code&gt;max_lines&lt;/code&gt; field defines the maximum number of lines a
block can have. If this is exceeded, a new block is started.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how this works in practice with an example stage and a stream of log
entries from a Flask web service.&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;stage {
	multiline {
		firstline     = &amp;#34;^\[\d{4}-\d{2}-\d{2} \d{1,2}:\d{2}:\d{2}\]&amp;#34;
		max_wait_time = &amp;#34;10s&amp;#34;
	}
}

[2023-01-18 17:41:21] &amp;#34;GET /hello HTTP/1.1&amp;#34; 200 -
[2023-01-18 17:41:25] ERROR in app: Exception on /error [GET]
Traceback (most recent call last):
  File &amp;#34;/home/pallets/.pyenv/versions/3.8.5/lib/python3.8/site-packages/flask/app.py&amp;#34;, line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File &amp;#34;/home/pallets/.pyenv/versions/3.8.5/lib/python3.8/site-packages/flask/app.py&amp;#34;, line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File &amp;#34;/home/pallets/.pyenv/versions/3.8.5/lib/python3.8/site-packages/flask/app.py&amp;#34;, line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File &amp;#34;/home/pallets/.pyenv/versions/3.8.5/lib/python3.8/site-packages/flask/_compat.py&amp;#34;, line 39, in reraise
    raise value
  File &amp;#34;/home/pallets/.pyenv/versions/3.8.5/lib/python3.8/site-packages/flask/app.py&amp;#34;, line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File &amp;#34;/home/pallets/.pyenv/versions/3.8.5/lib/python3.8/site-packages/flask/app.py&amp;#34;, line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File &amp;#34;/home/pallets/src/deployment_tools/hello.py&amp;#34;, line 10, in error
    raise Exception(&amp;#34;Sorry, this route always breaks&amp;#34;)
Exception: Sorry, this route always breaks
[2023-01-18 17:42:24] &amp;#34;GET /error HTTP/1.1&amp;#34; 500 -
[2023-01-18 17:42:29] &amp;#34;GET /hello HTTP/1.1&amp;#34; 200 -&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;All &amp;lsquo;blocks&amp;rsquo; that form log entries of separate web requests start with a
timestamp in square brackets. The stage detects this with the regular
expression in &lt;code&gt;firstline&lt;/code&gt; to collapse all lines of the traceback into a single
block and thus a single Loki log entry.&lt;/p&gt;
&lt;h3 id=&#34;match-block&#34;&gt;match block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;match&lt;/code&gt; inner block configures a filtering stage that can conditionally
either apply a nested set of processing stages or drop an entry when a log
entry matches a configurable LogQL stream selector and filter expressions.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The LogQL stream selector and filter expressions to use.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pipeline_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A custom name to use for the nested pipeline.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;action&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The action to take when the selector matches the log line. Supported values are &lt;code&gt;&amp;quot;keep&amp;quot;&lt;/code&gt; and &lt;code&gt;&amp;quot;drop&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;keep&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drop_counter_reason&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A custom reason to report for dropped lines.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;match_stage&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;match&lt;/code&gt; block supports a number of &lt;code&gt;stage&lt;/code&gt; inner blocks, like the top-level
block. These are used to construct the nested set of stages to run if the
selector matches the labels and content of the log entries.&lt;/p&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;stage &amp;gt; match&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;stage&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stage-block&#34;&gt;stage&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Processing stage to run.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If the specified action is &lt;code&gt;&amp;quot;drop&amp;quot;&lt;/code&gt;, the metric
&lt;code&gt;loki_process_dropped_lines_total&lt;/code&gt; is incremented with every line dropped.
By default, the reason label is &lt;code&gt;&amp;quot;match_stage&amp;quot;&lt;/code&gt;, but a custom reason can be
provided by using the &lt;code&gt;drop_counter_reason&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see this in action, with the following log lines and stages&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;{ &amp;#34;time&amp;#34;:&amp;#34;2023-01-18T17:08:41&amp;#43;00:00&amp;#34;, &amp;#34;app&amp;#34;:&amp;#34;foo&amp;#34;, &amp;#34;component&amp;#34;: [&amp;#34;parser&amp;#34;,&amp;#34;type&amp;#34;], &amp;#34;level&amp;#34; : &amp;#34;WARN&amp;#34;, &amp;#34;message&amp;#34; : &amp;#34;app1 log line&amp;#34; }
{ &amp;#34;time&amp;#34;:&amp;#34;2023-01-18T17:08:42&amp;#43;00:00&amp;#34;, &amp;#34;app&amp;#34;:&amp;#34;bar&amp;#34;, &amp;#34;component&amp;#34;: [&amp;#34;parser&amp;#34;,&amp;#34;type&amp;#34;], &amp;#34;level&amp;#34; : &amp;#34;ERROR&amp;#34;, &amp;#34;message&amp;#34; : &amp;#34;foo noisy error&amp;#34; }

stage {
	json {
		expressions = { &amp;#34;appname&amp;#34; = &amp;#34;app&amp;#34; }
	}
}

stage {
	labels {
		values = { &amp;#34;applbl&amp;#34; = &amp;#34;appname&amp;#34; }
	}
}

stage {
	match {
		selector = &amp;#39;{applbl=&amp;#34;foo&amp;#34;}&amp;#39;
		stage {
			json {
				expressions = { &amp;#34;msg&amp;#34; = &amp;#34;message&amp;#34; }
			}
		}
	}
}

stage {
	match {
		selector = &amp;#39;{applbl=&amp;#34;qux&amp;#34;}&amp;#39;
		stage {
			json {
				expressions = { &amp;#34;msg&amp;#34; = &amp;#34;msg&amp;#34; }
			}
		}
	}
}

stage {
	match {
		selector = &amp;#39;{applbl=&amp;#34;bar&amp;#34;} |~ &amp;#34;.*noisy error.*&amp;#34;&amp;#39;
		action   = &amp;#34;drop&amp;#34;

		drop_counter_reason = &amp;#34;discard_noisy_errors&amp;#34;
	}
}

stage {
	output {
		source = &amp;#34;msg&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The first two stages parse the log lines as JSON, decode the &lt;code&gt;app&lt;/code&gt; value into
the shared extracted map as &lt;code&gt;appname&lt;/code&gt;, and use its value as the &lt;code&gt;applbl&lt;/code&gt; label.&lt;/p&gt;
&lt;p&gt;The third stage uses the LogQL selector to only execute the nested stages on
lines where the &lt;code&gt;applbl=&amp;quot;foo&amp;quot;&lt;/code&gt;. So, for the first line, the nested JSON stage
adds &lt;code&gt;msg=&amp;quot;app1 log line&amp;quot;&lt;/code&gt; into the extracted map.&lt;/p&gt;
&lt;p&gt;The fourth stage uses the LogQL selector to only execute on lines where
&lt;code&gt;applbl=&amp;quot;qux&amp;quot;&lt;/code&gt;; that means it won&amp;rsquo;t match any of the input, and the nested
JSON stage does not run.&lt;/p&gt;
&lt;p&gt;The fifth stage drops entries from lines where &lt;code&gt;applbl&lt;/code&gt; is set to &amp;lsquo;bar&amp;rsquo; and the
line contents matches the regex &lt;code&gt;.*noisy error.*&lt;/code&gt;. It also increments the
&lt;code&gt;loki_process_dropped_lines_total&lt;/code&gt; metric with a label
&lt;code&gt;drop_counter_reason=&amp;quot;discard_noisy_errors&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The final output stage changes the contents of the log line to be the value of
&lt;code&gt;msg&lt;/code&gt; from the extracted map. In this case, the first log entry&amp;rsquo;s content is
changed to &lt;code&gt;app1 log line&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;drop-block&#34;&gt;drop block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;drop&lt;/code&gt; inner block configures a filtering stage that drops log entries
based on several options. If multiple options are provided, they&amp;rsquo;re treated
as AND clauses and must &lt;em&gt;all&lt;/em&gt; be true for the log entry to be dropped.
To drop entries with an OR clause, specify multiple &lt;code&gt;drop&lt;/code&gt; blocks in sequence.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to parse. If empty or not defined, it uses the log message.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;expression&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A valid RE2 regular expression.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If both &lt;code&gt;source&lt;/code&gt; and &lt;code&gt;value&lt;/code&gt; are specified, the stage drops lines where &lt;code&gt;value&lt;/code&gt; exactly matches the source content.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;older_than&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If specified, the stage drops lines whose timestamp is older than the current time minus this duration.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;longer_than&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If specified, the stage drops lines whose size exceeds the configured value.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drop_counter_reason&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A custom reason to report for dropped lines.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;drop_stage&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;expression&lt;/code&gt; field needs to be a RE2 regex string. If &lt;code&gt;source&lt;/code&gt; is empty or
not provided, the regex attempts to match the log line itself. If source is
provided, the regex attempts to match the corresponding value from the
extracted map.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;value&lt;/code&gt; field can only work with values from the extracted map, and must be
specified together with &lt;code&gt;source&lt;/code&gt;. Entries are dropped when there is an exact
match between the two.&lt;/p&gt;
&lt;p&gt;Whenever an entry is dropped, the metric &lt;code&gt;loki_process_dropped_lines_total&lt;/code&gt;
is incremented. By default, the reason label is &lt;code&gt;&amp;quot;drop_stage&amp;quot;&lt;/code&gt;, but you can
provide a custom label using the &lt;code&gt;drop_counter_reason&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;The following stage drops log entries that contain the word &lt;code&gt;debug&lt;/code&gt; &lt;em&gt;and&lt;/em&gt; are
longer than 1KB.&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;stage {
	drop {
		expression  = &amp;#34;.*debug.*&amp;#34;
		longer_than = &amp;#34;1KB&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;On the following example, we define multiple &lt;code&gt;drop&lt;/code&gt; blocks so &lt;code&gt;loki.process&lt;/code&gt;
will drop entries that are either 24h or older, are longer than 8KB, &lt;em&gt;or&lt;/em&gt; the
extracted value of &amp;lsquo;app&amp;rsquo; is equal to foo.&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;stage {
	drop {
		older_than  = &amp;#34;24h&amp;#34;
		drop_reason = &amp;#34;too old&amp;#34;
	}
}

stage {
	drop {
		older_than  = &amp;#34;8KB&amp;#34;
		drop_reason = &amp;#34;too long&amp;#34;
	}
}

stage {
	drop {
		source = &amp;#34;app&amp;#34;
		value  = &amp;#34;foo&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send log entries to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.process&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.process&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_process_dropped_lines_total&lt;/code&gt; (counter): Number of lines dropped as part of a processing stage.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates a &lt;code&gt;loki.process&lt;/code&gt; component that extracts the &lt;code&gt;environment&lt;/code&gt;
value from a JSON log line and sets it as a label named &amp;rsquo;env&amp;rsquo;.&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;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;loki.process &amp;#34;local&amp;#34; {
  forward_to = [loki.write.onprem.receiver]

  stage {
    json {
      expressions = { &amp;#34;extracted_env&amp;#34; = &amp;#34;environment&amp;#34; }
    }
  }

  stage {
    labels = { &amp;#34;env&amp;#34; = &amp;#34;extracted_env&amp;#34; }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokiprocess">loki.process&lt;/h1>
&lt;p>&lt;code>loki.process&lt;/code> receives log entries from other loki components, applies one or
more processing &lt;em>stages&lt;/em>, and forwards the results to the list of receivers
in the component&amp;rsquo;s arguments.&lt;/p></description></item><item><title>loki.relabel</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.relabel/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.relabel/</guid><content><![CDATA[&lt;h1 id=&#34;lokirelabel&#34;&gt;loki.relabel&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;loki.relabel&lt;/code&gt; component rewrites the label set of each log entry passed to
its receiver by applying one or more relabeling &lt;code&gt;rule&lt;/code&gt;s and forwards the
results to the list of receivers in the component&amp;rsquo;s arguments.&lt;/p&gt;
&lt;p&gt;If no labels remain after the relabeling rules are applied, then the log
entries are dropped.&lt;/p&gt;
&lt;p&gt;The most common use of &lt;code&gt;loki.relabel&lt;/code&gt; is to filter log entries or standardize
the label set that is passed to one or more downstream receivers. The &lt;code&gt;rule&lt;/code&gt;
blocks are applied to the label set of each log entry in order of their
appearance in the configuration file. The configured rules can be retrieved by
calling the function in the &lt;code&gt;rules&lt;/code&gt; export field.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re looking for a way to process the log entry contents, take a look at
&lt;a href=&#34;../loki.process/&#34;&gt;the &lt;code&gt;loki.process&lt;/code&gt; component&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.relabel&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.relabel &amp;#34;LABEL&amp;#34; {
  forward_to = RECEIVER_LIST

  rule {
    ...
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(receiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Where to forward log entries after relabeling.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of elements to hold in the relabeling cache&lt;/td&gt;
              &lt;td&gt;10,000&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;loki.relabel&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;rule&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#rule-block&#34;&gt;rule&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to received log entries.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;rule-block&#34;&gt;rule block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/rule-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;rule&lt;/code&gt; block contains the definition of any relabeling rules that can be
applied to an input metric. If more than one &lt;code&gt;rule&lt;/code&gt; block is defined, the
transformations are applied in top-down order.&lt;/p&gt;
&lt;p&gt;The following arguments can be used to configure a &lt;code&gt;rule&lt;/code&gt;. All arguments are
optional. Omitted fields take their default values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of labels whose values are to be selected. Their content is concatenated using the &lt;code&gt;separator&lt;/code&gt; and matched against &lt;code&gt;regex&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The separator used to concatenate the values present in &lt;code&gt;source_labels&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A valid RE2 expression with support for parenthesized capture groups. Used to match the extracted value from the combination of the &lt;code&gt;source_label&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt; fields or filter labels during the &lt;code&gt;labelkeep/labeldrop/labelmap&lt;/code&gt; actions.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;(.*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;modulus&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A positive integer used to calculate the modulus of the hashed source label values.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;target_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label to which the resulting value will be written to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replacement&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value against which a regex replace is performed, if the regex matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;$1&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;action&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The relabeling action to perform.&lt;/td&gt;
              &lt;td&gt;replace&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Here&amp;rsquo;s a list of the available actions, along with a brief description of their usage.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;replace&lt;/code&gt;   - Matches &lt;code&gt;regex&lt;/code&gt; to the concatenated labels. If there&amp;rsquo;s a match, it replaces the content of the &lt;code&gt;target_label&lt;/code&gt; using the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;keep&lt;/code&gt;      - Keeps metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;drop&lt;/code&gt;      - Drops metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hashmod&lt;/code&gt;   - Hashes the concatenated labels, calculates its modulo &lt;code&gt;modulus&lt;/code&gt; and writes the result to the &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelmap&lt;/code&gt;  - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are renamed according to the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labeldrop&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelkeep&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that don&amp;rsquo;t match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, note that the regex capture groups can be referred to using either the
&lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The input receiver where log lines are sent to be relabeled.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;RelabelRules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The currently configured relabeling rules.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.relabel&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields are kept at their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.relabel&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_relabel_entries_processed&lt;/code&gt; (counter): Total number of log entries processed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_relabel_entries_written&lt;/code&gt; (counter): Total number of log entries forwarded.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_relabel_cache_misses&lt;/code&gt; (counter): Total number of cache misses.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_relabel_cache_hits&lt;/code&gt; (counter): Total number of cache hits.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_relabel_cache_size&lt;/code&gt; (gauge): Total size of relabel cache.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example creates a &lt;code&gt;loki.relabel&lt;/code&gt; component that only forwards
entries whose &amp;rsquo;level&amp;rsquo; value is set to &amp;rsquo;error&#39;.&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;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;loki.relabel &amp;#34;keep_error_only&amp;#34; {
  forward_to = [loki.write.onprem.receiver]

  rule {
    action        = &amp;#34;keep&amp;#34;
    source_labels = [&amp;#34;level&amp;#34;]
    regex         = &amp;#34;error&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokirelabel">loki.relabel&lt;/h1>
&lt;p>The &lt;code>loki.relabel&lt;/code> component rewrites the label set of each log entry passed to
its receiver by applying one or more relabeling &lt;code>rule&lt;/code>s and forwards the
results to the list of receivers in the component&amp;rsquo;s arguments.&lt;/p></description></item><item><title>loki.source.cloudflare</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.cloudflare/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.cloudflare/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcecloudflare&#34;&gt;loki.source.cloudflare&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.cloudflare&lt;/code&gt; pulls logs from the Cloudflare Logpull API and
forwards them to other &lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;These logs contain data related to the connecting client, the request path
through the Cloudflare network, and the response from the origin web server and
can be useful for enriching existing logs on an origin server.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.cloudflare&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.cloudflare &amp;#34;LABEL&amp;#34; {
  zone_id   = &amp;#34;ZONE_ID&amp;#34;
  api_token = &amp;#34;API_TOKEN&amp;#34;

  forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.cloudflare&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send log entries to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The API token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;zone_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Cloudflare zone ID to use.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The labels to associate with incoming log entries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;workers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The number of workers to use for parsing logs.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;3&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pull_range&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The timeframe to fetch for each pull request.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fields_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The set of fields to fetch for log entries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;default&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;By default &lt;code&gt;loki.source.cloudflare&lt;/code&gt; fetches logs with the &lt;code&gt;default&lt;/code&gt; set of
fields. Here are the different sets of &lt;code&gt;fields_type&lt;/code&gt; available for selection,
and the fields they include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;default&lt;/code&gt; includes:&lt;/li&gt;
&lt;/ul&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;&amp;#34;ClientIP&amp;#34;, &amp;#34;ClientRequestHost&amp;#34;, &amp;#34;ClientRequestMethod&amp;#34;, &amp;#34;ClientRequestURI&amp;#34;, &amp;#34;EdgeEndTimestamp&amp;#34;, &amp;#34;EdgeResponseBytes&amp;#34;, &amp;#34;EdgeRequestHost&amp;#34;, &amp;#34;EdgeResponseStatus&amp;#34;, &amp;#34;EdgeStartTimestamp&amp;#34;, &amp;#34;RayID&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;minimal&lt;/code&gt; includes all &lt;code&gt;default&lt;/code&gt; fields and adds:&lt;/li&gt;
&lt;/ul&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;&amp;#34;ZoneID&amp;#34;, &amp;#34;ClientSSLProtocol&amp;#34;, &amp;#34;ClientRequestProtocol&amp;#34;, &amp;#34;ClientRequestPath&amp;#34;, &amp;#34;ClientRequestUserAgent&amp;#34;, &amp;#34;ClientRequestReferer&amp;#34;, &amp;#34;EdgeColoCode&amp;#34;, &amp;#34;ClientCountry&amp;#34;, &amp;#34;CacheCacheStatus&amp;#34;, &amp;#34;CacheResponseStatus&amp;#34;, &amp;#34;EdgeResponseContentType&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;extended&lt;/code&gt; includes all &lt;code&gt;minimal&lt;/code&gt; fields and adds:&lt;/li&gt;
&lt;/ul&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;&amp;#34;ClientSSLCipher&amp;#34;, &amp;#34;ClientASN&amp;#34;, &amp;#34;ClientIPClass&amp;#34;, &amp;#34;CacheResponseBytes&amp;#34;, &amp;#34;EdgePathingOp&amp;#34;, &amp;#34;EdgePathingSrc&amp;#34;, &amp;#34;EdgePathingStatus&amp;#34;, &amp;#34;ParentRayID&amp;#34;, &amp;#34;WorkerCPUTime&amp;#34;, &amp;#34;WorkerStatus&amp;#34;, &amp;#34;WorkerSubrequest&amp;#34;, &amp;#34;WorkerSubrequestCount&amp;#34;, &amp;#34;OriginIP&amp;#34;, &amp;#34;OriginResponseStatus&amp;#34;, &amp;#34;OriginSSLProtocol&amp;#34;, &amp;#34;OriginResponseHTTPExpires&amp;#34;, &amp;#34;OriginResponseHTTPLastModified&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;all&lt;/code&gt; includes all &lt;code&gt;extended&lt;/code&gt; fields and adds:&lt;/li&gt;
&lt;/ul&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; &amp;#34;BotScore&amp;#34;, &amp;#34;BotScoreSrc&amp;#34;, &amp;#34;ClientRequestBytes&amp;#34;, &amp;#34;ClientSrcPort&amp;#34;, &amp;#34;ClientXRequestedWith&amp;#34;, &amp;#34;CacheTieredFill&amp;#34;, &amp;#34;EdgeResponseCompressionRatio&amp;#34;, &amp;#34;EdgeServerIP&amp;#34;, &amp;#34;FirewallMatchesSources&amp;#34;, &amp;#34;FirewallMatchesActions&amp;#34;, &amp;#34;FirewallMatchesRuleIDs&amp;#34;, &amp;#34;OriginResponseBytes&amp;#34;, &amp;#34;OriginResponseTime&amp;#34;, &amp;#34;ClientDeviceType&amp;#34;, &amp;#34;WAFFlags&amp;#34;, &amp;#34;WAFMatchedVar&amp;#34;, &amp;#34;EdgeColoID&amp;#34;, &amp;#34;RequestHeaders&amp;#34;, &amp;#34;ResponseHeaders&amp;#34;`k&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The component saves the last successfully-fetched timestamp in its positions
file. If a position is found in the file for a given zone ID, the component
restarts pulling logs from that timestamp. When no position is found, the
component starts pulling logs from the current time.&lt;/p&gt;
&lt;p&gt;Logs are fetched using multiple &lt;code&gt;workers&lt;/code&gt; which request the last available
&lt;code&gt;pull_range&lt;/code&gt; repeatedly. It is possible to fall behind due to having too many
log lines to process for each pull; adding more workers, decreasing the pull
range, or decreasing the quantity of fields fetched can mitigate this
performance issue.&lt;/p&gt;
&lt;p&gt;The last timestamp fetched by the component is recorded in the
&lt;code&gt;loki_source_cloudflare_target_last_requested_end_timestamp&lt;/code&gt; debug metric.&lt;/p&gt;
&lt;p&gt;All incoming Cloudflare log entries are in JSON format. You can make use of the
&lt;code&gt;loki.process&lt;/code&gt; component and a JSON procssing stage to extract more labels or
change the log line format. A sample log looks like this:&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;{
	&amp;#34;CacheCacheStatus&amp;#34;: &amp;#34;miss&amp;#34;,
	&amp;#34;CacheResponseBytes&amp;#34;: 8377,
	&amp;#34;CacheResponseStatus&amp;#34;: 200,
	&amp;#34;CacheTieredFill&amp;#34;: false,
	&amp;#34;ClientASN&amp;#34;: 786,
	&amp;#34;ClientCountry&amp;#34;: &amp;#34;gb&amp;#34;,
	&amp;#34;ClientDeviceType&amp;#34;: &amp;#34;desktop&amp;#34;,
	&amp;#34;ClientIP&amp;#34;: &amp;#34;100.100.5.5&amp;#34;,
	&amp;#34;ClientIPClass&amp;#34;: &amp;#34;noRecord&amp;#34;,
	&amp;#34;ClientRequestBytes&amp;#34;: 2691,
	&amp;#34;ClientRequestHost&amp;#34;: &amp;#34;www.foo.com&amp;#34;,
	&amp;#34;ClientRequestMethod&amp;#34;: &amp;#34;GET&amp;#34;,
	&amp;#34;ClientRequestPath&amp;#34;: &amp;#34;/comments/foo/&amp;#34;,
	&amp;#34;ClientRequestProtocol&amp;#34;: &amp;#34;HTTP/1.0&amp;#34;,
	&amp;#34;ClientRequestReferer&amp;#34;: &amp;#34;https://www.foo.com/foo/168855/?offset=8625&amp;#34;,
	&amp;#34;ClientRequestURI&amp;#34;: &amp;#34;/foo/15248108/&amp;#34;,
	&amp;#34;ClientRequestUserAgent&amp;#34;: &amp;#34;some bot&amp;#34;,
	&amp;#34;ClientSSLCipher&amp;#34;: &amp;#34;ECDHE-ECDSA-AES128-GCM-SHA256&amp;#34;,
	&amp;#34;ClientSSLProtocol&amp;#34;: &amp;#34;TLSv1.2&amp;#34;,
	&amp;#34;ClientSrcPort&amp;#34;: 39816,
	&amp;#34;ClientXRequestedWith&amp;#34;: &amp;#34;&amp;#34;,
	&amp;#34;EdgeColoCode&amp;#34;: &amp;#34;MAN&amp;#34;,
	&amp;#34;EdgeColoID&amp;#34;: 341,
	&amp;#34;EdgeEndTimestamp&amp;#34;: 1637336610671000000,
	&amp;#34;EdgePathingOp&amp;#34;: &amp;#34;wl&amp;#34;,
	&amp;#34;EdgePathingSrc&amp;#34;: &amp;#34;macro&amp;#34;,
	&amp;#34;EdgePathingStatus&amp;#34;: &amp;#34;nr&amp;#34;,
	&amp;#34;EdgeRateLimitAction&amp;#34;: &amp;#34;&amp;#34;,
	&amp;#34;EdgeRateLimitID&amp;#34;: 0,
	&amp;#34;EdgeRequestHost&amp;#34;: &amp;#34;www.foo.com&amp;#34;,
	&amp;#34;EdgeResponseBytes&amp;#34;: 14878,
	&amp;#34;EdgeResponseCompressionRatio&amp;#34;: 1,
	&amp;#34;EdgeResponseContentType&amp;#34;: &amp;#34;text/html&amp;#34;,
	&amp;#34;EdgeResponseStatus&amp;#34;: 200,
	&amp;#34;EdgeServerIP&amp;#34;: &amp;#34;8.8.8.8&amp;#34;,
	&amp;#34;EdgeStartTimestamp&amp;#34;: 1637336610517000000,
	&amp;#34;FirewallMatchesActions&amp;#34;: [],
	&amp;#34;FirewallMatchesRuleIDs&amp;#34;: [],
	&amp;#34;FirewallMatchesSources&amp;#34;: [],
	&amp;#34;OriginIP&amp;#34;: &amp;#34;8.8.8.8&amp;#34;,
	&amp;#34;OriginResponseBytes&amp;#34;: 0,
	&amp;#34;OriginResponseHTTPExpires&amp;#34;: &amp;#34;&amp;#34;,
	&amp;#34;OriginResponseHTTPLastModified&amp;#34;: &amp;#34;&amp;#34;,
	&amp;#34;OriginResponseStatus&amp;#34;: 200,
	&amp;#34;OriginResponseTime&amp;#34;: 123000000,
	&amp;#34;OriginSSLProtocol&amp;#34;: &amp;#34;TLSv1.2&amp;#34;,
	&amp;#34;ParentRayID&amp;#34;: &amp;#34;00&amp;#34;,
	&amp;#34;RayID&amp;#34;: &amp;#34;6b0a...&amp;#34;,
  &amp;#34;RequestHeaders&amp;#34;: [],
  &amp;#34;ResponseHeaders&amp;#34;: [
    &amp;#34;x-foo&amp;#34;: &amp;#34;bar&amp;#34;
  ],
	&amp;#34;SecurityLevel&amp;#34;: &amp;#34;med&amp;#34;,
	&amp;#34;WAFAction&amp;#34;: &amp;#34;unknown&amp;#34;,
	&amp;#34;WAFFlags&amp;#34;: &amp;#34;0&amp;#34;,
	&amp;#34;WAFMatchedVar&amp;#34;: &amp;#34;&amp;#34;,
	&amp;#34;WAFProfile&amp;#34;: &amp;#34;unknown&amp;#34;,
	&amp;#34;WAFRuleID&amp;#34;: &amp;#34;&amp;#34;,
	&amp;#34;WAFRuleMessage&amp;#34;: &amp;#34;&amp;#34;,
	&amp;#34;WorkerCPUTime&amp;#34;: 0,
	&amp;#34;WorkerStatus&amp;#34;: &amp;#34;unknown&amp;#34;,
	&amp;#34;WorkerSubrequest&amp;#34;: false,
	&amp;#34;WorkerSubrequestCount&amp;#34;: 0,
	&amp;#34;ZoneID&amp;#34;: 1234
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.cloudflare&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.cloudflare&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.cloudflare&lt;/code&gt; exposes the following debug information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whether the target is ready and reading logs from the API.&lt;/li&gt;
&lt;li&gt;The Cloudflare zone ID.&lt;/li&gt;
&lt;li&gt;The last error reported, if any.&lt;/li&gt;
&lt;li&gt;The stored positions file entry, as the combination of zone_id, labels and
last fetched timestamp.&lt;/li&gt;
&lt;li&gt;The last timestamp fetched.&lt;/li&gt;
&lt;li&gt;The set of fields being fetched.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_source_cloudflare_target_entries_total&lt;/code&gt; (counter): Total number of successful entries sent via the cloudflare target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_cloudflare_target_last_requested_end_timestamp&lt;/code&gt; (gauge): The last cloudflare request end timestamp fetched, for calculating how far behind the target is.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example pulls logs from Cloudflare&amp;rsquo;s API and forwards them to a
&lt;code&gt;loki.write&lt;/code&gt; component.&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;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;loki.source.cloudflare &amp;#34;dev&amp;#34; {
  zone_id   = env(&amp;#34;CF_ZONE_ID&amp;#34;)
  api_token = local.file.api.content

  forward_to = [loki.write.local.receiver]
}

loki.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;loki:3100/api/v1/push&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourcecloudflare">loki.source.cloudflare&lt;/h1>
&lt;p>&lt;code>loki.source.cloudflare&lt;/code> pulls logs from the Cloudflare Logpull API and
forwards them to other &lt;code>loki.*&lt;/code> components.&lt;/p>
&lt;p>These logs contain data related to the connecting client, the request path
through the Cloudflare network, and the response from the origin web server and
can be useful for enriching existing logs on an origin server.&lt;/p></description></item><item><title>loki.source.file</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.file/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.file/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcefile&#34;&gt;loki.source.file&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.file&lt;/code&gt; reads log entries from files and forwards them to other
&lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.file&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.file &amp;#34;LABEL&amp;#34; {
  targets    = TARGET_LIST
  forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component starts a new reader for each of the given &lt;code&gt;targets&lt;/code&gt; and fans out
log entries to the list of receivers passed in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;loki.source.file&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of files to read from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send log entries to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;loki.source.file&lt;/code&gt; component doesn&amp;rsquo;t support any inner blocks and is
configured fully through arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.file&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.file&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.file&lt;/code&gt; exposes some target-level debug information per reader:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The tailed path.&lt;/li&gt;
&lt;li&gt;Whether the reader is currently running.&lt;/li&gt;
&lt;li&gt;What is the last recorded read offset in the positions file.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_source_file_read_bytes_total&lt;/code&gt; (gauge): Number of bytes read.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_file_file_bytes_total&lt;/code&gt; (gauge): Number of bytes total.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_file_read_lines_total&lt;/code&gt; (counter): Number of lines read.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_file_encoding_failures_total&lt;/code&gt; (counter): Number of encoding failures.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_file_files_active_total&lt;/code&gt; (gauge): Number of active files.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;component-behavior&#34;&gt;Component behavior&lt;/h2&gt;
&lt;p&gt;Each element in the list of &lt;code&gt;targets&lt;/code&gt; as a set of key-value pairs called
&lt;em&gt;labels&lt;/em&gt;.
The set of targets can either be &lt;em&gt;static&lt;/em&gt;, or dynamically provided periodically
by a service discovery component. The special label &lt;code&gt;__path__&lt;/code&gt; &lt;em&gt;must always&lt;/em&gt; be
present and must point to the absolute path of the file to read from.&lt;/p&gt;
&lt;!-- TODO(@tpaschalis) refer to discovery.fileglob --&gt;
&lt;p&gt;The &lt;code&gt;__path__&lt;/code&gt; value is  available as the &lt;code&gt;filename&lt;/code&gt; label to each log entry
the component reads. All other labels starting with a double underscore are
considered &lt;em&gt;internal&lt;/em&gt; and are removed from the log entries before they&amp;rsquo;re
passed to other &lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;The component uses its data path (a directory named after the domain&amp;rsquo;s
fully qualified name) to store its &lt;em&gt;positions file&lt;/em&gt;. The positions file is used
to store read offsets, so that in case of a component or Agent restart,
&lt;code&gt;loki.source.file&lt;/code&gt; can pick up tailing from the same spot.&lt;/p&gt;
&lt;p&gt;If a file is removed from the &lt;code&gt;targets&lt;/code&gt; list, its positions file entry is also
removed. When it&amp;rsquo;s added back on, &lt;code&gt;loki.source.file&lt;/code&gt; starts reading it from the
beginning.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example collects log entries from the files specified in the targets
argument and forwards them to a &lt;code&gt;loki.write&lt;/code&gt; component so they are can be
written to Loki.&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;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;loki.source.file &amp;#34;tmpfiles&amp;#34; {
  targets    = [
    {__path__ = &amp;#34;/tmp/foo.txt&amp;#34;, &amp;#34;color&amp;#34; = &amp;#34;pink&amp;#34;},
    {__path__ = &amp;#34;/tmp/bar.txt&amp;#34;, &amp;#34;color&amp;#34; = &amp;#34;blue&amp;#34;},
    {__path__ = &amp;#34;/tmp/baz.txt&amp;#34;, &amp;#34;color&amp;#34; = &amp;#34;grey&amp;#34;},
  ] 
  forward_to = [loki.write.local.receiver]
}

loki.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;loki:3100/api/v1/push&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourcefile">loki.source.file&lt;/h1>
&lt;p>&lt;code>loki.source.file&lt;/code> reads log entries from files and forwards them to other
&lt;code>loki.*&lt;/code> components.&lt;/p>
&lt;p>Multiple &lt;code>loki.source.file&lt;/code> components can be specified by giving them
different labels.&lt;/p></description></item><item><title>loki.source.gcplog</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.gcplog/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.gcplog/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcegcplog&#34;&gt;loki.source.gcplog&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.gcplog&lt;/code&gt; retrieves logs from cloud resources such as GCS buckets,
load balancers, or Kubernetes clusters running on GCP by making use of Pub/Sub
&lt;a href=&#34;https://cloud.google.com/pubsub/docs/subscriber&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;subscriptions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The component uses either the &amp;lsquo;push&amp;rsquo; or &amp;lsquo;pull&amp;rsquo; strategy to retrieve log
entries and forward them to the list of receivers in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.gcplog&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.gcplog &amp;#34;LABEL&amp;#34; {
  pull {
    project_id   = &amp;#34;PROJECT_ID&amp;#34;
    subscription = &amp;#34;SUB_ID&amp;#34;
  }

  forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.gcplog&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send log entries to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relabel_rules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;RelabelRules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply on log entries.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;{}&amp;rdquo;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;loki.source.gcplog&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;pull&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#pull-block&#34;&gt;pull&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a target to pull logs from a GCP Pub/Sub subscription.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;push&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#push-block&#34;&gt;push&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a server to receive logs as GCP Pub/Sub push requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;pull&lt;/code&gt; and &lt;code&gt;push&lt;/code&gt; inner blocks are mutually exclusive; a component must
contain exactly one of the two in its definition.&lt;/p&gt;
&lt;h3 id=&#34;pull-block&#34;&gt;pull block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;pull&lt;/code&gt; block defines which GCP project ID and subscription to read log
entries from.&lt;/p&gt;
&lt;p&gt;The following arguments can be used to configure the &lt;code&gt;pull&lt;/code&gt; block. Any omitted
fields take their default values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;project_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The GCP project id the subscription belongs to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;subscription&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The subscription to pull logs from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Additional labels to associate with incoming logs.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;{}&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_incoming_timestamp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to use the incoming log timestamp.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;To make use of the &lt;code&gt;pull&lt;/code&gt; strategy, the GCP project must have been
&lt;a href=&#34;/docs/loki/next/clients/promtail/gcplog-cloud/&#34;&gt;configured&lt;/a&gt;
to forward its cloud resource logs onto a Pub/Sub topic for
&lt;code&gt;loki.source.gcplog&lt;/code&gt; to consume.&lt;/p&gt;
&lt;p&gt;Typically, the host system also needs to have its GCP
&lt;a href=&#34;https://cloud.google.com/docs/authentication/application-default-credentials&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;credentials&lt;/a&gt;
configured. One way to do it is to point the &lt;code&gt;GOOGLE_APPLICATION_CREDENTIALS&lt;/code&gt;
environment variable to the location of a credential configuration JSON file or
a service account key.&lt;/p&gt;
&lt;h3 id=&#34;push-block&#34;&gt;push block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;push&lt;/code&gt; block defines the configuration of the HTTP server that receives
push requests from GCP&amp;rsquo;s Pub/Sub servers.&lt;/p&gt;
&lt;p&gt;The following arguments can be used to configure the &lt;code&gt;push&lt;/code&gt; block. Any omitted
fields take their default values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The address the server listens to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.0.0.0&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The port the server listens to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;8080&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;push_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sets a maximum processing time for each incoming GCP log entry.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Additional labels to associate with incoming entries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;{}&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_incoming_timestamp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to use the incoming entry timestamp.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The server listens for POST requests from GCP&amp;rsquo;s Push subscriptions on
&lt;code&gt;HOST:PORT/gcp/api/v1/push&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;By default, for both strategies the component assigns the log entry timestamp
as the time it was processed, except if &lt;code&gt;use_incoming_timestamp&lt;/code&gt; is set to
true.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;labels&lt;/code&gt; map is applied to every entry that passes through the component.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.gcplog&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.gcplog&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.gcplog&lt;/code&gt; exposes some debug information per gcplog listener:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The configured strategy.&lt;/li&gt;
&lt;li&gt;Their label set.&lt;/li&gt;
&lt;li&gt;When using a &lt;code&gt;push&lt;/code&gt; strategy, the listen address.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;When using the &lt;code&gt;pull&lt;/code&gt; strategy, the component exposes the following debug
metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_source_gcplog_pull_entries_total&lt;/code&gt; (counter): Number of entries received by the gcplog target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_gcplog_pull_parsing_errors_total&lt;/code&gt; (counter): Total number of parsing errors while receiving gcplog messages.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_gcplog_pull_last_success_scrape&lt;/code&gt; (gauge): Timestamp of target&amp;rsquo;s last successful poll.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When using the &lt;code&gt;push&lt;/code&gt; strategy, the component exposes the following debug
metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_source_gcplog_push_entries_total&lt;/code&gt; (counter): Number of entries received by the gcplog target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_gcplog_push_entries_total&lt;/code&gt; (counter): Number of parsing errors while receiving gcplog messages.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example listens for GCP Pub/Sub PushRequests on &lt;code&gt;0.0.0.0:8080&lt;/code&gt; and
forwards them to a &lt;code&gt;loki.write&lt;/code&gt; component.&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;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;loki.source.gcplog &amp;#34;local&amp;#34; {
  push {}

  forward_to = [loki.write.local.receiver]
}

loki.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;loki:3100/api/v1/push&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourcegcplog">loki.source.gcplog&lt;/h1>
&lt;p>&lt;code>loki.source.gcplog&lt;/code> retrieves logs from cloud resources such as GCS buckets,
load balancers, or Kubernetes clusters running on GCP by making use of Pub/Sub
&lt;a href="https://cloud.google.com/pubsub/docs/subscriber" target="_blank" rel="noopener noreferrer">subscriptions&lt;/a>.&lt;/p></description></item><item><title>loki.source.gelf</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.gelf/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.gelf/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcegelf&#34;&gt;loki.source.gelf&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.gelf&lt;/code&gt; reads &lt;a href=&#34;https://github.com/Graylog2/graylog2-server&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Graylog Extended Long Format (GELF) logs&lt;/a&gt; from a UDP listener and forwards them to other
&lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.gelf&lt;/code&gt; components can be specified by giving them
different labels and ports.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.gelf &amp;#34;LABEL&amp;#34; {
  forward_to    = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component starts a new UDP listener and fans out
log entries to the list of receivers passed in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;loki.source.gelf&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;UDP address and port to listen for Graylog messages.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0.0.0.0:12201&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_incoming_timestamp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When false, assigns the current timestamp to the log when it was processed&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relabel_rules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;RelabelRules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply on log entries.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;{}&amp;rdquo;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: GELF logs can be sent uncompressed or compressed with GZIP or ZLIB.
A &lt;code&gt;job&lt;/code&gt; label is added with the full name of the component &lt;code&gt;loki.source.gelf.LABEL&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Incoming messages have the following labels available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__gelf_message_level&lt;/code&gt;: The GELF level as a string.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__gelf_message_host&lt;/code&gt;: The host sending the GELF message.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__gelf_message_host&lt;/code&gt;: The GELF level message version sent by the client.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__gelf_message_facility&lt;/code&gt;: The GELF facility.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These labels are stripped unless relabeling is used to retain the labels with a
&lt;code&gt;loki.relabel&lt;/code&gt; component and its Rules export as the &lt;code&gt;relabel_rules&lt;/code&gt; argument.
An example rule is presented below.&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;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;rule {
		action      = &amp;#34;labelmap&amp;#34;
		regex       = &amp;#34;__gelf_(.*)&amp;#34;
		replacement = &amp;#34;gelf_${1}&amp;#34;
	}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.gelf&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug Metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;gelf_target_entries_total&lt;/code&gt; (counter): Total number of successful entries sent to the GELF target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gelf_target_parsing_errors_total&lt;/code&gt; (counter): Total number of parsing errors while receiving GELF messages.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&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;loki.source.gelf &amp;#34;listen&amp;#34;  {
    forward_to = [loki.write.endpoint.receiver]
}

loki.write &amp;#34;endpoint&amp;#34; {
    endpoint {
        url =&amp;#34;loki:3100/api/v1/push&amp;#34;
    }  
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourcegelf">loki.source.gelf&lt;/h1>
&lt;p>&lt;code>loki.source.gelf&lt;/code> reads &lt;a href="https://github.com/Graylog2/graylog2-server" target="_blank" rel="noopener noreferrer">Graylog Extended Long Format (GELF) logs&lt;/a> from a UDP listener and forwards them to other
&lt;code>loki.*&lt;/code> components.&lt;/p>
&lt;p>Multiple &lt;code>loki.source.gelf&lt;/code> components can be specified by giving them
different labels and ports.&lt;/p></description></item><item><title>loki.source.heroku</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.heroku/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.heroku/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourceheroku&#34;&gt;loki.source.heroku&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.heroku&lt;/code&gt; listens for Heroku messages over TCP connections
and forwards them to other &lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;The component starts a new heroku listener for the given &lt;code&gt;listener&lt;/code&gt;
block and fans out incoming entries to the list of receivers in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Before using &lt;code&gt;loki.source.heroku&lt;/code&gt;, Heroku should be configured with the URL where the Agent will be listening. Follow the steps in &lt;a href=&#34;https://devcenter.heroku.com/articles/log-drains#https-drains&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Heroku HTTPS Drain docs&lt;/a&gt; for using the Heroku CLI with a command like the following:&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;heroku drains:add [http|https]://HOSTNAME:PORT/heroku/api/v1/drain -a HEROKU_APP_NAME&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.heroku&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.heroku &amp;#34;LABEL&amp;#34; {
    listener {
        address = &amp;#34;LISTEN_ADDRESS&amp;#34;
        port    = PORT
    }
    forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.heroku&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_incoming_timestamp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether or not to use the timestamp received from Heroku.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The labels to associate with each received Heroku record.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send log entries to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relabel_rules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;RelabelRules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply on log entries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;relabel_rules&lt;/code&gt; field can make use of the &lt;code&gt;rules&lt;/code&gt; export value from a
&lt;code&gt;loki.relabel&lt;/code&gt; component to apply one or more relabeling rules to log entries
before they&amp;rsquo;re forwarded to the list of receivers in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;loki.source.heroku&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;listener&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#listener-block&#34;&gt;listener&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a listener for Heroku messages.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;listener-block&#34;&gt;listener block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;listener&lt;/code&gt; block defines the listen address and port where the listener
expects Heroku messages to be sent to.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The &lt;code&gt;&amp;lt;host&amp;gt;&lt;/code&gt; address to listen to for heroku messages.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0.0.0.0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The &lt;code&gt;&amp;lt;port&amp;gt;&lt;/code&gt; to listen to for heroku messages.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;labels&#34;&gt;Labels&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;labels&lt;/code&gt; map is applied to every message that the component reads.&lt;/p&gt;
&lt;p&gt;The following internal labels all prefixed with &lt;code&gt;__&lt;/code&gt; are available but will be discarded if not relabeled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__heroku_drain_host&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__heroku_drain_app&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__heroku_drain_proc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__heroku_drain_log_id&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All url query params will be translated to &lt;code&gt;__heroku_drain_param_&amp;lt;name&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;X-Scope-OrgID&lt;/code&gt; header is set it will be translated to &lt;code&gt;__tenant_id__&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.heroku&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.heroku&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.heroku&lt;/code&gt; exposes some debug information per Heroku listener:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whether the listener is currently running.&lt;/li&gt;
&lt;li&gt;The listen address.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_source_heroku_drain_entries_total&lt;/code&gt; (counter): Number of successful entries received by the Heroku target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_heroku_drain_parsing_errors_total&lt;/code&gt; (counter): Number of parsing errors while receiving Heroku messages.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example listens for Heroku messages over TCP in the specified port and forwards them to a &lt;code&gt;loki.write&lt;/code&gt; component using the Heroku timestamp.&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;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;loki.source.heroku &amp;#34;local&amp;#34; {
    listener {
        address = &amp;#34;0.0.0.0&amp;#34;
        port    = 8080
    }
    use_incoming_timestamp = true
    labels                 = {component = &amp;#34;loki.source.heroku&amp;#34;}
    forward_to             = [loki.write.local.receiver]
}

loki.write &amp;#34;local&amp;#34; {
    endpoint {
        url = &amp;#34;loki:3100/api/v1/push&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourceheroku">loki.source.heroku&lt;/h1>
&lt;p>&lt;code>loki.source.heroku&lt;/code> listens for Heroku messages over TCP connections
and forwards them to other &lt;code>loki.*&lt;/code> components.&lt;/p>
&lt;p>The component starts a new heroku listener for the given &lt;code>listener&lt;/code>
block and fans out incoming entries to the list of receivers in &lt;code>forward_to&lt;/code>.&lt;/p></description></item><item><title>loki.source.journal</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.journal/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.journal/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcejournal&#34;&gt;loki.source.journal&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.journal&lt;/code&gt; reads from the systemd journal and forwards them to other
&lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.journal&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.journal &amp;#34;LABEL&amp;#34; {
  forward_to    = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component starts a new journal reader and fans out
log entries to the list of receivers passed in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;loki.source.journal&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;format_as_json&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When true, log messages from the journal are passed through the pipeline as a JSON message with all of the journal entries&amp;rsquo; original  fields. When false, the log message is the text content of the MESSAGE field from the journal entry.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_age&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The oldest relative time from process start that will be read&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;7h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to a directory to read entries from. Defaults to system paths (/var/log/journal and /run/log/journal) when empty.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;matches&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Journal matches to filter. Character (&#43;) is not supported, only logical AND matches will be added.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send log entries to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;:  A &lt;code&gt;job&lt;/code&gt; label is added with the full name of the component &lt;code&gt;loki.source.journal.LABEL&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;loki.source.journal&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;relabel_rules&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#relabel_rules&#34;&gt;relabel_rules&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to received log entries.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;relabel_rules-block&#34;&gt;relabel_rules block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/rule-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;rule&lt;/code&gt; block contains the definition of any relabeling rules that can be
applied to an input metric. If more than one &lt;code&gt;rule&lt;/code&gt; block is defined, the
transformations are applied in top-down order.&lt;/p&gt;
&lt;p&gt;The following arguments can be used to configure a &lt;code&gt;rule&lt;/code&gt;. All arguments are
optional. Omitted fields take their default values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of labels whose values are to be selected. Their content is concatenated using the &lt;code&gt;separator&lt;/code&gt; and matched against &lt;code&gt;regex&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The separator used to concatenate the values present in &lt;code&gt;source_labels&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A valid RE2 expression with support for parenthesized capture groups. Used to match the extracted value from the combination of the &lt;code&gt;source_label&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt; fields or filter labels during the &lt;code&gt;labelkeep/labeldrop/labelmap&lt;/code&gt; actions.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;(.*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;modulus&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A positive integer used to calculate the modulus of the hashed source label values.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;target_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label to which the resulting value will be written to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replacement&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value against which a regex replace is performed, if the regex matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;$1&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;action&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The relabeling action to perform.&lt;/td&gt;
              &lt;td&gt;replace&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Here&amp;rsquo;s a list of the available actions, along with a brief description of their usage.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;replace&lt;/code&gt;   - Matches &lt;code&gt;regex&lt;/code&gt; to the concatenated labels. If there&amp;rsquo;s a match, it replaces the content of the &lt;code&gt;target_label&lt;/code&gt; using the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;keep&lt;/code&gt;      - Keeps metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;drop&lt;/code&gt;      - Drops metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hashmod&lt;/code&gt;   - Hashes the concatenated labels, calculates its modulo &lt;code&gt;modulus&lt;/code&gt; and writes the result to the &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelmap&lt;/code&gt;  - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are renamed according to the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labeldrop&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelkeep&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that don&amp;rsquo;t match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, note that the regex capture groups can be referred to using either the
&lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;
&lt;/div&gt;

        
&lt;p&gt;Incoming messages have labels from the journal following the patten &lt;code&gt;__journal_FIELDNAME&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;These labels are stripped unless a rule is created to retain the labels. An example rule is
below.&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;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;rule {
		action      = &amp;#34;labelmap&amp;#34;
		regex       = &amp;#34;__journal_(.*)&amp;#34;
		replacement = &amp;#34;journal_${1}&amp;#34;
	}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.journal&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug Metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;agent_loki_source_journal_target_parsing_errors_total&lt;/code&gt; (counter): Total number of parsing errors while reading journal messages.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_loki_source_journal_target_lines_total&lt;/code&gt; (counter): Total number of successful journal lines read.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&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;loki.source.journal &amp;#34;read&amp;#34;  {
    forward_to = [loki.write.endpoint.receiver]
}

loki.write &amp;#34;endpoint&amp;#34; {
    endpoint {
        url =&amp;#34;loki:3100/api/v1/push&amp;#34;
    }  
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourcejournal">loki.source.journal&lt;/h1>
&lt;p>&lt;code>loki.source.journal&lt;/code> reads from the systemd journal and forwards them to other
&lt;code>loki.*&lt;/code> components.&lt;/p>
&lt;p>Multiple &lt;code>loki.source.journal&lt;/code> components can be specified by giving them
different labels.&lt;/p></description></item><item><title>loki.source.kubernetes</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.kubernetes/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.kubernetes/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcekubernetes&#34;&gt;loki.source.kubernetes&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes&lt;/code&gt; tails logs from Kubernetes containers using the
Kubernetes API. It has the following benefits over &lt;code&gt;loki.source.file&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It works without a privileged container.&lt;/li&gt;
&lt;li&gt;It works without a root user.&lt;/li&gt;
&lt;li&gt;It works without needing access to the filesystem of the Kubernetes node.&lt;/li&gt;
&lt;li&gt;It doesn&amp;rsquo;t require a DaemonSet to collect logs, so one agent could collect
logs for the whole cluster.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Because &lt;code&gt;loki.source.kubernetes&lt;/code&gt; uses the Kubernetes API to tail
logs, it uses more network traffic and CPU consumption of Kubelets than
&lt;code&gt;loki.source.file&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.kubernetes&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.kubernetes &amp;#34;LABEL&amp;#34; {
  targets    = TARGET_LIST
  forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component starts a new reader for each of the given &lt;code&gt;targets&lt;/code&gt; and fans out
log entries to the list of receivers passed in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of files to read from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send log entries to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Each target in &lt;code&gt;targets&lt;/code&gt; must have the following labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt; or &lt;code&gt;__pod_namespace__&lt;/code&gt; to specify the namespace
of the pod to tail.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_name&lt;/code&gt; or &lt;code&gt;__pod_name__&lt;/code&gt; to specify the name of the pod
to tail.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_name&lt;/code&gt; or &lt;code&gt;__pod_container_name__&lt;/code&gt; to specify
the container within the pod to tail.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_uid&lt;/code&gt; or &lt;code&gt;__pod_uid__&lt;/code&gt; to specify the UID of the pod to
tail.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By default, all of these labels are present when the output
&lt;code&gt;discovery.kubernetes&lt;/code&gt; is used.&lt;/p&gt;
&lt;p&gt;A log tailer is started for each unique target in &lt;code&gt;targets&lt;/code&gt;. Log tailers will
reconnect with exponential backoff to Kubernetes if the log stream returns
before the container has permanently terminated.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;loki.source.kubernetes&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;client&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#client-block&#34;&gt;client&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures Kubernetes client used to tail logs.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; http_client_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http_client_config-block&#34;&gt;http_client_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client configuration for Kubernetes requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;client &amp;gt; http_client_config&lt;/code&gt; refers to an &lt;code&gt;http_client_config&lt;/code&gt; block defined
inside a &lt;code&gt;client&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;client-block&#34;&gt;client block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures the Kubernetes client used to tail logs from
containers. If the &lt;code&gt;client&lt;/code&gt; block isn&amp;rsquo;t provided, the default in-cluster
configuration with the service account of the running Grafana Agent pod is
used.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL of the Kubernetes API server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kubeconfig_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of the &lt;code&gt;kubeconfig&lt;/code&gt; file to use for connecting to Kubernetes.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; block configures settings used to connect to the
Kubernetes API server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes&lt;/code&gt; exposes some target-level debug information per
target:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The labels associated with the target.&lt;/li&gt;
&lt;li&gt;The full set of labels which were found during service discovery.&lt;/li&gt;
&lt;li&gt;The most recent time a log line was read and forwarded to the next components
in the pipeline.&lt;/li&gt;
&lt;li&gt;The most recent error from tailing, if any.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes&lt;/code&gt; does not expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example collects logs from all Kubernetes pods and forwards them to a
&lt;code&gt;loki.write&lt;/code&gt; component so they are can be written to Loki.&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;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;discovery.kubernetes &amp;#34;pods&amp;#34; {
  role = &amp;#34;pod&amp;#34;
}

loki.source.kubernetes &amp;#34;pods&amp;#34; {
  targets    = discovery.kubernetes.pods.targets
  forward_to = [loki.write.local.receiver]
}

loki.write &amp;#34;local&amp;#34; {
  endpoint {
    url = env(&amp;#34;LOKI_URL&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourcekubernetes">loki.source.kubernetes&lt;/h1>
&lt;p>&lt;code>loki.source.kubernetes&lt;/code> tails logs from Kubernetes containers using the
Kubernetes API. It has the following benefits over &lt;code>loki.source.file&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>It works without a privileged container.&lt;/li>
&lt;li>It works without a root user.&lt;/li>
&lt;li>It works without needing access to the filesystem of the Kubernetes node.&lt;/li>
&lt;li>It doesn&amp;rsquo;t require a DaemonSet to collect logs, so one agent could collect
logs for the whole cluster.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: Because &lt;code>loki.source.kubernetes&lt;/code> uses the Kubernetes API to tail
logs, it uses more network traffic and CPU consumption of Kubelets than
&lt;code>loki.source.file&lt;/code>.&lt;/p></description></item><item><title>loki.source.podlogs</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.podlogs/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.podlogs/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcepodlogs&#34;&gt;loki.source.podlogs&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt; discovers &lt;code&gt;PodLogs&lt;/code&gt; resources on Kubernetes and, using
the Kubernetes API, tails logs from Kubernetes containers of Pods specified by
the discovered them.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt; is similar to &lt;code&gt;loki.source.kubernetes&lt;/code&gt;, but uses custom
resources rather than being fed targets from another Flow component.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Unlike &lt;code&gt;loki.source.kubernetes&lt;/code&gt;, it is not possible to distribute
responsibility of collecting logs across multiple agents. To avoid collecting
duplicate logs, only one agent should be running a &lt;code&gt;loki.source.podlogs&lt;/code&gt;
component.&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Because &lt;code&gt;loki.source.podlogs&lt;/code&gt; uses the Kubernetes API to tail logs,
it uses more network traffic and CPU consumption of Kubelets than
&lt;code&gt;loki.source.file&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.podlogs&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.podlogs &amp;#34;LABEL&amp;#34; {
  forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component starts a new reader for each of the given &lt;code&gt;targets&lt;/code&gt; and fans out
log entries to the list of receivers passed in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send log entries to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt; searches for &lt;code&gt;PodLogs&lt;/code&gt; resources on Kubernetes. Each
&lt;code&gt;PodLogs&lt;/code&gt; resource describes a set of pods to tail logs from.&lt;/p&gt;
&lt;h2 id=&#34;podlogs-custom-resource&#34;&gt;PodLogs custom resource&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;PodLogs&lt;/code&gt; resource describes a set of Pods to collect logs from.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;loki.source.podlogs&lt;/code&gt; looks for &lt;code&gt;PodLogs&lt;/code&gt; of
&lt;code&gt;monitoring.grafana.com/v1alpha2&lt;/code&gt;, and is not compatible with &lt;code&gt;PodLogs&lt;/code&gt; from
the Grafana Agent Operator, which are version &lt;code&gt;v1alpha1&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;apiVersion&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;monitoring.grafana.com/v1alpha2&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kind&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;PodLogs&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ObjectMeta&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Metadata for the PodLogs.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spec&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#podlogsspec&#34;&gt;PodLogsSpec&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Definition of what Pods to collect logs from.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;podlogsspec&#34;&gt;PodLogsSpec&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;PodLogsSpec&lt;/code&gt; describes a set of Pods to collect logs from.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;LabelSelector&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector of Pods to collect logs from.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespaceSelector&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;LabelSelector&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector of Namespaces that Pods can be discovered in.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relabelings&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.RelabelConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;RelabelConfig&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabel rules to apply to discovered Pods.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If &lt;code&gt;selector&lt;/code&gt; is left as the default value, all Pods are discovered. If
&lt;code&gt;namespaceSelector&lt;/code&gt; is left as the default value, all Namespaces are used for
Pod discovery.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;relabelings&lt;/code&gt; field can be used to modify labels from discovered Pods. The
following meta labels are available for relabeling:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt;: The namespace of the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_name&lt;/code&gt;: The name of the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_ip&lt;/code&gt;: The pod IP of the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: Each label from the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_labelpresent_&amp;lt;labelname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for each label from
the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_annotation_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: Each annotation from the
Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_annotationpresent_&amp;lt;annotationname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for each
annotation from the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_init&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; if the container is an
&lt;code&gt;InitContainer&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_name&lt;/code&gt;: Name of the container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_image&lt;/code&gt;: The image the container is using.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_ready&lt;/code&gt;: Set to &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; for the Pod&amp;rsquo;s ready
state.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_phase&lt;/code&gt;: Set to &lt;code&gt;Pending&lt;/code&gt;, &lt;code&gt;Running&lt;/code&gt;, &lt;code&gt;Succeeded&lt;/code&gt;, &lt;code&gt;Failed&lt;/code&gt; or
&lt;code&gt;Unknown&lt;/code&gt; in the lifecycle.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_node_name&lt;/code&gt;: The name of the node the pod is scheduled
onto.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_host_ip&lt;/code&gt;: The current host IP of the pod object.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_uid&lt;/code&gt;: The UID of the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_controller_kind&lt;/code&gt;: Object kind of the Pod&amp;rsquo;s controller.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_controller_name&lt;/code&gt;: Name of the Pod&amp;rsquo;s controller.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to the meta labels, the following labels are exposed to tell
&lt;code&gt;loki.source.podlogs&lt;/code&gt; which container to tail:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__pod_namespace__&lt;/code&gt;: The namespace of the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__pod_name__&lt;/code&gt;: The name of the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__pod_container_name__&lt;/code&gt;: The container name within the Pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__pod_uid__&lt;/code&gt;: The UID of the Pod.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;loki.source.podlogs&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;client&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#client-block&#34;&gt;client&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures Kubernetes client used to tail logs.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; http_client_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http_client_config-block&#34;&gt;http_client_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client configuration for Kubernetes requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;selector&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#selector-block&#34;&gt;selector&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector for which &lt;code&gt;PodLogs&lt;/code&gt; to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;selector &amp;gt; match_expression&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#match_expression-block&#34;&gt;match_expression&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector expression for which &lt;code&gt;PodLogs&lt;/code&gt; to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;namespace_selector&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#selector-block&#34;&gt;selector&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector for which namespaces to discover &lt;code&gt;PodLogs&lt;/code&gt; in.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;namespace_selector &amp;gt; match_expression&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#match_expression-block&#34;&gt;match_expression&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector expression for which namespaces to discover &lt;code&gt;PodLogs&lt;/code&gt; in.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;client &amp;gt; http_client_config&lt;/code&gt; refers to an &lt;code&gt;http_client_config&lt;/code&gt; block defined
inside a &lt;code&gt;client&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;client-block&#34;&gt;client block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures the Kubernetes client used to tail logs from
containers. If the &lt;code&gt;client&lt;/code&gt; block isn&amp;rsquo;t provided, the default in-cluster
configuration with the service account of the running Grafana Agent pod is
used.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL of the Kubernetes API server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kubeconfig_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of the &lt;code&gt;kubeconfig&lt;/code&gt; file to use for connecting to Kubernetes.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; block configures settings used to connect to the
Kubernetes API server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;selector-block&#34;&gt;selector block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;selector&lt;/code&gt; block describes a Kubernetes label selector for &lt;code&gt;PodLogs&lt;/code&gt; or
Namespace discovery.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;match_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label keys and values used to discover resources.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;match_labels&lt;/code&gt; argument is empty, all resources will be matched.&lt;/p&gt;
&lt;h3 id=&#34;match_expression-block&#34;&gt;match_expression block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;match_expression&lt;/code&gt; block describes a Kubernetes label match expression for
&lt;code&gt;PodLogs&lt;/code&gt; or Namespace discovery.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label name to match against.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;operator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The operator to use when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The values used when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;operator&lt;/code&gt; argument must be one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;In&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;NotIn&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;Exists&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;DoesNotExist&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both &lt;code&gt;selector&lt;/code&gt; and &lt;code&gt;namespace_selector&lt;/code&gt; can make use of multiple
&lt;code&gt;match_expression&lt;/code&gt; inner blocks which are treated as AND clauses.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt; exposes some target-level debug information per target:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The labels associated with the target.&lt;/li&gt;
&lt;li&gt;The full set of labels which were found during service discovery.&lt;/li&gt;
&lt;li&gt;The most recent time a log line was read and forwarded to the next components
in the pipeline.&lt;/li&gt;
&lt;li&gt;The most recent error from tailing, if any.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt; does not expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example discovers all &lt;code&gt;PodLogs&lt;/code&gt; resources and forwards collected logs to a
&lt;code&gt;loki.write&lt;/code&gt; component so they are can be written to Loki.&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;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;loki.source.podlogs &amp;#34;default&amp;#34; {
  forward_to = [loki.write.local.receiver]
}

loki.write &amp;#34;local&amp;#34; {
  endpoint {
    url = env(&amp;#34;LOKI_URL&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourcepodlogs">loki.source.podlogs&lt;/h1>
&lt;p>&lt;code>loki.source.podlogs&lt;/code> discovers &lt;code>PodLogs&lt;/code> resources on Kubernetes and, using
the Kubernetes API, tails logs from Kubernetes containers of Pods specified by
the discovered them.&lt;/p>
&lt;p>&lt;code>loki.source.podlogs&lt;/code> is similar to &lt;code>loki.source.kubernetes&lt;/code>, but uses custom
resources rather than being fed targets from another Flow component.&lt;/p></description></item><item><title>loki.source.syslog</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.syslog/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.syslog/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcesyslog&#34;&gt;loki.source.syslog&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.syslog&lt;/code&gt; listens for syslog messages over TCP or UDP connections
and forwards them to other &lt;code&gt;loki.*&lt;/code&gt; components. The messages must be compliant
with the &lt;a href=&#34;https://www.rfc-editor.org/rfc/rfc5424&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;RFC5424&lt;/a&gt; format.&lt;/p&gt;
&lt;p&gt;The component starts a new syslog listener for each of the given &lt;code&gt;config&lt;/code&gt;
blocks and fans out incoming entries to the list of receivers in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.syslog&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.syslog &amp;#34;LABEL&amp;#34; {
  listener {
    address = &amp;#34;LISTEN_ADDRESS&amp;#34;
  }
  ...

  forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.syslog&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send log entries to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relabel_rules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;RelabelRules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply on log entries.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;{}&amp;rdquo;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;relabel_rules&lt;/code&gt; field can make use of the &lt;code&gt;rules&lt;/code&gt; export value from a
&lt;code&gt;loki.relabel&lt;/code&gt; component to apply one or more relabeling rules to log entries
before they&amp;rsquo;re forwarded to the list of receivers in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;loki.source.syslog&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;listener&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#listener-block&#34;&gt;listener&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a listener for IETF Syslog (RFC5424) messages.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;listener &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS settings for connecting to the endpoint for TCP connections.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;config &amp;gt; tls_config&lt;/code&gt;
refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside a &lt;code&gt;config&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;listener-block&#34;&gt;listener block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;listener&lt;/code&gt; block defines the listen address and protocol where the listener
expects syslog messages to be sent to, as well as its behavior when receiving
messages.&lt;/p&gt;
&lt;p&gt;The following arguments can be used to configure a &lt;code&gt;listener&lt;/code&gt;. Only the
&lt;code&gt;address&lt;/code&gt; field is required and any omitted fields take their default
values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The &lt;code&gt;&amp;lt;host:port&amp;gt;&lt;/code&gt; address to listen to for syslog messages.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;protocol&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The protocol to listen to for syslog messages. Must be either &lt;code&gt;tcp&lt;/code&gt; or &lt;code&gt;udp&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;tcp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;idle_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The idle timeout for tcp connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;120s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;label_structured_data&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to translate syslog structured data to loki labels.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The labels to associate with each received syslog record.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_incoming_timestamp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to set the timestamp to the incoming syslog record timestamp.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_rfc5424_message&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to forward the full RFC5424-formatted syslog message.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_message_length&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum limit to the length of syslog messages.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;8192&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;By default, the component assigns the log entry timestamp as the time it
was processed.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;labels&lt;/code&gt; map is applied to every message that the component reads.&lt;/p&gt;
&lt;p&gt;All header fields from the parsed RFC5424 messages are brought in as
internal labels, prefixed with &lt;code&gt;__syslog_&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;label_structured_data&lt;/code&gt; is set, structured data in the syslog header is also
translated to internal labels in the form of
&lt;code&gt;__syslog_message_sd_&amp;lt;ID&amp;gt;_&amp;lt;KEY&amp;gt;&lt;/code&gt;. For example, a  structured data entry of
&lt;code&gt;[example@99999 test=&amp;quot;yes&amp;quot;]&lt;/code&gt; becomes the label
&lt;code&gt;__syslog_message_sd_example_99999_test&lt;/code&gt; with the value &lt;code&gt;&amp;quot;yes&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.syslog&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.syslog&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.syslog&lt;/code&gt; exposes some debug information per syslog listener:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whether the listener is currently running.&lt;/li&gt;
&lt;li&gt;The listen address.&lt;/li&gt;
&lt;li&gt;The labels that the listener applies to incoming log entries.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_source_syslog_entries_total&lt;/code&gt; (counter): Total number of successful entries sent to the syslog component.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_syslog_parsing_errors_total&lt;/code&gt; (counter): Total number of parsing errors while receiving syslog messages.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_syslog_empty_messages_total&lt;/code&gt; (counter): Total number of empty messages received from the syslog component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example listens for Syslog messages in valid RFC5424 format over TCP and
UDP in the specified ports and forwards them to a &lt;code&gt;loki.write&lt;/code&gt; component.&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;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;loki.source.syslog &amp;#34;local&amp;#34; {
  listener {
    address  = &amp;#34;127.0.0.1:51893&amp;#34;
    labels   = { component = &amp;#34;loki.source.syslog&amp;#34;, protocol = &amp;#34;tcp&amp;#34; } 
  }

  listener {
    address  = &amp;#34;127.0.0.1:51898&amp;#34;
    protocol = &amp;#34;udp&amp;#34;
    labels   = { component = &amp;#34;loki.source.syslog&amp;#34;, protocol = &amp;#34;udp&amp;#34;} 
  }

  forward_to = [loki.write.local.receiver]
}

loki.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;loki:3100/api/v1/push&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourcesyslog">loki.source.syslog&lt;/h1>
&lt;p>&lt;code>loki.source.syslog&lt;/code> listens for syslog messages over TCP or UDP connections
and forwards them to other &lt;code>loki.*&lt;/code> components. The messages must be compliant
with the &lt;a href="https://www.rfc-editor.org/rfc/rfc5424" target="_blank" rel="noopener noreferrer">RFC5424&lt;/a> format.&lt;/p></description></item><item><title>loki.source.windowsevent</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.windowsevent/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.source.windowsevent/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcewindowsevent&#34;&gt;loki.source.windowsevent&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.windowsevent&lt;/code&gt; reads events from Windows Event Logs and forwards them to other
&lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.windowsevent&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.source.windowsevent &amp;#34;LABEL&amp;#34; {
  eventlog_name = EVENTLOG_NAME
  forward_to    = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component starts a new reader and fans out
log entries to the list of receivers passed in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;loki.source.windowsevent&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;locale&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Locale ID for event rendering. 0 default is Windows Locale.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;eventlog_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Event log to read from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;See below.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;xpath_query&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Event log to read from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;See below.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bookmark_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Keeps position in event log.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;DATA_PATH/bookmark.xml&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;poll_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to poll the event log.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;3s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_event_data&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exclude event data.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_user_data&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exclude user data.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;user_incoming_timestamp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When false, assigns the current timestamp to the log when it was processed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send log entries to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;eventlog_name&lt;/code&gt; is required if &lt;code&gt;xpath_query&lt;/code&gt; does not specify the event log.
You can define &lt;code&gt;xpath_query&lt;/code&gt; in &lt;a href=&#34;https://docs.microsoft.com/en-us/windows/win32/wes/consuming-events&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;short or xml form&lt;/a&gt;.
When using the XML form you can specify &lt;code&gt;event_log&lt;/code&gt; in the &lt;code&gt;xpath_query&lt;/code&gt;.
If using short form, you must define &lt;code&gt;eventlog_name&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.windowsevent&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example collects log entries from the Event Log specified in &lt;code&gt;eventlog_name&lt;/code&gt; and
forwards them to a &lt;code&gt;loki.write&lt;/code&gt; component so they are can be written to Loki.&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;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;loki.source.windowsevent &amp;#34;application&amp;#34;  {
    eventlog_name = &amp;#34;Application&amp;#34;
    forward_to = [loki.write.endpoint.receiver]
}

loki.write &amp;#34;endpoint&amp;#34; {
    endpoint {
        url =&amp;#34;loki:3100/api/v1/push&amp;#34;
    }  
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourcewindowsevent">loki.source.windowsevent&lt;/h1>
&lt;p>&lt;code>loki.source.windowsevent&lt;/code> reads events from Windows Event Logs and forwards them to other
&lt;code>loki.*&lt;/code> components.&lt;/p>
&lt;p>Multiple &lt;code>loki.source.windowsevent&lt;/code> components can be specified by giving them
different labels.&lt;/p></description></item><item><title>loki.write</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.write/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/loki.write/</guid><content><![CDATA[&lt;h1 id=&#34;lokiwrite&#34;&gt;loki.write&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.write&lt;/code&gt; receives log entries from other loki components and sends them
over the network using Loki&amp;rsquo;s &lt;code&gt;logproto&lt;/code&gt; format.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.write&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;loki.write &amp;#34;LABEL&amp;#34; {
  endpoint {
    url = REMOTE_WRITE_URL
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.write&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before marking a request as failed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;external_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Labels to add to logs sent over the network.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;loki.write&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#endpoint-block&#34;&gt;endpoint&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Location to send logs to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http_client_config-block&#34;&gt;http_client_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client settings when connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; basic_auth&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;basic_auth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic_auth for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; authorization&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authorization-block&#34;&gt;authorization&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; oauth2&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;oauth2&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; oauth2 &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;endpoint &amp;gt; http_client_config&lt;/code&gt; refers to an &lt;code&gt;http_client_config&lt;/code&gt; block defined inside an
&lt;code&gt;endpoint&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;endpoint-block&#34;&gt;endpoint block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;endpoint&lt;/code&gt; block describes a single location to send logs to. Multiple
&lt;code&gt;endpoint&lt;/code&gt; blocks can be provided to send logs to multiple locations.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Full URL to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional name to identify this endpoint with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;batch_wait&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum amount of time to wait before sending a batch.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;batch_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum batch size of logs to accumulate before sending.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1MiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remote_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for requests made to the URL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tenant_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The tenant ID used by default to push logs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_backoff_period&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Initial backoff time between retries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;500ms&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_backoff_period&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum backoff time between retries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_backoff_retries&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of retries.&lt;/td&gt;
              &lt;td&gt;10&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If no &lt;code&gt;tenant_id&lt;/code&gt; is provided, the component assumes that the Loki instance at
&lt;code&gt;endpoint&lt;/code&gt; is running in single-tenant mode and no X-Scope-OrgID header is
sent.&lt;/p&gt;
&lt;p&gt;When multiple &lt;code&gt;endpoint&lt;/code&gt; blocks are provided, the &lt;code&gt;loki.write&lt;/code&gt; component
creates a client for each. Received log entries are fanned-out to these clients
in succession. That means that if one client is bottlenecked, it may impact
the rest.&lt;/p&gt;
&lt;p&gt;Endpoints can be named for easier identification in debug metrics by using the
&lt;code&gt;name&lt;/code&gt; argument. If the &lt;code&gt;name&lt;/code&gt; argument isn&amp;rsquo;t provided, a name is generated
based on a hash of the endpoint settings.&lt;/p&gt;
&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; configures settings used to connect to the Loki API.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth-block&#34;&gt;basic_auth block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/basic-auth-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mututally exclusive and only one can be
provided inside of a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;authorization-block&#34;&gt;authorization block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/authorization-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credential&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive and only one can be
provided inside of an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2-block&#34;&gt;oauth2 block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/oauth2-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional proxy URL for OAuth2 requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mututally exclusive and only one
can be provided inside of an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain its own separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send log entries to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.write&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.write&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_write_encoded_bytes_total&lt;/code&gt; (counter): Number of bytes encoded and ready to send.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_write_sent_bytes_total&lt;/code&gt; (counter): Number of bytes sent.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_write_dropped_bytes_total&lt;/code&gt; (counter): Number of bytes dropped because failed to be sent to the ingester after all retries.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_write_sent_entries_total&lt;/code&gt; (counter): Number of log entries sent to the ingester.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_write_dropped_entries_total&lt;/code&gt; (counter): Number of log entries dropped because they failed to be sent to the ingester after all retries.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_write_request_duration_seconds&lt;/code&gt; (histogram): Duration of sent requests.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_write_batch_retries_total&lt;/code&gt; (counter): Number of times batches have had to be retried.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_write_stream_lag_seconds&lt;/code&gt; (gauge): Difference between current time and last batch timestamp for successful sends.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates a &lt;code&gt;loki.write&lt;/code&gt; component that sends received entries to a
local Loki 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;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;loki.write &amp;#34;local&amp;#34; {
    endpoint {
        url = &amp;#34;loki:3100&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokiwrite">loki.write&lt;/h1>
&lt;p>&lt;code>loki.write&lt;/code> receives log entries from other loki components and sends them
over the network using Loki&amp;rsquo;s &lt;code>logproto&lt;/code> format.&lt;/p>
&lt;p>Multiple &lt;code>loki.write&lt;/code> components can be specified by giving them
different labels.&lt;/p></description></item><item><title>mimir.rules.kubernetes</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/mimir.rules.kubernetes/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/mimir.rules.kubernetes/</guid><content><![CDATA[&lt;h1 id=&#34;mimirruleskubernetes&#34;&gt;mimir.rules.kubernetes&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; discovers &lt;code&gt;PrometheusRule&lt;/code&gt; Kubernetes resources and
loads them into a Mimir instance.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multiple &lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; components can be specified by giving them
different labels.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes label selectors&lt;/a&gt; can be used to limit the &lt;code&gt;Namespace&lt;/code&gt; and
&lt;code&gt;PrometheusRule&lt;/code&gt; resources considered during reconciliation.&lt;/li&gt;
&lt;li&gt;Compatible with the Ruler APIs of Grafana Mimir, Grafana Cloud, and Grafana Enterprise Metrics.&lt;/li&gt;
&lt;li&gt;Compatible with the &lt;code&gt;PrometheusRule&lt;/code&gt; CRD from the &lt;a href=&#34;https://prometheus-operator.dev/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;prometheus-operator&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;mimir.rules.kubernetes &amp;#34;LABEL&amp;#34; {
  address = MIMIR_RULER_URL
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL of the Mimir ruler.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tenant_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mimir tenant ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_legacy_routes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to use deprecated ruler API endpoints.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sync_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Amount of time between reconciliations with Mimir.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;30s&amp;rdquo;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mimir_namespace_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Prefix used to differentiate multiple agent deployments.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;agent&amp;rdquo;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If no &lt;code&gt;tenant_id&lt;/code&gt; is provided, the component assumes that the Mimir instance at
&lt;code&gt;address&lt;/code&gt; is running in single-tenant mode and no &lt;code&gt;X-Scope-OrgID&lt;/code&gt; header is sent.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;sync_interval&lt;/code&gt; argument determines how often Mimir&amp;rsquo;s ruler API is accessed
to reload the current state of rules. Interaction with the Kubernetes API works
differently. Updates are processed as events from the Kubernetes API server
according to the informer pattern.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;mimir_namespace_prefix&lt;/code&gt; argument can be used to separate the rules managed
by multiple agent deployments across your infrastructure. It should be set to a
unique value for each deployment.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;mimir.rules.kubernetes&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;rule_namespace_selector&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#label_selector-block&#34;&gt;label_selector&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector for &lt;code&gt;Namespace&lt;/code&gt; resources.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;rule_namespace_selector &amp;gt; match_expression&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#match_expression-block&#34;&gt;match_expression&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label match expression for &lt;code&gt;Namespace&lt;/code&gt; resources.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;rule_selector&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#label_selector-block&#34;&gt;label_selector&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector for &lt;code&gt;PrometheusRule&lt;/code&gt; resources.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;rule_selector &amp;gt; match_expression&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#match_expression-block&#34;&gt;match_expression&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label match expression for &lt;code&gt;PrometheusRule&lt;/code&gt; resources.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http_client_config-block&#34;&gt;http_client_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client settings when connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; basic_auth&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;basic_auth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic_auth for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; authorization&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authorization-block&#34;&gt;authorization&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;oauth2&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2 &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example,
&lt;code&gt;http_client_config &amp;gt; basic_auth&lt;/code&gt; refers to a &lt;code&gt;basic_auth&lt;/code&gt; block defined inside
an &lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;label_selector-block&#34;&gt;label_selector block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;label_selector&lt;/code&gt; block describes a Kubernetes label selector for rule or namespace discovery.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;match_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label keys and values used to discover resources.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;match_labels&lt;/code&gt; argument is empty, all resources will be matched.&lt;/p&gt;
&lt;h3 id=&#34;match_expression-block&#34;&gt;match_expression block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;match_expression&lt;/code&gt; block describes a Kubernetes label match expression for rule or namespace discovery.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label name to match against.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;operator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The operator to use when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The values used when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;operator&lt;/code&gt; argument should be one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;in&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;notin&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;exists&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; configures settings used to connect to the Mimir API.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth-block&#34;&gt;basic_auth block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/basic-auth-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mututally exclusive and only one can be
provided inside of a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;authorization-block&#34;&gt;authorization block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/authorization-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credential&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive and only one can be
provided inside of an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2-block&#34;&gt;oauth2 block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/oauth2-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional proxy URL for OAuth2 requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mututally exclusive and only one
can be provided inside of an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain its own separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; is reported as unhealthy if given an invalid configuration or an error occurs during reconciliation.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; exposes resource-level debug information.&lt;/p&gt;
&lt;p&gt;The following are exposed per discovered &lt;code&gt;PrometheusRule&lt;/code&gt; resource:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Kubernetes namespace.&lt;/li&gt;
&lt;li&gt;The resource name.&lt;/li&gt;
&lt;li&gt;The resource uid.&lt;/li&gt;
&lt;li&gt;The number of rule groups.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following are exposed per discovered Mimir rule namespace resource:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The namespace name.&lt;/li&gt;
&lt;li&gt;The number of rule groups.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Only resources managed by the component are exposed - regardless of how many
actually exist.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Metric Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mimir_rules_config_updates_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of times the configuration has been updated.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mimir_rules_events_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of events processed, partitioned by event type.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mimir_rules_events_failed_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of events that failed to be processed, partitioned by event type.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mimir_rules_events_retried_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of events that were retried, partitioned by event type.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mimir_rules_client_request_duration_seconds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;histogram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Duration of requests to the Mimir API.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates a &lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; component that loads discovered
rules to a local Mimir instance under the &lt;code&gt;team-a&lt;/code&gt; tenant. Only namespaces and
rules with the &lt;code&gt;agent&lt;/code&gt; label set to &lt;code&gt;yes&lt;/code&gt; are included.&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;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;mimir.rules.kubernetes &amp;#34;local&amp;#34; {
    address = &amp;#34;mimir:8080&amp;#34;
    tenant_id = &amp;#34;team-a&amp;#34;

    rule_namespace_selector {
        match_labels = {
            agent = &amp;#34;yes&amp;#34;,
        }
    }

    rule_selector {
        match_labels = {
            agent = &amp;#34;yes&amp;#34;,
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example creates a &lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; component that loads discovered
rules to 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;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;mimir.rules.kubernetes &amp;#34;default&amp;#34; {
    address = &amp;#34;GRAFANA_CLOUD_METRICS_URL&amp;#34;
    http_client_config {
        basic_auth {
            username = &amp;#34;GRAFANA_CLOUD_USER&amp;#34;
            password = &amp;#34;GRAFANA_CLOUD_API_KEY&amp;#34;
            // Alternatively, load the password from a file:
            // password_file = &amp;#34;GRAFANA_CLOUD_API_KEY_PATH&amp;#34;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="mimirruleskubernetes">mimir.rules.kubernetes&lt;/h1>
&lt;p>&lt;code>mimir.rules.kubernetes&lt;/code> discovers &lt;code>PrometheusRule&lt;/code> Kubernetes resources and
loads them into a Mimir instance.&lt;/p>
&lt;ul>
&lt;li>Multiple &lt;code>mimir.rules.kubernetes&lt;/code> components can be specified by giving them
different labels.&lt;/li>
&lt;li>&lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" target="_blank" rel="noopener noreferrer">Kubernetes label selectors&lt;/a> can be used to limit the &lt;code>Namespace&lt;/code> and
&lt;code>PrometheusRule&lt;/code> resources considered during reconciliation.&lt;/li>
&lt;li>Compatible with the Ruler APIs of Grafana Mimir, Grafana Cloud, and Grafana Enterprise Metrics.&lt;/li>
&lt;li>Compatible with the &lt;code>PrometheusRule&lt;/code> CRD from the &lt;a href="https://prometheus-operator.dev/" target="_blank" rel="noopener noreferrer">prometheus-operator&lt;/a>.&lt;/li>
&lt;/ul>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&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-alloy">mimir.rules.kubernetes &amp;#34;LABEL&amp;#34; {
address = MIMIR_RULER_URL
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>&lt;code>mimir.rules.kubernetes&lt;/code> supports the following arguments:&lt;/p></description></item><item><title>otelcol.auth.basic</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.auth.basic/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.auth.basic/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolauthbasic&#34;&gt;otelcol.auth.basic&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.basic&lt;/code&gt; exposes a &lt;code&gt;handler&lt;/code&gt; that can be used by other &lt;code&gt;otelcol&lt;/code&gt;
components to authenticate requests using basic authentication.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.auth.basic&lt;/code&gt; is a wrapper over the upstream OpenTelemetry
Collector &lt;code&gt;basicauth&lt;/code&gt; extension. Bug reports or feature requests will be
redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.auth.basic&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.auth.basic &amp;#34;LABEL&amp;#34; {
  username = &amp;#34;USERNAME&amp;#34;
  password = &amp;#34;PASSWORD&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.basic&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Username to use for basic authentication requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Password to use for basic authentication requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;handler&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;capsule(otelcol.Handler)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to authenticate requests.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.basic&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.basic&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example configures &lt;a href=&#34;../otelcol.exporter.otlp/&#34;&gt;otelcol.exporter.otlp&lt;/a&gt; to use basic authentication:&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;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;otelcol.exporter.otlp &amp;#34;example&amp;#34; {
  client {
    endpoint = &amp;#34;my-otlp-grpc-server:4317&amp;#34;
    auth     = otelcol.auth.basic.creds.handler
  }
}

otelcol.auth.basic &amp;#34;creds&amp;#34; {
  username = &amp;#34;demo&amp;#34;
  password = env(&amp;#34;API_KEY&amp;#34;)
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolauthbasic">otelcol.auth.basic&lt;/h1>
&lt;p>&lt;code>otelcol.auth.basic&lt;/code> exposes a &lt;code>handler&lt;/code> that can be used by other &lt;code>otelcol&lt;/code>
components to authenticate requests using basic authentication.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.auth.basic&lt;/code> is a wrapper over the upstream OpenTelemetry
Collector &lt;code>basicauth&lt;/code> extension. Bug reports or feature requests will be
redirected to the upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.auth.bearer</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.auth.bearer/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.auth.bearer/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolauthbearer&#34;&gt;otelcol.auth.bearer&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.bearer&lt;/code&gt; exposes a &lt;code&gt;handler&lt;/code&gt; that can be used by other &lt;code&gt;otelcol&lt;/code&gt;
components to authenticate requests using bearer token authentication.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.auth.bearer&lt;/code&gt; is a wrapper over the upstream OpenTelemetry
Collector &lt;code&gt;bearertokenauth&lt;/code&gt; extension. Bug reports or feature requests will
be redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.auth.bearer&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.auth.bearer &amp;#34;LABEL&amp;#34; {
  token = &amp;#34;TOKEN&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.bearer&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to use for authenticating requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;handler&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;capsule(otelcol.Handler)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to authenticate requests.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.bearer&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.bearer&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example configures &lt;a href=&#34;../otelcol.exporter.otlp/&#34;&gt;otelcol.exporter.otlp&lt;/a&gt; to use bearer token
authentication:&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;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;otelcol.exporter.otlp &amp;#34;example&amp;#34; {
  client {
    endpoint = &amp;#34;my-otlp-grpc-server:4317&amp;#34;
    auth     = otelcol.auth.bearer.creds.handler
  }
}

otelcol.auth.bearer &amp;#34;creds&amp;#34; {
  token = env(&amp;#34;API_KEY&amp;#34;)
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolauthbearer">otelcol.auth.bearer&lt;/h1>
&lt;p>&lt;code>otelcol.auth.bearer&lt;/code> exposes a &lt;code>handler&lt;/code> that can be used by other &lt;code>otelcol&lt;/code>
components to authenticate requests using bearer token authentication.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.auth.bearer&lt;/code> is a wrapper over the upstream OpenTelemetry
Collector &lt;code>bearertokenauth&lt;/code> extension. Bug reports or feature requests will
be redirected to the upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.auth.headers</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.auth.headers/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.auth.headers/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolauthheaders&#34;&gt;otelcol.auth.headers&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.headers&lt;/code&gt; exposes a &lt;code&gt;handler&lt;/code&gt; that can be used by other &lt;code&gt;otelcol&lt;/code&gt;
components to authenticate requests using custom headers.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.auth.headers&lt;/code&gt; is a wrapper over the upstream OpenTelemetry
Collector &lt;code&gt;headerssetter&lt;/code&gt; extension. Bug reports or feature requests will be
redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.auth.headers&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.auth.headers &amp;#34;LABEL&amp;#34; {
  header {
    key   = &amp;#34;HEADER_NAME&amp;#34;
    value = &amp;#34;HEADER_VALUE&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.headers&lt;/code&gt; doesn&amp;rsquo;t support any arguments and is configured fully
through inner blocks.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.auth.headers&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;header&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#header-block&#34;&gt;header&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Custom header to attach to requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;header-block&#34;&gt;header block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;header&lt;/code&gt; block defines a custom header to attach to requests. It is valid
to provide multiple &lt;code&gt;header&lt;/code&gt; blocks to set more than one header.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name of the header to set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt; or &lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Value of the header.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;from_context&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Metadata name to get header value from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Exactly one of &lt;code&gt;value&lt;/code&gt; or &lt;code&gt;from_context&lt;/code&gt; must be provided for each &lt;code&gt;header&lt;/code&gt;
block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;value&lt;/code&gt; attribute sets the value of the header directly.&lt;/p&gt;
&lt;p&gt;Alternatively, &lt;code&gt;from_context&lt;/code&gt; can be used to dynamically retrieve the header
value from request metadata.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: It is not possible to use &lt;code&gt;from_context&lt;/code&gt; to get the header value if
&lt;a href=&#34;../otelcol.processor.batch/&#34;&gt;the &lt;code&gt;otelcol.processor.batch&lt;/code&gt; component&lt;/a&gt; is used to
batch before data is sent to the component referencing
&lt;code&gt;otelcol.auth.headers&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;handler&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;capsule(otelcol.Handler)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to authenticate requests.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.headers&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.headers&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example configures &lt;a href=&#34;../otelcol.exporter.otlp/&#34;&gt;otelcol.exporter.otlp&lt;/a&gt; to use custom headers:&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;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;otelcol.exporter.otlp &amp;#34;example&amp;#34; {
  client {
    endpoint = &amp;#34;my-otlp-grpc-server:4317&amp;#34;
    auth     = otelcol.auth.headers.creds.handler
  }
}

otelcol.auth.headers &amp;#34;creds&amp;#34; {
  header {
    key          = &amp;#34;X-Scope-OrgID&amp;#34;
    from_context = &amp;#34;tenant_id&amp;#34;
  }

  header {
    key   = &amp;#34;User-ID&amp;#34;
    value = &amp;#34;user_id&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolauthheaders">otelcol.auth.headers&lt;/h1>
&lt;p>&lt;code>otelcol.auth.headers&lt;/code> exposes a &lt;code>handler&lt;/code> that can be used by other &lt;code>otelcol&lt;/code>
components to authenticate requests using custom headers.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.auth.headers&lt;/code> is a wrapper over the upstream OpenTelemetry
Collector &lt;code>headerssetter&lt;/code> extension. Bug reports or feature requests will be
redirected to the upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.exporter.jaeger</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.jaeger/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.jaeger/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolexporterjaeger&#34;&gt;otelcol.exporter.jaeger&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.jaeger&lt;/code&gt; accepts telemetry data from other &lt;code&gt;otelcol&lt;/code&gt; components
and writes them over the network using the Jaeger protocol.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.exporter.jaeger&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;jaeger&lt;/code&gt; exporter. Bug reports or feature requests will
be redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.exporter.jaeger&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.exporter.jaeger &amp;#34;LABEL&amp;#34; {
  client {
    endpoint = &amp;#34;HOST:PORT&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.jaeger&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before marking a request as failed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.exporter.jaeger&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;client&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#client-block&#34;&gt;client&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the gRPC server to send telemetry data to.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the gRPC client.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; keepalive&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#keepalive-block&#34;&gt;keepalive&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures keepalive settings for the gRPC client.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;sending_queue&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#sending_queue-block&#34;&gt;sending_queue&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures batching of data before sending.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;retry_on_failure&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#retry_on_failure-block&#34;&gt;retry_on_failure&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures retry mechanism for failed requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;client &amp;gt; tls&lt;/code&gt;
refers to a &lt;code&gt;tls&lt;/code&gt; block defined inside a &lt;code&gt;client&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;client-block&#34;&gt;client block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures the gRPC client used by the component.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to send telemetry data to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;compression&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Compression mechanism to use for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;gzip&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;read_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the read buffer the gRPC client to use for reading server responses.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;write_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the write buffer the gRPC client to use for writing requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;512KiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;wait_for_ready&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Waits for gRPC connection to be in the &lt;code&gt;READY&lt;/code&gt; state before sending data.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Additional headers to send with the request.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;balancer_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Which gRPC client-side load balancer to use for requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;auth&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;capsule(otelcol.Handler)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Handler from an &lt;code&gt;otelcol.auth&lt;/code&gt; component to use for authenticating requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;

&lt;div data-shared=&#34;flow/reference/components/otelcol-compression-field.md&#34;&gt;
            &lt;p&gt;By default, requests are compressed with gzip. The &lt;code&gt;compression&lt;/code&gt; argument
controls which compression mechanism to use. Supported strings are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;gzip&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;zlib&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;deflate&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;snappy&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;zstd&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;compression&lt;/code&gt; is set to &lt;code&gt;&amp;quot;none&amp;quot;&lt;/code&gt; or an empty string &lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;, no compression is
used.&lt;/p&gt;
&lt;/div&gt;

        
&lt;p&gt;The &lt;code&gt;balancer_name&lt;/code&gt; argument controls what client-side load balancing mechanism
to use. See the gRPC documentation on &lt;a href=&#34;https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md#pick_first&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Load balancing&lt;/a&gt; for more information.
When unspecified, &lt;code&gt;pick_first&lt;/code&gt; is used.&lt;/p&gt;
&lt;p&gt;An HTTP proxy can be configured through the following environment variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;HTTPS_PROXY&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NO_PROXY&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;HTTPS_PROXY&lt;/code&gt; environment variable specifies a URL to use for proxying
requests. Connections to the proxy are established via &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;the &lt;code&gt;HTTP CONNECT&lt;/code&gt;
method&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;NO_PROXY&lt;/code&gt; environment variable is an optional list of comma-separated
hostnames for which the HTTPS proxy should &lt;em&gt;not&lt;/em&gt; be used. Each hostname can be
provided as an IP address (&lt;code&gt;1.2.3.4&lt;/code&gt;), an IP address in CIDR notation
(&lt;code&gt;1.2.3.4/8&lt;/code&gt;), a domain name (&lt;code&gt;example.com&lt;/code&gt;), or &lt;code&gt;*&lt;/code&gt;. A domain name matches
that domain and all subdomains. A domain name with a leading &amp;ldquo;.&amp;rdquo;
(&lt;code&gt;.example.com&lt;/code&gt;) matches subdomains only. &lt;code&gt;NO_PROXY&lt;/code&gt; is only read when
&lt;code&gt;HTTPS_PROXY&lt;/code&gt; is set.&lt;/p&gt;
&lt;p&gt;Because &lt;code&gt;otelcol.exporter.jaeger&lt;/code&gt; uses gRPC, the configured proxy server must be
able to handle and proxy HTTP/2 traffic.&lt;/p&gt;
&lt;h3 id=&#34;tls-block&#34;&gt;tls block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls&lt;/code&gt; block configures TLS settings used for the connection to the gRPC
server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-tls-config-block.md&#34;&gt;
            &lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.3&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables TLS when connecting to the configured server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Ignores insecure server TLS certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Verifies the hostname of server certificates when set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If the server doesn&amp;rsquo;t support TLS, the tls block must be provided with the
&lt;code&gt;insecure&lt;/code&gt; argument set to &lt;code&gt;true&lt;/code&gt;. To disable &lt;code&gt;tls&lt;/code&gt; for connections to the
server, set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;keepalive-block&#34;&gt;keepalive block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;keepalive&lt;/code&gt; block configures keepalive settings for gRPC client
connections.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ping_wait&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to ping the server after no activity.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ping_response_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before closing inactive connections if the server does not respond to a ping.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ping_without_stream&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Send pings even if there is no active stream request.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;sending_queue-block&#34;&gt;sending_queue block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;sending_queue&lt;/code&gt; block configures an in-memory buffer of batches before data is sent
to the gRPC server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-queue-block.md&#34;&gt;
            &lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables an in-memory buffer before sending data to the client.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;num_consumers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of readers to send batches written to the queue in parallel.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;queue_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of unwritten batches allowed in the queue at once.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;enabled&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, data is first written to an in-memory buffer before
sending it to the configured server. Batches sent to the component&amp;rsquo;s &lt;code&gt;input&lt;/code&gt;
exported field are added to the buffer as long as the number of unsent batches
does not exceed the configured &lt;code&gt;queue_size&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;queue_size&lt;/code&gt; is used to determine how long an endpoint outage is tolerated for.
Assuming 100 requests/second, the default queue size &lt;code&gt;5000&lt;/code&gt; provides about 50
seconds of outage tolerance. To calculate the correct value for &lt;code&gt;queue_size&lt;/code&gt;,
multiply the average number of outgoing requests per second by the amount of
time in seconds that outages should be tolerated for.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;num_consumers&lt;/code&gt; argument controls how many readers read from the buffer and
send data in parallel. Larger values of &lt;code&gt;num_consumers&lt;/code&gt; allow data to be sent
more quickly at the expense of increased network traffic.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;retry_on_failure-block&#34;&gt;retry_on_failure block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;retry_on_failure&lt;/code&gt; block configures how failed requests to the gRPC server are
retried.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-retry-block.md&#34;&gt;
            &lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables retrying failed requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;initial_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Initial time to wait before retrying a failed request.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time to wait between retries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_elapsed_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum amount of time to wait before discarding a failed batch.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;enabled&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, failed batches are retried after a given interval.
The &lt;code&gt;initial_interval&lt;/code&gt; argument specifies how long to wait before the first
retry attempt. If requests continue to fail, the time to wait before retrying
increases exponentially. The &lt;code&gt;max_interval&lt;/code&gt; argument specifies the upper bound
of how long to wait between retries.&lt;/p&gt;
&lt;p&gt;If a batch has not sent successfully, it is discarded after the time specified
by &lt;code&gt;max_elapsed_time&lt;/code&gt; elapses. If &lt;code&gt;max_elapsed_time&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, failed
requests are retried forever until they succeed.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;input&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send telemetry data to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;input&lt;/code&gt; accepts &lt;code&gt;otelcol.Consumer&lt;/code&gt; data for any telemetry signal (metrics,
logs, or traces).&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.jaeger&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.jaeger&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example accepts OTLP traces over gRPC, sends them to a batch processor and forwards to Jaeger without TLS:&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;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;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
    grpc {}
    output {
        traces  = [otelcol.processor.batch.default.input]
    }
}

otelcol.processor.batch &amp;#34;default&amp;#34; {
    output {
        traces  = [otelcol.exporter.jaeger.default.input]
    }
}

otelcol.exporter.jaeger &amp;#34;default&amp;#34; {
    client {
        endpoint = &amp;#34;jaeger:14250&amp;#34;
        tls {
            insecure             = true
            insecure_skip_verify = true
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolexporterjaeger">otelcol.exporter.jaeger&lt;/h1>
&lt;p>&lt;code>otelcol.exporter.jaeger&lt;/code> accepts telemetry data from other &lt;code>otelcol&lt;/code> components
and writes them over the network using the Jaeger protocol.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.exporter.jaeger&lt;/code> is a wrapper over the upstream
OpenTelemetry Collector &lt;code>jaeger&lt;/code> exporter. Bug reports or feature requests will
be redirected to the upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.exporter.loki</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.loki/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.loki/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolexporterloki&#34;&gt;otelcol.exporter.loki&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loki&lt;/code&gt; accepts OTLP-formatted logs from other &lt;code&gt;otelcol&lt;/code&gt;
components, converts them to Loki-formatted log entries, and forwards them
to &lt;code&gt;loki&lt;/code&gt; components.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.exporter.loki&lt;/code&gt; is a custom component unrelated to the
&lt;code&gt;lokiexporter&lt;/code&gt; from the OpenTelemetry Collector.&lt;/p&gt;
&lt;p&gt;Conversion of logs are done according to the OpenTelemetry
&lt;a href=&#34;https://opentelemetry.io/docs/reference/specification/logs/data-model/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Logs Data Model&lt;/a&gt; specification.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.exporter.loki&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.exporter.loki &amp;#34;LABEL&amp;#34; {
  forward_to = [...]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loki&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(receiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Where to forward converted Loki logs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;input&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send telemetry data to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;input&lt;/code&gt; accepts &lt;code&gt;otelcol.Consumer&lt;/code&gt; data for logs. Other telemetry signals are ignored.&lt;/p&gt;
&lt;p&gt;Logs sent to &lt;code&gt;input&lt;/code&gt; are converted to Loki-compatible log entries and are
forwarded to the &lt;code&gt;forward_to&lt;/code&gt; argument in sequence.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loki&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loki&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example accepts OTLP logs over gRPC, transforms them and forwards
the converted log entries to &lt;code&gt;loki.write&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;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;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
  grpc {}

  output {
    logs = [otelcol.exporter.loki.default.input]
  }
}

otelcol.exporter.loki &amp;#34;default&amp;#34; {
  forward_to = [loki.write.local.receiver]
}

loki.write &amp;#34;local&amp;#34; {
    endpoint {
        url = &amp;#34;loki:3100&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolexporterloki">otelcol.exporter.loki&lt;/h1>
&lt;p>&lt;code>otelcol.exporter.loki&lt;/code> accepts OTLP-formatted logs from other &lt;code>otelcol&lt;/code>
components, converts them to Loki-formatted log entries, and forwards them
to &lt;code>loki&lt;/code> components.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.exporter.loki&lt;/code> is a custom component unrelated to the
&lt;code>lokiexporter&lt;/code> from the OpenTelemetry Collector.&lt;/p></description></item><item><title>otelcol.exporter.otlp</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.otlp/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.otlp/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolexporterotlp&#34;&gt;otelcol.exporter.otlp&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; accepts telemetry data from other &lt;code&gt;otelcol&lt;/code&gt; components
and writes them over the network using the OTLP gRPC protocol.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;otlp&lt;/code&gt; exporter. Bug reports or feature requests will
be redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.exporter.otlp &amp;#34;LABEL&amp;#34; {
  client {
    endpoint = &amp;#34;HOST:PORT&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before marking a request as failed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.exporter.otlp&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;client&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#client-block&#34;&gt;client&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the gRPC server to send telemetry data to.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the gRPC client.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; keepalive&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#keepalive-block&#34;&gt;keepalive&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures keepalive settings for the gRPC client.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;sending_queue&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#sending_queue-block&#34;&gt;sending_queue&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures batching of data before sending.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;retry_on_failure&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#retry_on_failure-block&#34;&gt;retry_on_failure&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures retry mechanism for failed requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;client &amp;gt; tls&lt;/code&gt;
refers to a &lt;code&gt;tls&lt;/code&gt; block defined inside a &lt;code&gt;client&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;client-block&#34;&gt;client block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures the gRPC client used by the component.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to send telemetry data to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;compression&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Compression mechanism to use for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;gzip&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;read_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the read buffer the gRPC client to use for reading server responses.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;write_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the write buffer the gRPC client to use for writing requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;512KiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;wait_for_ready&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Waits for gRPC connection to be in the &lt;code&gt;READY&lt;/code&gt; state before sending data.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Additional headers to send with the request.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;balancer_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Which gRPC client-side load balancer to use for requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;auth&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;capsule(otelcol.Handler)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Handler from an &lt;code&gt;otelcol.auth&lt;/code&gt; component to use for authenticating requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;

&lt;div data-shared=&#34;flow/reference/components/otelcol-compression-field.md&#34;&gt;
            &lt;p&gt;By default, requests are compressed with gzip. The &lt;code&gt;compression&lt;/code&gt; argument
controls which compression mechanism to use. Supported strings are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;gzip&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;zlib&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;deflate&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;snappy&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;zstd&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;compression&lt;/code&gt; is set to &lt;code&gt;&amp;quot;none&amp;quot;&lt;/code&gt; or an empty string &lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;, no compression is
used.&lt;/p&gt;
&lt;/div&gt;

        
&lt;p&gt;The &lt;code&gt;balancer_name&lt;/code&gt; argument controls what client-side load balancing mechanism
to use. See the gRPC documentation on &lt;a href=&#34;https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md#pick_first&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Load balancing&lt;/a&gt; for more information.
When unspecified, &lt;code&gt;pick_first&lt;/code&gt; is used.&lt;/p&gt;
&lt;p&gt;An HTTP proxy can be configured through the following environment variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;HTTPS_PROXY&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NO_PROXY&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;HTTPS_PROXY&lt;/code&gt; environment variable specifies a URL to use for proxying
requests. Connections to the proxy are established via &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;the &lt;code&gt;HTTP CONNECT&lt;/code&gt;
method&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;NO_PROXY&lt;/code&gt; environment variable is an optional list of comma-separated
hostnames for which the HTTPS proxy should &lt;em&gt;not&lt;/em&gt; be used. Each hostname can be
provided as an IP address (&lt;code&gt;1.2.3.4&lt;/code&gt;), an IP address in CIDR notation
(&lt;code&gt;1.2.3.4/8&lt;/code&gt;), a domain name (&lt;code&gt;example.com&lt;/code&gt;), or &lt;code&gt;*&lt;/code&gt;. A domain name matches
that domain and all subdomains. A domain name with a leading &amp;ldquo;.&amp;rdquo;
(&lt;code&gt;.example.com&lt;/code&gt;) matches subdomains only. &lt;code&gt;NO_PROXY&lt;/code&gt; is only read when
&lt;code&gt;HTTPS_PROXY&lt;/code&gt; is set.&lt;/p&gt;
&lt;p&gt;Because &lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; uses gRPC, the configured proxy server must be
able to handle and proxy HTTP/2 traffic.&lt;/p&gt;
&lt;h3 id=&#34;tls-block&#34;&gt;tls block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls&lt;/code&gt; block configures TLS settings used for the connection to the gRPC
server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-tls-config-block.md&#34;&gt;
            &lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.3&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables TLS when connecting to the configured server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Ignores insecure server TLS certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Verifies the hostname of server certificates when set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If the server doesn&amp;rsquo;t support TLS, the tls block must be provided with the
&lt;code&gt;insecure&lt;/code&gt; argument set to &lt;code&gt;true&lt;/code&gt;. To disable &lt;code&gt;tls&lt;/code&gt; for connections to the
server, set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;keepalive-block&#34;&gt;keepalive block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;keepalive&lt;/code&gt; block configures keepalive settings for gRPC client
connections.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ping_wait&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to ping the server after no activity.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ping_response_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before closing inactive connections if the server does not respond to a ping.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ping_without_stream&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Send pings even if there is no active stream request.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;sending_queue-block&#34;&gt;sending_queue block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;sending_queue&lt;/code&gt; block configures an in-memory buffer of batches before data is sent
to the gRPC server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-queue-block.md&#34;&gt;
            &lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables an in-memory buffer before sending data to the client.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;num_consumers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of readers to send batches written to the queue in parallel.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;queue_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of unwritten batches allowed in the queue at once.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;enabled&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, data is first written to an in-memory buffer before
sending it to the configured server. Batches sent to the component&amp;rsquo;s &lt;code&gt;input&lt;/code&gt;
exported field are added to the buffer as long as the number of unsent batches
does not exceed the configured &lt;code&gt;queue_size&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;queue_size&lt;/code&gt; is used to determine how long an endpoint outage is tolerated for.
Assuming 100 requests/second, the default queue size &lt;code&gt;5000&lt;/code&gt; provides about 50
seconds of outage tolerance. To calculate the correct value for &lt;code&gt;queue_size&lt;/code&gt;,
multiply the average number of outgoing requests per second by the amount of
time in seconds that outages should be tolerated for.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;num_consumers&lt;/code&gt; argument controls how many readers read from the buffer and
send data in parallel. Larger values of &lt;code&gt;num_consumers&lt;/code&gt; allow data to be sent
more quickly at the expense of increased network traffic.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;retry_on_failure-block&#34;&gt;retry_on_failure block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;retry_on_failure&lt;/code&gt; block configures how failed requests to the gRPC server are
retried.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-retry-block.md&#34;&gt;
            &lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables retrying failed requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;initial_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Initial time to wait before retrying a failed request.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time to wait between retries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_elapsed_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum amount of time to wait before discarding a failed batch.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;enabled&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, failed batches are retried after a given interval.
The &lt;code&gt;initial_interval&lt;/code&gt; argument specifies how long to wait before the first
retry attempt. If requests continue to fail, the time to wait before retrying
increases exponentially. The &lt;code&gt;max_interval&lt;/code&gt; argument specifies the upper bound
of how long to wait between retries.&lt;/p&gt;
&lt;p&gt;If a batch has not sent successfully, it is discarded after the time specified
by &lt;code&gt;max_elapsed_time&lt;/code&gt; elapses. If &lt;code&gt;max_elapsed_time&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, failed
requests are retried forever until they succeed.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;input&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send telemetry data to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;input&lt;/code&gt; accepts &lt;code&gt;otelcol.Consumer&lt;/code&gt; data for any telemetry signal (metrics,
logs, or traces).&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates an exporter to send data to a locally running Grafana
Tempo without TLS:&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;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;otelcol.exporter.otlp &amp;#34;tempo&amp;#34; {
    client {
        endpoint = &amp;#34;tempo:4317&amp;#34;
        tls {
            insecure             = true
            insecure_skip_verify = true
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolexporterotlp">otelcol.exporter.otlp&lt;/h1>
&lt;p>&lt;code>otelcol.exporter.otlp&lt;/code> accepts telemetry data from other &lt;code>otelcol&lt;/code> components
and writes them over the network using the OTLP gRPC protocol.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.exporter.otlp&lt;/code> is a wrapper over the upstream
OpenTelemetry Collector &lt;code>otlp&lt;/code> exporter. Bug reports or feature requests will
be redirected to the upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.exporter.otlphttp</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.otlphttp/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.otlphttp/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolexporterotlphttp&#34;&gt;otelcol.exporter.otlphttp&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlphttp&lt;/code&gt; accepts telemetry data from other &lt;code&gt;otelcol&lt;/code&gt;
components and writes them over the network using the OTLP HTTP protocol.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.exporter.otlphttp&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;otlphttp&lt;/code&gt; exporter. Bug reports or feature requests
will be redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.exporter.otlphttp&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.exporter.otlphttp &amp;#34;LABEL&amp;#34; {
  client {
    endpoint = &amp;#34;HOST:PORT&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlphttp&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics_endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The endpoint to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;client.endpoint &#43; &amp;quot;/v1/metrics&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs_endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The endpoint to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;client.endpoint &#43; &amp;quot;/v1/logs&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces_endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The endpoint to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;client.endpoint &#43; &amp;quot;/v1/traces&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The default value depends on the &lt;code&gt;endpoint&lt;/code&gt; field set in the required &lt;code&gt;client&lt;/code&gt;
block. If set, these arguments override the &lt;code&gt;client.endpoint&lt;/code&gt; field for the
corresponding signal.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.exporter.otlphttp&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;client&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#client-block&#34;&gt;client&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server to send telemetry data to.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the HTTP client.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;sending_queue&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#sending_queue-block&#34;&gt;sending_queue&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures batching of data before sending.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;retry_on_failure&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#retry_on_failure-block&#34;&gt;retry_on_failure&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures retry mechanism for failed requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;client &amp;gt; tls&lt;/code&gt;
refers to a &lt;code&gt;tls&lt;/code&gt; block defined inside a &lt;code&gt;client&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;client-block&#34;&gt;client block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures the HTTP client used by the component.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to send telemetry data to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;read_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the read buffer the HTTP client uses for reading server responses.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;write_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the write buffer the HTTP client uses for writing requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;512KiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before marking a request as failed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Additional headers to send with the request.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;compression&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Compression mechanism to use for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;gzip&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_idle_conns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limits the number of idle HTTP connections the client can keep open.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;100&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_idle_conns_per_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limits the number of idle HTTP connections the host can keep open.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_conns_per_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limits the total (dialing,active, and idle) number of connections per host.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;idle_conn_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before an idle connection closes itself.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;90s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;auth&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;capsule(otelcol.Handler)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Handler from an &lt;code&gt;otelcol.auth&lt;/code&gt; component to use for authenticating requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;

&lt;div data-shared=&#34;flow/reference/components/otelcol-compression-field.md&#34;&gt;
            &lt;p&gt;By default, requests are compressed with gzip. The &lt;code&gt;compression&lt;/code&gt; argument
controls which compression mechanism to use. Supported strings are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;gzip&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;zlib&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;deflate&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;snappy&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;zstd&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;compression&lt;/code&gt; is set to &lt;code&gt;&amp;quot;none&amp;quot;&lt;/code&gt; or an empty string &lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;, no compression is
used.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls-block&#34;&gt;tls block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls&lt;/code&gt; block configures TLS settings used for the connection to the HTTP
server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-tls-config-block.md&#34;&gt;
            &lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.3&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables TLS when connecting to the configured server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Ignores insecure server TLS certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Verifies the hostname of server certificates when set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If the server doesn&amp;rsquo;t support TLS, the tls block must be provided with the
&lt;code&gt;insecure&lt;/code&gt; argument set to &lt;code&gt;true&lt;/code&gt;. To disable &lt;code&gt;tls&lt;/code&gt; for connections to the
server, set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;sending_queue-block&#34;&gt;sending_queue block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;sending_queue&lt;/code&gt; block configures an in-memory buffer of batches before data is sent
to the HTTP server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-queue-block.md&#34;&gt;
            &lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables an in-memory buffer before sending data to the client.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;num_consumers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of readers to send batches written to the queue in parallel.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;queue_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of unwritten batches allowed in the queue at once.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;enabled&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, data is first written to an in-memory buffer before
sending it to the configured server. Batches sent to the component&amp;rsquo;s &lt;code&gt;input&lt;/code&gt;
exported field are added to the buffer as long as the number of unsent batches
does not exceed the configured &lt;code&gt;queue_size&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;queue_size&lt;/code&gt; is used to determine how long an endpoint outage is tolerated for.
Assuming 100 requests/second, the default queue size &lt;code&gt;5000&lt;/code&gt; provides about 50
seconds of outage tolerance. To calculate the correct value for &lt;code&gt;queue_size&lt;/code&gt;,
multiply the average number of outgoing requests per second by the amount of
time in seconds that outages should be tolerated for.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;num_consumers&lt;/code&gt; argument controls how many readers read from the buffer and
send data in parallel. Larger values of &lt;code&gt;num_consumers&lt;/code&gt; allow data to be sent
more quickly at the expense of increased network traffic.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;retry_on_failure-block&#34;&gt;retry_on_failure block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;retry_on_failure&lt;/code&gt; block configures how failed requests to the HTTP server are
retried.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-retry-block.md&#34;&gt;
            &lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables retrying failed requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;initial_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Initial time to wait before retrying a failed request.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time to wait between retries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_elapsed_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum amount of time to wait before discarding a failed batch.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;enabled&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, failed batches are retried after a given interval.
The &lt;code&gt;initial_interval&lt;/code&gt; argument specifies how long to wait before the first
retry attempt. If requests continue to fail, the time to wait before retrying
increases exponentially. The &lt;code&gt;max_interval&lt;/code&gt; argument specifies the upper bound
of how long to wait between retries.&lt;/p&gt;
&lt;p&gt;If a batch has not sent successfully, it is discarded after the time specified
by &lt;code&gt;max_elapsed_time&lt;/code&gt; elapses. If &lt;code&gt;max_elapsed_time&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, failed
requests are retried forever until they succeed.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;input&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send telemetry data to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;input&lt;/code&gt; accepts &lt;code&gt;otelcol.Consumer&lt;/code&gt; data for any telemetry signal (metrics,
logs, or traces).&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlphttp&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlphttp&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates an exporter to send data to a locally running Grafana
Tempo without TLS:&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;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;otelcol.exporter.otlphttp &amp;#34;tempo&amp;#34; {
    client {
        endpoint = &amp;#34;tempo:4317&amp;#34;
        tls {
            insecure             = true
            insecure_skip_verify = true
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolexporterotlphttp">otelcol.exporter.otlphttp&lt;/h1>
&lt;p>&lt;code>otelcol.exporter.otlphttp&lt;/code> accepts telemetry data from other &lt;code>otelcol&lt;/code>
components and writes them over the network using the OTLP HTTP protocol.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.exporter.otlphttp&lt;/code> is a wrapper over the upstream
OpenTelemetry Collector &lt;code>otlphttp&lt;/code> exporter. Bug reports or feature requests
will be redirected to the upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.exporter.prometheus</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.prometheus/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.exporter.prometheus/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolexporterprometheus&#34;&gt;otelcol.exporter.prometheus&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; accepts OTLP-formatted metrics from other
&lt;code&gt;otelcol&lt;/code&gt; components, converts metrics to Prometheus-formatted metrics,
and forwards the resulting metrics to &lt;code&gt;prometheus&lt;/code&gt; components.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; is a custom component unrelated to the
&lt;code&gt;prometheus&lt;/code&gt; exporter from OpenTelemetry Collector.&lt;/p&gt;
&lt;p&gt;Conversion of metrics are done according to the OpenTelemetry
&lt;a href=&#34;https://opentelemetry.io/docs/reference/specification/metrics/data-model/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Metrics Data Model&lt;/a&gt; specification.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.exporter.prometheus &amp;#34;LABEL&amp;#34; {
  forward_to = [...]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_target_info&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to include &lt;code&gt;target_info&lt;/code&gt; metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_scope_info&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to include &lt;code&gt;otel_scope_info&lt;/code&gt; metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gc_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to clean up stale metrics from memory.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(receiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Where to forward converted Prometheus metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;By default, OpenTelemetry resources are converted into &lt;code&gt;target_info&lt;/code&gt; metrics,
and OpenTelemetry instrumentation scopes are converted into &lt;code&gt;otel_scope_info&lt;/code&gt;
metrics. Set the &lt;code&gt;include_scope_info&lt;/code&gt; and &lt;code&gt;include_target_info&lt;/code&gt; arguments to
&lt;code&gt;false&lt;/code&gt;, respectively, to disable the custom metrics.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;include_scope_info&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, the instrumentation scope name and version
are added as &lt;code&gt;otel_scope_name&lt;/code&gt; and &lt;code&gt;otel_scope_version&lt;/code&gt; labels to every
converted metric sample.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;include_scope_info&lt;/code&gt; is true, OpenTelemetry Collector resources are converted into &lt;code&gt;target_info&lt;/code&gt; metrics.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;input&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send telemetry data to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;input&lt;/code&gt; accepts &lt;code&gt;otelcol.Consumer&lt;/code&gt; data for metrics. Other telemetry signals are ignored.&lt;/p&gt;
&lt;p&gt;Metrics sent to the &lt;code&gt;input&lt;/code&gt; are converted to Prometheus-compatible metrics and
are forwarded to the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;The following are dropped during the conversion process:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Metrics that use the delta aggregation temporality&lt;/li&gt;
&lt;li&gt;Exemplars on OpenTelemetry cumulative sums and OpenTelemetry Histograms&lt;/li&gt;
&lt;li&gt;ExponentialHistogram data points&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example accepts metrics over OTLP and forwards it using
&lt;code&gt;prometheus.remote_write&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;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;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
  grpc {}

  output {
    metrics = [otelcol.exporter.prometheus.default.input]
  }
}

otelcol.exporter.prometheus &amp;#34;default&amp;#34; {
  forward_to = [prometheus.remote_write.mimir.receiver]
}

prometheus.remote_write &amp;#34;mimir&amp;#34; {
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolexporterprometheus">otelcol.exporter.prometheus&lt;/h1>
&lt;p>&lt;code>otelcol.exporter.prometheus&lt;/code> accepts OTLP-formatted metrics from other
&lt;code>otelcol&lt;/code> components, converts metrics to Prometheus-formatted metrics,
and forwards the resulting metrics to &lt;code>prometheus&lt;/code> components.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.exporter.prometheus&lt;/code> is a custom component unrelated to the
&lt;code>prometheus&lt;/code> exporter from OpenTelemetry Collector.&lt;/p></description></item><item><title>otelcol.processor.batch</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.processor.batch/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.processor.batch/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessorbatch&#34;&gt;otelcol.processor.batch&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.batch&lt;/code&gt; accepts telemetry data from other &lt;code&gt;otelcol&lt;/code&gt;
components and places them into batches. Batching improves the compression of
data and reduces the number of outgoing network requests required to transmit
data.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.processor.batch&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;batch&lt;/code&gt; processor. Bug reports or feature requests
will be redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.processor.batch&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.processor.batch &amp;#34;LABEL&amp;#34; {
  output {
    metrics = [...]
    logs    = [...]
    traces  = [...]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.batch&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How long to wait before flushing the batch.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;200ms&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send_batch_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Amount of data to buffer before flushing the batch.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;8192&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send_batch_max_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Upper limit of a batch size.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;otelcol.processor.batch&lt;/code&gt; accumulates data into a batch until one of the
following events happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The duration specified by &lt;code&gt;timeout&lt;/code&gt; elapses since the time the last batch was
sent.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The number of spans, log lines, or metric samples processed exceeds the
number specified by &lt;code&gt;send_batch_size&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use &lt;code&gt;send_batch_max_size&lt;/code&gt; to limit the amount of data contained in a single
batch. When set to &lt;code&gt;0&lt;/code&gt;, batches can be any size.&lt;/p&gt;
&lt;p&gt;For example, assume &lt;code&gt;send_batch_size&lt;/code&gt; is set to the default &lt;code&gt;8192&lt;/code&gt; and there
are currently 8000 batched spans. If the batch processor receives 8000 more
spans at once, the total batch size would be 16,192 which would then be flushed
as a single batch. &lt;code&gt;send_batch_max_size&lt;/code&gt; constrains how big a batch can get.
When set to a non-zero value, &lt;code&gt;send_batch_max_size&lt;/code&gt; must be greater or equal to
&lt;code&gt;send_batch_size&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.processor.batch&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures where to send received telemetry data.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block configures a set of components to forward resulting
telemetry data to.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block must be specified, but all of its arguments are optional. By
default, telemetry data is dropped. To send telemetry data to other components,
configure the &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;traces&lt;/code&gt; arguments accordingly.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;input&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send telemetry data to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;input&lt;/code&gt; accepts &lt;code&gt;otelcol.Consumer&lt;/code&gt; data for any telemetry signal (metrics,
logs, or traces).&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.batch&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.batch&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example batches telemetry data before sending it to
&lt;a href=&#34;../otelcol.exporter.otlp/&#34;&gt;otelcol.exporter.otlp&lt;/a&gt; for further processing:&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;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;otelcol.processor.batch &amp;#34;default&amp;#34; {
  output {
    metrics = [otelcol.exporter.otlp.production.input]
    logs    = [otelcol.exporter.otlp.production.input]
    traces  = [otelcol.exporter.otlp.production.input]
  }
}

otelcol.exporter.otlp &amp;#34;production&amp;#34; {
  client {
    endpoint = env(&amp;#34;OTLP_SERVER_ENDPOINT&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolprocessorbatch">otelcol.processor.batch&lt;/h1>
&lt;p>&lt;code>otelcol.processor.batch&lt;/code> accepts telemetry data from other &lt;code>otelcol&lt;/code>
components and places them into batches. Batching improves the compression of
data and reduces the number of outgoing network requests required to transmit
data.&lt;/p></description></item><item><title>otelcol.​processor.​memory_limiter</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.processor.memory_limiter/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.processor.memory_limiter/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessormemory_limiter&#34;&gt;otelcol.processor.memory_limiter&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt; is used to prevent out of memory situations
on a telemetry pipeline by performing periodic checks of memory usage. If
usage exceeds the defined limits, data is dropped and garbage collections
are triggered to reduce it.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;memory_limiter&lt;/code&gt; component uses both soft and hard limits, where the hard limit
is always equal or larger than the soft limit. When memory usage goes above the
soft limit, the processor component drops data and returns errors to the
preceding components in the pipeline. When usage exceeds the hard
limit, the processor forces a garbage collection in order to try and free
memory. When usage is below the soft limit, no data is dropped and no forced
garbage collection is performed.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;memorylimiter&lt;/code&gt; processor. Bug reports or feature
requests will be redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt; components can be specified by
giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.processor.memory_limiter &amp;#34;LABEL&amp;#34; {
  check_interval = &amp;#34;1s&amp;#34;
  
  limit = &amp;#34;50MiB&amp;#34; // alternatively, set `limit_percentage` and `spike_limit_percentage`

  output {
    metrics = [...]
    logs    = [...]
    traces  = [...]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to check memory usage.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum amount of memory targeted to be allocated by the process heap.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0MiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spike_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum spike expected between the measurements of memory usage.&lt;/td&gt;
              &lt;td&gt;20% of &lt;code&gt;limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;limit_percentage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum amount of total available memory targeted to be allocated by the process heap.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spike_limit_percentage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt; int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum spike expected between the measurements of memory usage.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The arguments must define either &lt;code&gt;limit&lt;/code&gt; or the &lt;code&gt;limit_percentage, spike_limit_percentage&lt;/code&gt; pair, but not both.&lt;/p&gt;
&lt;p&gt;The configuration options &lt;code&gt;limit&lt;/code&gt; and &lt;code&gt;limit_percentage&lt;/code&gt; define the hard
limits. The soft limits are then calculated as the hard limit minus the
&lt;code&gt;spike_limit&lt;/code&gt; or &lt;code&gt;spike_limit_percentage&lt;/code&gt; values respectively. The recommended
value for spike limits is about 20% of the corresponding hard limit.&lt;/p&gt;
&lt;p&gt;The recommended &lt;code&gt;check_interval&lt;/code&gt; value is 1 second. If the traffic through the
component is spiky in nature, it is recommended to either decrease the interval
or increase the spike limit to avoid going over the hard limit.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;limit&lt;/code&gt; and &lt;code&gt;spike_limit&lt;/code&gt; values must be larger than 1 MiB.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures where to send received telemetry data.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block configures a set of components to forward resulting
telemetry data to.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block must be specified, but all of its arguments are optional. By
default, telemetry data is dropped. To send telemetry data to other components,
configure the &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;traces&lt;/code&gt; arguments accordingly.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;input&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send telemetry data to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;input&lt;/code&gt; accepts &lt;code&gt;otelcol.Consumer&lt;/code&gt; data for any telemetry signal (metrics,
logs, or traces).&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
]]></content><description>&lt;h1 id="otelcolprocessormemory_limiter">otelcol.processor.memory_limiter&lt;/h1>
&lt;p>&lt;code>otelcol.processor.memory_limiter&lt;/code> is used to prevent out of memory situations
on a telemetry pipeline by performing periodic checks of memory usage. If
usage exceeds the defined limits, data is dropped and garbage collections
are triggered to reduce it.&lt;/p></description></item><item><title>otelcol.receiver.jaeger</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.jaeger/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.jaeger/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceiverjaeger&#34;&gt;otelcol.receiver.jaeger&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt; accepts Jaeger-formatted data over the network and
forwards it to other &lt;code&gt;otelcol.*&lt;/code&gt; components.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;jaeger&lt;/code&gt; receiver. Bug reports or feature requests
will be redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.receiver.jaeger &amp;#34;LABEL&amp;#34; {
  protocols {
    grpc {}
    thrift_http {}
    thrift_binary {}
    thrift_compact {}
  }

  output {
    metrics = [...]
    logs    = [...]
    traces  = [...]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt; doesn&amp;rsquo;t support any arguments and is configured fully
through inner blocks.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#protocols-block&#34;&gt;protocols&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the protocols the component can accept traffic over.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; grpc&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#grpc-block&#34;&gt;grpc&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a Jaeger gRPC server to receive traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; grpc &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the gRPC server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; grpc &amp;gt; keepalive&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#keepalive-block&#34;&gt;keepalive&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures keepalive settings for the configured server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; grpc &amp;gt; keepalive &amp;gt; server_parameters&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#server_parameters-block&#34;&gt;server_parameters&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Server parameters used to configure keepalive settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; grpc &amp;gt; keepalive &amp;gt; enforcement_policy&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#enforcement_policy-block&#34;&gt;enforcement_policy&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enforcement policy for keepalive settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; thrift_http&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#thrift_http-block&#34;&gt;thrift_http&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a Thrift HTTP server to receive traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; thrift_http &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the Thrift HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; thrift_http &amp;gt; cors&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#cors-block&#34;&gt;cors&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures CORS for the Thrift HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; thrift_binary&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#thrift_binary-block&#34;&gt;thrift_binary&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a Thrift binary UDP server to receive traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocols &amp;gt; thrift_compact&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#thrift_compact-block&#34;&gt;thrift_compact&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a Thrift compact UDP server to receive traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures where to send received telemetry data.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;protocols &amp;gt; grpc&lt;/code&gt; refers to a &lt;code&gt;grpc&lt;/code&gt; block defined inside a &lt;code&gt;protocols&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;protocols-block&#34;&gt;protocols block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;protocols&lt;/code&gt; block defines a set of protocols that will be used to accept
traces over the network.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;protocols&lt;/code&gt; doesn&amp;rsquo;t support any arguments and is configured fully through inner
blocks.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.jeager&lt;/code&gt; requires at least one protocol block (&lt;code&gt;grpc&lt;/code&gt;,
&lt;code&gt;thrift_http&lt;/code&gt;, &lt;code&gt;thrift_binary&lt;/code&gt;, or &lt;code&gt;thrift_compact&lt;/code&gt;) to be provided.&lt;/p&gt;
&lt;h3 id=&#34;grpc-block&#34;&gt;grpc block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;grpc&lt;/code&gt; block configures a gRPC server which can accept Jaeger traces. If
the &lt;code&gt;grpc&lt;/code&gt; block isn&amp;rsquo;t provided, a gRPC server isn&amp;rsquo;t started.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to listen for traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.0.0.0:14250&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;transport&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Transport to use for the gRPC server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;tcp&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_recv_msg_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum size of messages the server will accept. 0 disables a limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_concurrent_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit the number of concurrent streaming RPC calls.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;read_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the read buffer the gRPC server will use for reading from clients.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;512KiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;write_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the write buffer the gRPC server will use for writing to clients.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Propagate incoming connection metadata to downstream consumers.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;tls-block&#34;&gt;tls block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls&lt;/code&gt; block configures TLS settings used for a server. If the &lt;code&gt;tls&lt;/code&gt; block
isn&amp;rsquo;t provided, TLS won&amp;rsquo;t be used for connections to the server.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.3&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Frequency to reload the certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file used to authenticate client certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;keepalive-block&#34;&gt;keepalive block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;keepalive&lt;/code&gt; block configures keepalive settings for connections to a gRPC
server.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;keepalive&lt;/code&gt; doesn&amp;rsquo;t support any arguments and is configured fully through inner
blocks.&lt;/p&gt;
&lt;h3 id=&#34;server_parameters-block&#34;&gt;server_parameters block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;server_parameters&lt;/code&gt; block controls keepalive and maximum age settings for gRPC
servers.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connection_idle&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum age for idle connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;infinity&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connection_age&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum age for non-idle connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;infinity&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connection_age_grace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before forcibly closing connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;infinity&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to ping inactive clients to check for liveness.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before closing inactive clients that do not respond to liveness checks.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;20s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;enforcement_policy-block&#34;&gt;enforcement_policy block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;enforcement_policy&lt;/code&gt; block configures the keepalive enforcement policy for
gRPC servers. The server will close connections from clients that violate the
configured policy.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum time clients should wait before sending a keepalive ping.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;permit_without_stream&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allow clients to send keepalive pings when there are no active streams.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;thrift_http-block&#34;&gt;thrift_http block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;thrift_http&lt;/code&gt; block configures an HTTP server which can accept
Thrift-formatted traces. If the &lt;code&gt;thrift_http&lt;/code&gt; block isn&amp;rsquo;t specified, an HTTP
server isn&amp;rsquo;t started.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to listen for traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.0.0.0:14268&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_request_body_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum request body size the server will allow. No limit when unset.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Propagate incoming connection metadata to downstream consumers.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;cors-block&#34;&gt;cors block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;cors&lt;/code&gt; block configures CORS settings for an HTTP server.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allowed_origins&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allowed values for the &lt;code&gt;Origin&lt;/code&gt; header.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allowed_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Accepted headers from CORS requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;X-Requested-With&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_age&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;Access-Control-Max-Age&lt;/code&gt; response header.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;allowed_headers&lt;/code&gt; specifies which headers are acceptable from a CORS
request. The following headers are always implicitly allowed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Accept&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Accept-Language&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Type&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Language&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;allowed_headers&lt;/code&gt; includes &lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt;, all headers will be permitted.&lt;/p&gt;
&lt;h3 id=&#34;thrift_binary-block&#34;&gt;thrift_binary block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;thrift_binary&lt;/code&gt; block configures a UDP server which can accept traces
formatted to the Thrift binary protocol. If the &lt;code&gt;thrift_binary&lt;/code&gt; block isn&amp;rsquo;t
provided, a UDP server isn&amp;rsquo;t started.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to listen for traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.0.0.0:6832&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;queue_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of UDP messages that can be queued at once.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_packet_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum UDP message size.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;65KiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;workers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of workers to concurrently read from the message queue.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;socket_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Buffer to allocate for the UDP socket.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;thrift_compact-block&#34;&gt;thrift_compact block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;thrift_compact&lt;/code&gt; block configures a UDP server which can accept traces
formatted to the Thrift compact protocol. If the &lt;code&gt;thrift_compact&lt;/code&gt; block isn&amp;rsquo;t
provided, a UDP server isn&amp;rsquo;t started.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to listen for traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.0.0.0:6831&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;queue_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of UDP messages that can be queued at once.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_packet_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum UDP message size.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;65KiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;workers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of workers to concurrently read from the message queue.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;socket_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Buffer to allocate for the UDP socket.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block configures a set of components to forward resulting
telemetry data to.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block must be specified, but all of its arguments are optional. By
default, telemetry data is dropped. To send telemetry data to other components,
configure the &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;traces&lt;/code&gt; arguments accordingly.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates a pipeline which accepts Jaeger-formatted traces and
writes them to an OTLP server:&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;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;otelcol.receiver.jaeger &amp;#34;default&amp;#34; {
  protocols {
    grpc {}
    thrift_http {}
    thrift_binary {}
    thrift_compact {}
  }

  output {
    traces = [otelcol.processor.batch.default.input]
  }
}

otelcol.processor.batch &amp;#34;default&amp;#34; {
  output {
    traces = [otelcol.exporter.otlp.default.input]
  }
}

otelcol.exporter.otlp &amp;#34;default&amp;#34; {
  client {
    endpoint = &amp;#34;my-otlp-server:4317&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolreceiverjaeger">otelcol.receiver.jaeger&lt;/h1>
&lt;p>&lt;code>otelcol.receiver.jaeger&lt;/code> accepts Jaeger-formatted data over the network and
forwards it to other &lt;code>otelcol.*&lt;/code> components.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.receiver.jaeger&lt;/code> is a wrapper over the upstream
OpenTelemetry Collector &lt;code>jaeger&lt;/code> receiver. Bug reports or feature requests
will be redirected to the upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.receiver.kafka</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.kafka/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.kafka/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceiverkafka&#34;&gt;otelcol.receiver.kafka&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.kafka&lt;/code&gt; accepts telemetry data from a Kafka broker and
forwards it to other &lt;code&gt;otelcol.*&lt;/code&gt; components.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.receiver.kafka&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;kafka&lt;/code&gt; receiver from the &lt;code&gt;otelcol-contrib&lt;/code&gt;
distribution. Bug reports or feature requests will be redirected to the
upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.receiver.kafka&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.receiver.kafka &amp;#34;LABEL&amp;#34; {
  brokers          = [&amp;#34;BROKER_ADDR&amp;#34;]
  protocol_version = &amp;#34;PROTOCOL_VERSION&amp;#34;

  output {
    metrics = [...]
    logs    = [...]
    traces  = [...]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;brokers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;array(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kafka brokers to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;protocol_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kafka protocol version to use.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;topic&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kafka topic to read from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;otlp_spans&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;encoding&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Encoding of payload read from Kafka.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;otlp_proto&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;group_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Consumer group to consume messages from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;otel-collector&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Consumer client ID to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;otel-collector&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;encoding&lt;/code&gt; argument determines how to decode messages read from Kafka.
&lt;code&gt;encoding&lt;/code&gt; must be one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;otlp_proto&amp;quot;&lt;/code&gt;: Decode messages as OTLP protobuf.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;jaeger_proto&amp;quot;&lt;/code&gt;: Decode messages as a single Jaeger protobuf span.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;jaeger_json&amp;quot;&lt;/code&gt;: Decode messages as a single Jaeger JSON span.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;zipkin_proto&amp;quot;&lt;/code&gt;: Decode messages as a list of Zipkin protobuf spans.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;zipkin_json&amp;quot;&lt;/code&gt;: Decode messages as a list of Zipkin JSON spans.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;zipkin_thrift&amp;quot;&lt;/code&gt;: Decode messages as a list of Zipkin Thrift spans.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;raw&amp;quot;&lt;/code&gt;: Copy the message bytes into the body of a log record.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;&amp;quot;otlp_proto&amp;quot;&lt;/code&gt; must be used to read all telemetry types from Kafka; other
encodings are signal-specific.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.receiver.kafka&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authentication-block&#34;&gt;authentication&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures authentication for connecting to Kafka brokers.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication &amp;gt; plaintext&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#plaintext-block&#34;&gt;plaintext&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticates against Kafka brokers with plaintext.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication &amp;gt; sasl&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#sasl-block&#34;&gt;sasl&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticates against Kafka brokers with SASL.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication &amp;gt; sasl &amp;gt; aws_msk&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#aws_msk-block&#34;&gt;aws_msk&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Additional SASL parameters when using AWS_MSK_IAM.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for connecting to the Kafka brokers.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication &amp;gt; kerberos&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#kerberos-block&#34;&gt;kerberos&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticates against Kafka brokers with Kerberos.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;metadata&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metadata-block&#34;&gt;metadata&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures how to retrieve metadata from Kafka brokers.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;metadata &amp;gt; retry&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#retry-block&#34;&gt;retry&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures how to retry metadata retrieval.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;autocommit&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#autocommit-block&#34;&gt;autocommit&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures how to automatically commit updated topic offsets to back to the Kafka brokers.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;message_marking&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#message_marking-block&#34;&gt;message_marking&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures when Kafka messages are marked as read.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures where to send received telemetry data.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example,
&lt;code&gt;authentication &amp;gt; tls&lt;/code&gt; refers to a &lt;code&gt;tls&lt;/code&gt; block defined inside an
&lt;code&gt;authentication&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;authentication-block&#34;&gt;authentication block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;authentication&lt;/code&gt; block holds the definition of different authentication
mechanisms to use when connecting to Kafka brokers. It doesn&amp;rsquo;t support any
arguments and is configured fully through inner blocks.&lt;/p&gt;
&lt;h3 id=&#34;plaintext-block&#34;&gt;plaintext block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;plaintext&lt;/code&gt; block configures &lt;code&gt;PLAIN&lt;/code&gt; authentication against Kafka brokers.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Username to use for &lt;code&gt;PLAIN&lt;/code&gt; authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Password to use for &lt;code&gt;PLAIN&lt;/code&gt; authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;sasl-block&#34;&gt;sasl block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;sasl&lt;/code&gt; block configures SASL authentication against Kafka brokers.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Username to use for SASL authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Password to use for SASL authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mechanism&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SASL mechanism to use when authenticating.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;mechanism&lt;/code&gt; argument can be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;PLAIN&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;AWS_MSK_IAM&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;SCRAM-SHA-256&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;SCRAM-SHA-512&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When &lt;code&gt;mechanism&lt;/code&gt; is set to &lt;code&gt;&amp;quot;AWS_MSK_IAM&amp;quot;&lt;/code&gt;, the &lt;a href=&#34;#aws_msk-block&#34;&gt;&lt;code&gt;aws_msk&lt;/code&gt; child block&lt;/a&gt; must also be provided.&lt;/p&gt;
&lt;h3 id=&#34;aws_msk-block&#34;&gt;aws_msk block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;aws_msk&lt;/code&gt; block configures extra parameters for SASL authentication when
using the &lt;code&gt;AWS_MSK_IAM&lt;/code&gt; mechanism.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;region&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS region the MSK cluster is based in.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;broker_addr&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;MSK address to connect to for authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;tls-block&#34;&gt;tls block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls&lt;/code&gt; block configures TLS settings used for connecting to the Kafka
brokers. If the &lt;code&gt;tls&lt;/code&gt; block isn&amp;rsquo;t provided, TLS won&amp;rsquo;t be used for
communication.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.3&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Frequency to reload the certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file used to authenticate client certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;kerberos-block&#34;&gt;kerberos block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;kerberos&lt;/code&gt; block configures Kerberos authentication against the Kafka
broker.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;service_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos service name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;realm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos realm.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_keytab&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables using keytab instead of password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos username to authenticate as.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos password to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;config_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to Kerberos location (for example, &lt;code&gt;/etc/krb5.conf&lt;/code&gt;).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;keytab_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to keytab file (for eaxmple, &lt;code&gt;/etc/security/kafka.keytab&lt;/code&gt;).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;use_keytab&lt;/code&gt; is &lt;code&gt;false&lt;/code&gt;, the &lt;code&gt;password&lt;/code&gt; argument is required. When
&lt;code&gt;use_keytab&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, the file pointed to by the &lt;code&gt;keytab_file&lt;/code&gt; argument is
used for authentication instead. At most one of &lt;code&gt;password&lt;/code&gt; or &lt;code&gt;keytab_file&lt;/code&gt;
must be provided.&lt;/p&gt;
&lt;h3 id=&#34;metadata-block&#34;&gt;metadata block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;metadata&lt;/code&gt; block configures how to retrieve and store metadata from the
Kafka broker.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_all_topics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When true, maintains metadata for all topics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If the &lt;code&gt;include_all_topics&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;otelcol.receiver.kafka&lt;/code&gt;
maintains a full set of metadata for all topics rather than the minimal set
that has been necessary so far. Including the full set of metadata is more
convenient for users but can consume a substantial amount of memory if you have
many topics and partitions.&lt;/p&gt;
&lt;p&gt;Retrieving metadata may fail if the Kafka broker is starting up at the same
time as the &lt;code&gt;otelcol.receiver.kafka&lt;/code&gt; component. The &lt;a href=&#34;#retry-block&#34;&gt;&lt;code&gt;retry&lt;/code&gt; child
block&lt;/a&gt; can be provided to customize retry behavior.&lt;/p&gt;
&lt;h3 id=&#34;retry-block&#34;&gt;retry block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;retry&lt;/code&gt; block configures how to retry retrieving metadata when retrieval
fails.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_retries&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How many times to reattempt retrieving metadata.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;3&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;backoff&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait between retries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;250ms&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;autocommit-block&#34;&gt;autocommit block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;autocommit&lt;/code&gt; block configures how to automatically commit updated topic
offsets back to the Kafka brokers.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable autocommitting updated topic offsets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently to autocommit.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;message_marking-block&#34;&gt;message_marking block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;message_marking&lt;/code&gt; block configures when Kafka messages are marked as read.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;after_execution&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mark messages after forwarding telemetry data to other components.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_unsuccessful&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether failed forwards should be marked as read.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;By default, a Kafka message is marked as read immediately after it is retrieved
from the Kafka broker. If the &lt;code&gt;after_execution&lt;/code&gt; argument is true, messages are
only read after the telemetry data is forwarded to components specified in &lt;a href=&#34;#output-block&#34;&gt;the
&lt;code&gt;output&lt;/code&gt; block&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;after_execution&lt;/code&gt; is true, messages are only marked as read when they are
decoded successfully and components where the data was forwarded did not return
an error. If the &lt;code&gt;include_unsuccessful&lt;/code&gt; argument is true, messages are marked
as read even if decoding or forwarding failed. Setting &lt;code&gt;include_unsuccessful&lt;/code&gt;
has no effect if &lt;code&gt;after_execution&lt;/code&gt; is &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;WARNING&lt;/strong&gt;: Setting &lt;code&gt;after_execution&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; and &lt;code&gt;include_unsuccessful&lt;/code&gt;
to &lt;code&gt;false&lt;/code&gt; can block the entire Kafka partition if message processing returns
a permanent error, such as failing to decode.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block configures a set of components to forward resulting
telemetry data to.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block must be specified, but all of its arguments are optional. By
default, telemetry data is dropped. To send telemetry data to other components,
configure the &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;traces&lt;/code&gt; arguments accordingly.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.kafka&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.kafka&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.kafka&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example forwards read telemetry data through a batch processor before
finally sending it to an OTLP-capable endpoint:&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;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;otelcol.receiver.kafka &amp;#34;default&amp;#34; {
  brokers          = [&amp;#34;localhost:9092&amp;#34;]
  protocol_version = &amp;#34;2.0.0&amp;#34;

  output {
    metrics = [otelcol.processor.batch.default.input]
    logs    = [otelcol.processor.batch.default.input]
    traces  = [otelcol.processor.batch.default.input]
  }
}

otelcol.processor.batch &amp;#34;default&amp;#34; {
  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}

otelcol.exporter.otlp &amp;#34;default&amp;#34; {
  client {
    endpoint = env(&amp;#34;OTLP_ENDPOINT&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolreceiverkafka">otelcol.receiver.kafka&lt;/h1>
&lt;p>&lt;code>otelcol.receiver.kafka&lt;/code> accepts telemetry data from a Kafka broker and
forwards it to other &lt;code>otelcol.*&lt;/code> components.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.receiver.kafka&lt;/code> is a wrapper over the upstream
OpenTelemetry Collector &lt;code>kafka&lt;/code> receiver from the &lt;code>otelcol-contrib&lt;/code>
distribution. Bug reports or feature requests will be redirected to the
upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.receiver.loki</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.loki/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.loki/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceiverloki&#34;&gt;otelcol.receiver.loki&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.loki&lt;/code&gt; receives Loki log entries, converts them to the
OpenTelemetry logs format, and forwards them to other &lt;code&gt;otelcol.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.receiver.loki&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.receiver.loki &amp;#34;LABEL&amp;#34; {
  output {
    logs = [...]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.loki&lt;/code&gt; doesn&amp;rsquo;t support any arguments and is configured fully
through inner blocks.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.receiver.loki&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures where to send converted telemetry data.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block configures a set of components to forward resulting
telemetry data to.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block must be specified, but all of its arguments are optional. By
default, telemetry data is dropped. To send telemetry data to other components,
configure the &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;traces&lt;/code&gt; arguments accordingly.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send Loki logs to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.loki&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.loki&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses the &lt;code&gt;otelcol.receiver.loki&lt;/code&gt; component as a bridge
between the Loki and OpenTelemetry ecosystems. The component exposes a
receiver which the &lt;code&gt;loki.source.file&lt;/code&gt; component uses to send Loki log entries
to. The logs are converted to the OTLP format before they are forwarded
to the &lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; component to be sent to an OTLP-capable
endpoint:&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;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;loki.source.file &amp;#34;default&amp;#34; {
  targets = [
    {__path__ = &amp;#34;/tmp/foo.txt&amp;#34;, &amp;#34;loki.format&amp;#34; = &amp;#34;logfmt&amp;#34;},
    {__path__ = &amp;#34;/tmp/bar.txt&amp;#34;, &amp;#34;loki.format&amp;#34; = &amp;#34;json&amp;#34;},
  ]
  forward_to = [otelcol.receiver.loki.default.receiver]
}

otelcol.receiver.loki &amp;#34;default&amp;#34; {
  output {
    logs = [otelcol.exporter.otlp.default.input] 
  } 
}

otelcol.exporter.otlp &amp;#34;default&amp;#34; {
  client {
    endpoint = env(&amp;#34;OTLP_ENDPOINT&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolreceiverloki">otelcol.receiver.loki&lt;/h1>
&lt;p>&lt;code>otelcol.receiver.loki&lt;/code> receives Loki log entries, converts them to the
OpenTelemetry logs format, and forwards them to other &lt;code>otelcol.*&lt;/code> components.&lt;/p>
&lt;p>Multiple &lt;code>otelcol.receiver.loki&lt;/code> components can be specified by giving them
different labels.&lt;/p></description></item><item><title>otelcol.receiver.opencensus</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.opencensus/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.opencensus/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceiveropencensus&#34;&gt;otelcol.receiver.opencensus&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.opencensus&lt;/code&gt; accepts telemetry data via gRPC or HTTP
using the &lt;a href=&#34;https://opencensus.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenCensus&lt;/a&gt; format and
forwards it to other &lt;code&gt;otelcol.*&lt;/code&gt; components.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.receiver.opencensus&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;opencensus&lt;/code&gt; receiver from the &lt;code&gt;otelcol-contrib&lt;/code&gt;
distribution. Bug reports or feature requests will be redirected to the
upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.receiver.opencensus&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.receiver.opencensus &amp;#34;LABEL&amp;#34; {
  output {
    metrics = [...]
    logs    = [...]
    traces  = [...]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.opencensus&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cors_allowed_origins&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of allowed Cross-Origin Resource Sharing (CORS) origins.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;cors_allowed_origins&lt;/code&gt; are the allowed &lt;a href=&#34;https://github.com/rs/cors&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;CORS&lt;/a&gt; origins for HTTP/JSON requests.
An empty list means that CORS is not enabled at all. A wildcard (*) can be
used to match any origin or one or more characters of an origin.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.receiver.opencensus&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#grpc-block&#34;&gt;grpc&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the gRPC/HTTP server to receive telemetry data.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the gRPC server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc &amp;gt; keepalive&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#keepalive-block&#34;&gt;keepalive&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures keepalive settings for the configured server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc &amp;gt; keepalive &amp;gt; server_parameters&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#server_parameters-block&#34;&gt;server_parameters&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Server parameters used to configure keepalive settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc &amp;gt; keepalive &amp;gt; enforcement_policy&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#enforcement_policy-block&#34;&gt;enforcement_policy&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enforcement policy for keepalive settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures where to send received telemetry data.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;grpc &amp;gt; tls&lt;/code&gt;
refers to a &lt;code&gt;tls&lt;/code&gt; block defined inside a &lt;code&gt;grpc&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;grpc-block&#34;&gt;grpc block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;grpc&lt;/code&gt; block configures the gRPC/HTTP server used by the component. If the
&lt;code&gt;grpc&lt;/code&gt; block isn&amp;rsquo;t provided, a server using default parameters is started.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to listen for traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.0.0.0:4317&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;transport&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Transport to use for the gRPC server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;tcp&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_recv_msg_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum size of messages the server will accept. 0 disables a limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_concurrent_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit the number of concurrent streaming RPC calls.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;read_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the read buffer the gRPC server will use for reading from clients.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;512KiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;write_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the write buffer the gRPC server will use for writing to clients.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Propagate incoming connection metadata to downstream consumers.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;In order to use plain HTTP/JSON, specify the &lt;code&gt;endpoint&lt;/code&gt; attribute. There is no HTTP-specific block.
The HTTP/JSON address is the same as gRPC, as the protocol is recognized and processed accordingly.&lt;/p&gt;
&lt;p&gt;To write traces with HTTP/JSON, &lt;code&gt;POST&lt;/code&gt; to &lt;code&gt;[address]/v1/trace&lt;/code&gt;. The JSON message format parallels the gRPC protobuf format. For details, refer to its &lt;a href=&#34;https://github.com/census-instrumentation/opencensus-proto/blob/master/gen-openapi/opencensus/proto/agent/trace/v1/trace_service.swagger.json&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenApi specification&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that &lt;code&gt;max_recv_msg_size&lt;/code&gt;, &lt;code&gt;read_buffer_size&lt;/code&gt; and &lt;code&gt;write_buffer_size&lt;/code&gt; are formatted in a special way,
so that the units are included in the string, e.g., &amp;ldquo;512KiB&amp;rdquo; or &amp;ldquo;1024KB&amp;rdquo;.&lt;/p&gt;
&lt;h3 id=&#34;tls-block&#34;&gt;tls block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls&lt;/code&gt; block configures TLS settings used for a server. If the &lt;code&gt;tls&lt;/code&gt; block
isn&amp;rsquo;t provided, TLS won&amp;rsquo;t be used for connections to the server.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.3&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Frequency to reload the certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file used to authenticate client certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;keepalive-block&#34;&gt;keepalive block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;keepalive&lt;/code&gt; block configures keepalive settings for connections to a gRPC
server.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;keepalive&lt;/code&gt; doesn&amp;rsquo;t support any arguments and is configured fully through inner
blocks.&lt;/p&gt;
&lt;h3 id=&#34;server_parameters-block&#34;&gt;server_parameters block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;server_parameters&lt;/code&gt; block controls keepalive and maximum age settings for gRPC
servers.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connection_idle&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum age for idle connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;infinity&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connection_age&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum age for non-idle connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;infinity&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connection_age_grace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before forcibly closing connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;infinity&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to ping inactive clients to check for liveness.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before closing inactive clients that do not respond to liveness checks.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;20s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;enforcement_policy-block&#34;&gt;enforcement_policy block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;enforcement_policy&lt;/code&gt; block configures the keepalive enforcement policy for
gRPC servers. The server will close connections from clients that violate the
configured policy.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum time clients should wait before sending a keepalive ping.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;permit_without_stream&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allow clients to send keepalive pings when there are no active streams.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block configures a set of components to forward resulting
telemetry data to.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block must be specified, but all of its arguments are optional. By
default, telemetry data is dropped. To send telemetry data to other components,
configure the &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;traces&lt;/code&gt; arguments accordingly.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.opencensus&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.opencensus&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.opencensus&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example forwards received telemetry data through a batch processor before
finally sending it to an OTLP-capable endpoint:&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;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;otelcol.receiver.opencensus &amp;#34;default&amp;#34; {
	cors_allowed_origins = [&amp;#34;https://*.test.com&amp;#34;, &amp;#34;https://test.com&amp;#34;]

	grpc {
		endpoint  = &amp;#34;0.0.0.0:9090&amp;#34;
		transport = &amp;#34;tcp&amp;#34;

		max_recv_msg_size      = &amp;#34;32KB&amp;#34;
		max_concurrent_streams = &amp;#34;16&amp;#34;
		read_buffer_size       = &amp;#34;1024KB&amp;#34;
		write_buffer_size      = &amp;#34;1024KB&amp;#34;
		include_metadata       = true

		tls {
			cert_file = &amp;#34;test.crt&amp;#34;
			key_file  = &amp;#34;test.key&amp;#34;
		}

		keepalive {
			server_parameters {
				max_connection_idle      = &amp;#34;11s&amp;#34;
				max_connection_age       = &amp;#34;12s&amp;#34;
				max_connection_age_grace = &amp;#34;13s&amp;#34;
				time                     = &amp;#34;30s&amp;#34;
				timeout                  = &amp;#34;5s&amp;#34;
			}

			enforcement_policy {
				min_time              = &amp;#34;10s&amp;#34;
				permit_without_stream = true
			}
		}
	}

	output {
		metrics = [otelcol.processor.batch.default.input]
		logs    = [otelcol.processor.batch.default.input]
		traces  = [otelcol.processor.batch.default.input]
	}
}

otelcol.processor.batch &amp;#34;default&amp;#34; {
	output {
		metrics = [otelcol.exporter.otlp.default.input]
		logs    = [otelcol.exporter.otlp.default.input]
		traces  = [otelcol.exporter.otlp.default.input]
	}
}

otelcol.exporter.otlp &amp;#34;default&amp;#34; {
	client {
		endpoint = env(&amp;#34;OTLP_ENDPOINT&amp;#34;)
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolreceiveropencensus">otelcol.receiver.opencensus&lt;/h1>
&lt;p>&lt;code>otelcol.receiver.opencensus&lt;/code> accepts telemetry data via gRPC or HTTP
using the &lt;a href="https://opencensus.io/" target="_blank" rel="noopener noreferrer">OpenCensus&lt;/a> format and
forwards it to other &lt;code>otelcol.*&lt;/code> components.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.receiver.opencensus&lt;/code> is a wrapper over the upstream
OpenTelemetry Collector &lt;code>opencensus&lt;/code> receiver from the &lt;code>otelcol-contrib&lt;/code>
distribution. Bug reports or feature requests will be redirected to the
upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.receiver.otlp</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.otlp/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.otlp/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceiverotlp&#34;&gt;otelcol.receiver.otlp&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; accepts OTLP-formatted data over the network and
forwards it to other &lt;code&gt;otelcol.*&lt;/code&gt; components.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;otlp&lt;/code&gt; receiver. Bug reports or feature requests will
be redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.receiver.otlp &amp;#34;LABEL&amp;#34; {
  grpc { ... }
  http { ... }

  output {
    metrics = [...]
    logs    = [...]
    traces  = [...]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; doesn&amp;rsquo;t support any arguments and is configured fully
through inner blocks.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#grpc-block&#34;&gt;grpc&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the gRPC server to receive telemetry data.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the gRPC server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc &amp;gt; keepalive&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#keepalive-block&#34;&gt;keepalive&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures keepalive settings for the configured server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc &amp;gt; keepalive &amp;gt; server_parameters&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#server_parameters-block&#34;&gt;server_parameters&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Server parameters used to configure keepalive settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;grpc &amp;gt; keepalive &amp;gt; enforcement_policy&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#enforcement_policy-block&#34;&gt;enforcement_policy&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enforcement policy for keepalive settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http-block&#34;&gt;http&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server to receive telemetry data.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http &amp;gt; cors&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#cors-block&#34;&gt;cors&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures CORS for the HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures where to send received telemetry data.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;grpc &amp;gt; tls&lt;/code&gt;
refers to a &lt;code&gt;tls&lt;/code&gt; block defined inside a &lt;code&gt;grpc&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;grpc-block&#34;&gt;grpc block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;grpc&lt;/code&gt; block configures the gRPC server used by the component. If the
&lt;code&gt;grpc&lt;/code&gt; block isn&amp;rsquo;t provided, a gRPC server isn&amp;rsquo;t started.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to listen for traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.0.0.0:4317&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;transport&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Transport to use for the gRPC server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;tcp&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_recv_msg_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum size of messages the server will accept. 0 disables a limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_concurrent_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit the number of concurrent streaming RPC calls.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;read_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the read buffer the gRPC server will use for reading from clients.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;512KiB&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;write_buffer_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of the write buffer the gRPC server will use for writing to clients.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Propagate incoming connection metadata to downstream consumers.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;tls-block&#34;&gt;tls block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls&lt;/code&gt; block configures TLS settings used for a server. If the &lt;code&gt;tls&lt;/code&gt; block
isn&amp;rsquo;t provided, TLS won&amp;rsquo;t be used for connections to the server.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.3&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Frequency to reload the certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file used to authenticate client certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;keepalive-block&#34;&gt;keepalive block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;keepalive&lt;/code&gt; block configures keepalive settings for connections to a gRPC
server.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;keepalive&lt;/code&gt; doesn&amp;rsquo;t support any arguments and is configured fully through inner
blocks.&lt;/p&gt;
&lt;h3 id=&#34;server_parameters-block&#34;&gt;server_parameters block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;server_parameters&lt;/code&gt; block controls keepalive and maximum age settings for gRPC
servers.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connection_idle&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum age for idle connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;infinity&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connection_age&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum age for non-idle connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;infinity&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connection_age_grace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before forcibly closing connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;infinity&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to ping inactive clients to check for liveness.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time to wait before closing inactive clients that do not respond to liveness checks.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;20s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;enforcement_policy-block&#34;&gt;enforcement_policy block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;enforcement_policy&lt;/code&gt; block configures the keepalive enforcement policy for
gRPC servers. The server will close connections from clients that violate the
configured policy.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum time clients should wait before sending a keepalive ping.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;permit_without_stream&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allow clients to send keepalive pings when there are no active streams.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;http-block&#34;&gt;http block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block configures the HTTP server used by the component. If the
&lt;code&gt;http&lt;/code&gt; block isn&amp;rsquo;t specified, an HTTP server isn&amp;rsquo;t started.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to listen for traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.0.0.0:4318&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_request_body_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum request body size the server will allow. No limit when unset.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Propagate incoming connection metadata to downstream consumers.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;cors-block&#34;&gt;cors block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;cors&lt;/code&gt; block configures CORS settings for an HTTP server.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allowed_origins&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allowed values for the &lt;code&gt;Origin&lt;/code&gt; header.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allowed_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Accepted headers from CORS requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;X-Requested-With&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_age&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;Access-Control-Max-Age&lt;/code&gt; response header.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;allowed_headers&lt;/code&gt; argument specifies which headers are acceptable from a
CORS request. The following headers are always implicitly allowed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Accept&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Accept-Language&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Type&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Language&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;allowed_headers&lt;/code&gt; includes &lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt;, all headers are permitted.&lt;/p&gt;
&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block configures a set of components to forward resulting
telemetry data to.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block must be specified, but all of its arguments are optional. By
default, telemetry data is dropped. To send telemetry data to other components,
configure the &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;traces&lt;/code&gt; arguments accordingly.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example forwards received telemetry data through a batch processor before
finally sending it to an OTLP-capable endpoint:&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;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;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
  http {}
  grpc {}

  output {
    metrics = [otelcol.processor.batch.default.input]
    logs    = [otelcol.processor.batch.default.input]
    traces  = [otelcol.processor.batch.default.input]
  }
}

otelcol.processor.batch &amp;#34;default&amp;#34; {
  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}

otelcol.exporter.otlp &amp;#34;default&amp;#34; {
  client {
    endpoint = env(&amp;#34;OTLP_ENDPOINT&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolreceiverotlp">otelcol.receiver.otlp&lt;/h1>
&lt;p>&lt;code>otelcol.receiver.otlp&lt;/code> accepts OTLP-formatted data over the network and
forwards it to other &lt;code>otelcol.*&lt;/code> components.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.receiver.otlp&lt;/code> is a wrapper over the upstream
OpenTelemetry Collector &lt;code>otlp&lt;/code> receiver. Bug reports or feature requests will
be redirected to the upstream repository, if necessary.&lt;/p></description></item><item><title>otelcol.receiver.prometheus</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.prometheus/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.prometheus/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceiverprometheus&#34;&gt;otelcol.receiver.prometheus&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt; receives Prometheus metrics, converts them to the
OpenTelemetry metrics format, and forwards them to other &lt;code&gt;otelcol.*&lt;/code&gt;
components.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.receiver.prometheus &amp;#34;LABEL&amp;#34; {
  output {
    metrics = [...]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt; doesn&amp;rsquo;t support any arguments and is configured fully
through inner blocks.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures where to send received telemetry data.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block configures a set of components to forward resulting
telemetry data to.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block must be specified, but all of its arguments are optional. By
default, telemetry data is dropped. To send telemetry data to other components,
configure the &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;traces&lt;/code&gt; arguments accordingly.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send Prometheus metrics to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses the &lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt; component as a bridge
between the Prometheus and OpenTelemetry ecosystems. The component exposes a
receiver which the &lt;code&gt;prometheus.scrape&lt;/code&gt; component uses to send Prometheus metric
data to. The metrics are converted to the OTLP format before they are forwarded
to the &lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; component to be sent to an OTLP-capable
endpoint:&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;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;default&amp;#34; {
    // Collect metrics from Grafana Agent&amp;#39;s default HTTP listen address.
    targets = [{&amp;#34;__address__&amp;#34;   = &amp;#34;127.0.0.1:12345&amp;#34;}]

    forward_to = [otelcol.receiver.prometheus.default.receiver] 
}

otelcol.receiver.prometheus &amp;#34;default&amp;#34; {
  output {
    metrics = [otelcol.exporter.otlp.default.input] 
  } 
}

otelcol.exporter.otlp &amp;#34;default&amp;#34; {
  client {
    endpoint = env(&amp;#34;OTLP_ENDPOINT&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolreceiverprometheus">otelcol.receiver.prometheus&lt;/h1>
&lt;p>&lt;code>otelcol.receiver.prometheus&lt;/code> receives Prometheus metrics, converts them to the
OpenTelemetry metrics format, and forwards them to other &lt;code>otelcol.*&lt;/code>
components.&lt;/p>
&lt;p>Multiple &lt;code>otelcol.receiver.prometheus&lt;/code> components can be specified by giving them
different labels.&lt;/p></description></item><item><title>otelcol.receiver.zipkin</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.zipkin/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/otelcol.receiver.zipkin/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceiverzipkin&#34;&gt;otelcol.receiver.zipkin&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.zipkin&lt;/code&gt; accepts Zipkin-formatted traces over the network and
forwards it to other &lt;code&gt;otelcol.*&lt;/code&gt; components.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.receiver.zipkin&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;zipkin&lt;/code&gt; receiver. Bug reports or feature requests
will be redirected to the upstream repository, if necessary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Multiple &lt;code&gt;otelcol.receiver.zipkin&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;otelcol.receiver.zipkin &amp;#34;LABEL&amp;#34; {
  output {
    traces = [...]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.zipkin&lt;/code&gt; supports the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;parse_string_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Parse string tags and binary annotations into non-string types.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If &lt;code&gt;parse_string_tags&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, string tags and binary annotations are
converted to &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;bool&lt;/code&gt;, and &lt;code&gt;float&lt;/code&gt; if possible. String tags and binary
annotations that cannot be converted remain unchanged.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;otelcol.receiver.zipkin&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;http&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http-block&#34;&gt;http&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server to receive telemetry data.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http &amp;gt; tls&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-block&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http &amp;gt; cors&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#cors-block&#34;&gt;cors&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures CORS for the HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#output-block&#34;&gt;output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures where to send received traces.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;grpc &amp;gt; tls&lt;/code&gt;
refers to a &lt;code&gt;tls&lt;/code&gt; block defined inside a &lt;code&gt;grpc&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;http-block&#34;&gt;http block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block configures the HTTP server used by the component.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host:port&lt;/code&gt; to listen for traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.0.0.0:9411&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_request_body_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum request body size the server will allow. No limit when unset.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Propagate incoming connection metadata to downstream consumers.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;tls-block&#34;&gt;tls block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls&lt;/code&gt; block configures TLS settings used for a server. If the &lt;code&gt;tls&lt;/code&gt; block
isn&amp;rsquo;t provided, TLS won&amp;rsquo;t be used for connections to the server.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the TLS certificate key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum acceptable TLS version for connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;TLS 1.3&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Frequency to reload the certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the CA file used to authenticate client certificates.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;cors-block&#34;&gt;cors block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;cors&lt;/code&gt; block configures CORS settings for an HTTP server.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allowed_origins&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allowed values for the &lt;code&gt;Origin&lt;/code&gt; header.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allowed_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Accepted headers from CORS requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;X-Requested-With&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_age&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;Access-Control-Max-Age&lt;/code&gt; response header.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;allowed_headers&lt;/code&gt; argument specifies which headers are acceptable from a
CORS request. The following headers are always implicitly allowed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Accept&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Accept-Language&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Type&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Language&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;allowed_headers&lt;/code&gt; includes &lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt;, all headers are permitted.&lt;/p&gt;
&lt;h3 id=&#34;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block configures a set of components to forward resulting
telemetry data to.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send logs to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of consumers to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;output&lt;/code&gt; block must be specified, but all of its arguments are optional. By
default, telemetry data is dropped. To send telemetry data to other components,
configure the &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;traces&lt;/code&gt; arguments accordingly.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.zipkin&lt;/code&gt; does not export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.zipkin&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.zipkin&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example forwards received traces through a batch processor before finally
sending it to an OTLP-capable endpoint:&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;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;otelcol.receiver.zipkin &amp;#34;default&amp;#34; {
  output {
    traces = [otelcol.processor.batch.default.input]
  }
}

otelcol.processor.batch &amp;#34;default&amp;#34; {
  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}

otelcol.exporter.otlp &amp;#34;default&amp;#34; {
  client {
    endpoint = env(&amp;#34;OTLP_ENDPOINT&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolreceiverzipkin">otelcol.receiver.zipkin&lt;/h1>
&lt;p>&lt;code>otelcol.receiver.zipkin&lt;/code> accepts Zipkin-formatted traces over the network and
forwards it to other &lt;code>otelcol.*&lt;/code> components.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>NOTE&lt;/strong>: &lt;code>otelcol.receiver.zipkin&lt;/code> is a wrapper over the upstream
OpenTelemetry Collector &lt;code>zipkin&lt;/code> receiver. Bug reports or feature requests
will be redirected to the upstream repository, if necessary.&lt;/p></description></item><item><title>phlare.scrape</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/phlare.scrape/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/phlare.scrape/</guid><content><![CDATA[&lt;h1 id=&#34;phlarescrape&#34;&gt;phlare.scrape&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;phlare.scrape&lt;/code&gt; configures a &lt;a href=&#34;https://github.com/google/pprof/blob/main/doc/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;pprof&lt;/a&gt; scraping job for a given set of
&lt;code&gt;targets&lt;/code&gt;. The scraped performance profiles are forwarded to the list of receivers passed in
&lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;phlare.scrape&lt;/code&gt; components can be specified by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;phlare.scrape &amp;#34;LABEL&amp;#34; {
  targets    = TARGET_LIST
  forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component configures and starts a new scrape job to scrape all of the
input targets. Multiple scrape jobs can be spawned for a single input target
when scraping multiple profile types.&lt;/p&gt;
&lt;p&gt;The list of arguments that can be used to configure the block is
presented below.&lt;/p&gt;
&lt;p&gt;The scrape job name defaults to the component&amp;rsquo;s unique identifier.&lt;/p&gt;
&lt;p&gt;Any omitted fields take on their default values. If conflicting
attributes are being passed (e.g., defining both a BearerToken and
BearerTokenFile or configuring both Basic Authorization and OAuth2 at the same
time), the component reports an error.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of targets to scrape.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(ProfilesReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send scraped profiles to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;job_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The job name to override the job label with.&lt;/td&gt;
              &lt;td&gt;component name&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A set of query parameters with which the target is scraped.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently to scrape the targets of this scrape config.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;15s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The timeout for scraping targets of this config.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;15s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scheme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The URL scheme with which to fetch metrics from targets.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;phlare.scrape&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http_client_config-block&#34;&gt;http_client_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client settings when connecting to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; basic_auth&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;basic_auth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic_auth for authenticating to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; authorization&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authorization-block&#34;&gt;authorization&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;oauth2&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2 &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to targets via OAuth2.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;profiling_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profiling_config-block&#34;&gt;profiling_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure profiling settings for the scrape job.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;profiling_config &amp;gt; profile.memory&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profile.memory-block&#34;&gt;profile.memory&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect memory profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;profiling_config &amp;gt; profile.block&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profile.block-block&#34;&gt;profile.block&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect profiles on blocks.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;profiling_config &amp;gt; profile.goroutine&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profile.goroutine-block&#34;&gt;profile.goroutine&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect goroutine profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;profiling_config &amp;gt; profile.mutex&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profile.mutex-block&#34;&gt;profile.mutex&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect mutex profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;profiling_config &amp;gt; profile.process_cpu&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profile.process_cpu-block&#34;&gt;profile.process_cpu&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect CPU profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;profiling_config &amp;gt; profile.fgprof&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profile.fgprof-block&#34;&gt;profile.fgprof&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect &lt;a href=&#34;https://github.com/felixge/fgprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;fgprof&lt;/a&gt; profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;profiling_config &amp;gt; profile.custom&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profile.custom-block&#34;&gt;profile.custom&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect custom profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example,
&lt;code&gt;http_client_config &amp;gt; basic_auth&lt;/code&gt; refers to a &lt;code&gt;basic_auth&lt;/code&gt; block defined inside
an &lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; block configures settings used to connect to
endpoints.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth-block&#34;&gt;basic_auth block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/basic-auth-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mututally exclusive and only one can be
provided inside of a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;authorization-block&#34;&gt;authorization block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/authorization-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credential&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive and only one can be
provided inside of an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2-block&#34;&gt;oauth2 block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/oauth2-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional proxy URL for OAuth2 requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mututally exclusive and only one
can be provided inside of an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain its own separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;profiling_config-block&#34;&gt;profiling_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profiling_config&lt;/code&gt; block configures the profiling settings when scraping
targets.&lt;/p&gt;
&lt;p&gt;The block contains the following attributes:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path prefix to use when scraping targets.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;profilememory-block&#34;&gt;profile.memory block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.memory&lt;/code&gt; block collects profiles on memory consumption.&lt;/p&gt;
&lt;p&gt;It accepts the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable this profile type to be scraped.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/memory&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;, a &lt;code&gt;seconds&lt;/code&gt; query parameter is
automatically added to requests.&lt;/p&gt;
&lt;h3 id=&#34;profileblock-block&#34;&gt;profile.block block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.block&lt;/code&gt; block collects profiles on process blocking.&lt;/p&gt;
&lt;p&gt;It accepts the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable this profile type to be scraped.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/block&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;, a &lt;code&gt;seconds&lt;/code&gt; query parameter is
automatically added to requests.&lt;/p&gt;
&lt;h3 id=&#34;profilegoroutine-block&#34;&gt;profile.goroutine block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.goroutine&lt;/code&gt; block collects profiles on the number of goroutines.&lt;/p&gt;
&lt;p&gt;It accepts the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable this profile type to be scraped.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/goroutine&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;, a &lt;code&gt;seconds&lt;/code&gt; query parameter is
automatically added to requests.&lt;/p&gt;
&lt;h3 id=&#34;profilemutex-block&#34;&gt;profile.mutex block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.mutex&lt;/code&gt; block collects profiles on mutexes.&lt;/p&gt;
&lt;p&gt;It accepts the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable this profile type to be scraped.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/mutex&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;, a &lt;code&gt;seconds&lt;/code&gt; query parameter is
automatically added to requests.&lt;/p&gt;
&lt;h3 id=&#34;profileprocess_cpu-block&#34;&gt;profile.process_cpu block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.process_cpu&lt;/code&gt; block collects profiles on CPU consumption for the
process.&lt;/p&gt;
&lt;p&gt;It accepts the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable this profile type to be scraped.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/profile&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;, a &lt;code&gt;seconds&lt;/code&gt; query parameter is
automatically added to requests.&lt;/p&gt;
&lt;h3 id=&#34;profilefgprof-block&#34;&gt;profile.fgprof block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.fgprof&lt;/code&gt; block collects profiles from an &lt;a href=&#34;https://github.com/felixge/fgprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;fgprof&lt;/a&gt; endpoint.&lt;/p&gt;
&lt;p&gt;It accepts the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable this profile type to be scraped.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/fgprof&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;, a &lt;code&gt;seconds&lt;/code&gt; query parameter is
automatically added to requests.&lt;/p&gt;
&lt;h3 id=&#34;profilecustom-block&#34;&gt;profile.custom block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.custom&lt;/code&gt; block allows for collecting profiles from custom
endpoints. Blocks must be specified with a label:&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;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;profile.custom &amp;#34;PROFILE_TYPE&amp;#34; {
  enabled = true
  path    = &amp;#34;PROFILE_PATH&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Multiple &lt;code&gt;profile.custom&lt;/code&gt; blocks can be specified. Labels assigned to
&lt;code&gt;profile.custom&lt;/code&gt; blocks must be unique across the component.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;profile.custom&lt;/code&gt; block accepts the following arguments:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable this profile type to be scraped.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;, a &lt;code&gt;seconds&lt;/code&gt; query parameter is
automatically added to requests.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;phlare.scrape&lt;/code&gt; does not export any fields that can be referenced by other
components.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;phlare.scrape&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;phlare.scrape&lt;/code&gt; reports the status of the last scrape for each configured
scrape job on the component&amp;rsquo;s debug endpoint.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;phlare_fanout_latency&lt;/code&gt; (histogram): Write latency for sending to direct and indirect components.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;scraping-behavior&#34;&gt;Scraping behavior&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;phlare.scrape&lt;/code&gt; component borrows the scraping behavior of Prometheus.
Prometheus, and by extension, this component, uses a pull model for scraping
profiles from a given set of &lt;em&gt;targets&lt;/em&gt;.
Each scrape target is defined as a set of key-value pairs called &lt;em&gt;labels&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The set of targets can either be &lt;em&gt;static&lt;/em&gt;, or dynamically provided periodically
by a service discovery component such as &lt;code&gt;discovery.kubernetes&lt;/code&gt;. The special
label &lt;code&gt;__address__&lt;/code&gt; &lt;em&gt;must always&lt;/em&gt; be present and corresponds to the
&lt;code&gt;&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt; that is used for the scrape request.&lt;/p&gt;
&lt;p&gt;By default, the scrape job tries to scrape all available targets&amp;rsquo; &lt;code&gt;/debug/pprof&lt;/code&gt;
endpoints using HTTP, with a scrape interval of 15 seconds and scrape timeout of
15 seconds. The profile paths, protocol scheme, scrape interval and timeout,
query parameters, as well as any other settings can be configured using the
component&amp;rsquo;s arguments.&lt;/p&gt;
&lt;p&gt;The scrape job expects profiles exposed by the endpoint to follow the
&lt;a href=&#34;https://github.com/google/pprof/blob/main/doc/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;pprof&lt;/a&gt; protobuf format. All profiles are then propagated
to each receiver listed in the component&amp;rsquo;s &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;Labels coming from targets, that start with a double underscore &lt;code&gt;__&lt;/code&gt; are
treated as &lt;em&gt;internal&lt;/em&gt;, and are removed prior to scraping.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;phlare.scrape&lt;/code&gt; component regards a scrape as successful if it
responded with an HTTP &lt;code&gt;200 OK&lt;/code&gt; status code and returned a body of valid &lt;a href=&#34;https://github.com/google/pprof/blob/main/doc/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;pprof&lt;/a&gt; profile.&lt;/p&gt;
&lt;p&gt;If the scrape request fails, the component&amp;rsquo;s debug UI section contains more
detailed information about the failure, the last successful scrape, as well as
the labels last used for scraping.&lt;/p&gt;
&lt;p&gt;The following labels are automatically injected to the scraped profiles and
can help pin down a scrape target.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Label&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;job&lt;/td&gt;
              &lt;td&gt;The configured job name that the target belongs to. Defaults to the fully formed component name.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;instance&lt;/td&gt;
              &lt;td&gt;The &lt;code&gt;__address__&lt;/code&gt; or &lt;code&gt;&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt; of the scrape target&amp;rsquo;s URL.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example sets up the scrape job with certain attributes (profiling config, targets) and lets it scrape two local applications (the Agent itself and Phlare).
The exposed profiles are sent over to the provided list of receivers, as defined by other components.&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;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;phlare.scrape &amp;#34;local&amp;#34; {
  targets    = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:4100&amp;#34;, &amp;#34;app&amp;#34;=&amp;#34;phlare&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;app&amp;#34;=&amp;#34;agent&amp;#34;},
  ]
  forward_to = [phlare.write.local.receiver]
  profiling_config {
    profile.fgprof {
      enabled = true
    }
    profile.block {
      enabled = false
    }
    profile.mutex {
      enabled = false
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Here are the the endpoints that are being scraped every 15 seconds:&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;http://localhost:4100/debug/pprof/allocs
http://localhost:4100/debug/pprof/goroutine
http://localhost:4100/debug/pprof/profile?seconds=14
http://localhost:4100/debug/fgprof?seconds=14
http://localhost:12345/debug/pprof/allocs
http://localhost:12345/debug/pprof/goroutine
http://localhost:12345/debug/pprof/profile?seconds=14
http://localhost:12345/debug/fgprof?seconds=14&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="phlarescrape">phlare.scrape&lt;/h1>
&lt;p>&lt;code>phlare.scrape&lt;/code> configures a &lt;a href="https://github.com/google/pprof/blob/main/doc/README.md" target="_blank" rel="noopener noreferrer">pprof&lt;/a> scraping job for a given set of
&lt;code>targets&lt;/code>. The scraped performance profiles are forwarded to the list of receivers passed in
&lt;code>forward_to&lt;/code>.&lt;/p></description></item><item><title>phlare.write</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/phlare.write/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/phlare.write/</guid><content><![CDATA[&lt;h1 id=&#34;phlarewrite&#34;&gt;phlare.write&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;phlare.write&lt;/code&gt; receives performance profiles from other components and forwards them
to a series of user-supplied endpoints using &lt;a href=&#34;/oss/phlare/&#34;&gt;Phlare&amp;rsquo; Push API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;phlare.write&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;phlare.write &amp;#34;LABEL&amp;#34; {
  endpoint {
    url = PHLARE_URL

    ...
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;external_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Labels to add to profiles sent over the network.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;phlare.write&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint&lt;/td&gt;
              &lt;td&gt;[endpoint][]&lt;/td&gt;
              &lt;td&gt;Location to send profiles to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config&lt;/td&gt;
              &lt;td&gt;[http_client_config][]&lt;/td&gt;
              &lt;td&gt;HTTP client settings when connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; basic_auth&lt;/td&gt;
              &lt;td&gt;[basic_auth][]&lt;/td&gt;
              &lt;td&gt;Configure basic_auth for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; authorization&lt;/td&gt;
              &lt;td&gt;[authorization][]&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; oauth2&lt;/td&gt;
              &lt;td&gt;[oauth2][]&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; oauth2 &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;[tls_config][]&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;[tls_config][]&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;endpoint &amp;gt; http_client_config&lt;/code&gt; refers to an &lt;code&gt;http_client_config&lt;/code&gt; block defined inside an
&lt;code&gt;endpoint&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;endpoint-block&#34;&gt;endpoint block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;endpoint&lt;/code&gt; block describes a single location to send profiles to. Multiple
&lt;code&gt;endpoint&lt;/code&gt; blocks can be provided to send profiles to multiple locations.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Full URL to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional name to identify the endpoint in metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remote_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for requests made to the URL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Extra headers to deliver with the request.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When multiple &lt;code&gt;endpoint&lt;/code&gt; blocks are provided, profiles are concurrently forwarded to all
configured locations.&lt;/p&gt;
&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; configures settings used to connect to the
remote_write server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth-block&#34;&gt;basic_auth block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/basic-auth-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mututally exclusive and only one can be
provided inside of a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;authorization-block&#34;&gt;authorization block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/authorization-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credential&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive and only one can be
provided inside of an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2-block&#34;&gt;oauth2 block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/oauth2-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional proxy URL for OAuth2 requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mututally exclusive and only one
can be provided inside of an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain its own separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send profiles to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;phlare.write&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration. In those cases, exported fields are kept at their last healthy
values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;phlare.write&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&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;phlare.write &amp;#34;staging&amp;#34; {
  // Send metrics to a locally running Phlare instance.
  endpoint {
    url = &amp;#34;http://phlare:4100&amp;#34;
    headers = {
      &amp;#34;X-Scope-Org-ID&amp;#34; = &amp;#34;squad-1&amp;#34;,
    }
  }
  external_labels = {
    &amp;#34;env&amp;#34; = &amp;#34;staging&amp;#34;,
  }
}


phlare.scrape &amp;#34;default&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;phlare:4100&amp;#34;, &amp;#34;app&amp;#34;=&amp;#34;phlare&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;agent:12345&amp;#34;, &amp;#34;app&amp;#34;=&amp;#34;agent&amp;#34;},
  ]
  forward_to = [phlare.write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="phlarewrite">phlare.write&lt;/h1>
&lt;p>&lt;code>phlare.write&lt;/code> receives performance profiles from other components and forwards them
to a series of user-supplied endpoints using &lt;a href="/oss/phlare/">Phlare&amp;rsquo; Push API&lt;/a>.&lt;/p>
&lt;p>Multiple &lt;code>phlare.write&lt;/code> components can be specified by giving them
different labels.&lt;/p></description></item><item><title>prometheus.​integration.​node_exporter</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/prometheus.integration.node_exporter/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/prometheus.integration.node_exporter/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusintegrationnode_exporter&#34;&gt;prometheus.integration.node_exporter&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.integration.node_exporter&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus/node_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;node_exporter&lt;/a&gt; which exposes a
wide variety of hardware and OS metrics for *nix-based systems.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;node_exporter&lt;/code&gt; itself is comprised of various &lt;em&gt;collectors&lt;/em&gt;, which can be
enabled and disabled at will. For more information on collectors, refer to the
&lt;a href=&#34;#collectors-list&#34;&gt;&lt;code&gt;collectors-list&lt;/code&gt;&lt;/a&gt; section.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;prometheus.integration.node_exporter&lt;/code&gt; component can only appear once per
configuration file, and a block label must not be passed to it.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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.integration.node_exporter {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments can be used to configure the exporter&amp;rsquo;s behavior.
All arguments are optional. Omitted fields take their default values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;set_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Overrides the default set of enabled collectors with the collectors listed.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collectors to mark as enabled.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collectors to mark as disabled.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_exporter_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether metrics about the exporter itself should be reported.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;procfs_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The procfs mountpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/proc&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sysfs_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The sysfs mountpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/sys&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rootfs_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specify a prefix for accessing the host filesystem.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;set_collectors&lt;/code&gt; defines a hand-picked list of enabled-by-default
collectors. If set, anything not provided in that list is disabled by
default. See the &lt;a href=&#34;#collectors-list&#34;&gt;Collectors list&lt;/a&gt; for the default set of
enabled collectors for each supported operating system.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;enable_collectors&lt;/code&gt; enables more collectors over the default set, or on top
of the ones provided in &lt;code&gt;set_collectors&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;disable_collectors&lt;/code&gt; extends the default set of disabled collectors. In case
of conflicts, it takes precedence over &lt;code&gt;enable_collectors&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definiton of
&lt;code&gt;prometheus.integration.node_exporter&lt;/code&gt; to configure collector-specific options:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;bcache&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#bcache-block&#34;&gt;bcache&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the bcache collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;cpu&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#cpu-block&#34;&gt;cpu&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the cpu collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;disk&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#disk-block&#34;&gt;disk&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the diskstats collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;ethtool&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#ethtool-block&#34;&gt;ethtool&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the ethtool collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;filesystem&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#filesystem-block&#34;&gt;filesystem&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the filesystem collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;ipvs&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#ipvs-block&#34;&gt;ipvs&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the ipvs collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;ntp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#ntp-block&#34;&gt;ntp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the ntp collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;netclass&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#netclass-block&#34;&gt;netclass&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the netclass collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;netdev&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#netdev-block&#34;&gt;netdev&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the netdev collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;netstat&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#netstat-block&#34;&gt;netstat&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the netstat collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#perf-block&#34;&gt;perf&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the perf collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;powersupply&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#powersupply-block&#34;&gt;powersupply&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the powersupply collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;runit&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#runit-block&#34;&gt;runit&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the runit collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;supervisord&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#supervisord-block&#34;&gt;supervisord&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the supervisord collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;systemd&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#systemd-block&#34;&gt;systemd&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the systemd collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;tapestats&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tapestats-block&#34;&gt;tapestats&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the tapestats collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;textfile&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#textfile-block&#34;&gt;textfile&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the textfile collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;vmstat&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#vmstat-block&#34;&gt;vmstat&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the vmstat collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;bcache-block&#34;&gt;bcache block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;priority_stats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable exposing of expensive bcache priority stats.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;cpu-block&#34;&gt;cpu block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;guest&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable the &lt;code&gt;node_cpu_guest_seconds_total&lt;/code&gt; metric.&lt;/td&gt;
              &lt;td&gt;true&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable the &lt;code&gt;cpu_info metric&lt;/code&gt; for the cpu collector.&lt;/td&gt;
              &lt;td&gt;true&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bugs_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of &lt;code&gt;bugs&lt;/code&gt; field in cpu info to filter.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;flags_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of &lt;code&gt;flags&lt;/code&gt; field in cpu info to filter.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;disk-block&#34;&gt;disk block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignored_devices&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of devices to ignore for diskstats.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d&#43;n\\d&#43;p)\\d&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;ethtool-block&#34;&gt;ethtool block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of ethtool devices to exclude (mutually exclusive with &lt;code&gt;device_include&lt;/code&gt;).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of ethtool devices to include (mutually exclusive with &lt;code&gt;device_exclude&lt;/code&gt;).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of ethtool stats to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;.*&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;filesystem-block&#34;&gt;filesystem block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fs_types_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of filesystem types to ignore for filesystem collector.&lt;/td&gt;
              &lt;td&gt;(&lt;em&gt;see below&lt;/em&gt; )&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mount_points_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of mount points to ignore for filesystem collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^/(dev|proc|sys|var/lib/docker/.&#43;)($|/)&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mount_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How long to wait for a mount to respond before marking it as stale.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;fs_types_exclude&lt;/code&gt; defaults to the following regular expression string:&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;^(autofs\|binfmt_misc\|bpf\|cgroup2?\|configfs\|debugfs\|devpts\|devtmpfs\|fusectl\|hugetlbfs\|iso9660\|mqueue\|nsfs\|overlay\|proc\|procfs\|pstore\|rpc_pipefs\|securityfs\|selinuxfs\|squashfs\|sysfs\|tracefs)$&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;ipvs-block&#34;&gt;ipvs block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;backend_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Array of IPVS backend stats labels.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[local_address, local_port, remote_address, remote_port, proto, local_mark]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;ntp-block&#34;&gt;ntp block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;NTP server to use for the collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;127.0.0.1&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_is_local&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certifies that the server address is not a public ntp server.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ip_ttl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;TTL to use while sending NTP query.&lt;/td&gt;
              &lt;td&gt;1&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;local_offset_tolerance&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Offset between local clock and local ntpd time to tolerate.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1ms&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_distance&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Max accumulated distance to the root.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;3466080us&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;protocol_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;NTP protocol version.&lt;/td&gt;
              &lt;td&gt;4&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;netclass-block&#34;&gt;netclass block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignore_invalid_speed_device&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Ignore net devices with invalid speed values.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignored_devices&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of net devices to ignore for netclass collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;netdev-block&#34;&gt;netdev block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address_info&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable collecting address-info for every device.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of net devices to exclude (mutually exclusive with &lt;code&gt;device_include&lt;/code&gt;).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of net devices to include (mutually exclusive with &lt;code&gt;device_exclude&lt;/code&gt;).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;netstat-block&#34;&gt;netstat block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fields&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of fields to return for netstat collector.&lt;/td&gt;
              &lt;td&gt;&lt;em&gt;(see below)&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;fields&lt;/code&gt; defaults to the following regular expression string:&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;&amp;#34;^(.*_(InErrors\|InErrs)\|Ip_Forwarding\|Ip(6\|Ext)_(InOctets\|OutOctets)\|Icmp6?_(InMsgs\|OutMsgs)\|TcpExt_(Listen.*\|Syncookies.*\|TCPSynRetrans\|TCPTimeouts)\|Tcp_(ActiveOpens\|InSegs\|OutSegs\|OutRsts\|PassiveOpens\|RetransSegs\|CurrEstab)\|Udp6?_(InDatagrams\|OutDatagrams\|NoPorts\|RcvbufErrors\|SndbufErrors))$&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;perf-block&#34;&gt;perf block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cpus&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of CPUs from which perf metrics should be collected.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tracepoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Array of perf tracepoints that should be collected.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;powersupply-block&#34;&gt;powersupply block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignored_supplies&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of power supplies to ignore for the powersupplyclass collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;runit-block&#34;&gt;runit block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;service_dir&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to runit service directory.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/etc/service&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;supervisord-block&#34;&gt;supervisord block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;XML RPC endpoint for the supervisord collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;http://localhost:9001/RPC2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Setting &lt;code&gt;SUPERVISORD_URL&lt;/code&gt; in the environment overrides the default value.
An explicit value in the block takes precedence over the environment variable.&lt;/p&gt;
&lt;h3 id=&#34;systemd-block&#34;&gt;systemd block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_restarts&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables service unit metric &lt;code&gt;service_restart_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;start_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables service unit metric &lt;code&gt;unit_start_time_seconds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;task_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables service unit task metrics &lt;code&gt;unit_tasks_current&lt;/code&gt; and &lt;code&gt;unit_tasks_max.&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;unit_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of systemd units to exclude. Units must both match include and not match exclude to be collected.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;.&#43;\\.(automount|device|mount|scope|slice)&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;unit_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of systemd units to include. Units must both match include and not match exclude to be collected.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;.&#43;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;tapestats-block&#34;&gt;tapestats block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignored_devices&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of tapestats devices to ignore.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;textfile-block&#34;&gt;textfile block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;textfile_directory&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Directory to read &lt;code&gt;*.prom&lt;/code&gt; files from for the textfile collector.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;vmstat-block&#34;&gt;vmstat block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;type&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default&lt;/th&gt;
              &lt;th&gt;required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fields&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of fields to return for the vmstat collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^(oom_kill|pgpg|pswp|pg.*fault).*&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect &lt;code&gt;node_exporter&lt;/code&gt; metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; could either be passed to a &lt;code&gt;prometheus.relabel&lt;/code&gt;
component to rewrite the metrics&amp;rsquo; label set, or to a &lt;code&gt;prometheus.scrape&lt;/code&gt;
component that collects the exposed metrics.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.integration.node_exporter&lt;/code&gt; is only reported as unhealthy if given
an invalid configuration. In those cases, exported fields retain their last
healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.integration.node_exporter&lt;/code&gt; does not expose any component-specific
debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.integration.node_exporter&lt;/code&gt; does not expose any component-specific
debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;collectors-list&#34;&gt;Collectors list&lt;/h2&gt;
&lt;p&gt;The following table lists the available collectors that &lt;code&gt;node_exporter&lt;/code&gt; brings
bundled in. Some collectors only work on specific operating systems; enabling a
collector that is not supported by the host OS where Flow is running
is a no-op.&lt;/p&gt;
&lt;p&gt;Users can choose to enable a subset of collectors to limit the amount of
metrics exposed by the &lt;code&gt;prometheus.integration.node_exporter&lt;/code&gt; component,
or disable collectors that are expensive to run.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;OS&lt;/th&gt;
              &lt;th&gt;Enabled by default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;arp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes ARP statistics from &lt;code&gt;/proc/net/arp&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bcache&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes bcache statistics from &lt;code&gt;/sys/fs/bcache&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bonding&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes the number of configured and active slaves of Linux bonding interfaces.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;boottime&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes system boot time derived from the &lt;code&gt;kern.boottime sysctl&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, NetBSD, OpenBSD, Solaris&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;btrfs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics on btrfs.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;buddyinfo&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics of memory fragments as reported by &lt;code&gt;/proc/buddyinfo&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;conntrack&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Shows conntrack statistics (does nothing if no &lt;code&gt;/proc/sys/net/netfilter/&lt;/code&gt; present).&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cpu&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes CPU statistics.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, Solaris&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cpufreq&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes CPU frequency statistics.&lt;/td&gt;
              &lt;td&gt;Linux, Solaris&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;devstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes device statistics.&lt;/td&gt;
              &lt;td&gt;Dragonfly, FreeBSD&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;diskstats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes disk I/O statistics.&lt;/td&gt;
              &lt;td&gt;Darwin, Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;dmi&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes DMI information.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drbd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes Distributed Replicated Block Device statistics (to version 8.4).&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes GPU card info from &lt;code&gt;/sys/class/drm/card?/device&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;edac&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes error detection and correction statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;entropy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes available entropy.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ethtool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes ethtool stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exec&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes execution statistics.&lt;/td&gt;
              &lt;td&gt;Dragonfly, FreeBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fibrechannel&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes FibreChannel statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;filefd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes file descriptor statistics from &lt;code&gt;/proc/sys/fs/file-nr&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;filesystem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes filesystem statistics, such as disk space used.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;hwmon&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes hardware monitoring and sensor data from &lt;code&gt;/sys/class/hwmon&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;infiniband&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network statistics specific to InfiniBand and Intel OmniPath configurations.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;interrupts&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes detailed interrupts statistics.&lt;/td&gt;
              &lt;td&gt;Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ipvs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes IPVS status from &lt;code&gt;/proc/net/ip_vs&lt;/code&gt; and stats from &lt;code&gt;/proc/net/ip_vs_stats&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ksmd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes kernel and system statistics from &lt;code&gt;/sys/kernel/mm/ksm&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;lnstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes Linux network cache stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;loadavg&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes load average.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, NetBSD, OpenBSD, Solaris&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logind&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes session counts from logind.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mdadm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics about devices in &lt;code&gt;/proc/mdstat&lt;/code&gt; (does nothing if no &lt;code&gt;/proc/mdstat&lt;/code&gt; present).&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;meminfo&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes memory statistics.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;meminfo_numa&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes memory statistics from &lt;code&gt;/proc/meminfo_numa&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mountstats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes filesystem statistics from &lt;code&gt;/proc/self/mountstats&lt;/code&gt;. Exposes detailed NFS client statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;netclass&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network interface info from &lt;code&gt;/sys/class/net&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;netdev&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network interface statistics such as bytes transferred.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;netstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network statistics from &lt;code&gt;/proc/net/netstat&lt;/code&gt;. This is the same information as &lt;code&gt;netstat -s&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;network_route&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network route statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nfs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes NFS client statistics from &lt;code&gt;/proc/net/rpc/nfs&lt;/code&gt;. This is the same information as &lt;code&gt;nfsstat -c&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nfsd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes NFS kernel server statistics from &lt;code&gt;/proc/net/rpc/nfsd&lt;/code&gt;. This is the same information as &lt;code&gt;nfsstat -s&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ntp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes local NTP daemon health to check time.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nvme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes NVMe statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;os&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes os-release information.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes perf based metrics (Warning: Metrics are dependent on kernel configuration and settings).&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;powersupplyclass&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collects information on power supplies.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pressure&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes pressure stall statistics from &lt;code&gt;/proc/pressure/&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux (kernel 4.20&#43; and/or CONFIG_PSI)&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;processes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes aggregate process statistics from /proc.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;qdisc&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes queuing discipline statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rapl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes various statistics from &lt;code&gt;/sys/class/powercap&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;runit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes service status from runit.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;schedstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes task scheduler statistics from &lt;code&gt;/proc/schedstat&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sockstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes various statistics from &lt;code&gt;/proc/net/sockstat&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;softnet&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics from &lt;code&gt;/proc/net/softnet_stat&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;stat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes various statistics from &lt;code&gt;/proc/stat&lt;/code&gt;. This includes boot time, forks and interrupts.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;supervisord&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes service status from supervisord.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;systemd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes service and system status from systemd.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tapestats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes tape device stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tcpstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes TCP connection status information from &lt;code&gt;/proc/net/tcp&lt;/code&gt; and &lt;code&gt;/proc/net/tcp6&lt;/code&gt;. (Warning: The current version has potential performance issues in high load situations.)&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;textfile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collects metrics from files in a directory matching the filename pattern &lt;code&gt;*.prom&lt;/code&gt;. The files must be using the text format defined here: &lt;a href=&#34;https://prometheus.io/docs/instrumenting/exposition_formats/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://prometheus.io/docs/instrumenting/exposition_formats/&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;thermal&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes thermal statistics.&lt;/td&gt;
              &lt;td&gt;Darwin&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;thermal_zone&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes thermal zone &amp;amp; cooling device statistics from &lt;code&gt;/sys/class/thermal&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes the current system time.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes selected &lt;code&gt;adjtimex(2)&lt;/code&gt; system call stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;udp_queues&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes UDP total lengths of the &lt;code&gt;rx_queue&lt;/code&gt; and &lt;code&gt;tx_queue&lt;/code&gt; from &lt;code&gt;/proc/net/udp&lt;/code&gt; and &lt;code&gt;/proc/net/udp6&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;uname&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes system information as provided by the uname system call.&lt;/td&gt;
              &lt;td&gt;Darwin, FreeBSD, Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;vmstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics from &lt;code&gt;/proc/vmstat&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;wifi&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes WiFi device and station statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;xfs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes XFS runtime statistics.&lt;/td&gt;
              &lt;td&gt;Linux (kernel 4.4&#43;)&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;zfs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes ZFS performance statistics.&lt;/td&gt;
              &lt;td&gt;Linux, Solaris&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;zoneinfo&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes zone stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;running-on-dockerkubernetes&#34;&gt;Running on Docker/Kubernetes&lt;/h2&gt;
&lt;p&gt;When running Flow in a Docker container, you need to bind mount the filesystem,
procfs, and sysfs from the host machine, as well as set the corresponding
arguments for the component to work.&lt;/p&gt;
&lt;p&gt;You may also need to add capabilities such as &lt;code&gt;SYS_TIME&lt;/code&gt; and make sure that the
Agent is running with elevated privileges for some of the collectors to work
properly.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics
from &lt;code&gt;prometheus.integration.node_exporter&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;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.integration.node_exporter {
}

// Configure a prometheus.scrape component to collect node_exporter metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.integration.node_exporter.targets
  forward_to = [ /* ... */ ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="prometheusintegrationnode_exporter">prometheus.integration.node_exporter&lt;/h1>
&lt;p>The &lt;code>prometheus.integration.node_exporter&lt;/code> component embeds
&lt;a href="https://github.com/prometheus/node_exporter" target="_blank" rel="noopener noreferrer">node_exporter&lt;/a> which exposes a
wide variety of hardware and OS metrics for *nix-based systems.&lt;/p>
&lt;p>The &lt;code>node_exporter&lt;/code> itself is comprised of various &lt;em>collectors&lt;/em>, which can be
enabled and disabled at will. For more information on collectors, refer to the
&lt;a href="#collectors-list">&lt;code>collectors-list&lt;/code>&lt;/a> section.&lt;/p></description></item><item><title>prometheus.relabel</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/prometheus.relabel/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/prometheus.relabel/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusrelabel&#34;&gt;prometheus.relabel&lt;/h1&gt;
&lt;p&gt;Prometheus metrics follow the &lt;a href=&#34;https://openmetrics.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenMetrics&lt;/a&gt; format.
Each time series is uniquely identified by its metric name, plus optional
key-value pairs called labels. Each sample represents a datapoint in the
time series and contains a value and an optional timestamp.&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;&amp;lt;metric name&amp;gt;{&amp;lt;label_1&amp;gt;=&amp;lt;label_val_1&amp;gt;, &amp;lt;label_2&amp;gt;=&amp;lt;label_val_2&amp;gt; ...} &amp;lt;value&amp;gt; [timestamp]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;prometheus.relabel&lt;/code&gt; component rewrites the label set of each metric passed
along to the exported receiver by applying one or more relabeling &lt;code&gt;rule&lt;/code&gt;s. If
no rules are defined or applicable to some metrics, then those metrics are
forwarded as-is to each receiver passed in the component&amp;rsquo;s arguments. If no
labels remain after the relabeling rules are applied, then the metric is
dropped.&lt;/p&gt;
&lt;p&gt;The most common use of &lt;code&gt;prometheus.relabel&lt;/code&gt; is to filter Prometheus metrics or
standardize the label set that is passed to one or more downstream
receivers. The &lt;code&gt;rule&lt;/code&gt; blocks are applied to the label set of each metric in
order of their appearance in the configuration file. The configured rules can
be retrieved by calling the function in the &lt;code&gt;rules&lt;/code&gt; export field.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;prometheus.relabel&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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.relabel &amp;#34;LABEL&amp;#34; {
  forward_to = RECEIVER_LIST

  rule {
    ...
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(receiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Where the metrics should be forwarded to, after relabeling takes place.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;prometheus.relabel&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;rule&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#rule-block&#34;&gt;rule&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to received metrics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;rule-block&#34;&gt;rule block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/rule-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;rule&lt;/code&gt; block contains the definition of any relabeling rules that can be
applied to an input metric. If more than one &lt;code&gt;rule&lt;/code&gt; block is defined, the
transformations are applied in top-down order.&lt;/p&gt;
&lt;p&gt;The following arguments can be used to configure a &lt;code&gt;rule&lt;/code&gt;. All arguments are
optional. Omitted fields take their default values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of labels whose values are to be selected. Their content is concatenated using the &lt;code&gt;separator&lt;/code&gt; and matched against &lt;code&gt;regex&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The separator used to concatenate the values present in &lt;code&gt;source_labels&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A valid RE2 expression with support for parenthesized capture groups. Used to match the extracted value from the combination of the &lt;code&gt;source_label&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt; fields or filter labels during the &lt;code&gt;labelkeep/labeldrop/labelmap&lt;/code&gt; actions.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;(.*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;modulus&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A positive integer used to calculate the modulus of the hashed source label values.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;target_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label to which the resulting value will be written to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replacement&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value against which a regex replace is performed, if the regex matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;$1&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;action&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The relabeling action to perform.&lt;/td&gt;
              &lt;td&gt;replace&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Here&amp;rsquo;s a list of the available actions, along with a brief description of their usage.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;replace&lt;/code&gt;   - Matches &lt;code&gt;regex&lt;/code&gt; to the concatenated labels. If there&amp;rsquo;s a match, it replaces the content of the &lt;code&gt;target_label&lt;/code&gt; using the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;keep&lt;/code&gt;      - Keeps metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;drop&lt;/code&gt;      - Drops metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hashmod&lt;/code&gt;   - Hashes the concatenated labels, calculates its modulo &lt;code&gt;modulus&lt;/code&gt; and writes the result to the &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelmap&lt;/code&gt;  - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are renamed according to the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labeldrop&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelkeep&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that don&amp;rsquo;t match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, note that the regex capture groups can be referred to using either the
&lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The input receiver where samples are sent to be relabeled.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;RelabelRules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The currently configured relabeling rules.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration. In those cases, exported fields are kept at their last healthy
values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_relabel_metrics_processed&lt;/code&gt; (counter): Total number of metrics processed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_relabel_metrics_written&lt;/code&gt; (counter): Total number of metrics written.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_relabel_cache_misses&lt;/code&gt; (counter): Total number of cache misses.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_relabel_cache_hits&lt;/code&gt; (counter): Total number of cache hits.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_relabel_cache_size&lt;/code&gt; (gauge): Total size of relabel cache.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_fanout_latency&lt;/code&gt; (histogram): Write latency for sending to direct and indirect components.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s create an instance of a see &lt;code&gt;prometheus.relabel&lt;/code&gt; component and see how
it acts on the following metrics.&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;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.relabel &amp;#34;keep_backend_only&amp;#34; {
  forward_to = [prometheus.remote_write.onprem.receiver]

  rule {
    action        = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__address__&amp;#34;, &amp;#34;instance&amp;#34;]
    separator     = &amp;#34;/&amp;#34;
    target_label  = &amp;#34;host&amp;#34;
  }
  rule {
    action        = &amp;#34;keep&amp;#34;
    source_labels = [&amp;#34;app&amp;#34;]
    regex         = &amp;#34;backend&amp;#34;
  }
  rule {
    action = &amp;#34;labeldrop&amp;#34;
    regex  = &amp;#34;instance&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;metric_a{__address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;frontend&amp;#34;} 10
metric_a{__address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;backend&amp;#34;}  2
metric_a{__address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;frontend&amp;#34;} 7
metric_a{__address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;backend&amp;#34;}  9
metric_a{__address__ = &amp;#34;cluster_b&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;database&amp;#34;} 4&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After applying the first &lt;code&gt;rule&lt;/code&gt;, the &lt;code&gt;replace&lt;/code&gt; action populates a new label
named &lt;code&gt;host&lt;/code&gt; by concatenating the contents of the &lt;code&gt;__address__&lt;/code&gt; and &lt;code&gt;instance&lt;/code&gt;
labels, separated by a slash &lt;code&gt;/&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;metric_a{host = &amp;#34;localhost/development&amp;#34;, __address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;frontend&amp;#34;} 10
metric_a{host = &amp;#34;localhost/development&amp;#34;, __address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;backend&amp;#34;}  2
metric_a{host = &amp;#34;cluster_a/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;frontend&amp;#34;} 7
metric_a{host = &amp;#34;cluster_a/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;backend&amp;#34;}  9
metric_a{host = &amp;#34;cluster_b/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;database&amp;#34;} 4&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;On the second relabeling rule, the &lt;code&gt;keep&lt;/code&gt; action only keeps the metrics whose
&lt;code&gt;app&lt;/code&gt; label matches &lt;code&gt;regex&lt;/code&gt;, dropping everything else, so the list of metrics
is be trimmed down to:&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;metric_a{host = &amp;#34;localhost/development&amp;#34;, __address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;backend&amp;#34;}  2
metric_a{host = &amp;#34;cluster_a/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;backend&amp;#34;}  9&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The third and final relabeling rule which uses the &lt;code&gt;labeldrop&lt;/code&gt; action removes
the &lt;code&gt;instance&lt;/code&gt; label from the set of labels.&lt;/p&gt;
&lt;p&gt;So in this case, the initial set of metrics passed to the exported receiver is:&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;metric_a{host = &amp;#34;localhost/development&amp;#34;, __address__ = &amp;#34;localhost&amp;#34;, app = &amp;#34;backend&amp;#34;}  2
metric_a{host = &amp;#34;cluster_a/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, app = &amp;#34;backend&amp;#34;}  9&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The two resulting metrics are then propagated to each receiver defined in the
&lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
]]></content><description>&lt;h1 id="prometheusrelabel">prometheus.relabel&lt;/h1>
&lt;p>Prometheus metrics follow the &lt;a href="https://openmetrics.io/" target="_blank" rel="noopener noreferrer">OpenMetrics&lt;/a> format.
Each time series is uniquely identified by its metric name, plus optional
key-value pairs called labels. Each sample represents a datapoint in the
time series and contains a value and an optional timestamp.&lt;/p></description></item><item><title>prometheus.remote_write</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/prometheus.remote_write/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/prometheus.remote_write/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusremote_write&#34;&gt;prometheus.remote_write&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; collects metrics sent from other components into a
Write-Ahead Log (WAL) and forwards them over the network to a series of
user-supplied endpoints. Metrics are sent over the network using the
&lt;a href=&#34;https://docs.google.com/document/d/1LPhVRSFkGNSuU1fBd81ulhsCPR4hkSZyyBj1SZ8fWOM/edit&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus Remote Write protocol&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;prometheus.remote_write&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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.remote_write &amp;#34;LABEL&amp;#34; {
  endpoint {
    url = REMOTE_WRITE_URL

    ...
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;external_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Labels to add to metrics sent over the network.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;prometheus.remote_write&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#endpoint-block&#34;&gt;endpoint&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Location to send metrics to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http_client_config-block&#34;&gt;http_client_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client settings when connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; basic_auth&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;basic_auth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic_auth for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; authorization&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authorization-block&#34;&gt;authorization&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; oauth2&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;oauth2&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; oauth2 &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; http_client_config &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; queue_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#queue_config-block&#34;&gt;queue_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for how metrics are batched before sending.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &amp;gt; metadata_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metadata_config-block&#34;&gt;metadata_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for how metric metadata is sent.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;wal&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#wal-block&#34;&gt;wal&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for the component&amp;rsquo;s WAL.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;endpoint &amp;gt; http_client_config&lt;/code&gt; refers to an &lt;code&gt;http_client_config&lt;/code&gt; block defined inside an
&lt;code&gt;endpoint&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;endpoint-block&#34;&gt;endpoint block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;endpoint&lt;/code&gt; block describes a single location to send metrics to. Multiple
&lt;code&gt;endpoint&lt;/code&gt; blocks can be provided to send metrics to multiple locations.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Full URL to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional name to identify the endpoint in metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remote_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for requests made to the URL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Extra headers to deliver with the request.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send_exemplars&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether exemplars should be sent.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send_native_histograms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether native histograms should be sent.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When multiple &lt;code&gt;endpoint&lt;/code&gt; blocks are provided, metrics are concurrently sent to all
configured locations. Each endpoint has a &lt;em&gt;queue&lt;/em&gt; which is used to read metrics
from the WAL and queue them for sending. The &lt;code&gt;queue_config&lt;/code&gt; block can be used
to customize the behavior of the queue.&lt;/p&gt;
&lt;p&gt;Endpoints can be named for easier identification in debug metrics using the
&lt;code&gt;name&lt;/code&gt; argument. If the &lt;code&gt;name&lt;/code&gt; argument isn&amp;rsquo;t provided, a name is generated
based on a hash of the endpoint settings.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;send_native_histograms&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, native Prometheus histogram samples
sent to &lt;code&gt;prometheus.remote_write&lt;/code&gt; are forwarded to the configured endpoint. If
the endpoint doesn&amp;rsquo;t support receiving native histogram samples, pushing
metrics fails.&lt;/p&gt;
&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; configures settings used to connect to the
remote_write server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth-block&#34;&gt;basic_auth block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/basic-auth-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mututally exclusive and only one can be
provided inside of a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;authorization-block&#34;&gt;authorization block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/authorization-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credential&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive and only one can be
provided inside of an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2-block&#34;&gt;oauth2 block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/oauth2-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional proxy URL for OAuth2 requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mututally exclusive and only one
can be provided inside of an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain its own separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;queue_config-block&#34;&gt;queue_config block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;capacity&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of samples to buffer per shard.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2500&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_shards&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum amount of concurrent shards sending samples to the endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_shards&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of concurrent shards sending samples to the endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;200&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_samples_per_send&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of samples per send.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;500&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;batch_send_deadline&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time samples will wait in the buffer before sending.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_backoff&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Initial retry delay. The backoff time gets doubled for each retry.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30ms&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_backoff&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum retry delay.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;retry_on_http_429&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Retry when an HTTP 429 status code is received.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Each queue then manages a number of concurrent &lt;em&gt;shards&lt;/em&gt; which is responsible
for sending a fraction of data to their respective endpoints. The number of
shards is automatically raised if samples are not being sent to the endpoint
quickly enough. The range of permitted shards can be configured with the
&lt;code&gt;min_shards&lt;/code&gt; and &lt;code&gt;max_shards&lt;/code&gt; arguments.&lt;/p&gt;
&lt;p&gt;Each shard has a buffer of samples it will keep in memory, controlled with the
&lt;code&gt;capacity&lt;/code&gt; argument. New metrics aren&amp;rsquo;t read from the WAL unless there is at
least one shard that is not at maximum capcity.&lt;/p&gt;
&lt;p&gt;The buffer of a shard is flushed and sent to the endpoint either after the
shard reaches the number of samples specified by &lt;code&gt;max_samples_per_send&lt;/code&gt; or the
duration specified by &lt;code&gt;batch_send_deadline&lt;/code&gt; has elapsed since the last flush
for that shard.&lt;/p&gt;
&lt;p&gt;Shards retry requests which fail due to a recoverable error. An error is
recoverable if the server responds with an &lt;code&gt;HTTP 5xx&lt;/code&gt; status code. The delay
between retries can be customized with the &lt;code&gt;min_backoff&lt;/code&gt; and &lt;code&gt;max_backoff&lt;/code&gt;
arguments.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;retry_on_http_429&lt;/code&gt; argument specifies whether &lt;code&gt;HTTP 429&lt;/code&gt; status code
responses should be treated as recoverable errors; other &lt;code&gt;HTTP 4xx&lt;/code&gt; status code
responses are never considered recoverable errors. When &lt;code&gt;retry_on_http_429&lt;/code&gt; is
enabled, &lt;code&gt;Retry-After&lt;/code&gt; response headers from the servers are honored.&lt;/p&gt;
&lt;h3 id=&#34;metadata_config-block&#34;&gt;metadata_config block&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls whether metric metadata is sent to the endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently metric metadata is sent to the endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_samples_per_send&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of metadata samples to send to the endpoint at once.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;500&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;wal-block&#34;&gt;wal block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;wal&lt;/code&gt; block customizes the Write-Ahead Log (WAL) used to temporarily store
metrics before they are sent to the configured set of endpoints.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;truncate_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently to clean up the WAL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_keepalive_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum time to keep data in the WAL before it can be removed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_keepalive_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time to keep data in the WAL before removing it.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;8h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The WAL serves two primary purposes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Buffer unsent metrics in case of intermittent network issues.&lt;/li&gt;
&lt;li&gt;Populate in-memory cache after a process restart.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The WAL is located inside a component-specific directory relative to the
storage path Grafana Agent is configured to use. See the
&lt;a href=&#34;../../cli/run/&#34;&gt;&lt;code&gt;agent run&lt;/code&gt; documentation&lt;/a&gt; for how to change the storage path.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;truncate_frequency&lt;/code&gt; argument configures how often to clean up the WAL.
Every time the &lt;code&gt;truncate_frequency&lt;/code&gt; period elapses, the lower two-thirds of
data is removed from the WAL and is no available for sending.&lt;/p&gt;
&lt;p&gt;When a WAL clean-up starts, the lowest successfully sent timestamp is used to
determine how much data is safe to remove from the WAL. The
&lt;code&gt;min_keepalive_time&lt;/code&gt; and &lt;code&gt;max_keepalive_time&lt;/code&gt; control the permitted age range
of data in the WAL; samples aren&amp;rsquo;t removed until they are at least as old as
&lt;code&gt;min_keepalive_time&lt;/code&gt;, and samples are forcibly removed if they are older than
&lt;code&gt;max_keepalive_time&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value which other components can use to send metrics to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration. In those cases, exported fields are kept at their last healthy
values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h3 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;agent_wal_storage_active_series&lt;/code&gt; (gauge): Current number of active series
being tracked by the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_wal_storage_deleted_series&lt;/code&gt; (gauge): Current number of series marked
for deletion from memory.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_wal_storage_created_series_total&lt;/code&gt; (counter): Total number of created
series appended to the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_wal_storage_removed_series_total&lt;/code&gt; (counter): Total number of series
removed from the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_wal_samples_appended_total&lt;/code&gt; (counter): Total number of samples
appended to the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_wal_exemplars_appended_total&lt;/code&gt; (counter): Total number of exemplars
appended to the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_total&lt;/code&gt; (counter): Total number of samples
sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_total&lt;/code&gt; (counter): Total number of
exemplars sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_total&lt;/code&gt; (counter): Total number of
metadata entries sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_failed_total&lt;/code&gt; (counter): Total number of
samples that failed to send to remote storage due to non-recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_failed_total&lt;/code&gt; (counter): Total number of
exemplars that failed to send to remote storage due to non-recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_failed_total&lt;/code&gt; (counter): Total number of
metadata entries that failed to send to remote storage due to
non-recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_retries_total&lt;/code&gt; (counter): Total number of
samples that failed to send to remote storage but were retried due to
recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_retried_total&lt;/code&gt; (counter): Total number of
exemplars that failed to send to remote storage but were retried due to
recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_retried_total&lt;/code&gt; (counter): Total number of
metadata entries that failed to send to remote storage but were retried due
to recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_dropped_total&lt;/code&gt; (counter): Total number of
samples which were dropped after being read from the WAL before being sent to
remote_write because of an unknown reference ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_dropped_total&lt;/code&gt; (counter): Total number
of exemplars which were dropped after being read from the WAL before being
sent to remote_write because of an unknown reference ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_enqueue_retries_total&lt;/code&gt; (counter): Total number of
times enqueue has failed because a shard&amp;rsquo;s queue was full.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_sent_batch_duration_seconds&lt;/code&gt; (histogram): Duration
of send calls to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_queue_highest_sent_timestamp_seconds&lt;/code&gt; (gauge):
Unix timestamp of the latest WAL sample successfully sent by a queue.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_pending&lt;/code&gt; (gauge): The number of samples
pending in shards to be sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_pending&lt;/code&gt; (gauge): The number of
exemplars pending in shards to be sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shard_capacity&lt;/code&gt; (gauge): The capacity of shards
within a given queue.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards&lt;/code&gt; (gauge): The number of shards used for
concurrent delivery of metrics to an endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_min&lt;/code&gt; (gauge): The minimum number of shards
a queue is allowed to run.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_max&lt;/code&gt; (gauge): The maximum number of a
shards a queue is allowed to run.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_desired&lt;/code&gt; (gauge): The number of shards a
queue wants to run to be able to keep up with the amount of incoming metrics.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_bytes_total&lt;/code&gt; (counter): Total number of bytes of
data sent by queues after compression.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_bytes_total&lt;/code&gt; (counter): Total number of
bytes of metadata sent by queues after compression.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_max_samples_per_send&lt;/code&gt; (gauge): The maximum number
of samples each shard is allowed to send in a single request.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_in_total&lt;/code&gt; (counter): Samples read into
remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_in_total&lt;/code&gt; (counter): Exemplars read into
remote storage.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&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.remote_write &amp;#34;staging&amp;#34; {
  // Send metrics to a locally running Mimir.
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

    http_client_config {
      basic_auth {
        username = &amp;#34;example-user&amp;#34;
        password = &amp;#34;example-password&amp;#34;
      }
    }
  }
}

// Configure a prometheus.scrape component to send metrics to
// prometheus.remote_write component.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets = [
    // Collect metrics from Grafana Agent&amp;#39;s default HTTP listen address.
    {&amp;#34;__address__&amp;#34; = &amp;#34;127.0.0.1:12345&amp;#34;},
  ]
  forward_to = [prometheus.remote_write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="prometheusremote_write">prometheus.remote_write&lt;/h1>
&lt;p>&lt;code>prometheus.remote_write&lt;/code> collects metrics sent from other components into a
Write-Ahead Log (WAL) and forwards them over the network to a series of
user-supplied endpoints. Metrics are sent over the network using the
&lt;a href="https://docs.google.com/document/d/1LPhVRSFkGNSuU1fBd81ulhsCPR4hkSZyyBj1SZ8fWOM/edit" target="_blank" rel="noopener noreferrer">Prometheus Remote Write protocol&lt;/a>.&lt;/p></description></item><item><title>prometheus.scrape</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/prometheus.scrape/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/prometheus.scrape/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusscrape&#34;&gt;prometheus.scrape&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; configures a Prometheus scraping job for a given set of
&lt;code&gt;targets&lt;/code&gt;. The scraped metrics are forwarded to the list of receivers passed in
&lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;prometheus.scrape&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;prometheus.scrape &amp;#34;LABEL&amp;#34; {
  targets    = TARGET_LIST
  forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component configures and starts a new scrape job to scrape all of the
input targets. The list of arguments that can be used to configure the block is
presented below.&lt;/p&gt;
&lt;p&gt;The scrape job name defaults to the component&amp;rsquo;s unique identifier.&lt;/p&gt;
&lt;p&gt;Any omitted fields take on their default values. In case that conflicting
attributes are being passed (eg. defining both a BearerToken and
BearerTokenFile or configuring both Basic Authorization and OAuth2 at the same
time), the component reports an error.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of targets to scrape.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send scraped metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;job_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The job name to override the job label with.&lt;/td&gt;
              &lt;td&gt;component name&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;extra_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether extra metrics should be generated for scrape targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;honor_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Indicator whether the scraped metrics should remain unmodified.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;honor_timestamps&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Indicator whether the scraped timestamps should be respected.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A set of query parameters with which the target is scraped.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently to scrape the targets of this scrape config.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;60s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The timeout for scraping targets of this config.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The HTTP resource path on which to fetch metrics from targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scheme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The URL scheme with which to fetch metrics from targets.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;body_size_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An uncompressed response body larger than this many bytes causes the scrape to fail. 0 means no limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sample_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this many samples post metric-relabeling causes the scrape to fail&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;target_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this many targets after the target relabeling causes the scrapes to fail.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;label_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this many labels post metric-relabeling causes the scrape to fail.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;label_name_length_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this label name length post metric-relabeling causes the scrape to fail.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;label_value_length_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this label value length post metric-relabeling causes the scrape to fail.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;prometheus.scrape&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http_client_config-block&#34;&gt;http_client_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client settings when connecting to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; basic_auth&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;basic_auth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic_auth for authenticating to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; authorization&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authorization-block&#34;&gt;authorization&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;oauth2&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; oauth2 &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to targets via OAuth2.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;http_client_config &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example,
&lt;code&gt;http_client_config &amp;gt; basic_auth&lt;/code&gt; refers to a &lt;code&gt;basic_auth&lt;/code&gt; block defined inside
an &lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;http_client_config-block&#34;&gt;http_client_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;http_client_config&lt;/code&gt; block configures settings used to connect to
endpoints.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth-block&#34;&gt;basic_auth block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/basic-auth-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mututally exclusive and only one can be
provided inside of a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;authorization-block&#34;&gt;authorization block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/authorization-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credential&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive and only one can be
provided inside of an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2-block&#34;&gt;oauth2 block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/oauth2-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional proxy URL for OAuth2 requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mututally exclusive and only one
can be provided inside of an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain its own separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; does not export any fields that can be referenced by other
components.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; is only reported as unhealthy if given an invalid
configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; reports the status of the last scrape for each configured
scrape job on the component&amp;rsquo;s debug endpoint.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_fanout_latency&lt;/code&gt; (histogram): Write latency for sending to direct and indirect components.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;scraping-behavior&#34;&gt;Scraping behavior&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.scrape&lt;/code&gt; component borrows the scraping behavior of Prometheus.
Prometheus, and by extent this component, uses a pull model for scraping
metrics from a given set of &lt;em&gt;targets&lt;/em&gt;.
Each scrape target is defined as a set of key-value pairs called &lt;em&gt;labels&lt;/em&gt;.
The set of targets can either be &lt;em&gt;static&lt;/em&gt;, or dynamically provided periodically
by a service discovery component such as &lt;code&gt;discovery.kubernetes&lt;/code&gt;. The special
label &lt;code&gt;__address__&lt;/code&gt; &lt;em&gt;must always&lt;/em&gt; be present and corresponds to the
&lt;code&gt;&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt; that is used for the scrape request.&lt;/p&gt;
&lt;p&gt;By default, the scrape job tries to scrape all available targets&amp;rsquo; &lt;code&gt;/metrics&lt;/code&gt;
endpoints using HTTP, with a scrape interval of 1 minute and scrape timeout of
10 seconds. The metrics path, protocol scheme, scrape interval and timeout,
query parameters, as well as any other settings can be configured using the
component&amp;rsquo;s arguments.&lt;/p&gt;
&lt;p&gt;The scrape job expects the metrics exposed by the endpoint to follow the
&lt;a href=&#34;https://openmetrics.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenMetrics&lt;/a&gt; format. All metrics are then propagated
to each receiver listed in the component&amp;rsquo;s &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;Labels coming from targets, that start with a double underscore &lt;code&gt;__&lt;/code&gt; are
treated as &lt;em&gt;internal&lt;/em&gt;, and are removed prior to scraping.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;prometheus.scrape&lt;/code&gt; component regards a scrape as successful if it
responded with an HTTP &lt;code&gt;200 OK&lt;/code&gt; status code and returned a body of valid
metrics.&lt;/p&gt;
&lt;p&gt;If the scrape request fails, the component&amp;rsquo;s debug UI section contains more
detailed information about the failure, the last successful scrape, as well as
the labels last used for scraping.&lt;/p&gt;
&lt;p&gt;The following labels are automatically injected to the scraped time series and
can help pin down a scrape target.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Label&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;job&lt;/td&gt;
              &lt;td&gt;The configured job name that the target belongs to. Defaults to the fully formed component name.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;instance&lt;/td&gt;
              &lt;td&gt;The &lt;code&gt;__address__&lt;/code&gt; or &lt;code&gt;&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt; of the scrape target&amp;rsquo;s URL.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Similarly, these metrics that record the behavior of the scrape targets are
also automatically available.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Metric Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;up&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;1 if the instance is healthy and reachable, or 0 if the scrape failed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_duration_seconds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Duration of the scrape in seconds.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_samples_scraped&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The number of samples the target exposed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_samples_post_metric_relabeling&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The number of samples remaining after metric relabeling was applied.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_series_added&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The approximate number of new series in this scrape.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_timeout_seconds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The configured scrape timeout for a target. Useful for measuring how close a target was to timing out using &lt;code&gt;scrape_duration_seconds / scrape_timeout_seconds&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_sample_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The configured sample limit for a target. Useful for measuring how close a target was to reaching the sample limit using &lt;code&gt;scrape_samples_post_metric_relabeling / (scrape_sample_limit &amp;gt; 0)&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_body_size_bytes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The uncompressed size of the most recent scrape response, if successful. Scrapes failing because the &lt;code&gt;body_size_limit&lt;/code&gt; is exceeded report -1, other scrape failures report 0.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;up&lt;/code&gt; metric is particularly useful for monitoring and alerting on the
health of a scrape job. It is set to &lt;code&gt;0&lt;/code&gt; in case anything goes wrong with the
scrape target, either because it is not reachable, because the connection
times out while scraping, or because the samples from the target could not be
processed. When the target is behaving normally, the &lt;code&gt;up&lt;/code&gt; metric is set to
&lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example sets up the scrape job with certain attributes (scrape
endpoint, scrape interval, query parameters) and lets it scrape two instances
of the &lt;a href=&#34;https://github.com/prometheus/blackbox_exporter/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;blackbox exporter&lt;/a&gt;.
The exposed metrics are sent over to the provided list of receivers, as
defined by other components.&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;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;blackbox_scraper&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;blackbox-exporter:9115&amp;#34;, &amp;#34;instance&amp;#34; = &amp;#34;one&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;blackbox-exporter:9116&amp;#34;, &amp;#34;instance&amp;#34; = &amp;#34;two&amp;#34;},
  ]

  forward_to = [prometheus.remote_write.grafanacloud.receiver, prometheus.remote_write.onprem.receiver]

  scrape_interval = &amp;#34;10s&amp;#34;
  params          = { &amp;#34;target&amp;#34; = [&amp;#34;grafana.com&amp;#34;], &amp;#34;module&amp;#34; = [&amp;#34;http_2xx&amp;#34;] }
  metrics_path    = &amp;#34;/probe&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Here&amp;rsquo;s the the endpoints that are being scraped every 10 seconds:&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;http://blackbox-exporter:9115/probe?target=grafana.com&amp;amp;module=http_2xx
http://blackbox-exporter:9116/probe?target=grafana.com&amp;amp;module=http_2xx&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="prometheusscrape">prometheus.scrape&lt;/h1>
&lt;p>&lt;code>prometheus.scrape&lt;/code> configures a Prometheus scraping job for a given set of
&lt;code>targets&lt;/code>. The scraped metrics are forwarded to the list of receivers passed in
&lt;code>forward_to&lt;/code>.&lt;/p></description></item><item><title>remote.http</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/remote.http/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/remote.http/</guid><content><![CDATA[&lt;h1 id=&#34;remotehttp&#34;&gt;remote.http&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;remote.http&lt;/code&gt; exposes the response body of a URL to other components. The URL
is polled for changes so that the most recent content is always available.&lt;/p&gt;
&lt;p&gt;The most common use of &lt;code&gt;remote.http&lt;/code&gt; is to load discovery targets from an HTTP
server.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;remote.http&lt;/code&gt; components can be specified by giving them different
labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;remote.http &amp;#34;LABEL&amp;#34; {
  url = &amp;#34;URL_TO_POLL&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to poll.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;poll_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Frequency to poll the URL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;poll_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout when polling the URL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;is_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether the response body should be treated as a secret.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;remote.http&lt;/code&gt; performs a poll operation, an HTTP &lt;code&gt;GET&lt;/code&gt; request is made
against the URL specified by the &lt;code&gt;url&lt;/code&gt; argument. A poll is triggered by the
following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When the component first loads.&lt;/li&gt;
&lt;li&gt;Every time the component&amp;rsquo;s arguments get re-evaluated.&lt;/li&gt;
&lt;li&gt;At the frequency specified by the &lt;code&gt;poll_frequency&lt;/code&gt; argument.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The poll is successful if the URL returns a &lt;code&gt;200 OK&lt;/code&gt; response code. All other
response codes are treated as errors and mark the component as unhealthy. After
a successful poll, the response body from the URL is exported.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;remote.http&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;client&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#client-block&#34;&gt;client&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;HTTP client settings when connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; basic_auth&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;basic_auth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic_auth for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; authorization&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authorization-block&#34;&gt;authorization&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; oauth2&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;oauth2&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; oauth2 &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;client &amp;gt; tls_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config-block&#34;&gt;tls_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; symbol indicates deeper levels of nesting. For example, &lt;code&gt;client &amp;gt; basic_auth&lt;/code&gt; refers to an &lt;code&gt;basic_auth&lt;/code&gt; block defined inside a &lt;code&gt;client&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;client-block&#34;&gt;client block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures settings used to connect to the HTTP
server.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to proxy requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http_2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;bearer_token&lt;/code&gt;, &lt;code&gt;bearer_token_file&lt;/code&gt;, &lt;code&gt;basic_auth&lt;/code&gt;, &lt;code&gt;authorization&lt;/code&gt;, and
&lt;code&gt;oauth2&lt;/code&gt; are mutually exclusive and only one can be provided inside of a
&lt;code&gt;http_client_config&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth-block&#34;&gt;basic_auth block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;basic_auth&lt;/code&gt; block configures basic authentication to use when polling the
configured URL.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/basic-auth-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mututally exclusive and only one can be
provided inside of a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;authorization-block&#34;&gt;authorization block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;authorization&lt;/code&gt; block configures custom authorization to use when polling
the configured URL.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/authorization-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credential&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive and only one can be
provided inside of an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2-block&#34;&gt;oauth2 block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block configures OAuth2 authorization to use when polling the
configured URL.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/oauth2-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional proxy URL for OAuth2 requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mututally exclusive and only one
can be provided inside of an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain its own separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config-block&#34;&gt;tls_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls_config&lt;/code&gt; block configures TLS settings for connecting to HTTPS servers.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/tls-config-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; is not provided, the minimum acceptable TLS version is
inherited from Go&amp;rsquo;s default minimum version, TLS 1.2. If &lt;code&gt;min_version&lt;/code&gt; is
provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following field is exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;content&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt; or &lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The contents of the file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If the &lt;code&gt;is_secret&lt;/code&gt; argument was &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;content&lt;/code&gt; is a secret type.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;Instances of &lt;code&gt;remote.http&lt;/code&gt; report as healthy if the most recent HTTP &lt;code&gt;GET&lt;/code&gt;
request of the specified URL succeeds.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;remote.http&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h3 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;remote.http&lt;/code&gt; does not expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example reads a JSON array of objects from an endpoint and uses them as a
set of scrape targets:&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;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;remote.http &amp;#34;targets&amp;#34; {
  url = env(&amp;#34;MY_TARGETS_URL&amp;#34;)
}

prometheus.scrape &amp;#34;default&amp;#34; {
  targets    = json_decode(remote.http.targets.content)
  forward_to = [prometheus.remote_write.default.receiver]
}

prometheus.remote_write &amp;#34;default&amp;#34; {
  client {
    url = env(&amp;#34;PROMETHEUS_URL&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="remotehttp">remote.http&lt;/h1>
&lt;p>&lt;code>remote.http&lt;/code> exposes the response body of a URL to other components. The URL
is polled for changes so that the most recent content is always available.&lt;/p></description></item><item><title>remote.s3</title><link>https://grafana.com/docs/agent/v0.31/flow/reference/components/remote.s3/</link><pubDate>Sat, 11 Apr 2026 12:27:38 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.31/flow/reference/components/remote.s3/</guid><content><![CDATA[&lt;h1 id=&#34;remotes3&#34;&gt;remote.s3&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;remote.s3&lt;/code&gt; exposes the string contents of a file located in &lt;a href=&#34;https://aws.amazon.com/s3/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS S3&lt;/a&gt;
to other components. The file will be polled for changes so that the most
recent content is always available.&lt;/p&gt;
&lt;p&gt;The most common use of &lt;code&gt;remote.s3&lt;/code&gt; is to load secrets from files.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;remote.s3&lt;/code&gt; components can be specified using different name
labels. By default, &lt;a href=&#34;https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS environment variables&lt;/a&gt; are used to authenticate against S3. The &lt;code&gt;key&lt;/code&gt; and &lt;code&gt;secret&lt;/code&gt; arguments inside &lt;code&gt;client_options&lt;/code&gt; blocks can be used to provide custom authentication.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Other S3-compatible systems can be read  with &lt;code&gt;remote.s3&lt;/code&gt; but may require specific
authentication environment variables. There is no  guarantee that &lt;code&gt;remote.s3&lt;/code&gt; will work with non-AWS S3
systems.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;remote.s3 &amp;#34;LABEL&amp;#34; {
  path = S3_FILE_PATH
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path in the format of &lt;code&gt;&amp;quot;s3://bucket/file&amp;quot;&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;poll_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to poll the file for changes. Must be greater than 30 seconds.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;is_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Marks the file as containing a &lt;a href=&#34;../../../config-language/expressions/types_and_values/#secrets&#34;&gt;secret&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;path&lt;/code&gt; must include a full path to a file. This does not support reading of directories.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Hierarchy&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;client_options&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#client_options-block&#34;&gt;client_options&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Additional options for configuring the S3 client.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;client_options-block&#34;&gt;client_options block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client_options&lt;/code&gt; block customizes options to connect to the S3 server.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to override default access key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to override default secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies a custom url to access, used generally for S3-compatible systems.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_ssl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to disable SSL, generally used for testing.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_path_style&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path style is a deprecated setting that is generally enabled for S3 compatible systems.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;region&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to override default region.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;content&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt; or &lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The contents of the file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;content&lt;/code&gt; field will be secret if &lt;code&gt;is_secret&lt;/code&gt; was set to true.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;Instances of &lt;code&gt;remote.s3&lt;/code&gt; report as healthy if the most recent read of
the watched file was successful.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;remote.s3&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h3 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;remote.s3&lt;/code&gt; does not expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&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;remote.s3 &amp;#34;data&amp;#34; {
  path = &amp;#34;s3://test-bucket/file.txt&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="remotes3">remote.s3&lt;/h1>
&lt;p>&lt;code>remote.s3&lt;/code> exposes the string contents of a file located in &lt;a href="https://aws.amazon.com/s3/" target="_blank" rel="noopener noreferrer">AWS S3&lt;/a>
to other components. The file will be polled for changes so that the most
recent content is always available.&lt;/p></description></item></channel></rss>