<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Components reference on Grafana Labs</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/</link><description>Recent content in Components reference on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/agent/v0.42/flow/reference/components/index.xml" rel="self" type="application/rss+xml"/><item><title>discovery.azure</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.azure/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.azure/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryazure&#34;&gt;discovery.azure&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.azure&lt;/code&gt; discovers &lt;a href=&#34;https://azure.microsoft.com/en-us&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure&lt;/a&gt; Virtual Machines 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.azure &amp;#34;LABEL&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;environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Azure environment.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;AzurePublicCloud&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;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 be appended to the &lt;code&gt;__address__&lt;/code&gt; label for each target.&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;subscription_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Azure subscription 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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Interval at which to refresh the list of targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5m&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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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_http2&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;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.azure&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;oauth&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth-block&#34;&gt;oauth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;OAuth configuration for Azure API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;managed_identity&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#managed_identity-block&#34;&gt;managed_identity&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Managed Identity configuration for Azure API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&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;TLS configuration for requests to the Azure API.&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 the &lt;code&gt;oauth&lt;/code&gt; or &lt;code&gt;managed_identity&lt;/code&gt; blocks must be specified.&lt;/p&gt;
&lt;h3 id=&#34;oauth-block&#34;&gt;oauth block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;oauth&lt;/code&gt; block configures OAuth authentication for the Azure API.&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;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth client ID.&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;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth client secret.&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;OAuth tenant ID.&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;managed_identity-block&#34;&gt;managed_identity block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;managed_identity&lt;/code&gt; block configures Managed Identity authentication for the Azure API.&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;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Managed Identity client ID.&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_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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Azure 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_azure_subscription_id&lt;/code&gt;: The Azure subscription ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_tenant_id&lt;/code&gt;: The Azure tenant ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_id&lt;/code&gt;: The UUID of the Azure VM.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_resource_group&lt;/code&gt;: The name of the resource group the VM is in.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_name&lt;/code&gt;: The name of the VM.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_computer_name&lt;/code&gt;: The host OS name of the VM.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_os_type&lt;/code&gt;: The OS the VM is running (either &lt;code&gt;Linux&lt;/code&gt; or &lt;code&gt;Windows&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_location&lt;/code&gt;: The region the VM is in.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_private_ip&lt;/code&gt;: The private IP address of the VM.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_public_ip&lt;/code&gt;: The public IP address of the VM.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_tag_*&lt;/code&gt;: A tag on the VM. There will be one label per tag.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_scale_set&lt;/code&gt;: The name of the scale set the VM is in.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_azure_machine_size&lt;/code&gt;: The size of the VM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each discovered VM maps to a single target. The &lt;code&gt;__address__&lt;/code&gt; label is set to the &lt;code&gt;private_ip:port&lt;/code&gt; (&lt;code&gt;[private_ip]:port&lt;/code&gt; if the private IP is an IPv6 address) of the VM.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.azure&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.azure&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;discovery.azure&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.azure &amp;#34;example&amp;#34; {
  port = 80
  subscription_id = AZURE_SUBSCRIPTION_ID
  oauth {
      client_id = AZURE_CLIENT_ID
      client_secret = AZURE_CLIENT_SECRET
      tenant_id = AZURE_TENANT_ID
  }
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.azure.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;AZURE_SUBSCRIPTION_ID&lt;/code&gt;: Your Azure subscription ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AZURE_CLIENT_ID&lt;/code&gt;: Your Azure client ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AZURE_CLIENT_SECRET&lt;/code&gt;: Your Azure client secret.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AZURE_TENANT_ID&lt;/code&gt;: Your Azure tenant ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.azure&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryazure">discovery.azure&lt;/h1>
&lt;p>&lt;code>discovery.azure&lt;/code> discovers &lt;a href="https://azure.microsoft.com/en-us" target="_blank" rel="noopener noreferrer">Azure&lt;/a> Virtual Machines 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.azure &amp;#34;LABEL&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.consul</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.consul/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.consul/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryconsul&#34;&gt;discovery.consul&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.consul&lt;/code&gt; allows retrieving scrape targets from &lt;a href=&#34;https://www.consul.io/use-cases/discover-services&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Consul&amp;rsquo;s Catalog API&lt;/a&gt;.&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.consul &amp;#34;LABEL&amp;#34; {
  server = CONSUL_SERVER
}&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;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Host and port of the Consul API.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;localhost:8500&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;token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret token used to access the Consul API.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;datacenter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Datacenter to query. If not provided, the default is used.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Namespace to use (only supported in Consul Enterprise).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;partition&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Admin partition to use (only supported in Consul Enterprise).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tag_separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The string by which Consul tags are joined into the tag label.&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;scheme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The scheme to use when talking to Consul.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http&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;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The username to use (deprecated in favor of the basic_auth configuration).&lt;/td&gt;
              &lt;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;The password to use (deprecated in favor of the basic_auth configuration).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allow_stale&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allow stale Consul results (see &lt;a href=&#34;https://www.consul.io/api/features/consistency.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;official documentation&lt;/a&gt;). Will reduce load on Consul.&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;services&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 services for which targets are retrieved. If omitted, all services are 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;tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An optional list of tags used to filter nodes for a given service. Services must contain all tags in the list.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;node_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Node metadata key/value pairs to filter nodes for a given service.&lt;/td&gt;
              &lt;td&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;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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.consul&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Consul catalog 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_consul_address&lt;/code&gt;: the address of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_dc&lt;/code&gt;: the datacenter name for the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_health&lt;/code&gt;: the health status of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_partition&lt;/code&gt;: the admin partition name where the service is registered.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_metadata_&amp;lt;key&amp;gt;&lt;/code&gt;: each node metadata key value of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_node&lt;/code&gt;: the node name defined for the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_service_address&lt;/code&gt;: the service address of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_service_id&lt;/code&gt;: the service ID of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_service_metadata_&amp;lt;key&amp;gt;&lt;/code&gt;: each service metadata key value of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_service_port&lt;/code&gt;: the service port of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_service&lt;/code&gt;: the name of the service the target belongs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_tagged_address_&amp;lt;key&amp;gt;&lt;/code&gt;: each node tagged address key value of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consul_tags&lt;/code&gt;: the list of tags of the target joined by the tag separator.&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.consul&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.consul&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;discovery.consul&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 targets from Consul for the specified list of services:&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.consul &amp;#34;example&amp;#34; {
  server = &amp;#34;localhost:8500&amp;#34;
  services = [
    &amp;#34;service1&amp;#34;,
    &amp;#34;service2&amp;#34;,
  ]
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.consul.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.consul&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryconsul">discovery.consul&lt;/h1>
&lt;p>&lt;code>discovery.consul&lt;/code> allows retrieving scrape targets from &lt;a href="https://www.consul.io/use-cases/discover-services" target="_blank" rel="noopener noreferrer">Consul&amp;rsquo;s Catalog API&lt;/a>.&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.consul &amp;#34;LABEL&amp;#34; {
server = CONSUL_SERVER
}&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.consulagent</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.consulagent/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.consulagent/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryconsulagent&#34;&gt;discovery.consulagent&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.consulagent&lt;/code&gt; allows you to retrieve scrape targets from &lt;a href=&#34;https://developer.hashicorp.com/consul/api-docs/agent&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Consul&amp;rsquo;s Agent API&lt;/a&gt;.
Only the services registered with the local agent running on the same host will be watched.
This is suitable for very large Consul clusters for which using the Catalog API would be too slow or resource intensive.&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.consulagent &amp;#34;LABEL&amp;#34; {
  server = CONSUL_SERVER
}&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;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Host and port of the Consul Agent API.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;localhost:8500&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;token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret token used to access the Consul Agent API.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;datacenter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Datacenter in which the Consul Agent is configured to run. If not provided, the datacenter will be retrieved from the local Consul Agent.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tag_separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The string by which Consul tags are joined into the tag label.&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;scheme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The scheme to use when talking to the Consul Agent.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http&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;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The username to use.&lt;/td&gt;
              &lt;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;The password to use.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;services&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 services for which targets are retrieved. If omitted, all services are 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;tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An optional list of tags used to filter nodes for a given service. Services must contain all tags in the list.&lt;/td&gt;
              &lt;td&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;30s&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.consulagent&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;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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Consul Agent 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_consulagent_address&lt;/code&gt;: the address of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_dc&lt;/code&gt;: the datacenter name for the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_health&lt;/code&gt;: the health status of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_metadata_&amp;lt;key&amp;gt;&lt;/code&gt;: each node metadata key value of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_node&lt;/code&gt;: the node name defined for the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_service&lt;/code&gt;: the name of the service the target belongs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_service_address&lt;/code&gt;: the service address of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_service_id&lt;/code&gt;: the service ID of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_service_metadata_&amp;lt;key&amp;gt;&lt;/code&gt;: each service metadata key value of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_service_port&lt;/code&gt;: the service port of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_tagged_address_&amp;lt;key&amp;gt;&lt;/code&gt;: each node tagged address key value of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_consulagent_tags&lt;/code&gt;: the list of tags of the target joined by the tag separator.&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.consulagent&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.consulagent&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;discovery_consulagent_rpc_failures_total&lt;/code&gt; (Counter): The number of Consul Agent RPC call failures.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;discovery_consulagent_rpc_duration_seconds&lt;/code&gt; (SummaryVec): The duration of a Consul Agent RPC call in seconds.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;!-- TODO: Include a logging example --&gt;
&lt;p&gt;This example discovers targets from a Consul Agent for the specified list of services:&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.consulagent &amp;#34;example&amp;#34; {
  server = &amp;#34;localhost:8500&amp;#34;
  services = [
    &amp;#34;service1&amp;#34;,
    &amp;#34;service2&amp;#34;,
  ]
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.consul.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.consulagent&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryconsulagent">discovery.consulagent&lt;/h1>
&lt;p>&lt;code>discovery.consulagent&lt;/code> allows you to retrieve scrape targets from &lt;a href="https://developer.hashicorp.com/consul/api-docs/agent" target="_blank" rel="noopener noreferrer">Consul&amp;rsquo;s Agent API&lt;/a>.
Only the services registered with the local agent running on the same host will be watched.
This is suitable for very large Consul clusters for which using the Catalog API would be too slow or resource intensive.&lt;/p></description></item><item><title>discovery.digitalocean</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.digitalocean/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.digitalocean/</guid><content><![CDATA[&lt;h1 id=&#34;discoverydigitalocean&#34;&gt;discovery.digitalocean&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.digitalocean&lt;/code&gt; discovers &lt;a href=&#34;https://www.digitalocean.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;DigitalOcean&lt;/a&gt; Droplets 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.digitalocean &amp;#34;LABEL&amp;#34; {
    // Use one of:
    // bearer_token      = BEARER_TOKEN
    // bearer_token_file = PATH_TO_BEARER_TOKEN_FILE
}&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;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 be appended to the &lt;code&gt;__address__&lt;/code&gt; label for each Droplet.&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;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 Droplets.&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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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_http2&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;The DigitalOcean API uses bearer tokens for authentication, see more about it in the &lt;a href=&#34;https://docs.digitalocean.com/reference/api/api-reference/#section/Authentication&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;DigitalOcean API documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Exactly one of the &lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/a&gt; and &lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/a&gt; arguments must be specified to authenticate against DigitalOcean.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;discovery.digitalocean&lt;/code&gt; component does not support any 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;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 DigitalOcean 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_digitalocean_droplet_id&lt;/code&gt;: ID of the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_droplet_name&lt;/code&gt;: Name of the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_image&lt;/code&gt;: The image slug (unique text identifier of the image) used to create the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_image_name&lt;/code&gt;: Name of the image used to create the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_private_ipv4&lt;/code&gt;: The private IPv4 address of the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_public_ipv4&lt;/code&gt;: The public IPv4 address of the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_public_ipv6&lt;/code&gt;: The public IPv6 address of the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_region&lt;/code&gt;: The region the Droplet is running in.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_size&lt;/code&gt;: The size of the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_status&lt;/code&gt;: The current status of the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_features&lt;/code&gt;: Optional properties configured for the Droplet, such as IPV6 networking, private networking, or backups.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_tags&lt;/code&gt;: The tags assigned to the Droplet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_digitalocean_vpc&lt;/code&gt;: The ID of the VPC where the Droplet is located.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each discovered Droplet maps to one target.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.digitalocean&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.digitalocean&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;discovery.digitalocean&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 would result in targets with &lt;code&gt;__address__&lt;/code&gt; labels like: &lt;code&gt;192.0.2.1:8080&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;discovery.digitalocean &amp;#34;example&amp;#34; {
  port             = 8080
  refresh_interval = &amp;#34;5m&amp;#34;
  bearer_token     = &amp;#34;my-secret-bearer-token&amp;#34;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.digitalocean.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.digitalocean&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverydigitalocean">discovery.digitalocean&lt;/h1>
&lt;p>&lt;code>discovery.digitalocean&lt;/code> discovers &lt;a href="https://www.digitalocean.com/" target="_blank" rel="noopener noreferrer">DigitalOcean&lt;/a> Droplets 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.digitalocean &amp;#34;LABEL&amp;#34; {
// Use one of:
// bearer_token = BEARER_TOKEN
// bearer_token_file = PATH_TO_BEARER_TOKEN_FILE
}&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.dns</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.dns/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.dns/</guid><content><![CDATA[&lt;h1 id=&#34;discoverydns&#34;&gt;discovery.dns&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.dns&lt;/code&gt; discovers scrape targets from DNS records.&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.dns &amp;#34;LABEL&amp;#34; {
  names = [NAME_1, NAME_2, ...]
}&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;names&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;DNS names to look up.&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. Not used for SRV records.&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;refresh_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 query DNS for updates.&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;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Type of DNS record to query. Must be one of SRV, A, AAAA, or MX.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;SRV&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 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;/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_dns_name&lt;/code&gt;: Name of the record that produced the discovered target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dns_srv_record_target&lt;/code&gt;: Target field of the SRV record.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dns_srv_record_port&lt;/code&gt;: Port field of the SRV record.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dns_mx_record_target&lt;/code&gt;: Target field of the MX record.&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.dns&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.dns&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;discovery.dns&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 targets from an A record.&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.dns &amp;#34;dns_lookup&amp;#34; {
  names = [&amp;#34;myservice.example.com&amp;#34;, &amp;#34;myotherservice.example.com&amp;#34;]
  type = &amp;#34;A&amp;#34;
  port = 8080
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.dns.dns_lookup.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.dns&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverydns">discovery.dns&lt;/h1>
&lt;p>&lt;code>discovery.dns&lt;/code> discovers scrape targets from DNS records.&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.dns &amp;#34;LABEL&amp;#34; {
names = [NAME_1, NAME_2, ...]
}&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.docker</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.docker/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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 = DOCKER_ENGINE_HOST
}&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&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;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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&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;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.docker.containers.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&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;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.docker.containers.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.docker&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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 = DOCKER_ENGINE_HOST
}&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.dockerswarm</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.dockerswarm/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.dockerswarm/</guid><content><![CDATA[&lt;h1 id=&#34;discoverydockerswarm&#34;&gt;discovery.dockerswarm&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.dockerswarm&lt;/code&gt; allows you to retrieve scrape targets from &lt;a href=&#34;https://docs.docker.com/engine/swarm/key-concepts/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Docker Swarm&lt;/a&gt;.&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.dockerswarm &amp;#34;LABEL&amp;#34; {
  host = &amp;#34;DOCKER_DAEMON_HOST&amp;#34;
  role = &amp;#34;SWARM_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;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.&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;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 targets to retrieve. Must be &lt;code&gt;services&lt;/code&gt;, &lt;code&gt;tasks&lt;/code&gt;, or &lt;code&gt;nodes&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;port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The port to scrape metrics from, when &lt;code&gt;role&lt;/code&gt; is nodes, and for discovered tasks and services that don&amp;rsquo;t have published ports.&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Interval at which to refresh the list of targets.&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.dockerswarm&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;Optional filter to limit the discovery process to a subset of available resources.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;filter-block&#34;&gt;filter block&lt;/h3&gt;
&lt;p&gt;Filters can be used to limit the discovery process to a subset of available resources.
It is possible to define multiple &lt;code&gt;filter&lt;/code&gt; blocks within the &lt;code&gt;discovery.dockerswarm&lt;/code&gt; block.
The list of available filters depends on the &lt;code&gt;role&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.docker.com/engine/api/v1.40/#operation/ServiceList&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;services filters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.docker.com/engine/api/v1.40/#operation/TaskList&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;tasks filters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.docker.com/engine/api/v1.40/#operation/NodeList&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;nodes filters&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following arguments can be used to configure a 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;Name of the filter.&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;List of values associated with 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;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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Swarm.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;roles&#34;&gt;Roles&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;role&lt;/code&gt; attribute decides the role of the targets to retrieve.&lt;/p&gt;
&lt;h3 id=&#34;services&#34;&gt;services&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;services&lt;/code&gt; role discovers all &lt;a href=&#34;https://docs.docker.com/engine/swarm/key-concepts/#services-and-tasks&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Swarm services&lt;/a&gt; and exposes their ports as targets. For each published port of a service, a single target is generated. If a service has no published ports, a target per service is created using the &lt;code&gt;port&lt;/code&gt; attribute defined in the arguments.&lt;/p&gt;
&lt;p&gt;Available meta labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_id&lt;/code&gt;: the ID of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_name&lt;/code&gt;: the name of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_mode&lt;/code&gt;: the mode of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_endpoint_port_name&lt;/code&gt;: the name of the endpoint port, if available.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_endpoint_port_publish_mode&lt;/code&gt;: the publish mode of the endpoint port.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: each label of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_task_container_hostname&lt;/code&gt;: the container hostname of the target, if available.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_task_container_image&lt;/code&gt;: the container image of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_updating_status&lt;/code&gt;: the status of the service, if available.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_id&lt;/code&gt;: the ID of the network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_name&lt;/code&gt;: the name of the network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_ingress&lt;/code&gt;: whether the network is ingress.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_internal&lt;/code&gt;: whether the network is internal.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: each label of the network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_scope&lt;/code&gt;: the scope of the network.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;tasks&#34;&gt;tasks&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tasks&lt;/code&gt; role discovers all &lt;a href=&#34;https://docs.docker.com/engine/swarm/key-concepts/#services-and-tasks&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Swarm tasks&lt;/a&gt; and exposes their ports as targets. For each published port of a task, a single target is generated. If a task has no published ports, a target per task is created using the &lt;code&gt;port&lt;/code&gt; attribute defined in the arguments.&lt;/p&gt;
&lt;p&gt;Available meta labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_container_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: each label of the container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_task_id&lt;/code&gt;: the ID of the task.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_task_container_id&lt;/code&gt;: the container ID of the task.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_task_desired_state&lt;/code&gt;: the desired state of the task.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_task_slot&lt;/code&gt;: the slot of the task.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_task_state&lt;/code&gt;: the state of the task.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_task_port_publish_mode&lt;/code&gt;: the publish mode of the task port.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_id&lt;/code&gt;: the ID of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_name&lt;/code&gt;: the name of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_mode&lt;/code&gt;: the mode of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: each label of the service.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_id&lt;/code&gt;: the ID of the network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_name&lt;/code&gt;: the name of the network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_ingress&lt;/code&gt;: whether the network is ingress.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_internal&lt;/code&gt;: whether the network is internal.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: each label of the network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_label&lt;/code&gt;: each label of the network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_network_scope&lt;/code&gt;: the scope of the network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_id&lt;/code&gt;: the ID of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_hostname&lt;/code&gt;: the hostname of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_address&lt;/code&gt;: the address of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_availability&lt;/code&gt;: the availability of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: each label of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_platform_architecture&lt;/code&gt;: the architecture of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_platform_os&lt;/code&gt;: the operating system of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_role&lt;/code&gt;: the role of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_status&lt;/code&gt;: the status of the node.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;__meta_dockerswarm_network_*&lt;/code&gt; meta labels are not populated for ports which are published with mode=host.&lt;/p&gt;
&lt;h3 id=&#34;nodes&#34;&gt;nodes&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;nodes&lt;/code&gt; role is used to discover &lt;a href=&#34;https://docs.docker.com/engine/swarm/key-concepts/#nodes&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Swarm nodes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Available meta labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_address&lt;/code&gt;: the address of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_availability&lt;/code&gt;: the availability of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_engine_version&lt;/code&gt;: the version of the node engine.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_hostname&lt;/code&gt;: the hostname of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_id&lt;/code&gt;: the ID of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: each label of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_manager_address&lt;/code&gt;: the address of the manager component of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_manager_leader&lt;/code&gt;: the leadership status of the manager component of the node (true or false).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_manager_reachability&lt;/code&gt;: the reachability of the manager component of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_platform_architecture&lt;/code&gt;: the architecture of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_platform_os&lt;/code&gt;: the operating system of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_role&lt;/code&gt;: the role of the node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_node_status&lt;/code&gt;: the status of the node.&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.dockerswarm&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.dockerswarm&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;discovery.dockerswarm&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 targets from Docker Swarm tasks:&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.dockerswarm &amp;#34;example&amp;#34; {
  host = &amp;#34;unix:///var/run/docker.sock&amp;#34;
  role = &amp;#34;tasks&amp;#34;

  filter {
    name = &amp;#34;id&amp;#34;
    values = [&amp;#34;0kzzo1i0y4jz6027t0k7aezc7&amp;#34;]
  }

  filter {
    name = &amp;#34;desired-state&amp;#34;
    values = [&amp;#34;running&amp;#34;, &amp;#34;accepted&amp;#34;]
  }
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.dockerswarm.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.dockerswarm&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverydockerswarm">discovery.dockerswarm&lt;/h1>
&lt;p>&lt;code>discovery.dockerswarm&lt;/code> allows you to retrieve scrape targets from &lt;a href="https://docs.docker.com/engine/swarm/key-concepts/" target="_blank" rel="noopener noreferrer">Docker Swarm&lt;/a>.&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.dockerswarm &amp;#34;LABEL&amp;#34; {
host = &amp;#34;DOCKER_DAEMON_HOST&amp;#34;
role = &amp;#34;SWARM_ROLE&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.ec2</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.ec2/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.ec2/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryec2&#34;&gt;discovery.ec2&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.ec2&lt;/code&gt; lets you retrieve scrape targets from EC2 instances. The private IP address is used by default, but you can change it to the public IP address using relabeling.&lt;/p&gt;
&lt;p&gt;The IAM credentials used must have the &lt;code&gt;ec2:DescribeInstances&lt;/code&gt; permission to discover scrape targets, and may optionally have the &lt;code&gt;ec2:DescribeAvailabilityZones&lt;/code&gt; permission to make the availability zone ID available as a label.&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.ec2 &amp;#34;LABEL&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;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom endpoint to be used.&lt;/td&gt;
              &lt;td&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;The AWS region. If blank, the region from the instance metadata is used.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;access_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The AWS API key ID. If blank, the environment variable &lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt; is used.&lt;/td&gt;
              &lt;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_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The AWS API key secret. If blank, the environment variable &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt; is used.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Named AWS profile used to connect to the API.&lt;/td&gt;
              &lt;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_arn&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS Role Amazon Resource Name (ARN), an alternative to using AWS API keys.&lt;/td&gt;
              &lt;td&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;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Refresh interval to re-read the instance list.&lt;/td&gt;
              &lt;td&gt;60s&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 port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule.&lt;/td&gt;
              &lt;td&gt;80&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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;basic_auth&lt;/code&gt; block][basic_auth].&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

 
 &lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
             &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
 names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
 is configured.&lt;/p&gt;
 &lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
 and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
 the environment variable matching their scheme, unless excluded by NO_PROXY.
 &lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
 is configured.&lt;/p&gt;
 &lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
 &lt;/div&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.ec2&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;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;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;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;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;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;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;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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;filter-block&#34;&gt;filter block&lt;/h3&gt;
&lt;p&gt;Filters can be used optionally to filter the instance list by other criteria.
Available filter criteria can be found in the &lt;a href=&#34;https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Amazon EC2 documentation&lt;/a&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;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 the &lt;a href=&#34;https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Filter.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Filter API AWS EC2 documentation&lt;/a&gt; for the list of supported filters and their descriptions.&lt;/p&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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 discovered EC2 targets.&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_ec2_ami&lt;/code&gt;: The EC2 Amazon Machine Image.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_architecture&lt;/code&gt;: The architecture of the instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_availability_zone&lt;/code&gt;: The availability zone in which the instance is running.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_availability_zone_id&lt;/code&gt;: The availability zone ID in which the instance is running (requires &lt;code&gt;ec2:DescribeAvailabilityZones&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_instance_id&lt;/code&gt;: The EC2 instance ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_instance_lifecycle&lt;/code&gt;: The lifecycle of the EC2 instance, set only for &amp;lsquo;spot&amp;rsquo; or &amp;lsquo;scheduled&amp;rsquo; instances, absent otherwise.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_instance_state&lt;/code&gt;: The state of the EC2 instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_instance_type&lt;/code&gt;: The type of the EC2 instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_ipv6_addresses&lt;/code&gt;: Comma-separated list of IPv6 addresses assigned to the instance&amp;rsquo;s network interfaces, if present.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_owner_id&lt;/code&gt;: The ID of the AWS account that owns the EC2 instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_platform&lt;/code&gt;: The Operating System platform, set to &amp;lsquo;windows&amp;rsquo; on Windows servers, absent otherwise.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_primary_subnet_id&lt;/code&gt;: The subnet ID of the primary network interface, if available.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_private_dns_name&lt;/code&gt;: The private DNS name of the instance, if available.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_private_ip&lt;/code&gt;: The private IP address of the instance, if present.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_public_dns_name&lt;/code&gt;: The public DNS name of the instance, if available.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_public_ip&lt;/code&gt;: The public IP address of the instance, if available.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_region&lt;/code&gt;: The region of the instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_subnet_id&lt;/code&gt;: Comma-separated list of subnets IDs in which the instance is running, if available.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_tag_&amp;lt;tagkey&amp;gt;&lt;/code&gt;: Each tag value of the instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ec2_vpc_id&lt;/code&gt;: The ID of the VPC in which the instance is running, if available.&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.ec2&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.ec2&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;discovery.ec2&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.ec2 &amp;#34;ec2&amp;#34; {
  region = &amp;#34;us-east-1&amp;#34;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.ec2.ec2.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.ec2&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryec2">discovery.ec2&lt;/h1>
&lt;p>&lt;code>discovery.ec2&lt;/code> lets you retrieve scrape targets from EC2 instances. The private IP address is used by default, but you can change it to the public IP address using relabeling.&lt;/p></description></item><item><title>discovery.eureka</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.eureka/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.eureka/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryeureka&#34;&gt;discovery.eureka&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.eureka&lt;/code&gt; discovers instances in a &lt;a href=&#34;https://github.com/Netflix/eureka/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Eureka&lt;/a&gt; Registry 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.eureka &amp;#34;LABEL&amp;#34; {
    server = SERVER
}&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;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Eureka server URL.&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Interval at which to refresh the list of targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;30s&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.eureka&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Eureka 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_eureka_app_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_hostname&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_homepage_url&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_statuspage_url&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_healthcheck_url&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_ip_addr&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_vip_address&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_secure_vip_address&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_status&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_port&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_port_enabled&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_secure_port&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_secure_port_enabled&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_datacenterinfo_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_datacenterinfo_metadata_&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_country_id&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_id&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_eureka_app_instance_metadata_&lt;/code&gt;&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.eureka&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.eureka&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;discovery.eureka&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.eureka &amp;#34;example&amp;#34; {
    server = &amp;#34;https://eureka.example.com/eureka/v1&amp;#34;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.eureka.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.eureka&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryeureka">discovery.eureka&lt;/h1>
&lt;p>&lt;code>discovery.eureka&lt;/code> discovers instances in a &lt;a href="https://github.com/Netflix/eureka/" target="_blank" rel="noopener noreferrer">Eureka&lt;/a> Registry 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.eureka &amp;#34;LABEL&amp;#34; {
server = SERVER
}&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.42/flow/reference/components/discovery.file/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.file/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryfile&#34;&gt;discovery.file&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; In Grafana Agent &lt;code&gt;v0.35.0&lt;/code&gt;, the &lt;code&gt;discovery.file&lt;/code&gt; component was renamed to &lt;a href=&#34;../local.file_match/&#34;&gt;local.file_match&lt;/a&gt;,
and &lt;code&gt;discovery.file&lt;/code&gt; was repurposed to discover scrape targets from one or more files.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;If you are trying to discover files on the local filesystem rather than scrape
targets within a set of files, you should use &lt;a href=&#34;../local.file_match/&#34;&gt;local.file_match&lt;/a&gt; instead.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;code&gt;discovery.file&lt;/code&gt; discovers targets from a set of files, similar to the &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus file_sd_config&lt;/a&gt;.&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; {
  files = [FILE_PATH_1, FILE_PATH_2, ...]
}&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;files&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Files to read and discover targets 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;refresh_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 sync targets.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;5m&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 last path segment of each element in &lt;code&gt;files&lt;/code&gt; may contain a single * that matches any character sequence, e.g. &lt;code&gt;my/path/tg_*.json&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;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;__meta_filepath&lt;/code&gt;: The absolute path to the file the target was discovered from.&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;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&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;h3 id=&#34;example-target-files&#34;&gt;Example target files&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&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-json&#34;&gt;[
  {
    &amp;#34;targets&amp;#34;: [ &amp;#34;127.0.0.1:9091&amp;#34;, &amp;#34;127.0.0.1:9092&amp;#34; ],
    &amp;#34;labels&amp;#34;: {
      &amp;#34;environment&amp;#34;: &amp;#34;dev&amp;#34;
    }
  },
  {
    &amp;#34;targets&amp;#34;: [ &amp;#34;127.0.0.1:9093&amp;#34; ],
    &amp;#34;labels&amp;#34;: {
      &amp;#34;environment&amp;#34;: &amp;#34;prod&amp;#34;
    }
  }
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;- targets:
  - 127.0.0.1:9999
  - 127.0.0.1:10101
  labels:
    job: worker
- targets:
  - 127.0.0.1:9090
  labels:
    job: prometheus&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;basic-file-discovery&#34;&gt;Basic file discovery&lt;/h3&gt;
&lt;p&gt;This example discovers targets from a single file, scrapes them, and writes metrics
to a Prometheus remote write 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;discovery.file &amp;#34;example&amp;#34; {
  files = [&amp;#34;/tmp/example.json&amp;#34;]
}

prometheus.scrape &amp;#34;default&amp;#34; {
  targets    = discovery.file.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;file-discovery-with-retained-file-path-label&#34;&gt;File discovery with retained file path label&lt;/h3&gt;
&lt;p&gt;This example discovers targets from a wildcard file path, scrapes them, and writes metrics
to a Prometheus remote write endpoint.&lt;/p&gt;
&lt;p&gt;It also uses a relabeling rule to retain the file path as a label on each target.&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;example&amp;#34; {
  files = [&amp;#34;/tmp/example_*.yaml&amp;#34;]
}

discovery.relabel &amp;#34;keep_filepath&amp;#34; {
  targets = discovery.file.example.targets
  rule {
    source_labels = [&amp;#34;__meta_filepath&amp;#34;]
    target_label = &amp;#34;filepath&amp;#34;
  }
}

prometheus.scrape &amp;#34;default&amp;#34; {
  targets    = discovery.relabel.keep_filepath.output
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.file&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryfile">discovery.file&lt;/h1>
&lt;blockquote>
&lt;p>&lt;strong>NOTE:&lt;/strong> In Grafana Agent &lt;code>v0.35.0&lt;/code>, the &lt;code>discovery.file&lt;/code> component was renamed to &lt;a href="../local.file_match/">local.file_match&lt;/a>,
and &lt;code>discovery.file&lt;/code> was repurposed to discover scrape targets from one or more files.&lt;/p></description></item><item><title>discovery.gce</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.gce/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.gce/</guid><content><![CDATA[&lt;h1 id=&#34;discoverygce&#34;&gt;discovery.gce&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.gce&lt;/code&gt; allows retrieving scrape targets from &lt;a href=&#34;https://cloud.google.com/compute&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Google Compute Engine&lt;/a&gt; (GCE) instances. The private IP address is used by default, but may be changed to the public IP address with relabeling.&lt;/p&gt;
&lt;p&gt;Credentials are discovered by the Google Cloud SDK default client by looking in the following places, preferring the first location found:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;a JSON file specified by the &lt;code&gt;GOOGLE_APPLICATION_CREDENTIALS&lt;/code&gt; environment variable.&lt;/li&gt;
&lt;li&gt;a JSON file in the well-known path &lt;code&gt;$HOME/.config/gcloud/application_default_credentials.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;fetched from the GCE metadata server.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If the Agent is running within GCE, the service account associated with the instance it is running on should have at least read-only permissions to the compute resources. If running outside of GCE make sure to create an appropriate service account and place the credential file in one of the expected locations.&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.gce &amp;#34;LABEL&amp;#34; {
  project = PROJECT_NAME
  zone    = ZONE_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;project&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.&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&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The zone of the scrape targets.&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;filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter can be used optionally to filter the instance list by other criteria.&lt;/td&gt;
              &lt;td&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;Refresh interval to re-read the instance list.&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;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 to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule.&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;tag_separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The tag separator is used to separate the tags on concatenation.&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;For more information on the syntax of the &lt;code&gt;filter&lt;/code&gt; argument, refer to Google&amp;rsquo;s &lt;code&gt;filter&lt;/code&gt; documentation for &lt;a href=&#34;https://cloud.google.com/compute/docs/reference/latest/instances/list&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Method: instances.list&lt;/a&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;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 discovered GCE targets.&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_gce_instance_id&lt;/code&gt;: the numeric id of the instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_instance_name&lt;/code&gt;: the name of the instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_label_LABEL_NAME&lt;/code&gt;: each GCE label of the instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_machine_type&lt;/code&gt;: full or partial URL of the machine type of the instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_metadata_NAME&lt;/code&gt;: each metadata item of the instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_network&lt;/code&gt;: the network URL of the instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_private_ip&lt;/code&gt;: the private IP address of the instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_interface_ipv4_NAME&lt;/code&gt;: IPv4 address of each named interface&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_project&lt;/code&gt;: the GCP project in which the instance is running&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_public_ip&lt;/code&gt;: the public IP address of the instance, if present&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_subnetwork&lt;/code&gt;: the subnetwork URL of the instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_tags&lt;/code&gt;: comma separated list of instance tags&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_gce_zone&lt;/code&gt;: the GCE zone URL in which the instance is running&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.gce&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.gce&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;discovery.gce&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.gce &amp;#34;gce&amp;#34; {
  project = &amp;#34;agent&amp;#34;
  zone    = &amp;#34;us-east1-a&amp;#34;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.gce.gce.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.gce&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverygce">discovery.gce&lt;/h1>
&lt;p>&lt;code>discovery.gce&lt;/code> allows retrieving scrape targets from &lt;a href="https://cloud.google.com/compute" target="_blank" rel="noopener noreferrer">Google Compute Engine&lt;/a> (GCE) instances. The private IP address is used by default, but may be changed to the public IP address with relabeling.&lt;/p></description></item><item><title>discovery.hetzner</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.hetzner/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.hetzner/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryhetzner&#34;&gt;discovery.hetzner&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.hetzner&lt;/code&gt; allows retrieving scrape targets from &lt;a href=&#34;https://www.hetzner.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Hetzner Cloud API&lt;/a&gt; and &lt;a href=&#34;https://docs.hetzner.com/robot/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Robot API&lt;/a&gt;.
This service discovery uses the public IPv4 address by default, but that can be changed with relabeling.&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.hetzner &amp;#34;LABEL&amp;#34; {
  role = HETZNER_ROLE
}&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;role&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Hetzner role of entities that should be discovered.&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;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The port to scrape metrics from.&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time after which the servers are refreshed.&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;role&lt;/code&gt; must be one of &lt;code&gt;robot&lt;/code&gt; or &lt;code&gt;hcloud&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.hetzner&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Hetzner catalog 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_hetzner_server_id&lt;/code&gt;: the ID of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_server_name&lt;/code&gt;: the name of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_server_status&lt;/code&gt;: the status of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_public_ipv4&lt;/code&gt;: the public ipv4 address of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_public_ipv6_network&lt;/code&gt;: the public ipv6 network (/64) of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_datacenter&lt;/code&gt;: the datacenter of the server&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;hcloud&#34;&gt;&lt;code&gt;hcloud&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The labels below are only available for targets with &lt;code&gt;role&lt;/code&gt; set to &lt;code&gt;hcloud&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_image_name&lt;/code&gt;: the image name of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_image_description&lt;/code&gt;: the description of the server image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_image_os_flavor&lt;/code&gt;: the OS flavor of the server image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_image_os_version&lt;/code&gt;: the OS version of the server image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_datacenter_location&lt;/code&gt;: the location of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_datacenter_location_network_zone&lt;/code&gt;: the network zone of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_server_type&lt;/code&gt;: the type of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_cpu_cores&lt;/code&gt;: the CPU cores count of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_cpu_type&lt;/code&gt;: the CPU type of the server (shared or dedicated)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_memory_size_gb&lt;/code&gt;: the amount of memory of the server (in GB)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_disk_size_gb&lt;/code&gt;: the disk size of the server (in GB)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_private_ipv4_&amp;lt;networkname&amp;gt;&lt;/code&gt;: the private ipv4 address of the server within a given network&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: each label of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_hcloud_labelpresent_&amp;lt;labelname&amp;gt;&lt;/code&gt;: &lt;code&gt;true&lt;/code&gt; for each label of the server&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;robot&#34;&gt;&lt;code&gt;robot&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The labels below are only available for targets with &lt;code&gt;role&lt;/code&gt; set to &lt;code&gt;robot&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_robot_product&lt;/code&gt;: the product of the server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_hetzner_robot_cancelled&lt;/code&gt;: the server cancellation status&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.hetzner&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.hetzner&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;discovery.hetzner&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 targets from Hetzner:&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.hetzner &amp;#34;example&amp;#34; {
  role = HETZNER_ROLE
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.hetzner.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;HETZNER_ROLE&lt;/code&gt;: The role of the entities that should be discovered.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.hetzner&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryhetzner">discovery.hetzner&lt;/h1>
&lt;p>&lt;code>discovery.hetzner&lt;/code> allows retrieving scrape targets from &lt;a href="https://www.hetzner.com/" target="_blank" rel="noopener noreferrer">Hetzner Cloud API&lt;/a> and &lt;a href="https://docs.hetzner.com/robot/" target="_blank" rel="noopener noreferrer">Robot API&lt;/a>.
This service discovery uses the public IPv4 address by default, but that can be changed with relabeling.&lt;/p></description></item><item><title>discovery.http</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.http/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.http/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryhttp&#34;&gt;discovery.http&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.http&lt;/code&gt; provides a flexible way to define targets by querying an external http endpoint.&lt;/p&gt;
&lt;p&gt;It fetches targets from an HTTP endpoint containing a list of zero or more target definitions. The target must reply with an HTTP 200 response. The HTTP header Content-Type must be application/json, and the body must be valid JSON.&lt;/p&gt;
&lt;p&gt;Example response body:&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;JSON&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-json&#34;&gt;[
  {
    &amp;#34;targets&amp;#34;: [ &amp;#34;&amp;lt;host&amp;gt;&amp;#34;, ... ],
    &amp;#34;labels&amp;#34;: {
      &amp;#34;&amp;lt;labelname&amp;gt;&amp;#34;: &amp;#34;&amp;lt;labelvalue&amp;gt;&amp;#34;, ...
    }
  },
  ...
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;It is possible to use additional fields in the JSON to pass parameters to &lt;a href=&#34;../prometheus.scrape/#technical-details&#34;&gt;prometheus.scrape&lt;/a&gt; such as the &lt;code&gt;metricsPath&lt;/code&gt; and &lt;code&gt;scrape_interval&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As an example, the following will provide a target with a custom &lt;code&gt;metricsPath&lt;/code&gt;, scrape interval, and timeout value:&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;JSON&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-json&#34;&gt;[
   {
      &amp;#34;labels&amp;#34; : {
         &amp;#34;__metrics_path__&amp;#34; : &amp;#34;/api/prometheus&amp;#34;,
         &amp;#34;__scheme__&amp;#34; : &amp;#34;https&amp;#34;,
         &amp;#34;__scrape_interval__&amp;#34; : &amp;#34;60s&amp;#34;,
         &amp;#34;__scrape_timeout__&amp;#34; : &amp;#34;10s&amp;#34;,
         &amp;#34;service&amp;#34; : &amp;#34;custom-api-service&amp;#34;
      },
      &amp;#34;targets&amp;#34; : [
         &amp;#34;custom-api:443&amp;#34;
      ]
   },
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;It is also possible to append query parameters to the metrics path with the &lt;code&gt;__param_&amp;lt;name&amp;gt;&lt;/code&gt; syntax.&lt;/p&gt;
&lt;p&gt;For example, the following will call a metrics path of &lt;code&gt;/health?target_data=prometheus&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;JSON&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-json&#34;&gt;[
   {
      &amp;#34;labels&amp;#34; : {
         &amp;#34;__metrics_path__&amp;#34; : &amp;#34;/health&amp;#34;,
         &amp;#34;__scheme__&amp;#34; : &amp;#34;https&amp;#34;,
         &amp;#34;__scrape_interval__&amp;#34; : &amp;#34;60s&amp;#34;,
         &amp;#34;__scrape_timeout__&amp;#34; : &amp;#34;10s&amp;#34;,
         &amp;#34;__param_target_data&amp;#34;: &amp;#34;prometheus&amp;#34;,
         &amp;#34;service&amp;#34; : &amp;#34;custom-api-service&amp;#34;
      },
      &amp;#34;targets&amp;#34; : [
         &amp;#34;custom-api:443&amp;#34;
      ]
   },
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more information on the potential labels you can use, see the &lt;a href=&#34;../prometheus.scrape/#technical-details&#34;&gt;prometheus.scrape technical details&lt;/a&gt; section, or the &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus Configuration&lt;/a&gt; documentation.&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.http &amp;#34;LABEL&amp;#34; {
  url = 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;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 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;refresh_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 refresh targets.&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 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;__meta_url&lt;/code&gt;: URL the target was obtained from.&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.http&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.http&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;prometheus_sd_http_failures_total&lt;/code&gt; (counter): Total number of refresh failures.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;This example will query a url every 15 seconds and expose targets that it finds:&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.http &amp;#34;dynamic_targets&amp;#34; {
  url = &amp;#34;https://example.com/scrape_targets&amp;#34;
  refresh_interval = &amp;#34;15s&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.http&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryhttp">discovery.http&lt;/h1>
&lt;p>&lt;code>discovery.http&lt;/code> provides a flexible way to define targets by querying an external http endpoint.&lt;/p>
&lt;p>It fetches targets from an HTTP endpoint containing a list of zero or more target definitions. The target must reply with an HTTP 200 response. The HTTP header Content-Type must be application/json, and the body must be valid JSON.&lt;/p></description></item><item><title>discovery.ionos</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.ionos/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.ionos/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryionos&#34;&gt;discovery.ionos&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.ionos&lt;/code&gt; allows you to retrieve scrape targets from &lt;a href=&#34;https://cloud.ionos.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;IONOS Cloud&lt;/a&gt; API.&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.ionos &amp;#34;LABEL&amp;#34; {
    datacenter_id = DATACENTER_ID
}&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;datacenter_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The unique ID of the data center.&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time after which the servers are refreshed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;60s&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 port to scrape metrics from.&lt;/td&gt;
              &lt;td&gt;80&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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.ionos&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 IONOS Cloud 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_ionos_server_availability_zone&lt;/code&gt;: the availability zone of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_boot_cdrom_id&lt;/code&gt;: the ID of the CD-ROM the server is booted from.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_boot_image_id&lt;/code&gt;: the ID of the boot image or snapshot the server is booted from.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_boot_volume_id&lt;/code&gt;: the ID of the boot volume.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_cpu_family&lt;/code&gt;: the CPU family of the server to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_id&lt;/code&gt;: the ID of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_ip&lt;/code&gt;: comma separated list of all IPs assigned to the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_lifecycle&lt;/code&gt;: the lifecycle state of the server resource.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_name&lt;/code&gt;: the name of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_nic_ip_&amp;lt;nic_name&amp;gt;&lt;/code&gt;: comma separated list of IPs, grouped by the name of each NIC attached to the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_servers_id&lt;/code&gt;: the ID of the servers the server belongs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_state&lt;/code&gt;: the execution state of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ionos_server_type&lt;/code&gt;: the type of the server.&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.ionos&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.ionos&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;discovery.ionos&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.ionos &amp;#34;example&amp;#34; {
    datacenter_id = &amp;#34;15f67991-0f51-4efc-a8ad-ef1fb31a480c&amp;#34;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.ionos.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.ionos&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryionos">discovery.ionos&lt;/h1>
&lt;p>&lt;code>discovery.ionos&lt;/code> allows you to retrieve scrape targets from &lt;a href="https://cloud.ionos.com/" target="_blank" rel="noopener noreferrer">IONOS Cloud&lt;/a> API.&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.ionos &amp;#34;LABEL&amp;#34; {
datacenter_id = DATACENTER_ID
}&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.kubelet</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.kubelet/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.kubelet/</guid><content><![CDATA[&lt;h1 id=&#34;discoverykubelet&#34;&gt;discovery.kubelet&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.kubelet&lt;/code&gt; discovers Kubernetes pods running on the specified Kubelet
and exposes them as scrape 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.kubelet &amp;#34;LABEL&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The Kubelet must be reachable from the &lt;code&gt;grafana-agent&lt;/code&gt; pod network.&lt;/li&gt;
&lt;li&gt;Follow the &lt;a href=&#34;https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-authz/#kubelet-authorization&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubelet authorization&lt;/a&gt;
documentation to configure authentication to the Kubelet API.&lt;/li&gt;
&lt;/ul&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 of the Kubelet server.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;https://localhost:10250&amp;rdquo;&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;How often the Kubelet should be polled for scrape targets&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5s&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;namespaces&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 namespaces to extract target pods 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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;The &lt;code&gt;namespaces&lt;/code&gt; list limits the namespaces to discover resources in. If
omitted, all namespaces are searched.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;discovery.kubelet&lt;/code&gt; appends a &lt;code&gt;/pods&lt;/code&gt; path to &lt;code&gt;url&lt;/code&gt; to request the available pods.
You can have additional paths in the &lt;code&gt;url&lt;/code&gt;.
For example, if &lt;code&gt;url&lt;/code&gt; is &lt;code&gt;https://kubernetes.default.svc.cluster.local:443/api/v1/nodes/cluster-node-1/proxy&lt;/code&gt;, then &lt;code&gt;discovery.kubelet&lt;/code&gt; sends a request on &lt;code&gt;https://kubernetes.default.svc.cluster.local:443/api/v1/nodes/cluster-node-1/proxy/pods&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.kubelet&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Kubelet 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;__address__&lt;/code&gt;: The target address to scrape derived from the pod IP and container port.&lt;/li&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_id&lt;/code&gt;: ID of the container the target address
points to. The ID is in the form &lt;code&gt;&amp;lt;type&amp;gt;://&amp;lt;container_id&amp;gt;&lt;/code&gt;.&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;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The Kubelet API used by this component is an internal API and therefore the
data in the response returned from the API cannot be guaranteed between different versions
of the Kubelet.&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;discovery.kubelet&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.kubelet&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;discovery.kubelet&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;bearer-token-file-authentication&#34;&gt;Bearer token file authentication&lt;/h3&gt;
&lt;p&gt;This example uses a bearer token file to authenticate to the Kubelet 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.kubelet &amp;#34;k8s_pods&amp;#34; {
  bearer_token_file = &amp;#34;/var/run/secrets/kubernetes.io/serviceaccount/token&amp;#34;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.kubelet.k8s_pods.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&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; argument:&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.kubelet &amp;#34;k8s_pods&amp;#34; {
  bearer_token_file = &amp;#34;/var/run/secrets/kubernetes.io/serviceaccount/token&amp;#34;
  namespaces = [&amp;#34;default&amp;#34;, &amp;#34;kube-system&amp;#34;]
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.kubelet.k8s_pods.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.kubelet&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverykubelet">discovery.kubelet&lt;/h1>
&lt;p>&lt;code>discovery.kubelet&lt;/code> discovers Kubernetes pods running on the specified Kubelet
and exposes them as scrape 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.kubelet &amp;#34;LABEL&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="requirements">Requirements&lt;/h2>
&lt;ul>
&lt;li>The Kubelet must be reachable from the &lt;code>grafana-agent&lt;/code> pod network.&lt;/li>
&lt;li>Follow the &lt;a href="https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-authz/#kubelet-authorization" target="_blank" rel="noopener noreferrer">Kubelet authorization&lt;/a>
documentation to configure authentication to the Kubelet API.&lt;/li>
&lt;/ul>
&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.42/flow/reference/components/discovery.kubernetes/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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 configuration. 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 = DISCOVERY_ROLE
}&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_id&lt;/code&gt;: ID of the container the target address
points to. The ID is in the form &lt;code&gt;&amp;lt;type&amp;gt;://&amp;lt;container_id&amp;gt;&lt;/code&gt;.&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;attach_metadata&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#attach_metadata-block&#34;&gt;attach_metadata&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Optional metadata to attach to discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&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 Grafana Agent Flow 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;list(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 &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Labels and
selectors&lt;/a&gt; to learn more about the possible filters that can be used.&lt;/p&gt;
&lt;p&gt;The endpoints role supports pod, service, and endpoints selectors.
The pod role supports node selectors when configured with &lt;code&gt;attach_metadata: {node: true}&lt;/code&gt;.
Other roles only support selectors matching the role itself (e.g. node role can only contain node selectors).&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;attach_metadata-block&#34;&gt;attach_metadata block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;attach_metadata&lt;/code&gt; block allows to attach node metadata to discovered
targets. Valid for roles: pod, endpoints, endpointslice.&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;node&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Attach node metadata.&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;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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&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;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.kubernetes.k8s_pods.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&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;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.kubernetes.k8s_pods.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;limit-searched-namespaces-and-filter-by-labels-value&#34;&gt;Limit searched namespaces and filter by labels value&lt;/h3&gt;
&lt;p&gt;This example limits the searched namespaces and only selects pods with a specific label value attached to 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_pods&amp;#34; {
  role = &amp;#34;pod&amp;#34;

  selectors {
    role = &amp;#34;pod&amp;#34;
    label = &amp;#34;app.kubernetes.io/name=prometheus-node-exporter&amp;#34;
  }

  namespaces {
    names = [&amp;#34;myapp&amp;#34;]
  }
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.kubernetes.k8s_pods.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;limit-to-only-pods-on-the-same-node&#34;&gt;Limit to only pods on the same node&lt;/h3&gt;
&lt;p&gt;This example limits the search to pods on the same node as this Grafana Agent.
This configuration could be useful if you are running Grafana Agent as a DaemonSet.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;This example assumes you have used Helm chart to deploy Grafana Agent Flow in Kubernetes and sets &lt;code&gt;HOSTNAME&lt;/code&gt; to the Kubernetes host name.
If you have a custom Kubernetes deployment, you must adapt this example to your configuration.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;
  selectors {
    role = &amp;#34;pod&amp;#34;
    field = &amp;#34;spec.nodeName=&amp;#34; &amp;#43; coalesce(env(&amp;#34;HOSTNAME&amp;#34;), constants.hostname)
  }
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.kubernetes.k8s_pods.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.kubernetes&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.kuma</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.kuma/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.kuma/</guid><content><![CDATA[&lt;h1 id=&#34;discoverykuma&#34;&gt;discovery.kuma&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.kuma&lt;/code&gt; discovers scrape target from the &lt;a href=&#34;https://kuma.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kuma&lt;/a&gt; control plane.&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.kuma &amp;#34;LABEL&amp;#34; {
    server = SERVER
}&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;server&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 Kuma Control Plane&amp;rsquo;s MADS xDS server.&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time to wait between polling update requests.&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;fetch_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time after which the monitoring assignments are refreshed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2m&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&gt;

        
&lt;p&gt;The following blocks are supported inside the definition of
&lt;code&gt;discovery.kuma&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Kuma API.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following meta labels are available on targets and can be used by the
discovery.relabel component:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kuma_mesh&lt;/code&gt;: the name of the proxy&amp;rsquo;s Mesh&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kuma_dataplane&lt;/code&gt;: the name of the proxy&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kuma_service&lt;/code&gt;: the name of the proxy&amp;rsquo;s associated Service&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kuma_label_&amp;lt;tagname&amp;gt;&lt;/code&gt;: each tag of the proxy&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.kuma&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.kuma&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;discovery.kuma&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.kuma &amp;#34;example&amp;#34; {
    server     = &amp;#34;http://kuma-control-plane.kuma-system.svc:5676&amp;#34;
}
prometheus.scrape &amp;#34;demo&amp;#34; {
	targets    = discovery.kuma.example.targets
	forward_to = [prometheus.remote_write.demo.receiver]
}
prometheus.remote_write &amp;#34;demo&amp;#34; {
	endpoint {
		url = PROMETHEUS_REMOTE_WRITE_URL
		basic_auth {
			username = USERNAME
			password = PASSWORD
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.kuma&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverykuma">discovery.kuma&lt;/h1>
&lt;p>&lt;code>discovery.kuma&lt;/code> discovers scrape target from the &lt;a href="https://kuma.io/" target="_blank" rel="noopener noreferrer">Kuma&lt;/a> control plane.&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.kuma &amp;#34;LABEL&amp;#34; {
server = SERVER
}&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.lightsail</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.lightsail/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.lightsail/</guid><content><![CDATA[&lt;h1 id=&#34;discoverylightsail&#34;&gt;discovery.lightsail&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.lightsail&lt;/code&gt; allows retrieving scrape targets from Amazon Lightsail instances. The private IP address is used by default, but may be changed to the public IP address with relabeling.&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.lightsail &amp;#34;LABEL&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;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom endpoint to be used.&lt;/td&gt;
              &lt;td&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;The AWS region. If blank, the region from the instance metadata is used.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;access_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The AWS API key ID. If blank, the environment variable &lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt; is used.&lt;/td&gt;
              &lt;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_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The AWS API key secret. If blank, the environment variable &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt; is used.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Named AWS profile used to connect to the API.&lt;/td&gt;
              &lt;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_arn&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS Role ARN, an alternative to using AWS API keys.&lt;/td&gt;
              &lt;td&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;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Refresh interval to re-read the instance list.&lt;/td&gt;
              &lt;td&gt;60s&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 port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule.&lt;/td&gt;
              &lt;td&gt;80&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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.lightsail&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 discovered Lightsail targets.&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_lightsail_availability_zone&lt;/code&gt;: The availability zone in which the instance is running.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_blueprint_id&lt;/code&gt;: The Lightsail blueprint ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_bundle_id&lt;/code&gt;: The Lightsail bundle ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_instance_name&lt;/code&gt;: The name of the Lightsail instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_instance_state&lt;/code&gt;: The state of the Lightsail instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_instance_support_code&lt;/code&gt;: The support code of the Lightsail instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_ipv6_addresses&lt;/code&gt;: Comma-separated list of IPv6 addresses assigned to the instance&amp;rsquo;s network interfaces, if present.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_private_ip&lt;/code&gt;: The private IP address of the instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_public_ip&lt;/code&gt;: The public IP address of the instance, if available.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_region&lt;/code&gt;: The region of the instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_lightsail_tag_&amp;lt;tagkey&amp;gt;&lt;/code&gt;: Each tag value of the instance.&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.lightsail&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.lightsail&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;discovery.lightsail&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.lightsail &amp;#34;lightsail&amp;#34; {
  region = &amp;#34;us-east-1&amp;#34;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.lightsail.lightsail.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.lightsail&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverylightsail">discovery.lightsail&lt;/h1>
&lt;p>&lt;code>discovery.lightsail&lt;/code> allows retrieving scrape targets from Amazon Lightsail instances. The private IP address is used by default, but may be changed to the public IP address with relabeling.&lt;/p></description></item><item><title>discovery.linode</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.linode/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.linode/</guid><content><![CDATA[&lt;h1 id=&#34;discoverylinode&#34;&gt;discovery.linode&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.linode&lt;/code&gt; allows you to retrieve scrape targets from &lt;a href=&#34;https://www.linode.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Linode&amp;rsquo;s&lt;/a&gt; Linode APIv4.
This service discovery uses the public IPv4 address by default, but that can be changed with relabeling.&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.linode &amp;#34;LABEL&amp;#34; {
	bearer_token = LINODE_API_TOKEN
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The linode APIv4 Token must be created with the scopes: &lt;code&gt;linodes:read_only&lt;/code&gt;, &lt;code&gt;ips:read_only&lt;/code&gt;, and &lt;code&gt;events:read_only&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time to wait between polling update requests.&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;port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port that metrics are scraped from.&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;tag_separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The string by which Linode Instance tags are joined into the tag label.&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.linode&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Linode API.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following meta labels are available on targets and can be used by the
discovery.relabel component:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_instance_id&lt;/code&gt;: the id of the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_instance_label&lt;/code&gt;: the label of the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_image&lt;/code&gt;: the slug of the Linode instance&amp;rsquo;s image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_private_ipv4&lt;/code&gt;: the private IPv4 of the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_public_ipv4&lt;/code&gt;: the public IPv4 of the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_public_ipv6&lt;/code&gt;: the public IPv6 of the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_region&lt;/code&gt;: the region of the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_type&lt;/code&gt;: the type of the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_status&lt;/code&gt;: the status of the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_tags&lt;/code&gt;: a list of tags of the Linode instance joined by the tag separator&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_group&lt;/code&gt;: the display group a Linode instance is a member of&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_hypervisor&lt;/code&gt;: the virtualization software powering the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_backups&lt;/code&gt;: the backup service status of the Linode instance&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_specs_disk_bytes&lt;/code&gt;: the amount of storage space the Linode instance has access to&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_specs_memory_bytes&lt;/code&gt;: the amount of RAM the Linode instance has access to&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_specs_vcpus&lt;/code&gt;: the number of VCPUS this Linode has access to&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_specs_transfer_bytes&lt;/code&gt;: the amount of network transfer the Linode instance is allotted each month&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_linode_extra_ips&lt;/code&gt;: a list of all extra IPv4 addresses assigned to the Linode instance joined by the tag separator&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.linode&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.linode&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;discovery.linode&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.linode &amp;#34;example&amp;#34; {
    bearer_token = env(&amp;#34;LINODE_TOKEN&amp;#34;)
    port = 8876
}
prometheus.scrape &amp;#34;demo&amp;#34; {
	targets    = discovery.linode.example.targets
	forward_to = [prometheus.remote_write.demo.receiver]
}
prometheus.remote_write &amp;#34;demo&amp;#34; {
	endpoint {
		url = PROMETHEUS_REMOTE_WRITE_URL
		basic_auth {
			username = USERNAME
			password = PASSWORD
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;using-private-ip-address&#34;&gt;Using private IP address:&lt;/h3&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.linode &amp;#34;example&amp;#34; {
    bearer_token = env(&amp;#34;LINODE_TOKEN&amp;#34;)
    port = 8876
}
discovery.relabel &amp;#34;private_ips&amp;#34; {
	targets = discovery.linode.example.targets
	rule {
    	source_labels = [&amp;#34;__meta_linode_private_ipv4&amp;#34;]
    	replacement     = &amp;#34;[$1]:8876&amp;#34;
    	target_label  = &amp;#34;__address__&amp;#34;
  	}
}
prometheus.scrape &amp;#34;demo&amp;#34; {
	targets    = discovery.relabel.private_ips.targets
	forward_to = [prometheus.remote_write.demo.receiver]
}
prometheus.remote_write &amp;#34;demo&amp;#34; {
	endpoint {
		url = PROMETHEUS_REMOTE_WRITE_URL
		basic_auth {
			username = USERNAME
			password = PASSWORD
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.linode&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverylinode">discovery.linode&lt;/h1>
&lt;p>&lt;code>discovery.linode&lt;/code> allows you to retrieve scrape targets from &lt;a href="https://www.linode.com/" target="_blank" rel="noopener noreferrer">Linode&amp;rsquo;s&lt;/a> Linode APIv4.
This service discovery uses the public IPv4 address by default, but that can be changed with relabeling.&lt;/p></description></item><item><title>discovery.marathon</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.marathon/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.marathon/</guid><content><![CDATA[&lt;h1 id=&#34;discoverymarathon&#34;&gt;discovery.marathon&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.marathon&lt;/code&gt; allows you to retrieve scrape targets from &lt;a href=&#34;https://mesosphere.github.io/marathon/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Marathon&amp;rsquo;s&lt;/a&gt; Service API.&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.marathon &amp;#34;LABEL&amp;#34; {
  servers = [MARATHON_SERVER1, MARATHON_SERVER2...]
}&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;servers&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 Marathon servers.&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Interval at which to refresh the list of targets.&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;auth_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Auth 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;auth_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 an auth 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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;auth_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;auth_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.marathon&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Marathon servers.&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_marathon_app&lt;/code&gt;: the name of the app (with slashes replaced by dashes).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_marathon_image&lt;/code&gt;: the name of the Docker image used (if available).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_marathon_task&lt;/code&gt;: the ID of the Mesos task.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_marathon_app_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: any Marathon labels attached to the app.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_marathon_port_definition_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: the port definition labels.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_marathon_port_mapping_label_&amp;lt;labelname&amp;gt;&lt;/code&gt;: the port mapping labels.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_marathon_port_index&lt;/code&gt;: the port index number (e.g. 1 for PORT1).&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.marathon&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.marathon&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;discovery.marathon&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 targets from a Marathon 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;discovery.marathon &amp;#34;example&amp;#34; {
  servers = [&amp;#34;localhost:8500&amp;#34;]
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.marathon.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.marathon&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverymarathon">discovery.marathon&lt;/h1>
&lt;p>&lt;code>discovery.marathon&lt;/code> allows you to retrieve scrape targets from &lt;a href="https://mesosphere.github.io/marathon/" target="_blank" rel="noopener noreferrer">Marathon&amp;rsquo;s&lt;/a> Service API.&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.marathon &amp;#34;LABEL&amp;#34; {
servers = [MARATHON_SERVER1, MARATHON_SERVER2...]
}&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.nerve</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.nerve/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.nerve/</guid><content><![CDATA[&lt;h1 id=&#34;discoverynerve&#34;&gt;discovery.nerve&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.nerve&lt;/code&gt; discovers &lt;a href=&#34;https://github.com/airbnb/nerve&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;airbnb/nerve&lt;/a&gt; targets stored in Zookeeper.&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.nerve &amp;#34;LABEL&amp;#34; {
	servers = [SERVER_1, SERVER_2]
	paths   = [PATH_1, PATH_2]
}&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;servers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Zookeeper servers.&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;paths&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The paths to look for targets at.&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;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 to use.&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;Each element in the &lt;code&gt;path&lt;/code&gt; list can either point to a single service, or to the
root of a tree of services.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;discovery.nerve&lt;/code&gt; component does not support any 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;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 Nerve&amp;rsquo;s API.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following meta labels are available on targets and can be used by the
discovery.relabel component&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_nerve_path&lt;/code&gt;: the full path to the endpoint node in Zookeeper&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nerve_endpoint_host&lt;/code&gt;: the host of the endpoint&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nerve_endpoint_port&lt;/code&gt;: the port of the endpoint&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nerve_endpoint_name&lt;/code&gt;: the name of the endpoint&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.nerve&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.nerve&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;discovery.nerve&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.nerve &amp;#34;example&amp;#34; {
	servers = [&amp;#34;localhost&amp;#34;]
	paths   = [&amp;#34;/monitoring&amp;#34;]
	timeout = &amp;#34;1m&amp;#34;
}
prometheus.scrape &amp;#34;demo&amp;#34; {
	targets    = discovery.nerve.example.targets
	forward_to = [prometheus.remote_write.demo.receiver]
}
prometheus.remote_write &amp;#34;demo&amp;#34; {
	endpoint {
		url = PROMETHEUS_REMOTE_WRITE_URL
		basic_auth {
			username = USERNAME
			password = PASSWORD
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.nerve&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverynerve">discovery.nerve&lt;/h1>
&lt;p>&lt;code>discovery.nerve&lt;/code> discovers &lt;a href="https://github.com/airbnb/nerve" target="_blank" rel="noopener noreferrer">airbnb/nerve&lt;/a> targets stored in Zookeeper.&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.nerve &amp;#34;LABEL&amp;#34; {
servers = [SERVER_1, SERVER_2]
paths = [PATH_1, PATH_2]
}&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.nomad</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.nomad/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.nomad/</guid><content><![CDATA[&lt;h1 id=&#34;discoverynomad&#34;&gt;discovery.nomad&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.nomad&lt;/code&gt; allows you to retrieve scrape targets from &lt;a href=&#34;https://www.nomadproject.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Nomad&amp;rsquo;s&lt;/a&gt; Service API.&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.nomad &amp;#34;LABEL&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;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address of nomad server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http://localhost:4646&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;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Nomad namespace to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;default&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;Nomad region to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;global&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;allow_stale&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allow reading from non-leader nomad instances.&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;tag_separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Seperator to join nomad tags into Prometheus labels.&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;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;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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.nomad&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 nomad server.&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_nomad_address&lt;/code&gt;: the service address of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nomad_dc&lt;/code&gt;: the datacenter name for the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nomad_namespace&lt;/code&gt;: the namespace of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nomad_node_id&lt;/code&gt;: the node name defined for the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nomad_service&lt;/code&gt;: the name of the service the target belongs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nomad_service_address&lt;/code&gt;: the service address of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nomad_service_id&lt;/code&gt;: the service ID of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nomad_service_port&lt;/code&gt;: the service port of the target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_nomad_tags&lt;/code&gt;: the list of tags of the target joined by the tag separator.&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.nomad&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.nomad&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;discovery.nomad&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 targets from a Nomad 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;discovery.nomad &amp;#34;example&amp;#34; {
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.nomad.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.nomad&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverynomad">discovery.nomad&lt;/h1>
&lt;p>&lt;code>discovery.nomad&lt;/code> allows you to retrieve scrape targets from &lt;a href="https://www.nomadproject.io/" target="_blank" rel="noopener noreferrer">Nomad&amp;rsquo;s&lt;/a> Service API.&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.nomad &amp;#34;LABEL&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.openstack</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.openstack/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.openstack/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryopenstack&#34;&gt;discovery.openstack&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.openstack&lt;/code&gt; discovers &lt;a href=&#34;https://docs.openstack.org/nova/latest/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenStack&lt;/a&gt; Nova instances 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.openstack &amp;#34;LABEL&amp;#34; {
  role   = &amp;#34;hypervisor&amp;#34;
  region = &amp;#34;us-east-1&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;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 discovered targets.&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;region&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OpenStack region.&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;identity_endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies the HTTP endpoint that is required to work with te Identity API of the appropriate version&lt;/td&gt;
              &lt;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;OpenStack username for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;userid&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OpenStack userid for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;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;Password for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;domain_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OpenStack domain name for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;domain_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OpenStack domain ID for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;project_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OpenStack project name for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&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;OpenStack project ID for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;application_credential_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OpenStack application credential name for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;application_credential_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OpenStack application credential ID for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;application_credential_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OpenStack application credential secret for the Identity V2 and V3 APIs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;all_tenants&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether the service discovery should list all instances for all projects.&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Refresh interval to re-read the instance list.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;60s&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 port to scrape metrics from.&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;availability&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The availability of the endpoint to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;public&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;role&lt;/code&gt; must be one of &lt;code&gt;hypervisor&lt;/code&gt; or &lt;code&gt;instance&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;username&lt;/code&gt; is required if using Identity V2 API. In Identity V3, either &lt;code&gt;userid&lt;/code&gt; or a combination of &lt;code&gt;username&lt;/code&gt; and &lt;code&gt;domain_id&lt;/code&gt; or &lt;code&gt;domain_name&lt;/code&gt; are needed.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;project_id&lt;/code&gt; and &lt;code&gt;project_name&lt;/code&gt; fields are optional for the Identity V2 API. Some providers allow you to specify a &lt;code&gt;project_name&lt;/code&gt; instead of the &lt;code&gt;project_id&lt;/code&gt;. Some require both.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;application_credential_id&lt;/code&gt; or &lt;code&gt;application_credential_name&lt;/code&gt; fields are required if using an application credential to authenticate. Some providers allow you to create an application credential to authenticate rather than a password.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;application_credential_secret&lt;/code&gt; field is required if using an application credential to authenticate.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;all_tenants&lt;/code&gt; is only relevant for the &lt;code&gt;instance&lt;/code&gt; role and usually requires admin permissions.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;availability&lt;/code&gt; must be one of &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;admin&lt;/code&gt;, or &lt;code&gt;internal&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;discovery.openstack&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;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;TLS configuration for requests to the OpenStack API.&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_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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 OpenStack API.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h4 id=&#34;hypervisor&#34;&gt;&lt;code&gt;hypervisor&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;hypervisor&lt;/code&gt; role discovers one target per Nova hypervisor node. The target
address defaults to the &lt;code&gt;host_ip&lt;/code&gt; attribute of the hypervisor.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_hypervisor_host_ip&lt;/code&gt;: the hypervisor node&amp;rsquo;s IP address.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_hypervisor_hostname&lt;/code&gt;: the hypervisor node&amp;rsquo;s name.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_hypervisor_id&lt;/code&gt;: the hypervisor node&amp;rsquo;s ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_hypervisor_state&lt;/code&gt;: the hypervisor node&amp;rsquo;s state.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_hypervisor_status&lt;/code&gt;: the hypervisor node&amp;rsquo;s status.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_hypervisor_type&lt;/code&gt;: the hypervisor node&amp;rsquo;s type.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;instance&#34;&gt;&lt;code&gt;instance&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;instance&lt;/code&gt; role discovers one target per network interface of Nova
instance. The target address defaults to the private IP address of the network
interface.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_address_pool&lt;/code&gt;: the pool of the private IP.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_instance_flavor&lt;/code&gt;: the flavor of the OpenStack instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_instance_id&lt;/code&gt;: the OpenStack instance ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_instance_image&lt;/code&gt;: the ID of the image the OpenStack instance is using.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_instance_name&lt;/code&gt;: the OpenStack instance name.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_instance_status&lt;/code&gt;: the status of the OpenStack instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_private_ip&lt;/code&gt;: the private IP of the OpenStack instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_project_id&lt;/code&gt;: the project (tenant) owning this instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_public_ip&lt;/code&gt;: the public IP of the OpenStack instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_tag_&amp;lt;tagkey&amp;gt;&lt;/code&gt;: each tag value of the instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_openstack_user_id&lt;/code&gt;: the user account owning the tenant.&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.openstack&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.openstack&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;discovery.openstack&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.openstack &amp;#34;example&amp;#34; {
  role   = OPENSTACK_ROLE
  region = OPENSTACK_REGION
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.openstack.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;OPENSTACK_ROLE&lt;/code&gt;: Your OpenStack role.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;OPENSTACK_REGION&lt;/code&gt;: Your OpenStack region.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.openstack&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryopenstack">discovery.openstack&lt;/h1>
&lt;p>&lt;code>discovery.openstack&lt;/code> discovers &lt;a href="https://docs.openstack.org/nova/latest/" target="_blank" rel="noopener noreferrer">OpenStack&lt;/a> Nova instances 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.openstack &amp;#34;LABEL&amp;#34; {
role = &amp;#34;hypervisor&amp;#34;
region = &amp;#34;us-east-1&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.ovhcloud</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.ovhcloud/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.ovhcloud/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryovhcloud&#34;&gt;discovery.ovhcloud&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.ovhcloud&lt;/code&gt; discovers scrape targets from OVHcloud&amp;rsquo;s &lt;a href=&#34;https://www.ovhcloud.com/en/bare-metal/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;dedicated servers&lt;/a&gt; and &lt;a href=&#34;https://www.ovhcloud.com/en/vps/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;VPS&lt;/a&gt; using their &lt;a href=&#34;https://api.ovh.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API&lt;/a&gt;.
Grafana Agent will periodically check the REST endpoint and create a target for every discovered server.
The public IPv4 address will be used by default - if there&amp;rsquo;s none, the IPv6 address will be used.
This may be changed via relabeling with &lt;code&gt;discovery.relabel&lt;/code&gt;.
For OVHcloud&amp;rsquo;s &lt;a href=&#34;https://www.ovhcloud.com/en/public-cloud/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;public cloud&lt;/a&gt; instances you can use &lt;code&gt;discovery.openstack&lt;/code&gt;.&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.ovhcloud &amp;#34;LABEL&amp;#34; {
    application_key    = APPLICATION_KEY
    application_secret = APPLICATION_SECRET
    consumer_key       = CONSUMER_KEY
    service            = SERVICE
}&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;application_key&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://api.ovh.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API&lt;/a&gt; application key.&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;application_secret&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://api.ovh.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API&lt;/a&gt; application secret.&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;consumer_key&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://api.ovh.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API&lt;/a&gt; consumer key.&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;endpoint&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://api.ovh.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API&lt;/a&gt; endpoint.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;ovh-eu&amp;rdquo;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;refresh_interval&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Refresh interval to re-read the resources list.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;60s&amp;rdquo;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;service&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Service of the targets to retrieve.&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;endpoint&lt;/code&gt; must be one of the &lt;a href=&#34;https://github.com/ovh/go-ovh#supported-apis&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;supported API endpoints&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;service&lt;/code&gt; must be either &lt;code&gt;vps&lt;/code&gt; or &lt;code&gt;dedicated_server&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;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 OVHcloud API.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Multiple meta labels are available on &lt;code&gt;targets&lt;/code&gt; and can be used by the &lt;code&gt;discovery.relabel&lt;/code&gt; component.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.ovhcloud.com/en/vps/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;VPS&lt;/a&gt; meta labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_cluster&lt;/code&gt;: the cluster of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_datacenter&lt;/code&gt;: the datacenter of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_disk&lt;/code&gt;: the disk of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_display_name&lt;/code&gt;: the display name of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_ipv4&lt;/code&gt;: the IPv4 of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_ipv6&lt;/code&gt;: the IPv6 of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_keymap&lt;/code&gt;: the KVM keyboard layout of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_maximum_additional_ip&lt;/code&gt;: the maximum additional IPs of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_memory_limit&lt;/code&gt;: the memory limit of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_memory&lt;/code&gt;: the memory of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_monitoring_ip_blocks&lt;/code&gt;: the monitoring IP blocks of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_name&lt;/code&gt;: the name of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_netboot_mode&lt;/code&gt;: the netboot mode of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_offer_type&lt;/code&gt;: the offer type of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_offer&lt;/code&gt;: the offer of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_state&lt;/code&gt;: the state of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_vcore&lt;/code&gt;: the number of virtual cores of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_version&lt;/code&gt;: the version of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_vps_zone&lt;/code&gt;: the zone of the server.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&#34;https://www.ovhcloud.com/en/bare-metal/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Dedicated servers&lt;/a&gt; meta labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_commercial_range&lt;/code&gt;: the commercial range of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_datacenter&lt;/code&gt;: the datacenter of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_ipv4&lt;/code&gt;: the IPv4 of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_ipv6&lt;/code&gt;: the IPv6 of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_link_speed&lt;/code&gt;: the link speed of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_name&lt;/code&gt;: the name of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_os&lt;/code&gt;: the operating system of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_rack&lt;/code&gt;: the rack of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_reverse&lt;/code&gt;: the reverse DNS name of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_server_id&lt;/code&gt;: the ID of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_state&lt;/code&gt;: the state of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_ovhcloud_dedicated_server_support_level&lt;/code&gt;: the support level of the server.&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.ovhcloud&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.ovhcloud&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;discovery.ovhcloud&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.ovhcloud &amp;#34;example&amp;#34; {
	application_key    = APPLICATION_KEY
	application_secret = APPLICATION_SECRET
	consumer_key       = CONSUMER_KEY
	service            = SERVICE
}

prometheus.scrape &amp;#34;demo&amp;#34; {
	targets    = discovery.ovhcloud.example.targets
	forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
	endpoint {
		url = PROMETHEUS_REMOTE_WRITE_URL
		basic_auth {
			username = USERNAME
			password = PASSWORD
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;APPLICATION_KEY&lt;/code&gt;: The OVHcloud &lt;a href=&#34;https://api.ovh.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API&lt;/a&gt; application key.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;APPLICATION_SECRET&lt;/code&gt;: The OVHcloud &lt;a href=&#34;https://api.ovh.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API&lt;/a&gt; application secret.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CONSUMER_KEY&lt;/code&gt;: The OVHcloud &lt;a href=&#34;https://api.ovh.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API&lt;/a&gt; consumer key.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SERVICE&lt;/code&gt;: The OVHcloud service of the targets to retrieve.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.ovhcloud&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryovhcloud">discovery.ovhcloud&lt;/h1>
&lt;p>&lt;code>discovery.ovhcloud&lt;/code> discovers scrape targets from OVHcloud&amp;rsquo;s &lt;a href="https://www.ovhcloud.com/en/bare-metal/" target="_blank" rel="noopener noreferrer">dedicated servers&lt;/a> and &lt;a href="https://www.ovhcloud.com/en/vps/" target="_blank" rel="noopener noreferrer">VPS&lt;/a> using their &lt;a href="https://api.ovh.com/" target="_blank" rel="noopener noreferrer">API&lt;/a>.
Grafana Agent will periodically check the REST endpoint and create a target for every discovered server.
The public IPv4 address will be used by default - if there&amp;rsquo;s none, the IPv6 address will be used.
This may be changed via relabeling with &lt;code>discovery.relabel&lt;/code>.
For OVHcloud&amp;rsquo;s &lt;a href="https://www.ovhcloud.com/en/public-cloud/" target="_blank" rel="noopener noreferrer">public cloud&lt;/a> instances you can use &lt;code>discovery.openstack&lt;/code>.&lt;/p></description></item><item><title>discovery.process</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.process/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.process/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryprocess&#34;&gt;discovery.process&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;discovery.process&lt;/code&gt; discovers processes running on the local Linux OS.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;To use the &lt;code&gt;discovery.process&lt;/code&gt; component you must run Grafana Agent Flow as root and inside host PID namespace.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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.process &amp;#34;LABEL&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;join&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Join external targets to discovered processes targets based on &lt;code&gt;__container_id__&lt;/code&gt; label.&lt;/td&gt;
              &lt;td&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;How often to sync targets.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;60s&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;h3 id=&#34;targets-joining&#34;&gt;Targets joining&lt;/h3&gt;
&lt;p&gt;If &lt;code&gt;join&lt;/code&gt; is specified, &lt;code&gt;discovery.process&lt;/code&gt; will join the discovered processes based on the &lt;code&gt;__container_id__&lt;/code&gt; label.&lt;/p&gt;
&lt;p&gt;For example, if &lt;code&gt;join&lt;/code&gt; is specified as follows:&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;JSON&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-json&#34;&gt;[
  {
    &amp;#34;pod&amp;#34;: &amp;#34;pod-1&amp;#34;,
    &amp;#34;__container_id__&amp;#34;: &amp;#34;container-1&amp;#34;
  },
  {
    &amp;#34;pod&amp;#34;: &amp;#34;pod-2&amp;#34;,
    &amp;#34;__container_id__&amp;#34;: &amp;#34;container-2&amp;#34;
  }
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And the discovered processes are:&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;JSON&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-json&#34;&gt;[
  {
    &amp;#34;__process_pid__&amp;#34;: &amp;#34;1&amp;#34;,
    &amp;#34;__container_id__&amp;#34;: &amp;#34;container-1&amp;#34;
  },
  {
    &amp;#34;__process_pid__&amp;#34;: &amp;#34;2&amp;#34;
  }
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The resulting targets are:&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;JSON&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-json&#34;&gt;[
  {
    &amp;#34;__container_id__&amp;#34;: &amp;#34;container-1&amp;#34;,
    &amp;#34;__process_pid__&amp;#34;: &amp;#34;1&amp;#34;,
    &amp;#34;pod&amp;#34;: &amp;#34;pod-1&amp;#34;
  },
  {
    &amp;#34;__process_pid__&amp;#34;: &amp;#34;2&amp;#34;
  },
  {
    &amp;#34;__container_id__&amp;#34;: &amp;#34;container-1&amp;#34;,
    &amp;#34;pod&amp;#34;: &amp;#34;pod-1&amp;#34;
  },
  {
    &amp;#34;__container_id__&amp;#34;: &amp;#34;container-2&amp;#34;,
    &amp;#34;pod&amp;#34;: &amp;#34;pod-2&amp;#34;
  }
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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.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;discover_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#discover_config-block&#34;&gt;discover_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which process metadata to discover.&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;discover_config-block&#34;&gt;discover_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;discover_config&lt;/code&gt; block describes which process metadata to discover.&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;exe&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable discovering &lt;code&gt;__meta_process_exe&lt;/code&gt; label.&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;cwd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable discovering &lt;code&gt;__meta_process_cwd&lt;/code&gt; label.&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;commandline&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable discovering &lt;code&gt;__meta_process_commandline&lt;/code&gt; label.&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;uid&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable discovering &lt;code&gt;__meta_process_uid&lt;/code&gt;: label.&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;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable discovering &lt;code&gt;__meta_process_username&lt;/code&gt;: label.&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;container_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable discovering &lt;code&gt;__container_id__&lt;/code&gt; label.&lt;/td&gt;
              &lt;td&gt;true&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 set of processes discovered on the local Linux OS.&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;__process_pid__&lt;/code&gt;: The process PID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_process_exe&lt;/code&gt;: The process executable path. Taken from &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/exe&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_process_cwd&lt;/code&gt;: The process current working directory. Taken from &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/cwd&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_process_commandline&lt;/code&gt;: The process command line. Taken from &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/cmdline&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_process_uid&lt;/code&gt;: The process UID. Taken from &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/status&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_process_username&lt;/code&gt;: The process username. Taken from &lt;code&gt;__meta_process_uid&lt;/code&gt; and &lt;code&gt;os/user/LookupID&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__container_id__&lt;/code&gt;: The container ID. Taken from &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/cgroup&lt;/code&gt;. If the process is not running in a container,
this label is not set.&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.process&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.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;p&gt;&lt;code&gt;discovery.process&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;example-discovering-processes-on-the-local-host&#34;&gt;Example discovering processes on the local host&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;discovery.process &amp;#34;all&amp;#34; {
  refresh_interval = &amp;#34;60s&amp;#34;
  discover_config {
    cwd = true
    exe = true
    commandline = true
    username = true
    uid = true
    container_id = true
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;example-discovering-processes-on-the-local-host-and-joining-with-discoverykubernetes&#34;&gt;Example discovering processes on the local host and joining with &lt;code&gt;discovery.kubernetes&lt;/code&gt;&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;discovery.kubernetes &amp;#34;pyroscope_kubernetes&amp;#34; {
  selectors {
    field = &amp;#34;spec.nodeName=&amp;#34; &amp;#43; env(&amp;#34;HOSTNAME&amp;#34;)
    role = &amp;#34;pod&amp;#34;
  }
  role = &amp;#34;pod&amp;#34;
}

discovery.process &amp;#34;all&amp;#34; {
  join = discovery.kubernetes.pyroscope_kubernetes.targets
  refresh_interval = &amp;#34;60s&amp;#34;
  discover_config {
    cwd = true
    exe = true
    commandline = true
    username = true
    uid = true
    container_id = true
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.process&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;discovery.process&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="discoveryprocess">discovery.process&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>discovery.puppetdb</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.puppetdb/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.puppetdb/</guid><content><![CDATA[&lt;h1 id=&#34;discoverypuppetdb&#34;&gt;discovery.puppetdb&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.puppetdb&lt;/code&gt; allows you to retrieve scrape targets from &lt;a href=&#34;https://www.puppet.com/docs/puppetdb/7/overview.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;PuppetDB&lt;/a&gt; resources.&lt;/p&gt;
&lt;p&gt;This SD discovers resources and will create a target for each resource returned by the API.&lt;/p&gt;
&lt;p&gt;The resource address is the &lt;code&gt;certname&lt;/code&gt; of the resource, and can be changed during relabeling.&lt;/p&gt;
&lt;p&gt;The queries for this component are expected to be valid &lt;a href=&#34;https://puppet.com/docs/puppetdb/latest/api/query/v4/pql.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;PQL (Puppet Query Language)&lt;/a&gt;.&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.puppetdb &amp;#34;LABEL&amp;#34; {
  url = PUPPET_SERVER
}&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;The URL of the PuppetDB root query endpoint.&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;query&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Puppet Query Language (PQL) query. Only resources are supported.&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;include_parameters&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to include the parameters as meta labels. Due to the differences between parameter types and Prometheus labels, some parameters might not be rendered. The format of the parameters might also change in future releases. Make sure that you don&amp;rsquo;t have secrets exposed as parameters if you enable this.&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;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 to scrape metrics from.&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;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 targets.&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.puppetdb&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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 puppetdb.&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_puppetdb_query&lt;/code&gt;: the Puppet Query Language (PQL) query.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_puppetdb_certname&lt;/code&gt;: the name of the node associated with the resourcet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_puppetdb_resource&lt;/code&gt;: a SHA-1 hash of the resource’s type, title, and parameters, for identification.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_puppetdb_type&lt;/code&gt;: the resource type.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_puppetdb_title&lt;/code&gt;: the resource title.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_puppetdb_exported&lt;/code&gt;: whether the resource is exported (&amp;ldquo;true&amp;rdquo; or &amp;ldquo;false&amp;rdquo;).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_puppetdb_tags&lt;/code&gt;: comma separated list of resource tags.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_puppetdb_file&lt;/code&gt;: the manifest file in which the resource was declared.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_puppetdb_environment&lt;/code&gt;: the environment of the node associated with the resource.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_puppetdb_parameter_&amp;lt;parametername&amp;gt;&lt;/code&gt;: the parameters of the resource.&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.puppetdb&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.puppetdb&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;discovery.puppetdb&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 targets from puppetdb for all the servers that have a specific package defined:&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.puppetdb &amp;#34;example&amp;#34; {
	url   = &amp;#34;http://puppetdb.local:8080&amp;#34;
	query = &amp;#34;resources { type = \&amp;#34;Package\&amp;#34; and title = \&amp;#34;node_exporter\&amp;#34; }&amp;#34;
	port  = 9100
}

prometheus.scrape &amp;#34;demo&amp;#34; {
	targets    = discovery.puppetdb.example.targets
	forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
	endpoint {
		url = PROMETHEUS_REMOTE_WRITE_URL

		basic_auth {
			username = USERNAME
			password = PASSWORD
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.puppetdb&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverypuppetdb">discovery.puppetdb&lt;/h1>
&lt;p>&lt;code>discovery.puppetdb&lt;/code> allows you to retrieve scrape targets from &lt;a href="https://www.puppet.com/docs/puppetdb/7/overview.html" target="_blank" rel="noopener noreferrer">PuppetDB&lt;/a> resources.&lt;/p>
&lt;p>This SD discovers resources and will create a target for each resource returned by the API.&lt;/p></description></item><item><title>discovery.relabel</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.relabel/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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 &#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;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;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;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;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;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 regular expression replace is performed, if the regular expression matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;$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;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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can use the following actions:&lt;/p&gt;
&lt;ul&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;dropequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do match &lt;code&gt;target_label&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;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;keepequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do not match &lt;code&gt;target_label&lt;/code&gt;.&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;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;lowercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the lowercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&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;uppercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the uppercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression 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;/blockquote&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;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;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.relabel&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;discovery.relabel&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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>discovery.scaleway</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.scaleway/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.scaleway/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryscaleway&#34;&gt;discovery.scaleway&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.scaleway&lt;/code&gt; discovers targets from &lt;a href=&#34;https://www.scaleway.com/en/virtual-instances/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Scaleway instances&lt;/a&gt; and
&lt;a href=&#34;https://www.scaleway.com/en/bare-metal-servers/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;baremetal services&lt;/a&gt;.&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.scaleway &amp;#34;LABEL&amp;#34; {
    project_id = &amp;#34;SCALEWAY_PROJECT_ID&amp;#34;
    role       = &amp;#34;SCALEWAY_PROJECT_ROLE&amp;#34;
    access_key = &amp;#34;SCALEWAY_ACCESS_KEY&amp;#34;
    secret_key = &amp;#34;SCALEWAY_SECRET_KEY&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;project_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Scaleway project ID of targets.&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;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 targets to retrieve.&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_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Scaleway API URL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;https://api.scaleway.com&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;zone&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Availability zone of targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;fr-par-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;access_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Access key for the Scaleway API.&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;secret_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret key for the Scaleway API.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;conditional&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;secret_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 file containing secret key for the Scaleway API.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;conditional&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name_filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name filter to apply against the listing 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;tags_filter&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 tags to search for.&lt;/td&gt;
              &lt;td&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 rediscover targets.&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;port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Default port on servers to associate with generated targets.&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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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_http2&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;The &lt;code&gt;role&lt;/code&gt; argument determines what type of Scaleway machines to discover. It
must be set to one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;baremetal&amp;quot;&lt;/code&gt;: Discover &lt;a href=&#34;https://www.scaleway.com/en/bare-metal-servers/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;baremetal&lt;/a&gt; Scaleway machines.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;instance&amp;quot;&lt;/code&gt;: Discover virtual Scaleway &lt;a href=&#34;https://www.scaleway.com/en/virtual-instances/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;instances&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;name_filter&lt;/code&gt; and &lt;code&gt;tags_filter&lt;/code&gt; arguments can be used to filter the set of
discovered servers. &lt;code&gt;name_filter&lt;/code&gt; returns machines matching a specific name,
while &lt;code&gt;tags_filter&lt;/code&gt; returns machines who contain &lt;em&gt;all&lt;/em&gt; the tags listed in the
&lt;code&gt;tags_filter&lt;/code&gt; argument.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.scaleway&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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Consul catalog API.&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;role&lt;/code&gt; is &lt;code&gt;baremetal&lt;/code&gt;, discovered targets include the following labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_id&lt;/code&gt;: ID of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_public_ipv4&lt;/code&gt;: Public IPv4 address of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_public_ipv6&lt;/code&gt;: Public IPv6 address of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_name&lt;/code&gt;: Name of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_os_name&lt;/code&gt;: Operating system name of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_os_version&lt;/code&gt;: Operation system version of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_project_id&lt;/code&gt;: Project ID the server belongs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_status&lt;/code&gt;: Current status of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_tags&lt;/code&gt;: The list of tags associated with the server concatenated with a &lt;code&gt;,&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_type&lt;/code&gt;: Commercial type of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_baremetal_zone&lt;/code&gt;: Availability zone of the server.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When &lt;code&gt;role&lt;/code&gt; is &lt;code&gt;instance&lt;/code&gt;, discovered targets include the following labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_boot_type&lt;/code&gt;: Boot type of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_hostname&lt;/code&gt;: Hostname of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_id&lt;/code&gt;: ID of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_image_arch&lt;/code&gt;: Architecture of the image the server is running.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_image_id&lt;/code&gt;: ID of the image the server is running.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_image_name&lt;/code&gt;: Name of the image the server is running.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_location_cluster_id&lt;/code&gt;: ID of the cluster for the server&amp;rsquo;s location.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_location_hypervisor_id&lt;/code&gt;: Hypervisor ID for the server&amp;rsquo;s location.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_location_node_id&lt;/code&gt;: Node ID for the server&amp;rsquo;s location.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_name&lt;/code&gt;: Name of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_organization_id&lt;/code&gt;: Organization ID that the server belongs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_private_ipv4&lt;/code&gt;: Private IPv4 address of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_project_id&lt;/code&gt;: Project ID the server belongs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_public_ipv4&lt;/code&gt;: Public IPv4 address of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_public_ipv6&lt;/code&gt;: Public IPv6 address of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_region&lt;/code&gt;: Region of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_security_group_id&lt;/code&gt;: ID of the security group the server is assigned to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_security_group_name&lt;/code&gt;: Name of the security group the server is assigned to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_status&lt;/code&gt;: Current status of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_tags&lt;/code&gt;: The list of tags associated with the server concatenated with a &lt;code&gt;,&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_type&lt;/code&gt;: Commercial type of the server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_scaleway_instance_zone&lt;/code&gt;: Availability zone of the server.&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.scaleway&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.scaleway&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;discovery.scaleway&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.scaleway &amp;#34;example&amp;#34; {
    project_id = &amp;#34;SCALEWAY_PROJECT_ID&amp;#34;
    role       = &amp;#34;SCALEWAY_PROJECT_ROLE&amp;#34;
    access_key = &amp;#34;SCALEWAY_ACCESS_KEY&amp;#34;
    secret_key = &amp;#34;SCALEWAY_SECRET_KEY&amp;#34;
}

prometheus.scrape &amp;#34;demo&amp;#34; {
    targets    = discovery.scaleway.example.targets
    forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
    endpoint {
        url = PROMETHEUS_REMOTE_WRITE_URL

        basic_auth {
            username = USERNAME
            password = PASSWORD
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SCALEWAY_PROJECT_ID&lt;/code&gt;: The project ID of your Scaleway machines.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SCALEWAY_PROJECT_ROLE&lt;/code&gt;: Set to &lt;code&gt;baremetal&lt;/code&gt; to discover &lt;a href=&#34;https://www.scaleway.com/en/bare-metal-servers/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;baremetal&lt;/a&gt; machines or &lt;code&gt;instance&lt;/code&gt; to discover &lt;a href=&#34;https://www.scaleway.com/en/virtual-instances/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;virtual instances&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SCALEWAY_ACCESS_KEY&lt;/code&gt;: Your Scaleway API access key.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SCALEWAY_SECRET_KEY&lt;/code&gt;: Your Scaleway API secret key.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.scaleway&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryscaleway">discovery.scaleway&lt;/h1>
&lt;p>&lt;code>discovery.scaleway&lt;/code> discovers targets from &lt;a href="https://www.scaleway.com/en/virtual-instances/" target="_blank" rel="noopener noreferrer">Scaleway instances&lt;/a> and
&lt;a href="https://www.scaleway.com/en/bare-metal-servers/" target="_blank" rel="noopener noreferrer">baremetal services&lt;/a>.&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.scaleway &amp;#34;LABEL&amp;#34; {
project_id = &amp;#34;SCALEWAY_PROJECT_ID&amp;#34;
role = &amp;#34;SCALEWAY_PROJECT_ROLE&amp;#34;
access_key = &amp;#34;SCALEWAY_ACCESS_KEY&amp;#34;
secret_key = &amp;#34;SCALEWAY_SECRET_KEY&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.serverset</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.serverset/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.serverset/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryserverset&#34;&gt;discovery.serverset&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.serverset&lt;/code&gt; discovers &lt;a href=&#34;https://github.com/twitter/finagle/tree/develop/finagle-serversets&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Serversets&lt;/a&gt; stored in Zookeeper and exposes them as targets.
Serversets are commonly used by &lt;a href=&#34;https://twitter.github.io/finagle/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Finagle&lt;/a&gt; and &lt;a href=&#34;https://aurora.apache.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Aurora&lt;/a&gt;.&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.serverset &amp;#34;LABEL&amp;#34; {
	servers = SERVERS_LIST
	paths   = ZOOKEEPER_PATHS_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Serverset data stored in Zookeeper must be in JSON format. The Thrift format is not supported.&lt;/p&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;servers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Zookeeper servers 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;paths&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Zookeeper paths to discover Serversets 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;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Zookeeper session timeout&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10s&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 set of targets discovered.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following metadata labels are available on targets during relabeling:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_serverset_path&lt;/code&gt;: the full path to the serverset member node in Zookeeper&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_serverset_endpoint_host&lt;/code&gt;: the host of the default endpoint&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_serverset_endpoint_port&lt;/code&gt;: the port of the default endpoint&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_serverset_endpoint_host_&amp;lt;endpoint&amp;gt;&lt;/code&gt;: the host of the given endpoint&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_serverset_endpoint_port_&amp;lt;endpoint&amp;gt;&lt;/code&gt;: the port of the given endpoint&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_serverset_shard&lt;/code&gt;: the shard number of the member&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_serverset_status&lt;/code&gt;: the status of the member&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.serverset&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.serverset&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;discovery.serverset&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;The configuration below will connect to one of the Zookeeper servers
(either &lt;code&gt;zk1&lt;/code&gt;, &lt;code&gt;zk2&lt;/code&gt;, or &lt;code&gt;zk3&lt;/code&gt;) and discover JSON Serversets at paths
&lt;code&gt;/path/to/znode1&lt;/code&gt; and &lt;code&gt;/path/to/znode2&lt;/code&gt;. The discovered targets are scraped
by the &lt;code&gt;prometheus.scrape.default&lt;/code&gt; component and forwarded to
the &lt;code&gt;prometheus.remote_write.default&lt;/code&gt; component, which will send the samples to
specified remote_write URL.&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.serverset &amp;#34;zookeeper&amp;#34; {
	servers = [&amp;#34;zk1&amp;#34;, &amp;#34;zk2&amp;#34;, &amp;#34;zk3&amp;#34;]
	paths   = [&amp;#34;/path/to/znode1&amp;#34;, &amp;#34;/path/to/znode2&amp;#34;]
	timeout = &amp;#34;30s&amp;#34;
}

prometheus.scrape &amp;#34;default&amp;#34; {
	targets    = discovery.serverset.zookeeper.targets
	forward_to = [prometheus.remote_write.default.receiver]
}

prometheus.remote_write &amp;#34;default&amp;#34; {
	endpoint {
		url = &amp;#34;http://remote-write-url1&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.serverset&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryserverset">discovery.serverset&lt;/h1>
&lt;p>&lt;code>discovery.serverset&lt;/code> discovers &lt;a href="https://github.com/twitter/finagle/tree/develop/finagle-serversets" target="_blank" rel="noopener noreferrer">Serversets&lt;/a> stored in Zookeeper and exposes them as targets.
Serversets are commonly used by &lt;a href="https://twitter.github.io/finagle/" target="_blank" rel="noopener noreferrer">Finagle&lt;/a> and &lt;a href="https://aurora.apache.org/" target="_blank" rel="noopener noreferrer">Aurora&lt;/a>.&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.serverset &amp;#34;LABEL&amp;#34; {
servers = SERVERS_LIST
paths = ZOOKEEPER_PATHS_LIST
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;p>Serverset data stored in Zookeeper must be in JSON format. The Thrift format is not supported.&lt;/p></description></item><item><title>discovery.triton</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.triton/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.triton/</guid><content><![CDATA[&lt;h1 id=&#34;discoverytriton&#34;&gt;discovery.triton&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.triton&lt;/code&gt; discovers &lt;a href=&#34;https://www.tritondatacenter.com&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Triton&lt;/a&gt; Container Monitors 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.triton &amp;#34;LABEL&amp;#34; {
	account    = ACCOUNT
	dns_suffix = DNS_SUFFIX
	endpoint   = ENDPOINT
}&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;account&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The account to use for discovering new targets.&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;role&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The type of targets to discover.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;container&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;dns_suffix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The DNS suffix that is applied to 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;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Triton discovery endpoint.&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;groups&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 groups to retrieve targets 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;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 to use for discovery and metrics scraping.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;9163&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;The refresh interval for the list of targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;60s&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;version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Triton discovery API version.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;role&lt;/code&gt; can be set to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;container&amp;quot;&lt;/code&gt; to discover virtual machines (SmartOS zones, lx/KVM/bhyve branded zones) running on Triton&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;cn&amp;quot;&lt;/code&gt; to discover compute nodes (servers/global zones) making up the Triton infrastructure&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;groups&lt;/code&gt; is only supported when &lt;code&gt;role&lt;/code&gt; is set to &lt;code&gt;&amp;quot;container&amp;quot;&lt;/code&gt;. If omitted all
containers owned by the requesting account are scraped.&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;discovery.triton&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;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;TLS configuration for requests to the Triton API.&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_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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Triton API.&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;role&lt;/code&gt; is set to &lt;code&gt;&amp;quot;container&amp;quot;&lt;/code&gt;, each target includes the following labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_triton_groups&lt;/code&gt;: The list of groups belonging to the target joined by a comma separator.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_triton_machine_alias&lt;/code&gt;: The alias of the target container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_triton_machine_brand&lt;/code&gt;: The brand of the target container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_triton_machine_id&lt;/code&gt;: The UUID of the target container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_triton_machine_image&lt;/code&gt;: The target container&amp;rsquo;s image type.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_triton_server_id&lt;/code&gt;: The server UUID the target container is running on.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When &lt;code&gt;role&lt;/code&gt; is set to &lt;code&gt;&amp;quot;cn&amp;quot;&lt;/code&gt; each target includes the following labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_triton_machine_alias&lt;/code&gt;: The hostname of the target (requires triton-cmon 1.7.0 or newer).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_triton_machine_id&lt;/code&gt;: The UUID of the target.&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.triton&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.triton&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;discovery.triton&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.triton &amp;#34;example&amp;#34; {
	account    = TRITON_ACCOUNT
	dns_suffix = TRITON_DNS_SUFFIX
	endpoint   = TRITON_ENDPOINT
}

prometheus.scrape &amp;#34;demo&amp;#34; {
	targets    = discovery.triton.example.targets
	forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
	endpoint {
		url = PROMETHEUS_REMOTE_WRITE_URL

		basic_auth {
			username = USERNAME
			password = PASSWORD
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;TRITON_ACCOUNT&lt;/code&gt;: Your Triton account.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TRITON_DNS_SUFFIX&lt;/code&gt;: Your Triton DNS suffix.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TRITON_ENDPOINT&lt;/code&gt;: Your Triton endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.triton&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoverytriton">discovery.triton&lt;/h1>
&lt;p>&lt;code>discovery.triton&lt;/code> discovers &lt;a href="https://www.tritondatacenter.com" target="_blank" rel="noopener noreferrer">Triton&lt;/a> Container Monitors 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.triton &amp;#34;LABEL&amp;#34; {
account = ACCOUNT
dns_suffix = DNS_SUFFIX
endpoint = ENDPOINT
}&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.uyuni</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.uyuni/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/discovery.uyuni/</guid><content><![CDATA[&lt;h1 id=&#34;discoveryuyuni&#34;&gt;discovery.uyuni&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;discovery.uyuni&lt;/code&gt; discovers &lt;a href=&#34;https://www.uyuni-project.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Uyuni&lt;/a&gt; Monitoring Endpoints 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.uyuni &amp;#34;LABEL&amp;#34; {
    server   = SERVER
    username = USERNAME
    password = PASSWORD
}&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;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The primary Uyuni Server.&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;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The username to use for authentication to the Uyuni API.&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;The password to use for authentication to the Uyuni API.&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;entitlement&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The entitlement to filter on when listing targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;monitoring_entitled&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;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 to use when building the &lt;code&gt;__meta_uyuni_groups&lt;/code&gt; label.&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Interval at which to refresh the list of targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1m&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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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_http2&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;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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.uyuni&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;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;TLS configuration for requests to the Uyuni API.&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_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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 Uyuni 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_uyuni_minion_hostname&lt;/code&gt;: The hostname of the Uyuni Minion.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_uyuni_primary_fqdn&lt;/code&gt;: The FQDN of the Uyuni primary.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_uyuni_system_id&lt;/code&gt;: The system ID of the Uyuni Minion.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_uyuni_groups&lt;/code&gt;: The groups the Uyuni Minion belongs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_uyuni_endpoint_name&lt;/code&gt;: The name of the endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_uyuni_exporter&lt;/code&gt;: The name of the exporter.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_uyuni_proxy_module&lt;/code&gt;: The name of the Uyuni module.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_uyuni_metrics_path&lt;/code&gt;: The path to the metrics endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_uyuni_scheme&lt;/code&gt;: &lt;code&gt;https&lt;/code&gt; if TLS is enabled on the endpoint, &lt;code&gt;http&lt;/code&gt; otherwise.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These labels are largely derived from a &lt;a href=&#34;https://www.uyuni-project.org/uyuni-docs-api/uyuni/api/system.monitoring.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;listEndpoints&lt;/a&gt;
API call to the Uyuni Server.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.uyuni&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.uyuni&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;discovery.uyuni&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.uyuni &amp;#34;example&amp;#34; {
  server    = &amp;#34;https://127.0.0.1/rpc/api&amp;#34;
  username  = UYUNI_USERNAME
  password  = UYUNI_PASSWORD
}

prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = discovery.uyuni.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;UYUNI_USERNAME&lt;/code&gt;: The username to use for authentication to the Uyuni server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UYUNI_PASSWORD&lt;/code&gt;: The password to use for authentication to the Uyuni server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;discovery.uyuni&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="discoveryuyuni">discovery.uyuni&lt;/h1>
&lt;p>&lt;code>discovery.uyuni&lt;/code> discovers &lt;a href="https://www.uyuni-project.org/" target="_blank" rel="noopener noreferrer">Uyuni&lt;/a> Monitoring Endpoints 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.uyuni &amp;#34;LABEL&amp;#34; {
server = SERVER
username = USERNAME
password = PASSWORD
}&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>faro.receiver</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/faro.receiver/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/faro.receiver/</guid><content><![CDATA[&lt;h1 id=&#34;faroreceiver&#34;&gt;faro.receiver&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;faro.receiver&lt;/code&gt; accepts web application telemetry data from the &lt;a href=&#34;https://github.com/grafana/faro-web-sdk&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Faro Web SDK&lt;/a&gt;
and forwards it to other components for future processing.&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;faro.receiver &amp;#34;LABEL&amp;#34; {
    output {
        logs   = [LOKI_RECEIVERS]
        traces = [OTELCOL_COMPONENTS]
    }
}&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;extra_log_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Extra labels to attach to emitted log lines.&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;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;faro.receiver&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;server&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#server-block&#34;&gt;server&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;server &amp;gt; rate_limiting&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#rate_limiting-block&#34;&gt;rate_limiting&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures rate limiting for the HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;sourcemaps&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#sourcemaps-block&#34;&gt;sourcemaps&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures sourcemap retrieval.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;sourcemaps &amp;gt; location&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#location-block&#34;&gt;location&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures on-disk location for sourcemap retrieval.&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 collected 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;server-block&#34;&gt;server block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;server&lt;/code&gt; block configures the HTTP server managed by the &lt;code&gt;faro.receiver&lt;/code&gt;
component. Clients using the &lt;a href=&#34;https://github.com/grafana/faro-web-sdk&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Faro Web SDK&lt;/a&gt; forward telemetry
data to this HTTP server for processing.&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;Address to listen for HTTP traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;127.0.0.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;listen_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 listen for HTTP traffic on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;12347&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;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;Origins for which cross-origin requests are permitted.&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;api_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional API key to validate client requests with.&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;max_allowed_payload_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 (in bytes) for client requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5MiB&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;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;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, telemetry data is only accepted from applications on the same local
network as the browser. To accept telemetry data from a wider set of clients,
modify the &lt;code&gt;listen_address&lt;/code&gt; attribute to the IP address of the appropriate
network interface to use.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;cors_allowed_origins&lt;/code&gt; argument determines what origins browser requests
may come from. The default value, &lt;code&gt;[]&lt;/code&gt;, disables CORS support. To support
requests from all origins, set &lt;code&gt;cors_allowed_origins&lt;/code&gt; to &lt;code&gt;[&amp;quot;*&amp;quot;]&lt;/code&gt;. The &lt;code&gt;*&lt;/code&gt;
character indicates a wildcard.&lt;/p&gt;
&lt;p&gt;When the &lt;code&gt;api_key&lt;/code&gt; argument is non-empty, client requests must have an HTTP
header called &lt;code&gt;X-API-Key&lt;/code&gt; matching the value of the &lt;code&gt;api_key&lt;/code&gt; argument.
Requests that are missing the header or have the wrong value are rejected with
an &lt;code&gt;HTTP 401 Unauthorized&lt;/code&gt; status code. If the &lt;code&gt;api_key&lt;/code&gt; argument is empty, no
authentication checks are performed, and the &lt;code&gt;X-API-Key&lt;/code&gt; HTTP header is
ignored.&lt;/p&gt;
&lt;h3 id=&#34;rate_limiting-block&#34;&gt;rate_limiting block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;rate_limiting&lt;/code&gt; block configures rate limiting for client requests.&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;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to enable rate limiting.&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;rate&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Rate of allowed requests per second.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;50&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;burst_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allowed burst size of requests.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Rate limiting functions as a &lt;a href=&#34;https://en.wikipedia.org/wiki/Token_bucket&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;token bucket algorithm&lt;/a&gt;, where
a bucket has a maximum capacity for up to &lt;code&gt;burst_size&lt;/code&gt; requests and refills at a
rate of &lt;code&gt;rate&lt;/code&gt; per second.&lt;/p&gt;
&lt;p&gt;Each HTTP request drains the capacity of the bucket by one. Once the bucket is
empty, HTTP requests are rejected with an &lt;code&gt;HTTP 429 Too Many Requests&lt;/code&gt; status
code until the bucket has more available capacity.&lt;/p&gt;
&lt;p&gt;Configuring the &lt;code&gt;rate&lt;/code&gt; argument determines how fast the bucket refills, and
configuring the &lt;code&gt;burst_size&lt;/code&gt; argument determines how many requests can be
received in a burst before the bucket is empty and starts rejecting requests.&lt;/p&gt;
&lt;h3 id=&#34;sourcemaps-block&#34;&gt;sourcemaps block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;sourcemaps&lt;/code&gt; block configures how to retrieve sourcemaps. Sourcemaps are
then used to transform file and line information from minified code into the
file and line information from the original source code.&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;download&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to download sourcemaps.&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;download_from_origins&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Which origins to download sourcemaps from.&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;download_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 downloading sourcemaps.&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;p&gt;When exceptions are sent to the &lt;code&gt;faro.receiver&lt;/code&gt; component, it can download
sourcemaps from the web application. You can disable this behavior by setting
the &lt;code&gt;download&lt;/code&gt; argument to &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;download_from_origins&lt;/code&gt; argument determines which origins a sourcemap may
be downloaded from. The origin is attached to the URL that a browser is sending
telemetry data from. The default value, &lt;code&gt;[&amp;quot;*&amp;quot;]&lt;/code&gt;, enables downloading sourcemaps
from all origins. The &lt;code&gt;*&lt;/code&gt; character indicates a wildcard.&lt;/p&gt;
&lt;p&gt;By default, sourcemap downloads are subject to a timeout of &lt;code&gt;&amp;quot;1s&amp;quot;&lt;/code&gt;, specified
by the &lt;code&gt;download_timeout&lt;/code&gt; argument. Setting &lt;code&gt;download_timeout&lt;/code&gt; to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;
disables timeouts.&lt;/p&gt;
&lt;p&gt;To retrieve sourcemaps from disk instead of the network, specify one or more
&lt;a href=&#34;#location-block&#34;&gt;&lt;code&gt;location&lt;/code&gt; blocks&lt;/a&gt;. When &lt;code&gt;location&lt;/code&gt; blocks are provided, they are
checked first for sourcemaps before falling back to downloading.&lt;/p&gt;
&lt;h3 id=&#34;location-block&#34;&gt;location block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;location&lt;/code&gt; block declares a location where sourcemaps are stored on the
filesystem. The &lt;code&gt;location&lt;/code&gt; block can be specified multiple times to declare
multiple locations where sourcemaps are stored.&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;The path on disk where sourcemaps are stored.&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;minified_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 prefix of the minified path sent from browsers.&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;minified_path_prefix&lt;/code&gt; argument determines the prefix of paths to
Javascript files, such as &lt;code&gt;http://example.com/&lt;/code&gt;. The &lt;code&gt;path&lt;/code&gt; argument then
determines where to find the sourcemap for the file.&lt;/p&gt;
&lt;p&gt;For example, given the following location block:&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;location {
    path                 = &amp;#34;/var/my-app/build&amp;#34;
    minified_path_prefix = &amp;#34;http://example.com/&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To look up the sourcemaps for a file hosted at &lt;code&gt;http://example.com/foo.js&lt;/code&gt;, the
&lt;code&gt;faro.receiver&lt;/code&gt; component will:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Remove the minified path prefix to extract the path to the file (&lt;code&gt;foo.js&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Search for that file path with a &lt;code&gt;.map&lt;/code&gt; extension (&lt;code&gt;foo.js.map&lt;/code&gt;) in &lt;code&gt;path&lt;/code&gt;
(&lt;code&gt;/var/my-app/build/foo.js.map&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Optionally, the value for the &lt;code&gt;path&lt;/code&gt; argument may contain &lt;code&gt;{{ .Release }}&lt;/code&gt; as a
template value, such as &lt;code&gt;/var/my-app/{{ .Release }}/build&lt;/code&gt;. The template value
will be replaced with the release value provided by the &lt;a href=&#34;https://github.com/grafana/faro-web-sdk&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Faro Web App SDK&lt;/a&gt;.&lt;/p&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; block specifies where to forward collected logs and traces.&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;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(LogsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of &lt;code&gt;loki&lt;/code&gt; components to forward 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;A list of &lt;code&gt;otelcol&lt;/code&gt; components to forward 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;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;faro.receiver&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;faro.receiver&lt;/code&gt; is reported as unhealthy when the integrated server fails to
start.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;faro.receiver&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;faro.receiver&lt;/code&gt; exposes the following metrics for monitoring the component:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_logs_total&lt;/code&gt; (counter): Total number of ingested logs.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_measurements_total&lt;/code&gt; (counter): Total number of ingested measurements.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_exceptions_total&lt;/code&gt; (counter): Total number of ingested exceptions.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_events_total&lt;/code&gt; (counter): Total number of ingested events.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_exporter_errors_total&lt;/code&gt; (counter): Total number of errors produced by an internal exporter.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_request_duration_seconds&lt;/code&gt; (histogram): Time (in seconds) spent serving HTTP requests.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_request_message_bytes&lt;/code&gt; (histogram): Size (in bytes) of HTTP requests received from clients.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_response_message_bytes&lt;/code&gt; (histogram): Size (in bytes) of HTTP responses sent to clients.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_inflight_requests&lt;/code&gt; (gauge): Current number of inflight requests.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_sourcemap_cache_size&lt;/code&gt; (counter): Number of items in sourcemap cache per origin.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_sourcemap_downloads_total&lt;/code&gt; (counter): Total number of sourcemap downloads performed per origin and status.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faro_receiver_sourcemap_file_reads_total&lt;/code&gt; (counter): Total number of sourcemap retrievals using the filesystem per origin and status.&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;faro.receiver &amp;#34;default&amp;#34; {
    server {
        listen_address = &amp;#34;NETWORK_ADDRESS&amp;#34;
    }

    sourcemaps {
        location {
            path                 = &amp;#34;PATH_TO_SOURCEMAPS&amp;#34;
            minified_path_prefix = &amp;#34;WEB_APP_PREFIX&amp;#34;
        }
    }

    output {
        logs   = [loki.write.default.receiver]
        traces = [otelcol.exporter.otlp.traces.input]
    }
}

loki.write &amp;#34;default&amp;#34; {
    endpoint {
        url = &amp;#34;https://LOKI_ADDRESS/api/v1/push&amp;#34;
    }
}

otelcol.exporter.otlp &amp;#34;traces&amp;#34; {
    client {
        endpoint = &amp;#34;OTLP_ADDRESS&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;NETWORK_ADDRESS&lt;/code&gt;: IP address of the network interface to listen to traffic
on. This IP address must be reachable by browsers using the web application
to instrument.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;PATH_TO_SOURCEMAPS&lt;/code&gt;: Path on disk where sourcemaps are located.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;WEB_APP_PREFIX&lt;/code&gt;: Prefix of the web application being instrumented.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;LOKI_ADDRESS&lt;/code&gt;: Address of the Loki server to send logs to.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If authentication is required to send logs to the Loki server, refer to the
documentation of &lt;a href=&#34;../loki.write/&#34;&gt;loki.write&lt;/a&gt; for more information.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;OTLP_ADDRESS&lt;/code&gt;: The address of the OTLP-compatible server to send traces to.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If authentication is required to send logs to the Loki server, refer to the
documentation of &lt;a href=&#34;../otelcol.exporter.otlp/&#34;&gt;otelcol.exporter.otlp&lt;/a&gt; for more information.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;faro.receiver&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="faroreceiver">faro.receiver&lt;/h1>
&lt;p>&lt;code>faro.receiver&lt;/code> accepts web application telemetry data from the &lt;a href="https://github.com/grafana/faro-web-sdk" target="_blank" rel="noopener noreferrer">Grafana Faro Web SDK&lt;/a>
and forwards it to other components for future processing.&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">faro.receiver &amp;#34;LABEL&amp;#34; {
output {
logs = [LOKI_RECEIVERS]
traces = [OTELCOL_COMPONENTS]
}
}&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>local.file</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/local.file/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;../../../concepts/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;div data-shared=&#34;flow/reference/components/local-file-arguments-text.md&#34;&gt;
            &lt;h3 id=&#34;file-change-detectors&#34;&gt;File change detectors&lt;/h3&gt;
&lt;p&gt;File change detectors detect 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 is updated.
This detector requires a filesystem that 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;The component re-reads the watched file when a filesystem event is received.
This re-read happens for any filesystem event related to the file, including a permissions change.&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; stops receiving filesystem events if the watched file has been deleted, renamed, or moved.
The subscription is 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 causes the watched file to be re-read every &lt;code&gt;poll_frequency&lt;/code&gt;, regardless of whether the file changed.&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;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;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&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 successfully 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>local.file_match</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/local.file_match/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/local.file_match/</guid><content><![CDATA[&lt;h1 id=&#34;localfile_match&#34;&gt;local.file_match&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;local.file_match&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;local.file_match &amp;#34;LABEL&amp;#34; {
  path_targets = [{&amp;#34;__path__&amp;#34; = DOUBLESTAR_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_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;local.file_match&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;local.file_match&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;local.file_match&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;send-tmplogslog-files-to-loki&#34;&gt;Send &lt;code&gt;/tmp/logs/*.log&lt;/code&gt; files to Loki&lt;/h3&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;local.file_match &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    = local.file_match.tmp.targets
  forward_to = [loki.write.endpoint.receiver]
}

loki.write &amp;#34;endpoint&amp;#34; {
  endpoint {
      url = LOKI_URL
      basic_auth {
          username = USERNAME
          password = PASSWORD
      }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;LOKI_URL&lt;/code&gt;: The URL of the Loki server to send logs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the Loki API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the Loki API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;send-kubernetes-pod-logs-to-loki&#34;&gt;Send Kubernetes pod logs to Loki&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;
  }
}

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

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

loki.write &amp;#34;endpoint&amp;#34; {
  endpoint {
      url = LOKI_URL
      basic_auth {
          username = USERNAME
          password = PASSWORD
      }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;LOKI_URL&lt;/code&gt;: The URL of the Loki server to send logs to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the Loki API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the Loki API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;local.file_match&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;local.file_match&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="localfile_match">local.file_match&lt;/h1>
&lt;p>&lt;code>local.file_match&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">local.file_match &amp;#34;LABEL&amp;#34; {
path_targets = [{&amp;#34;__path__&amp;#34; = DOUBLESTAR_PATH}]
}&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>loki.echo</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.echo/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.echo/</guid><content><![CDATA[&lt;h1 id=&#34;lokiecho&#34;&gt;loki.echo&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;loki.echo&lt;/code&gt; receives log entries from other &lt;code&gt;loki&lt;/code&gt; components and prints them
to the process&amp;rsquo; standard output (stdout).&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.echo&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.echo &amp;#34;LABEL&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;loki.echo&lt;/code&gt; accepts no arguments.&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;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.echo&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.echo&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 that reads log files from &lt;code&gt;/var/log&lt;/code&gt; and
prints log lines to echo:&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;local.file_match &amp;#34;varlog&amp;#34; {
  path_targets = [{
    __path__ = &amp;#34;/var/log/*log&amp;#34;,
    job      = &amp;#34;varlog&amp;#34;,
  }]
}

loki.source.file &amp;#34;logs&amp;#34; {
  targets    = local.file_match.varlog.targets
  forward_to = [loki.echo.example.receiver]
}

loki.echo &amp;#34;example&amp;#34; { }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.echo&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#loki-logsreceiver-consumers&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="lokiecho">loki.echo&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>loki.process</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.process/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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 tool 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.STAGENAME {
    ...
  }
  ...
}&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.cri&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagecri-block&#34;&gt;stage.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.decolorize&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagedecolorize-block&#34;&gt;stage.decolorize&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Strips ANSI color codes from log lines.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage.docker&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagedocker-block&#34;&gt;stage.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.drop&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagedrop-block&#34;&gt;stage.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;tr&gt;
              &lt;td&gt;stage.eventlogmessage&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stageeventlogmessage-block&#34;&gt;stage.eventlogmessage&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Extracts data from the Message field in the Windows Event Log.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage.geoip&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagegeoip-block&#34;&gt;stage.geoip&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;geoip&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.json&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagejson-block&#34;&gt;stage.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.label_drop&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagelabel_drop-block&#34;&gt;stage.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.label_keep&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagelabel_keep-block&#34;&gt;stage.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.labels&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagelabels-block&#34;&gt;stage.labels&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;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.limit&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagelimit-block&#34;&gt;stage.limit&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;limit&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.logfmt&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagelogfmt-block&#34;&gt;stage.logfmt&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;logfmt&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.luhn&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stageluhn-block&#34;&gt;stage.luhn&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;luhn&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.match&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagematch-block&#34;&gt;stage.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.metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagemetrics-block&#34;&gt;stage.metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;metrics&lt;/code&gt; stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage.multiline&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagemultiline-block&#34;&gt;stage.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.output&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stageoutput-block&#34;&gt;stage.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.pack&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagepack-block&#34;&gt;stage.pack&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;pack&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.regex&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stageregex-block&#34;&gt;stage.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.replace&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagereplace-block&#34;&gt;stage.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.sampling&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagesampling-block&#34;&gt;stage.sampling&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Samples logs at a given rate.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage.static_labels&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagestatic_labels-block&#34;&gt;stage.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.structured_metadata&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagestructuredmetadata-block&#34;&gt;stage.structured_metadata&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a structured metadata processing stage.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;stage.template&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagetemplate-block&#34;&gt;stage.template&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;template&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.tenant&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagetenant-block&#34;&gt;stage.tenant&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;tenant&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.timestamp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#stagetimestamp-block&#34;&gt;stage.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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;A user can provide any number of these stage blocks nested inside
&lt;code&gt;loki.process&lt;/code&gt;; these will run in order of appearance in the configuration
file.&lt;/p&gt;
&lt;h3 id=&#34;stagecri-block&#34;&gt;stage.cri block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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 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_partial_lines&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 partial lines to hold in memory.&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_partial_line_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 characters which a partial line can have.&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_partial_line_size_truncate&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Truncate partial lines that are longer than &lt;code&gt;max_partial_line_size&lt;/code&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;p&gt;&lt;code&gt;max_partial_line_size&lt;/code&gt; is only taken into account if
&lt;code&gt;max_partial_line_size_truncate&lt;/code&gt; is set to &lt;code&gt;true&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;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;stagedecolorize-block&#34;&gt;stage.decolorize block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.decolorize&lt;/code&gt; strips ANSI color codes from the log lines, thus making
it easier to parse logs further.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;stage.decolorize&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.decolorize {}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;code&gt;stage.decolorize&lt;/code&gt; turns each line having a color code into a non-colored one,
for example:&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;[2022-11-04 22:17:57.811] \033[0;32http\033[0m: GET /_health (0 ms) 204&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;is turned 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;[2022-11-04 22:17:57.811] http: GET /_health (0 ms) 204&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;stagedocker-block&#34;&gt;stage.docker block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;stage.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;stagedrop-block&#34;&gt;stage.drop block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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 or comma-separated list of names from extracted data to match. 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;separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;source&lt;/code&gt; is a comma-separated list of names, this separator is placed between concatenated extracted data values.&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 must be a RE2 regex string.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;source&lt;/code&gt; is empty or not provided, the regex attempts to match the log
line itself.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;source&lt;/code&gt; is a single name, the regex attempts to match the corresponding
value from the extracted map.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;source&lt;/code&gt; is a comma-separated list of names, the corresponding values from
the extracted map are concatenated using &lt;code&gt;separator&lt;/code&gt; and the regex attempts to
match the concatenated string.&lt;/li&gt;
&lt;/ul&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;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;source&lt;/code&gt; is a single name, the entries are dropped when there is an exact
match between the corresponding value from the extracted map and the &lt;code&gt;value&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;source&lt;/code&gt; is a comma-separated list of names, the entries are dropped when
the &lt;code&gt;value&lt;/code&gt; matches the &lt;code&gt;source&lt;/code&gt; values from extracted data, concatenated using
the &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&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 &#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.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;
drops 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 &#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.drop {
    older_than          = &amp;#34;24h&amp;#34;
    drop_counter_reason = &amp;#34;too old&amp;#34;
}

stage.drop {
    longer_than         = &amp;#34;8KB&amp;#34;
    drop_counter_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;h3 id=&#34;stageeventlogmessage-block&#34;&gt;stage.eventlogmessage block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;eventlogmessage&lt;/code&gt; stage extracts data from the Message string that appears
in the Windows Event Log.&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 of the field in the extracted data to parse.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;message&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;overwrite_existing&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to overwrite existing extracted data fields.&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;drop_invalid_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to drop fields that are not valid label names.&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 &lt;code&gt;overwrite_existing&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;, the stage overwrites existing extracted data
fields with the same name. If set to &lt;code&gt;false&lt;/code&gt;, the &lt;code&gt;_extracted&lt;/code&gt; suffix will be
appended to an already existing field name.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;drop_invalid_labels&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;, the stage drops fields that are
not valid label names. If set to &lt;code&gt;false&lt;/code&gt;, the stage will automatically convert
them into valid labels replacing invalid characters with underscores.&lt;/p&gt;
&lt;h4 id=&#34;example-combined-with-stagejson&#34;&gt;Example combined with &lt;code&gt;stage.json&lt;/code&gt;&lt;/h4&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.json {
    expressions = { 
        message = &amp;#34;&amp;#34;, 
        Overwritten = &amp;#34;&amp;#34;,
    }
}

stage.eventlogmessage {
    source = &amp;#34;message&amp;#34;
    overwrite_existing = true
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Given the following log line:&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;event_id&amp;#34;: 1, &amp;#34;Overwritten&amp;#34;: &amp;#34;old&amp;#34;, &amp;#34;message&amp;#34;: &amp;#34;Message type:\r\nOverwritten: new\r\nImage: C:\\Users\\User\\agent.exe&amp;#34;}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The first stage would create the following key-value pairs in the set of
extracted data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;message&lt;/code&gt;: &lt;code&gt;Message type:\r\nOverwritten: new\r\nImage: C:\Users\User\agent.exe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Overwritten&lt;/code&gt;: &lt;code&gt;old&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The second stage will parse the value of &lt;code&gt;message&lt;/code&gt; from the extracted data
and append/overwrite the following key-value pairs to the set of extracted data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Image&lt;/code&gt;: &lt;code&gt;C:\\Users\\User\\agent.exe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Message_type&lt;/code&gt;: (empty string)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Overwritten&lt;/code&gt;: &lt;code&gt;new&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;stagejson-block&#34;&gt;stage.json block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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 JMESPath 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 = &amp;#34;log&amp;#34;, 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;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Due to a limitation of the upstream jmespath library, you must wrap any string
that contains a hyphen &lt;code&gt;-&lt;/code&gt; in quotes so that it&amp;rsquo;s not considered a numerical
expression.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t use quotes to wrap a string that contains a hyphen, you will get
errors like: &lt;code&gt;Unexpected token at the end of the expression: tNumber&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can use one of two options to circumvent this issue:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An escaped double quote. For example: &lt;code&gt;http_user_agent = &amp;quot;\&amp;quot;request_User-Agent\&amp;quot;&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;A backtick quote. For example: &lt;code&gt;http_user_agent = `&amp;quot;request_User-Agent&amp;quot;` &lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;stagelabel_drop-block&#34;&gt;stage.label_drop block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;stagelabel_keep-block&#34;&gt;stage.label_keep block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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_pod_container_name&amp;#34; ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;stagelabels-block&#34;&gt;stage.labels block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;stagestructured_metadata-block&#34;&gt;stage.structured_metadata block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.structured_metadata&lt;/code&gt; inner block configures a stage that can read
data from the extracted values map and add them to log entries as structured metadata.&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;Specifies the list of labels to add from extracted values map to log entry.&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 structured_metadata 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.structured_metadata {
    values = {
      env  = &amp;#34;&amp;#34;,         // Sets up an &amp;#39;env&amp;#39; property to structured metadata, based on the &amp;#39;env&amp;#39; extracted value.
      user = &amp;#34;username&amp;#34;, // Sets up a &amp;#39;user&amp;#39; property to structured metadata, 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;stagelimit-block&#34;&gt;stage.limit block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.limit&lt;/code&gt; inner block configures a rate-limiting stage that throttles logs
based on several options.&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;rate&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum rate of lines per second that the stage forwards.&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;burst&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of burst lines that the stage forwards.&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;by_label_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label to use when rate-limiting on a label name.&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&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to discard or backpressure lines that exceed the rate limit.&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_distinct_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The number of unique values to keep track of when rate-limiting &lt;code&gt;by_label_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10000&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 rate limiting is implemented as a &amp;ldquo;token bucket&amp;rdquo; of size &lt;code&gt;burst&lt;/code&gt;, initially
full and refilled at &lt;code&gt;rate&lt;/code&gt; tokens per second. Each received log entry consumes one token from the bucket. When &lt;code&gt;drop&lt;/code&gt; is set to true, incoming entries
that exceed the rate-limit are dropped, otherwise they are queued until
more tokens are available.&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.limit {
    rate  = 5
    burst = 10
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If &lt;code&gt;by_label_name&lt;/code&gt; is set, then &lt;code&gt;drop&lt;/code&gt; must be set to &lt;code&gt;true&lt;/code&gt;. This enables the
stage to rate-limit not by the number of lines but by the number of labels.&lt;/p&gt;
&lt;p&gt;The following example rate-limits entries from each unique &lt;code&gt;namespace&lt;/code&gt; value
independently. Any entries without the &lt;code&gt;namespace&lt;/code&gt; label are not rate-limited.
The stage keeps track of up to &lt;code&gt;max_distinct_labels&lt;/code&gt; unique
values, defaulting at 10000.&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.limit {
    rate  = 10
    burst = 10
    drop  = true

    by_label_name = &amp;#34;namespace&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;stagelogfmt-block&#34;&gt;stage.logfmt block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;stageluhn-block&#34;&gt;stage.luhn block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.luhn&lt;/code&gt; inner block configures a processing stage that reads incoming
log lines and redacts strings that match a Luhn algorithm.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://en.wikipedia.org/wiki/Luhn_algorithm&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Luhn algorithm&lt;/a&gt; is a simple checksum formula used to validate various
identification numbers, such as credit card numbers, IMEI numbers, National
Provider Identifier numbers in the US, and Canadian Social Insurance Numbers.
Many Payment Card Industry environments require these numbers to be redacted.&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;replacement&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;String to substitute the matched patterns with&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;**REDACTED**&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;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.&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;minLength&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum length of digits to consider&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;13&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 search. 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;The following example log line contains an approved credit card number.&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;credit card approved 4032032513548443&amp;#34; extra=&amp;#34;user=foo&amp;#34;

stage.luhn {
    replacement = &amp;#34;**DELETED**&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The stage parses the log line, redacts the credit card number, and produces the following updated log line:&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=INFO duration=125 message=&amp;#34;credit card approved **DELETED**&amp;#34; extra=&amp;#34;user=foo&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;stagematch-block&#34;&gt;stage.match block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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 line 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;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The filters do not include label filter expressions such as &lt;code&gt;| label == &amp;quot;foobar&amp;quot;&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;stage.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. It supports all the
same &lt;code&gt;stage.NAME&lt;/code&gt; blocks as the in the top level of the loki.process component.&lt;/p&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;#34;{applbl=\&amp;#34;foo\&amp;#34;}&amp;#34;

    stage.json {
        expressions = { &amp;#34;msg&amp;#34; = &amp;#34;message&amp;#34; }
    }
}

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

stage.match {
    selector = &amp;#34;{applbl=\&amp;#34;bar\&amp;#34;} |~ \&amp;#34;.*noisy error.*\&amp;#34;&amp;#34;
    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;stagemetrics-block&#34;&gt;stage.metrics block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.metrics&lt;/code&gt; inner block configures stage that allows to define and
update metrics based on values from the shared extracted map. The created
metrics are available at the Agent&amp;rsquo;s root /metrics endpoint.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;stage.metrics&lt;/code&gt; block does not support any arguments and is only configured via
a number of nested inner &lt;code&gt;metric.*&lt;/code&gt; blocks, one for each metric that should be
generated.&lt;/p&gt;
&lt;p&gt;The following blocks are supported inside the definition of &lt;code&gt;stage.metrics&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;metric.counter&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metriccounter-block&#34;&gt;metric.counter&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Defines a &lt;code&gt;counter&lt;/code&gt; metric.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;metric.gauge&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metricgauge-block&#34;&gt;metric.gauge&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Defines a &lt;code&gt;gauge&lt;/code&gt; metric.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;metric.histogram&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metrichistogram-block&#34;&gt;metric.histogram&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Defines a &lt;code&gt;histogram&lt;/code&gt; metric.&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;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The metrics will be reset if you reload the Grafana Agent configuration file.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h4 id=&#34;metriccounter-block&#34;&gt;metric.counter block&lt;/h4&gt;
&lt;p&gt;Defines a metric whose value only goes up.&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The metric name.&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;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. Valid actions are &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;inc&lt;/code&gt;, &lt;code&gt;dec&lt;/code&gt;,&lt;code&gt; add&lt;/code&gt;, or &lt;code&gt;sub&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;description&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The metric&amp;rsquo;s description and help text.&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;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key from the extracted data map to use for the metric. Defaults to the metric name.&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;prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The prefix to the metric name.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;loki_process_custom_&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_duration&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 until the metric is marked as &amp;lsquo;stale&amp;rsquo; and 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;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set, the metric only changes if &lt;code&gt;source&lt;/code&gt; exactly matches the &lt;code&gt;value&lt;/code&gt;.&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;match_all&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set to true, all log lines are counted, without attemptng to match the &lt;code&gt;source&lt;/code&gt; to the extracted map.&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;count_entry_bytes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set to true, counts all log lines bytes.&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;A counter cannot set both &lt;code&gt;match_all&lt;/code&gt; to true &lt;em&gt;and&lt;/em&gt; a &lt;code&gt;value&lt;/code&gt;.
A counter cannot set &lt;code&gt;count_entry_bytes&lt;/code&gt; without also setting &lt;code&gt;match_all=true&lt;/code&gt;
&lt;em&gt;or&lt;/em&gt; &lt;code&gt;action=add&lt;/code&gt;.
The valid &lt;code&gt;action&lt;/code&gt; values are &lt;code&gt;inc&lt;/code&gt; and &lt;code&gt;add&lt;/code&gt;. The &lt;code&gt;inc&lt;/code&gt; action increases the
metric value by 1 for each log line that passed the filter. The &lt;code&gt;add&lt;/code&gt; action
converts the extracted value to a positive float and adds it to the metric.&lt;/p&gt;
&lt;h4 id=&#34;metricgauge-block&#34;&gt;metric.gauge block&lt;/h4&gt;
&lt;p&gt;Defines a gauge metric whose value can go up or down.&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The metric name.&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;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. Valid actions are &lt;code&gt;inc&lt;/code&gt; and &lt;code&gt;add&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;description&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The metric&amp;rsquo;s description and help text.&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;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key from the extracted data map to use for the metric. Defaults to the metric name.&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;prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The prefix to the metric name.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;loki_process_custom_&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_duration&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 until the metric is marked as &amp;lsquo;stale&amp;rsquo; and 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;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set, the metric only changes if &lt;code&gt;source&lt;/code&gt; exactly matches the &lt;code&gt;value&lt;/code&gt;.&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 valid &lt;code&gt;action&lt;/code&gt; values are &lt;code&gt;inc&lt;/code&gt;, &lt;code&gt;dec&lt;/code&gt;, &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;add&lt;/code&gt;, or &lt;code&gt;sub&lt;/code&gt;.
&lt;code&gt;inc&lt;/code&gt; and &lt;code&gt;dec&lt;/code&gt; increment and decrement the metric&amp;rsquo;s value by 1 respectively.
If &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;add, or &lt;/code&gt;sub` is chosen, the extracted value must be convertible
to a positive float and is set, added to, or subtracted from the metric&amp;rsquo;s value.&lt;/p&gt;
&lt;h4 id=&#34;metrichistogram-block&#34;&gt;metric.histogram block&lt;/h4&gt;
&lt;p&gt;Defines a histogram metric whose values are recorded in predefined buckets.&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The metric name.&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;buckets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(float)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The action to take. Valid actions are &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;inc&lt;/code&gt;, &lt;code&gt;dec&lt;/code&gt;,&lt;code&gt; add&lt;/code&gt;, or &lt;code&gt;sub&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;description&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The metric&amp;rsquo;s description and help text.&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;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key from the extracted data map to use for the metric. Defaults to the metric name.&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;prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The prefix to the metric name.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;loki_process_custom_&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_duration&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 until the metric is marked as &amp;lsquo;stale&amp;rsquo; and 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;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set, the metric only changes if &lt;code&gt;source&lt;/code&gt; exactly matches the &lt;code&gt;value&lt;/code&gt;.&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;h4 id=&#34;metrics-behavior&#34;&gt;metrics behavior&lt;/h4&gt;
&lt;p&gt;If &lt;code&gt;value&lt;/code&gt; is not present, all incoming log entries match.&lt;/p&gt;
&lt;p&gt;Label values on created metrics can be dynamic, which can cause exported
metrics to explode in cardinality or go stale, for example, when a stream stops
receiving new logs. To prevent unbounded growth of the &lt;code&gt;/metrics&lt;/code&gt; endpoint, any
metrics which have not been updated within &lt;code&gt;max_idle_duration&lt;/code&gt; are removed. The
&lt;code&gt;max_idle_duration&lt;/code&gt; must be greater or equal to &lt;code&gt;&amp;quot;1s&amp;quot;&lt;/code&gt;, and it defaults to &lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The metric values extracted from the log data are internally converted to
floats. The supported values are the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;integer&lt;/li&gt;
&lt;li&gt;floating point number&lt;/li&gt;
&lt;li&gt;string - Two types of string format are supported:
&lt;ul&gt;
&lt;li&gt;Strings that represent floating point numbers, for example, &amp;ldquo;0.804&amp;rdquo; is converted to 0.804.&lt;/li&gt;
&lt;li&gt;Duration format strings. Valid time units are “ns”, “us”, “ms”, “s”, “m”, “h”. A value in this format is converted to a floating point number of seconds, for example, &amp;ldquo;0.5ms&amp;rdquo; is converted to 0.0005.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;boolean:
&lt;ul&gt;
&lt;li&gt;true is converted to 1.&lt;/li&gt;
&lt;li&gt;false is converted to 0.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following pipeline creates a counter which increments every time any log line is received by using the &lt;code&gt;match_all&lt;/code&gt; parameter. The pipeline creates a second counter which adds the byte size of these log lines by using the &lt;code&gt;count_entry_bytes&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;These two metrics disappear after 24 hours if no new entries are received, to avoid building up metrics which no longer serve any use. These two metrics are a good starting point to track the volume of log streams in both the number of entries and their byte size, to identify sources of high-volume or high-cardinality data.&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.metrics {
    metric.counter {
        name        = &amp;#34;log_lines_total&amp;#34;
        description = &amp;#34;total number of log lines&amp;#34;
        prefix      = &amp;#34;my_custom_tracking_&amp;#34;

        match_all         = true
        action            = &amp;#34;inc&amp;#34;
        max_idle_duration = &amp;#34;24h&amp;#34;
    }
}
stage.metrics {
    metric.counter {
        name        = &amp;#34;log_bytes_total&amp;#34;
        description = &amp;#34;total bytes of log lines&amp;#34;
        prefix      = &amp;#34;my_custom_tracking_&amp;#34;

        match_all         = true
        count_entry_bytes = true
        action            = &amp;#34;add&amp;#34;
        max_idle_duration = &amp;#34;24h&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Here, the first stage uses a regex to extract text in the format
&lt;code&gt;order_status=&amp;lt;string&amp;gt;&lt;/code&gt; in the log line.
The second stage, defines a counter which increments the &lt;code&gt;successful_orders_total&lt;/code&gt; and &lt;code&gt;failed_orders_total&lt;/code&gt; based on the previously extracted values.&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.regex {
    expression = &amp;#34;^.* order_status=(?P&amp;lt;order_status&amp;gt;.*?) .*$&amp;#34;
}
stage.metrics {
    metric.counter {
        name        = &amp;#34;successful_orders_total&amp;#34;
        description = &amp;#34;successful orders&amp;#34;
        source      = &amp;#34;order_status&amp;#34;
        value       = &amp;#34;success&amp;#34;
        action      = &amp;#34;inc&amp;#34;
    }
}
stage.metrics {
    metric.counter {
        name        = &amp;#34;failed_orders_total&amp;#34;
        description = &amp;#34;failed orders&amp;#34;
        source      = &amp;#34;order_status&amp;#34;
        value       = &amp;#34;fail&amp;#34;
        action      = &amp;#34;inc&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this example, the first stage extracts text in the format of &lt;code&gt;retries=&amp;lt;value&amp;gt;&lt;/code&gt;, from the log line. The second stage creates a gauge whose current metric value is increased by the number extracted from the retries field.&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.regex {
    expression = &amp;#34;^.* retries=(?P&amp;lt;retries&amp;gt;\\d&amp;#43;) .*$&amp;#34;
}
stage.metrics {
    metric.gauge {
        name        = &amp;#34;retries_total&amp;#34;
        description = &amp;#34;total_retries&amp;#34;
        source      = &amp;#34;retries&amp;#34;
        action      = &amp;#34;add&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example shows a histogram that reads &lt;code&gt;response_time&lt;/code&gt; from the extracted
map and places it into a bucket, both increasing the count of the bucket and
the sum for that particular bucket:&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.metrics {
    metric.histogram {
        name        = &amp;#34;http_response_time_seconds&amp;#34;
        description = &amp;#34;recorded response times&amp;#34;
        source      = &amp;#34;response_time&amp;#34;
        buckets     = [0.001,0.0025,0.005,0.010,0.025,0.050]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;stagemultiline-block&#34;&gt;stage.multiline block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;number&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;stageoutput-block&#34;&gt;stage.output block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;stagepack-block&#34;&gt;stage.pack block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.pack&lt;/code&gt; inner block configures a transforming stage that replaces the log
entry with a JSON object that embeds extracted values and labels with it.&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;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 values from the extracted data and labels to pack with 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;ingest_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 replace the log entry timestamp with the time the &lt;code&gt;pack&lt;/code&gt; stage runs.&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;This stage lets you embed extracted values and labels together with the log
line, by packing them into a JSON object. The original message is stored under
the &lt;code&gt;_entry&lt;/code&gt; key, and all other keys retain their values. This is useful in
cases where you &lt;em&gt;do&lt;/em&gt; want to keep a certain label or metadata, but you don&amp;rsquo;t
want it to be indexed as a label due to high cardinality.&lt;/p&gt;
&lt;p&gt;The querying capabilities of Loki make it easy to still access this data so it can
be filtered and aggregated at query time.&lt;/p&gt;
&lt;p&gt;For example, consider the following log entry:&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;log_line: &amp;#34;something went wrong&amp;#34;
labels:   { &amp;#34;level&amp;#34; = &amp;#34;error&amp;#34;, &amp;#34;env&amp;#34; = &amp;#34;dev&amp;#34;, &amp;#34;user_id&amp;#34; = &amp;#34;f8fas0r&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;and this processing stage:&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.pack {
    labels = [&amp;#34;env&amp;#34;, &amp;#34;user_id&amp;#34;]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The stage transforms the log entry into the following JSON object, where the two
embedded labels are removed from the original log entry:&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;JSON&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-json&#34;&gt;{
  &amp;#34;_entry&amp;#34;: &amp;#34;something went wrong&amp;#34;,
  &amp;#34;env&amp;#34;: &amp;#34;dev&amp;#34;,
  &amp;#34;user_id&amp;#34;: &amp;#34;f8fas0r&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;At query time, Loki&amp;rsquo;s &lt;a href=&#34;/docs/loki/latest/logql/log_queries/#unpack&#34;&gt;&lt;code&gt;unpack&lt;/code&gt; parser&lt;/a&gt;
can be used to access these embedded labels and replace the log line with the
original one stored in the &lt;code&gt;_entry&lt;/code&gt; field automatically.&lt;/p&gt;
&lt;p&gt;When combining several log streams to use with the &lt;code&gt;pack&lt;/code&gt; stage, you can set
&lt;code&gt;ingest_timestamp&lt;/code&gt; to true to avoid interlaced timestamps and
out-of-order ingestion issues.&lt;/p&gt;
&lt;h3 id=&#34;stageregex-block&#34;&gt;stage.regex block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;stagereplace-block&#34;&gt;stage.replace block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;stagesampling-block&#34;&gt;stage.sampling block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;sampling&lt;/code&gt; stage is used to sample the logs. Configuring the value
&lt;code&gt;rate = 0.1&lt;/code&gt; means that 10% of the logs will continue to be processed. The
remaining 90% of the logs will be dropped.&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;rate&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;float&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The sampling rate in a range of &lt;code&gt;[0, 1]&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;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;The label to add to &lt;code&gt;loki_process_dropped_lines_total&lt;/code&gt; metric when logs are dropped by this stage.&lt;/td&gt;
              &lt;td&gt;sampling_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;For example, the configuration below will sample 25% of the logs and drop the
remaining 75%. When logs are dropped, the &lt;code&gt;loki_process_dropped_lines_total&lt;/code&gt;
metric is incremented with an additional &lt;code&gt;reason=logs_sampling&lt;/code&gt; 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;stage.sampling {
    rate = 0.25
    drop_counter_reason = &amp;#34;logs_sampling&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;stagestatic_labels-block&#34;&gt;stage.static_labels block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;stagetemplate-block&#34;&gt;stage.template block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.template&lt;/code&gt; inner block configures a transforming stage that allows users to
manipulate the values in the extracted map by using Go&amp;rsquo;s &lt;code&gt;text/template&lt;/code&gt;
&lt;a href=&#34;https://pkg.go.dev/text/template&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;package&lt;/a&gt; syntax. This stage is primarily
useful for manipulating and standardizing data from previous stages before
setting them as labels in a subsequent stage. Example use cases are replacing
spaces with underscores, converting uppercase strings to lowercase, or hashing
a value.&lt;/p&gt;
&lt;p&gt;The template stage can also create new keys in the 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;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 the key doesn&amp;rsquo;t exist, a new entry is created.&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;template&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Go template string to use.&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 template string can be any valid template that can be used by Go&amp;rsquo;s &lt;code&gt;text/template&lt;/code&gt;. It supports all functions from the &lt;a href=&#34;http://masterminds.github.io/sprig/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;sprig package&lt;/a&gt;, as well as the following list of custom functions:&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&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;More details on each of these functions can be found in the &lt;a href=&#34;#supported-functions&#34;&gt;supported
functions&lt;/a&gt; section below.&lt;/p&gt;
&lt;p&gt;Assuming no data is present on the extracted map, the following stage simply
adds the &lt;code&gt;new_key: &amp;quot;hello_world&amp;quot;&lt;/code&gt;key-value pair to the shared map.&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.template {
    source   = &amp;#34;new_key&amp;#34;
    template = &amp;#34;hello_world&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If the &lt;code&gt;source&lt;/code&gt; value exists in the extract fields, its value can be referred to as &lt;code&gt;.Value&lt;/code&gt; in the template.
The next stage takes the current value of &lt;code&gt;app&lt;/code&gt; from the extracted map,
converts it to lowercase, and adds a suffix to its value:&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.template {
    source   = &amp;#34;app&amp;#34;
    template = &amp;#34;{{ ToLower .Value }}_some_suffix&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Any previously extracted keys are available for &lt;code&gt;template&lt;/code&gt; to expand and use.
The next stage takes the current values for &lt;code&gt;level&lt;/code&gt;, &lt;code&gt;app&lt;/code&gt; and &lt;code&gt;module&lt;/code&gt; and
creates a new key named &lt;code&gt;output_message&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;stage.template {
    source   = &amp;#34;output_msg&amp;#34;
    template = &amp;#34;{{ .level }} for app {{ ToUpper .app }} in module {{.module}}&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;A special key named &lt;code&gt;Entry&lt;/code&gt; can be used to reference the current line; this can
be useful when you need to append/prepend something to the log line, like this snippet:&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.template {
    source   = &amp;#34;message&amp;#34;
    template = &amp;#34;{{.app }}: {{ .Entry }}&amp;#34;
}
stage.output {
    source = &amp;#34;message&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;supported-functions&#34;&gt;Supported functions&lt;/h4&gt;
&lt;p&gt;In addition to supporting all functions from the &lt;a href=&#34;http://masterminds.github.io/sprig/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;sprig package&lt;/a&gt;, the &lt;code&gt;template&lt;/code&gt; stage supports the following custom functions.&lt;/p&gt;
&lt;h5 id=&#34;tolower-and-toupper&#34;&gt;ToLower and ToUpper&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;ToLower&lt;/code&gt; and &lt;code&gt;ToUpper&lt;/code&gt; convert the entire string to lowercase and
uppercase, respectively.&lt;/p&gt;
&lt;p&gt;Examples:&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.template {
    source   = &amp;#34;out&amp;#34;
    template = &amp;#34;{{ ToLower .app }}&amp;#34;
}
stage.template {
    source   = &amp;#34;out&amp;#34;
    template = &amp;#34;{{ .app | ToUpper }}&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h5 id=&#34;replace&#34;&gt;Replace&lt;/h5&gt;
&lt;p&gt;The &lt;code&gt;Replace&lt;/code&gt; function syntax is defined as &lt;code&gt;{{ Replace &amp;lt;string&amp;gt; &amp;lt;old&amp;gt; &amp;lt;new&amp;gt; &amp;lt;n&amp;gt; }}&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The function returns a copy of the input string, with instances of the &lt;code&gt;&amp;lt;old&amp;gt;&lt;/code&gt;
argument being replaced by &lt;code&gt;&amp;lt;new&amp;gt;&lt;/code&gt;. The function replaces up to &lt;code&gt;&amp;lt;n&amp;gt;&lt;/code&gt;
non-overlapping instances of the second argument. If &lt;code&gt;&amp;lt;n&amp;gt;&lt;/code&gt; is less than zero,
there is no limit on the number of replacement. Finally, if &lt;code&gt;&amp;lt;old&amp;gt;&lt;/code&gt; is empty,
it matches before and after every UTF-8 character in the string.&lt;/p&gt;
&lt;p&gt;This example replaces the first two instances of the &lt;code&gt;loki&lt;/code&gt; word by &lt;code&gt;Loki&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;stage.template {
    source   = &amp;#34;output&amp;#34;
    template = &amp;#34;{{ Replace .Value &amp;#34;loki&amp;#34; &amp;#34;Loki&amp;#34; 2 }}&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h5 id=&#34;trim-trimleft-trimright-trimspace-trimprefix-trimsuffix&#34;&gt;Trim, TrimLeft, TrimRight, TrimSpace, TrimPrefix, TrimSuffix&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Trim&lt;/code&gt; returns a slice of the string &lt;code&gt;s&lt;/code&gt; with all leading and trailing Unicode
code points contained in &lt;code&gt;cutset&lt;/code&gt; removed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TrimLeft&lt;/code&gt; and &lt;code&gt;TrimRight&lt;/code&gt; are the same as Trim except that they
trim only leading and trailing characters, respectively.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TrimSpace&lt;/code&gt; returns a slice of the string s, with all leading and trailing
white space removed, as defined by Unicode.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TrimPrefix&lt;/code&gt; and &lt;code&gt;TrimSuffix&lt;/code&gt; trim the supplied prefix or suffix, respectively.
Examples:&lt;/li&gt;
&lt;/ul&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.template {
    source   = &amp;#34;output&amp;#34;
    template = &amp;#34;{{ Trim .Value &amp;#34;,. &amp;#34; }}&amp;#34;
}
stage.template {
    source   = &amp;#34;output&amp;#34;
    template = &amp;#34;{{ TrimSpace .Value }}&amp;#34;
}
stage.template {
    source   = &amp;#34;output&amp;#34;
    template = &amp;#34;{{ TrimPrefix .Value &amp;#34;--&amp;#34; }}&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h5 id=&#34;regex&#34;&gt;Regex&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;regexReplaceAll&lt;/code&gt; returns a copy of the input string, replacing matches of the
Regexp with the replacement string. Inside the replacement string, &lt;code&gt;$&lt;/code&gt; characters
are interpreted as in Expand functions, so for instance, $1 represents the first captured
submatch.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;regexReplaceAllLiteral&lt;/code&gt; returns a copy of the input string, replacing matches
of the Regexp with the replacement string. The replacement string is
substituted directly, without using Expand.&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.template {
    source   = &amp;#34;output&amp;#34;
    template = &amp;#34;{{ regexReplaceAll &amp;#34;(a*)bc&amp;#34; .Value &amp;#34;${1}a&amp;#34; }}&amp;#34;
}
stage.template {
    source   = &amp;#34;output&amp;#34;
    template = &amp;#34;{{ regexReplaceAllLiteral &amp;#34;(ts=)&amp;#34; .Value &amp;#34;timestamp=&amp;#34; }}&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h5 id=&#34;hash-and-sha2hash&#34;&gt;Hash and Sha2Hash&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;Hash&lt;/code&gt; returns a &lt;code&gt;Sha3_256&lt;/code&gt; hash of the string, represented as a hexadecimal number of 64 digits. You can use it to obfuscate sensitive data and PII in the logs. It requires a (fixed) salt value, to add complexity to low input domains (e.g., all possible social security numbers).
&lt;code&gt;Sha2Hash&lt;/code&gt; returns a &lt;code&gt;Sha2_256&lt;/code&gt; of the string which is faster and less CPU-intensive than &lt;code&gt;Hash&lt;/code&gt;, however it is less secure.&lt;/p&gt;
&lt;p&gt;Examples:&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.template {
    source   = &amp;#34;output&amp;#34;
    template = &amp;#34;{{ Hash .Value &amp;#34;salt&amp;#34; }}&amp;#34;
}
stage.template {
    source   = &amp;#34;output&amp;#34;
    template = &amp;#34;{{ Sha2Hash .Value &amp;#34;salt&amp;#34; }}&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We recommend using Hash as it has a stronger hashing algorithm.&lt;/p&gt;
&lt;h3 id=&#34;stagetenant-block&#34;&gt;stage.tenant block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.tenant&lt;/code&gt; inner block sets the tenant ID for the log entry by obtaining it from a
field in the extracted data map, a label, or a provided value.&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;label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label to set as tenant ID.&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;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name from the extracted value to use as tenant ID.&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;The value to set as the tenant ID.&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 block expects only one of &lt;code&gt;label&lt;/code&gt;, &lt;code&gt;source&lt;/code&gt; or &lt;code&gt;value&lt;/code&gt; to be provided.&lt;/p&gt;
&lt;p&gt;The following stage assigns the fixed value &lt;code&gt;team-a&lt;/code&gt; as the tenant ID:&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.tenant {
    value = &amp;#34;team-a&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This stage extracts the tenant ID from the &lt;code&gt;customer_id&lt;/code&gt; field after
parsing the log entry as JSON in the shared extracted map:&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.json {
    expressions = { &amp;#34;customer_id&amp;#34; = &amp;#34;&amp;#34; }
}
stage.tenant {
    source = &amp;#34;customer_id&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The final example extracts the tenant ID from a label set by a previous stage:&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 {
    &amp;#34;namespace&amp;#34; = &amp;#34;k8s_namespace&amp;#34;
}
stage.tenant {
    label = &amp;#34;namespace&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;stagetimestamp-block&#34;&gt;stage.timestamp block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.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;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Be careful with further stages which may also override the timestamp.
For example, a &lt;code&gt;stage.pack&lt;/code&gt; with &lt;code&gt;ingest_timestamp&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt; could replace the timestamp which &lt;code&gt;stage.timestamp&lt;/code&gt; had set earlier in the pipeline.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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 &#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.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;stagegeoip-block&#34;&gt;stage.geoip block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stage.geoip&lt;/code&gt; inner block configures a processing stage that reads an IP address and populates the shared map with geoip fields. Maxmind’s GeoIP2 database is used for the lookup.&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;db&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 Maxmind DB file.&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;IP from extracted data to parse.&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;db_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maxmind DB type. Allowed values are &amp;ldquo;city&amp;rdquo;, &amp;ldquo;asn&amp;rdquo;, &amp;ldquo;country&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;custom_lookups&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;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h4 id=&#34;geoip-with-city-database-example&#34;&gt;GeoIP with City database example:&lt;/h4&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&amp;#34;,&amp;#34;client_ip&amp;#34;:&amp;#34;34.120.177.193&amp;#34;}

loki.process &amp;#34;example&amp;#34; {
	stage.json {
		expressions = {ip = &amp;#34;client_ip&amp;#34;}
	}

	stage.geoip {
		source  = &amp;#34;ip&amp;#34;
		db      = &amp;#34;/path/to/db/GeoLite2-City.mmdb&amp;#34;
		db_type = &amp;#34;city&amp;#34;
	}

	stage.labels {
		values = {
			geoip_city_name          = &amp;#34;&amp;#34;,
			geoip_country_name       = &amp;#34;&amp;#34;,
			geoip_country_code       = &amp;#34;&amp;#34;,
			geoip_continent_name     = &amp;#34;&amp;#34;,
			geoip_continent_code     = &amp;#34;&amp;#34;,
			geoip_location_latitude  = &amp;#34;&amp;#34;,
			geoip_location_longitude = &amp;#34;&amp;#34;,
			geoip_postal_code        = &amp;#34;&amp;#34;,
			geoip_timezone           = &amp;#34;&amp;#34;,
			geoip_subdivision_name   = &amp;#34;&amp;#34;,
			geoip_subdivision_code   = &amp;#34;&amp;#34;,
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;json&lt;/code&gt; stage extracts the IP address from the &lt;code&gt;client_ip&lt;/code&gt; key in the log line.
Then the extracted &lt;code&gt;ip&lt;/code&gt; value is given as source to geoip stage. The geoip stage performs a lookup on the IP and populates the following fields in the shared map which are added as labels using the &lt;code&gt;labels&lt;/code&gt; stage.&lt;/p&gt;
&lt;p&gt;The extracted data from the IP used in this example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;geoip_city_name: Kansas City&lt;/li&gt;
&lt;li&gt;geoip_country_name: United States&lt;/li&gt;
&lt;li&gt;geoip_country_code: US&lt;/li&gt;
&lt;li&gt;geoip_continent_name: North America&lt;/li&gt;
&lt;li&gt;geoip_continent_code: NA&lt;/li&gt;
&lt;li&gt;geoip_location_latitude: 39.1027&lt;/li&gt;
&lt;li&gt;geoip_location_longitude: -94.5778&lt;/li&gt;
&lt;li&gt;geoip_postal_code: 64184&lt;/li&gt;
&lt;li&gt;geoip_timezone: America/Chicago&lt;/li&gt;
&lt;li&gt;geoip_subdivision_name: Missouri&lt;/li&gt;
&lt;li&gt;geoip_subdivision_code: MO&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;geoip-with-asn-autonomous-system-number-database-example&#34;&gt;GeoIP with ASN (Autonomous System Number) database example&lt;/h4&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;loki.process &amp;#34;example&amp;#34; {
	stage.json {
		expressions = {ip = &amp;#34;client_ip&amp;#34;}
	}

	stage.geoip {
		source  = &amp;#34;ip&amp;#34;
		db      = &amp;#34;/path/to/db/GeoIP2-ASN.mmdb&amp;#34;
		db_type = &amp;#34;asn&amp;#34;
	}

	stage.labels {
		values = {
			geoip_autonomous_system_number       = &amp;#34;&amp;#34;,
			geoip_autonomous_system_organization = &amp;#34;&amp;#34;,
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;json&lt;/code&gt; stage extracts the IP address from the &lt;code&gt;client_ip&lt;/code&gt; key in the log line.
Then the extracted &lt;code&gt;ip&lt;/code&gt; value is given as source to geoip stage. The geoip stage performs a lookup on the IP and populates the shared map.&lt;/p&gt;
&lt;p&gt;The extracted data from the IP used in this example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;geoip_autonomous_system_number: 396982&lt;/li&gt;
&lt;li&gt;geoip_autonomous_system_organization: GOOGLE-CLOUD-PLATFORM&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;geoip-with-country-database-example&#34;&gt;GeoIP with Country database example:&lt;/h4&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&amp;#34;,&amp;#34;client_ip&amp;#34;:&amp;#34;34.120.177.193&amp;#34;}

loki.process &amp;#34;example&amp;#34; {
	stage.json {
		expressions = {ip = &amp;#34;client_ip&amp;#34;}
	}

	stage.geoip {
		source  = &amp;#34;ip&amp;#34;
		db      = &amp;#34;/path/to/db/GeoLite2-Country.mmdb&amp;#34;
		db_type = &amp;#34;country&amp;#34;
	}

	stage.labels {
		values = {
			geoip_country_name       = &amp;#34;&amp;#34;,
			geoip_country_code       = &amp;#34;&amp;#34;,
			geoip_continent_name     = &amp;#34;&amp;#34;,
			geoip_continent_code     = &amp;#34;&amp;#34;,
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;json&lt;/code&gt; stage extracts the IP address from the &lt;code&gt;client_ip&lt;/code&gt; key in the log line.
Then the extracted &lt;code&gt;ip&lt;/code&gt; value is given as source to geoip stage. The geoip stage performs a lookup on the IP and populates the following fields in the shared map which are added as labels using the &lt;code&gt;labels&lt;/code&gt; stage.&lt;/p&gt;
&lt;p&gt;The extracted data from the IP used in this example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;geoip_country_name: United States&lt;/li&gt;
&lt;li&gt;geoip_country_code: US&lt;/li&gt;
&lt;li&gt;geoip_continent_name: North America&lt;/li&gt;
&lt;li&gt;geoip_continent_code: NA&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;geoip-with-custom-fields-example&#34;&gt;GeoIP with custom fields example&lt;/h4&gt;
&lt;p&gt;If the MMDB file used is enriched with custom data, for example, private IP addresses as explained in &lt;a href=&#34;https://github.com/maxmind/mmdb-from-go-blogpost&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;the Maxmind blog post&lt;/a&gt;, then it can be extracted from the record using the &lt;code&gt;custom_lookups&lt;/code&gt; attribute.&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;loki.process &amp;#34;example&amp;#34; {
	stage.json {
		expressions = {ip = &amp;#34;client_ip&amp;#34;}
	}

	stage.geoip {
		source         = &amp;#34;ip&amp;#34;
		db             = &amp;#34;/path/to/db/GeoIP2-Enriched.mmdb&amp;#34;
		db_type        = &amp;#34;city&amp;#34;
		custom_lookups = {
			&amp;#34;department&amp;#34;  = &amp;#34;MyCompany.DeptName&amp;#34;,
			&amp;#34;parent_vnet&amp;#34; = &amp;#34;MyCompany.ParentVNet&amp;#34;,
			&amp;#34;subnet&amp;#34;      = &amp;#34;MyCompany.Subnet&amp;#34;,
		}
	}

	stage.labels {
		values = {
			department  = &amp;#34;&amp;#34;,
			parent_vnet = &amp;#34;&amp;#34;,
			subnet      = &amp;#34;&amp;#34;,
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;json&lt;/code&gt; stage extracts the IP address from the &lt;code&gt;client_ip&lt;/code&gt; key in the log line.
Then the extracted &lt;code&gt;ip&lt;/code&gt; value is given as source to geoip stage. The geoip stage performs a lookup on the IP and populates the shared map with the data from the city database results in addition to the custom lookups. Lastly, the custom lookup fields from the shared map are added as labels.&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;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;li&gt;&lt;code&gt;loki_process_dropped_lines_by_label_total&lt;/code&gt; (counter):  Number of lines dropped when &lt;code&gt;by_label_name&lt;/code&gt; is non-empty in &lt;a href=&#34;#stagelimit-block&#34;&gt;stage.limit&lt;/a&gt;.&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 {
      values = { &amp;#34;env&amp;#34; = &amp;#34;extracted_env&amp;#34; }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.process&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;loki.process&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#loki-logsreceiver-consumers&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/loki.relabel/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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-logs.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 log.
The transformations are applied in top-down order if more than one &lt;code&gt;rule&lt;/code&gt; block is defined.&lt;/p&gt;
&lt;p&gt;You can use the following arguments 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;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;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;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;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 regular expression replace is performed if the regular expression matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;$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;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;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;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 is written to.&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;You can use the following actions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;drop&lt;/code&gt;      - Drops logs 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;dropequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do match &lt;code&gt;target_label&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;keep&lt;/code&gt;      - Keeps logs 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;keepequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do not match &lt;code&gt;target_label&lt;/code&gt;.&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 log&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 log&amp;rsquo;s label set.&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;lowercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the lowercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&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;uppercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the uppercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression 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;/blockquote&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;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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.relabel&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;loki.relabel&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#loki-logsreceiver-consumers&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.rules.kubernetes</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.rules.kubernetes/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.rules.kubernetes/</guid><content><![CDATA[&lt;h1 id=&#34;lokiruleskubernetes&#34;&gt;loki.rules.kubernetes&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;loki.rules.kubernetes&lt;/code&gt; discovers &lt;code&gt;PrometheusRule&lt;/code&gt; Kubernetes resources and
loads them into a Loki instance.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can specify multiple &lt;code&gt;loki.rules.kubernetes&lt;/code&gt; components 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 Loki, 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;li&gt;This component accesses the Kubernetes REST API from &lt;a href=&#34;https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;within a Pod&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;This component requires [Role-based access control (RBAC)][] to be set up
in Kubernetes for Grafana Agent to access it via the Kubernetes REST API.&lt;/p&gt;
&lt;p&gt;Role-based access control (RBAC)]: &lt;a href=&#34;https://kubernetes.io/docs/reference/access-authn-authz/rbac/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://kubernetes.io/docs/reference/access-authn-authz/rbac/&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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.rules.kubernetes &amp;#34;LABEL&amp;#34; {
  address = LOKI_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;loki.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 Loki 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;Loki 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 Loki.&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;loki_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 Grafana 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;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_http2&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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&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;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 Loki&amp;rsquo;s ruler API is accessed
to reload the current state. 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;You can use the &lt;code&gt;loki_namespace_prefix&lt;/code&gt; argument to separate the rules managed
by multiple Grafana Agent deployments across your infrastructure. You should set the prefix 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;loki.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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&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;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 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;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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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.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;loki.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;loki.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 Loki 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;loki_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;loki_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;loki_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;loki_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;loki_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 Loki 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;loki.rules.kubernetes&lt;/code&gt; component that loads discovered
rules to a local Loki 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;loki.rules.kubernetes &amp;#34;local&amp;#34; {
    address = &amp;#34;loki:3100&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;loki.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;loki.rules.kubernetes &amp;#34;default&amp;#34; {
    address = &amp;#34;GRAFANA_CLOUD_URL&amp;#34;
    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;
&lt;p&gt;The following example is an RBAC configuration for Kubernetes. It authorizes Grafana Agent to query the Kubernetes REST 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;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: ServiceAccount
metadata:
  name: grafana-agent
  namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: grafana-agent
rules:
- apiGroups: [&amp;#34;&amp;#34;]
  resources: [&amp;#34;namespaces&amp;#34;]
  verbs: [&amp;#34;get&amp;#34;, &amp;#34;list&amp;#34;, &amp;#34;watch&amp;#34;]
- apiGroups: [&amp;#34;monitoring.coreos.com&amp;#34;]
  resources: [&amp;#34;prometheusrules&amp;#34;]
  verbs: [&amp;#34;get&amp;#34;, &amp;#34;list&amp;#34;, &amp;#34;watch&amp;#34;]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: grafana-agent
subjects:
- kind: ServiceAccount
  name: grafana-agent
  namespace: default
roleRef:
  kind: ClusterRole
  name: grafana-agent
  apiGroup: rbac.authorization.k8s.io&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokiruleskubernetes">loki.rules.kubernetes&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>loki.rules.kubernetes&lt;/code> discovers &lt;code>PrometheusRule&lt;/code> Kubernetes resources and
loads them into a Loki instance.&lt;/p></description></item><item><title>loki.source.api</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.api/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.api/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourceapi&#34;&gt;loki.source.api&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.api&lt;/code&gt; receives log entries over HTTP and forwards them to other &lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;The HTTP API exposed is compatible with &lt;a href=&#34;/docs/loki/latest/api/#push-log-entries-to-loki&#34;&gt;Loki push API&lt;/a&gt; and the &lt;code&gt;logproto&lt;/code&gt; format. This means that other &lt;a href=&#34;../loki.write/&#34;&gt;&lt;code&gt;loki.write&lt;/code&gt;&lt;/a&gt; components can be used as a client and send requests to &lt;code&gt;loki.source.api&lt;/code&gt; which enables using the Agent as a proxy for logs.&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.api &amp;#34;LABEL&amp;#34; {
    http {
        listen_address = &amp;#34;LISTEN_ADDRESS&amp;#34;
        listen_port = PORT
    }
    forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The component will start HTTP server on the configured port and address with the following endpoints:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/loki/api/v1/push&lt;/code&gt; - accepting &lt;code&gt;POST&lt;/code&gt; requests compatible with &lt;a href=&#34;/docs/loki/latest/api/#push-log-entries-to-loki&#34;&gt;Loki push API&lt;/a&gt;, for example, from another Grafana Agent&amp;rsquo;s &lt;a href=&#34;../loki.write/&#34;&gt;&lt;code&gt;loki.write&lt;/code&gt;&lt;/a&gt; component.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/loki/api/v1/raw&lt;/code&gt; - accepting &lt;code&gt;POST&lt;/code&gt; requests with newline-delimited log lines in body. This can be used to send NDJSON or plaintext logs. This is compatible with promtail&amp;rsquo;s push API endpoint - see &lt;a href=&#34;/docs/loki/latest/clients/promtail/configuration/#loki_push_api&#34;&gt;promtail&amp;rsquo;s documentation&lt;/a&gt; for more information. NOTE: when this endpoint is used, the incoming timestamps cannot be used and the &lt;code&gt;use_incoming_timestamp = true&lt;/code&gt; setting will be ignored.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/loki/ready&lt;/code&gt; - accepting &lt;code&gt;GET&lt;/code&gt; requests - can be used to confirm the server is reachable and healthy.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/api/v1/push&lt;/code&gt; - internally reroutes to &lt;code&gt;/loki/api/v1/push&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/api/v1/raw&lt;/code&gt; - internally reroutes to &lt;code&gt;/loki/api/v1/raw&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.api&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;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 request.&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 logs 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;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;a href=&#34;../loki.relabel/&#34;&gt;&lt;code&gt;loki.relabel&lt;/code&gt;&lt;/a&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.api&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;&lt;code&gt;http&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http&#34;&gt;http&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server that receives 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;http&#34;&gt;http&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/loki-server-http.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block configures the HTTP server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;http&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;conn_limit&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 simultaneous HTTP connections. Defaults to no limit.&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;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. Defaults to accepting all incoming connections.&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;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections.&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;server_idle_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Idle timeout for HTTP server.&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;server_read_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read timeout for HTTP server.&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;server_write_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write timeout for HTTP server.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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.api&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.api&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;p&gt;The following are some of the metrics that are exposed when this component is used. Note that the metrics include labels such as &lt;code&gt;status_code&lt;/code&gt; where relevant, which can be used to measure request success rates.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_source_api_request_duration_seconds&lt;/code&gt; (histogram): Time (in seconds) spent serving HTTP requests.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_api_request_message_bytes&lt;/code&gt; (histogram): Size (in bytes) of messages received in the request.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_api_response_message_bytes&lt;/code&gt; (histogram): Size (in bytes) of messages sent in response.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_api_tcp_connections&lt;/code&gt; (gauge): Current number of accepted TCP connections.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example starts an HTTP server on &lt;code&gt;0.0.0.0&lt;/code&gt; address and port &lt;code&gt;9999&lt;/code&gt;. The server receives log entries and forwards them to a &lt;code&gt;loki.write&lt;/code&gt; component while adding a &lt;code&gt;forwarded=&amp;quot;true&amp;quot;&lt;/code&gt; label. The &lt;code&gt;loki.write&lt;/code&gt; component will send the logs to the specified loki instance using basic auth credentials provided.&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;http://loki:3100/api/v1/push&amp;#34;
        basic_auth {
            username = &amp;#34;&amp;lt;your username&amp;gt;&amp;#34;
            password_file = &amp;#34;&amp;lt;your password file&amp;gt;&amp;#34;
        }
    }
}

loki.source.api &amp;#34;loki_push_api&amp;#34; {
    http {
        listen_address = &amp;#34;0.0.0.0&amp;#34;
        listen_port = 9999
    }
    forward_to = [
        loki.write.local.receiver,
    ]
    labels = {
        forwarded = &amp;#34;true&amp;#34;,
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.api&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="lokisourceapi">loki.source.api&lt;/h1>
&lt;p>&lt;code>loki.source.api&lt;/code> receives log entries over HTTP and forwards them to other &lt;code>loki.*&lt;/code> components.&lt;/p>
&lt;p>The HTTP API exposed is compatible with &lt;a href="/docs/loki/latest/api/#push-log-entries-to-loki">Loki push API&lt;/a> and the &lt;code>logproto&lt;/code> format. This means that other &lt;a href="../loki.write/">&lt;code>loki.write&lt;/code>&lt;/a> components can be used as a client and send requests to &lt;code>loki.source.api&lt;/code> which enables using the Agent as a proxy for logs.&lt;/p></description></item><item><title>loki.source.awsfirehose</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.awsfirehose/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.awsfirehose/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourceawsfirehose&#34;&gt;loki.source.awsfirehose&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.awsfirehose&lt;/code&gt; receives log entries over HTTP
from &lt;a href=&#34;https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS Firehose&lt;/a&gt;
and forwards them to other &lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;The HTTP API exposed is compatible
with the &lt;a href=&#34;https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Firehose HTTP Delivery API&lt;/a&gt;.
Since the API model that AWS Firehose uses to deliver data over HTTP is generic enough, the same component can be used
to receive data from multiple origins:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/firehose/latest/dev/writing-with-cloudwatch-logs.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS CloudWatch logs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/firehose/latest/dev/writing-with-cloudwatch-events.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS CloudWatch events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Custom data through &lt;a href=&#34;https://docs.aws.amazon.com/firehose/latest/dev/writing-with-sdk.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;DirectPUT requests&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component uses a heuristic to try to decode as much information as possible from each log record, and it falls back to writing
the raw records to Loki. The decoding process goes as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AWS Firehose sends batched requests&lt;/li&gt;
&lt;li&gt;Each record is treated individually&lt;/li&gt;
&lt;li&gt;For each &lt;code&gt;record&lt;/code&gt; received in each request:
&lt;ul&gt;
&lt;li&gt;If the &lt;code&gt;record&lt;/code&gt; comes from a &lt;a href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html#DestinationKinesisExample&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;CloudWatch logs subscription filter&lt;/a&gt;, it is decoded and each logging event is written to Loki&lt;/li&gt;
&lt;li&gt;All other records are written raw to Loki&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component exposes some internal labels, available for relabeling. The following tables describes internal labels available
in records coming from any source.&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;Example&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__aws_firehose_request_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Firehose request ID.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;a1af4300-6c09-4916-ba8f-12f336176246&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__aws_firehose_source_arn&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Firehose delivery stream ARN.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;arn:aws:firehose:us-east-2:123:deliverystream/aws_firehose_test_stream&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If the source of the Firehose record is CloudWatch logs, the request is further decoded and enriched with even more labels,
exposed as follows:&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;Example&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__aws_owner&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The AWS Account ID of the originating log data.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;111111111111&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__aws_cw_log_group&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The log group name of the originating log data.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;CloudTrail/logs&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__aws_cw_log_stream&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The log stream name of the originating log data.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;111111111111_CloudTrail/logs_us-east-1&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__aws_cw_matched_filters&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of subscription filter names that match the originating log data. The list is encoded as a comma-separated list.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;Destination,Destination2&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__aws_cw_msg_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Data messages will use the &lt;code&gt;DATA_MESSAGE&lt;/code&gt; type. Sometimes CloudWatch Logs may emit Kinesis Data Streams records with a &lt;code&gt;CONTROL_MESSAGE&lt;/code&gt; type, mainly for checking if the destination is reachable.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;DATA_MESSAGE&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;See &lt;a href=&#34;#example&#34;&gt;Examples&lt;/a&gt; for a full example configuration showing how to enrich each log entry with these 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.awsfirehose &amp;#34;LABEL&amp;#34; {
    http {
        listen_address = &amp;#34;LISTEN_ADDRESS&amp;#34;
        listen_port = PORT 
    }
    forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The component will start an HTTP server on the configured port and address with the following endpoints:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/awsfirehose/api/v1/push&lt;/code&gt; - accepting &lt;code&gt;POST&lt;/code&gt; requests compatible
with &lt;a href=&#34;https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS Firehose HTTP Specifications&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.awsfirehose&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;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 the request.&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;&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;access_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set, require AWS Firehose to provide a matching key.&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;relabel_rules&lt;/code&gt; field can make use of the &lt;code&gt;rules&lt;/code&gt; export value from a
&lt;a href=&#34;../loki.relabel/&#34;&gt;&lt;code&gt;loki.relabel&lt;/code&gt;&lt;/a&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.awsfirehose&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;&lt;code&gt;http&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http&#34;&gt;http&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server that receives requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;grpc&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#grpc&#34;&gt;grpc&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the gRPC server that receives 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;http&#34;&gt;http&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/loki-server-http.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block configures the HTTP server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;http&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;conn_limit&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 simultaneous HTTP connections. Defaults to no limit.&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;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. Defaults to accepting all incoming connections.&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;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections.&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;server_idle_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Idle timeout for HTTP server.&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;server_read_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read timeout for HTTP server.&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;server_write_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write timeout for HTTP server.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;

        
&lt;h3 id=&#34;grpc&#34;&gt;grpc&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/loki-server-grpc.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;grpc&lt;/code&gt; block configures the gRPC server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;grpc&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;conn_limit&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 simultaneous HTTP connections. Defaults to no limit.&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;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. It defaults to accepting all incoming connections.&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;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections. Defaults to a random free port.&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_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;An additive period after &lt;code&gt;max_connection_age&lt;/code&gt; after which the connection is forcibly closed.&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;The duration for the maximum time a connection may exist before it is closed.&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_idle&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which an idle connection is closed.&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;server_max_concurrent_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit on the number of concurrent streams for gRPC calls (0 = unlimited).&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;server_max_recv_msg_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit on the size of a gRPC message this server can receive (bytes).&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;4MB&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_max_send_msg_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit on the size of a gRPC message this server can send (bytes).&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;4MB&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&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.awsfirehose&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.awsfirehose&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;p&gt;The following are some of the metrics that are exposed when this component is used.


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The metrics include labels  such as &lt;code&gt;status_code&lt;/code&gt; where relevant, which you can use to measure request success rates.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;loki_source_awsfirehose_request_errors&lt;/code&gt; (counter): Count of errors while receiving a request.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_awsfirehose_record_errors&lt;/code&gt; (counter): Count of errors while decoding an individual record.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_awsfirehose_records_received&lt;/code&gt; (counter): Count of records received.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_awsfirehose_batch_size&lt;/code&gt; (histogram): Size (in units) of the number of records received per request.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example starts an HTTP server on &lt;code&gt;0.0.0.0&lt;/code&gt; address and port &lt;code&gt;9999&lt;/code&gt;. The server receives log entries and forwards
them to a &lt;code&gt;loki.write&lt;/code&gt; component. The &lt;code&gt;loki.write&lt;/code&gt; component will send the logs to the specified loki instance using
basic auth credentials provided.&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;http://loki:3100/api/v1/push&amp;#34;
        basic_auth {
            username = &amp;#34;&amp;lt;your username&amp;gt;&amp;#34;
            password_file = &amp;#34;&amp;lt;your password file&amp;gt;&amp;#34;
        }
    }
}

loki.source.awsfirehose &amp;#34;loki_fh_receiver&amp;#34; {
    http {
        listen_address = &amp;#34;0.0.0.0&amp;#34;
        listen_port = 9999
    }
    forward_to = [
        loki.write.local.receiver,
    ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As another example, if you are receiving records that originated from a CloudWatch logs subscription, you can enrich each
received entry by relabeling internal labels. The following configuration builds upon the one above but keeps the origin
log stream and group as &lt;code&gt;log_stream&lt;/code&gt; and &lt;code&gt;log_group&lt;/code&gt;, respectively.&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;http://loki:3100/api/v1/push&amp;#34;
        basic_auth {
            username = &amp;#34;&amp;lt;your username&amp;gt;&amp;#34;
            password_file = &amp;#34;&amp;lt;your password file&amp;gt;&amp;#34;
        }
    }
}

loki.source.awsfirehose &amp;#34;loki_fh_receiver&amp;#34; {
    http {
        listen_address = &amp;#34;0.0.0.0&amp;#34;
        listen_port = 9999
    }
    forward_to = [
        loki.write.local.receiver,
    ]
    relabel_rules = loki.relabel.logging_origin.rules
}

loki.relabel &amp;#34;logging_origin&amp;#34; {
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__aws_cw_log_group&amp;#34;]
    target_label = &amp;#34;log_group&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__aws_cw_log_stream&amp;#34;]
    target_label = &amp;#34;log_stream&amp;#34;
  }
  forward_to = []
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.awsfirehose&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="lokisourceawsfirehose">loki.source.awsfirehose&lt;/h1>
&lt;p>&lt;code>loki.source.awsfirehose&lt;/code> receives log entries over HTTP
from &lt;a href="https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html" target="_blank" rel="noopener noreferrer">AWS Firehose&lt;/a>
and forwards them to other &lt;code>loki.*&lt;/code> components.&lt;/p>
&lt;p>The HTTP API exposed is compatible
with the &lt;a href="https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html" target="_blank" rel="noopener noreferrer">Firehose HTTP Delivery API&lt;/a>.
Since the API model that AWS Firehose uses to deliver data over HTTP is generic enough, the same component can be used
to receive data from multiple origins:&lt;/p></description></item><item><title>loki.source.azure_event_hubs</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.azure_event_hubs/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.azure_event_hubs/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourceazure_event_hubs&#34;&gt;loki.source.azure_event_hubs&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.azure_event_hubs&lt;/code&gt; receives Azure Event Hubs messages by making use of an Apache Kafka
endpoint on Event Hubs. For more information, see
the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/event-hubs/azure-event-hubs-kafka-overview&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Event Hubs documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To learn more about streaming Azure logs to an Azure Event Hubs, refer to
Microsoft&amp;rsquo;s tutorial on how to &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/active-directory/reports-monitoring/tutorial-azure-monitor-stream-logs-to-event-hub&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Stream Azure Active Directory logs to an Azure event hub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that an Apache Kafka endpoint is not available within the Basic pricing plan. For more information, see
the &lt;a href=&#34;https://azure.microsoft.com/en-us/pricing/details/event-hubs/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Event Hubs pricing page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.azure_event_hubs&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.azure_event_hubs &amp;#34;LABEL&amp;#34; {
	fully_qualified_namespace = &amp;#34;HOST:PORT&amp;#34;
	event_hubs                = EVENT_HUB_LIST
	forward_to                = RECEIVER_LIST

	authentication {
		mechanism = &amp;#34;AUTHENTICATION_MECHANISM&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;loki.source.azure_event_hubs&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;fully_qualified_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Event hub namespace.&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;event_hubs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Event Hubs to consume.&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;group_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Kafka consumer group id.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;loki.source.azure_event_hubs&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;assignor&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The consumer group rebalancing strategy to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;range&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 or not to use the timestamp received from Azure Event Hub.&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 event.&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;tr&gt;
              &lt;td&gt;&lt;code&gt;disallow_custom_messages&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to ignore messages that don&amp;rsquo;t match the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/resource-logs-schema&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;schema&lt;/a&gt; for Azure resource logs.&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;&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;fully_qualified_namespace&lt;/code&gt; argument must refer to a full &lt;code&gt;HOST:PORT&lt;/code&gt; that points to your event hub, such as &lt;code&gt;NAMESPACE.servicebus.windows.net:9093&lt;/code&gt;.
The &lt;code&gt;assignor&lt;/code&gt; argument must be set to one of &lt;code&gt;&amp;quot;range&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;roundrobin&amp;quot;&lt;/code&gt;, or &lt;code&gt;&amp;quot;sticky&amp;quot;&lt;/code&gt;.&lt;/p&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;h3 id=&#34;labels&#34;&gt;Labels&lt;/h3&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 prefixed with &lt;code&gt;__&lt;/code&gt; are available but are discarded if not relabeled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_message_key&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_topic&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_partition&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_member_id&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_group_id&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__azure_event_hubs_category&lt;/code&gt;&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.azure_event_hubs&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;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;Authentication configuration with Azure Event Hub.&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;authentication-block&#34;&gt;authentication block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;authentication&lt;/code&gt; block defines the authentication method when communicating with Azure Event Hub.&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;mechanism&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authentication mechanism.&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;connection_string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Event Hubs ConnectionString for authentication on Azure Cloud.&lt;/td&gt;
              &lt;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;Access token scopes. Default is &lt;code&gt;fully_qualified_namespace&lt;/code&gt; without port.&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;mechanism&lt;/code&gt; supports the values &lt;code&gt;&amp;quot;connection_string&amp;quot;&lt;/code&gt; and &lt;code&gt;&amp;quot;oauth&amp;quot;&lt;/code&gt;. If &lt;code&gt;&amp;quot;connection_string&amp;quot;&lt;/code&gt; is used,
you must set the &lt;code&gt;connection_string&lt;/code&gt; attribute. If &lt;code&gt;&amp;quot;oauth&amp;quot;&lt;/code&gt; is used, you must configure one of the supported credential
types as documented
here: &lt;a href=&#34;https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azidentity/README.md#credential-types&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azidentity/README.md#credential-types&lt;/a&gt; via environment
variables or Azure CLI.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.azure_event_hubs&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.azure_event_hubs&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.azure_event_hubs&lt;/code&gt; does not expose additional debug info.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example consumes messages from Azure Event Hub and uses OAuth to authenticate itself.&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.azure_event_hubs &amp;#34;example&amp;#34; {
	fully_qualified_namespace = &amp;#34;my-ns.servicebus.windows.net:9093&amp;#34;
	event_hubs                = [&amp;#34;gw-logs&amp;#34;]
	forward_to                = [loki.write.example.receiver]

	authentication {
		mechanism = &amp;#34;oauth&amp;#34;
	}
}

loki.write &amp;#34;example&amp;#34; {
	endpoint {
		url = &amp;#34;loki:3100/api/v1/push&amp;#34;
	}
}
```&amp;lt;!-- START GENERATED COMPATIBLE COMPONENTS --&amp;gt;

## Compatible components

`loki.source.azure_event_hubs` can accept arguments from the following components:

- Components that export [Loki `LogsReceiver`](../../compatibility/#loki-logsreceiver-exporters)




&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&amp;lt;!-- END GENERATED COMPATIBLE COMPONENTS --&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="lokisourceazure_event_hubs">loki.source.azure_event_hubs&lt;/h1>
&lt;p>&lt;code>loki.source.azure_event_hubs&lt;/code> receives Azure Event Hubs messages by making use of an Apache Kafka
endpoint on Event Hubs. For more information, see
the &lt;a href="https://learn.microsoft.com/en-us/azure/event-hubs/azure-event-hubs-kafka-overview" target="_blank" rel="noopener noreferrer">Azure Event Hubs documentation&lt;/a>.&lt;/p></description></item><item><title>loki.source.cloudflare</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.cloudflare/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;tr&gt;
              &lt;td&gt;&lt;code&gt;additional_fields&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The additional list of fields to supplement those provided via &lt;code&gt;fields_type&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;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;p&gt;plus any extra fields provided via &lt;code&gt;additional_fields&lt;/code&gt; argument.&lt;/p&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&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;plus any extra fields provided via &lt;code&gt;additional_fields&lt;/code&gt; argument.&lt;/p&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;p&gt;plus any extra fields provided via &lt;code&gt;additional_fields&lt;/code&gt; argument.&lt;/p&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;BotTags&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;, &amp;#34;ClientRequestSource&amp;#34;`&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;plus any extra fields provided via &lt;code&gt;additional_fields&lt;/code&gt; argument (this is still relevant in this case if new fields are made available via Cloudflare API but are not yet included in &lt;code&gt;all&lt;/code&gt;).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;custom&lt;/code&gt; includes only the fields defined in &lt;code&gt;additional_fields&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&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 processing 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 &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&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-json&#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;ClientRequestSource&amp;#34;: &amp;#34;1&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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.cloudflare&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.docker</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.docker/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.docker/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcedocker&#34;&gt;loki.source.docker&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.docker&lt;/code&gt; reads log entries from Docker containers and forwards them
to other &lt;code&gt;loki.*&lt;/code&gt; components. Each component can read from a single Docker
daemon.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.docker&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.docker &amp;#34;LABEL&amp;#34; {
  host       = HOST
  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.docker&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;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.&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;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 containers to read 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;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;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 default set of labels to apply on 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;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;&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;refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The refresh interval to use when connecting to the Docker daemon over HTTP(S).&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;/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.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;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;p&gt;These blocks are only applicable when connecting to a Docker daemon over HTTP
or HTTPS and has no effect when connecting via a &lt;code&gt;unix:///&lt;/code&gt; socket&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 HTTP(S) Docker
daemons.&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_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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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 data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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 for HTTP(S) Docker
daemons.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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 for the Docker
daemon.&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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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 for the Docker
daemon.&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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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 Docker
daemons.&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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.docker&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.docker&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.docker&lt;/code&gt; exposes some debug information per target:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whether the target is ready to tail entries.&lt;/li&gt;
&lt;li&gt;The labels associated with the target.&lt;/li&gt;
&lt;li&gt;The most recent time a log line was read.&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_docker_target_entries_total&lt;/code&gt; (gauge): Total number of successful entries sent to the Docker target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loki_source_docker_target_parsing_errors_total&lt;/code&gt; (gauge): Total number of parsing errors while receiving Docker messages.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;component-behavior&#34;&gt;Component behavior&lt;/h2&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 if a component or Grafana Agent restarts,
&lt;code&gt;loki.source.docker&lt;/code&gt; can pick up tailing from the same spot.&lt;/p&gt;
&lt;p&gt;If the target&amp;rsquo;s argument contains multiple entries with the same container
ID (for example as a result of &lt;code&gt;discovery.docker&lt;/code&gt; picking up multiple exposed
ports or networks), &lt;code&gt;loki.source.docker&lt;/code&gt; will deduplicate them, and only keep
the first of each container ID instances, based on the
&lt;code&gt;__meta_docker_container_id&lt;/code&gt; label.  As such, the Docker daemon is queried
for each container ID only once, and only one target will be available in the
component&amp;rsquo;s debug info.&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 &lt;code&gt;targets&lt;/code&gt;
argument and forwards them to a &lt;code&gt;loki.write&lt;/code&gt; component to 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.docker &amp;#34;linux&amp;#34; {
  host = &amp;#34;unix:///var/run/docker.sock&amp;#34;
}

loki.source.docker &amp;#34;default&amp;#34; {
  host       = &amp;#34;unix:///var/run/docker.sock&amp;#34;
  targets    = discovery.docker.linux.targets 
  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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.docker&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="lokisourcedocker">loki.source.docker&lt;/h1>
&lt;p>&lt;code>loki.source.docker&lt;/code> reads log entries from Docker containers and forwards them
to other &lt;code>loki.*&lt;/code> components. Each component can read from a single Docker
daemon.&lt;/p>
&lt;p>Multiple &lt;code>loki.source.docker&lt;/code> components can be specified by giving them
different labels.&lt;/p></description></item><item><title>loki.source.file</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.file/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;loki.source.file&lt;/code&gt; does not handle file discovery. You can use &lt;code&gt;local.file_match&lt;/code&gt; for file discovery. Refer to the &lt;a href=&#34;#file-globbing&#34;&gt;File Globbing&lt;/a&gt; example for more information.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;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;The encoding to convert from when reading files.&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;tail_from_end&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether a log file should be tailed from the end if a stored position is not found.&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;legacy_positions_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allows conversion from legacy positions file.&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;encoding&lt;/code&gt; argument must be a valid &lt;a href=&#34;https://www.iana.org/assignments/character-sets/character-sets.xhtml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;IANA encoding&lt;/a&gt; name. If not set, it
defaults to UTF-8.&lt;/p&gt;
&lt;p&gt;You can use the &lt;code&gt;tail_from_end&lt;/code&gt; argument when you want to tail a large file without reading its entire content.
When set to true, only new logs will be read, ignoring the existing ones.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;legacy_positions_file&lt;/code&gt; argument is used when you are transitioning from legacy. The legacy positions file will be rewritten into the new format.
This operation will only occur if the new positions file does not exist and the &lt;code&gt;legacy_positions_file&lt;/code&gt; is valid.
Once converted successfully, the &lt;code&gt;legacy_positions_file&lt;/code&gt; will be deleted.
If you add any labels before &lt;code&gt;loki.source.file&lt;/code&gt;, then the positions file will conversion will not work.
The legacy positions file did not have a concept of labels in the positions file, so the conversion assumes no labels.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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.file&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;decompression&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#decompression-block&#34;&gt;decompression&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure reading logs from compressed files.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;file_watch&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#file_watch-block&#34;&gt;file_watch&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure how often files should be polled from disk for changes.&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;decompression-block&#34;&gt;decompression block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;decompression&lt;/code&gt; block contains configuration for reading logs from
compressed files. 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;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether decompression is enabled.&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;initial_delay&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 starting to read from new compressed files.&lt;/td&gt;
              &lt;td&gt;0&lt;/td&gt;
              &lt;td&gt;no&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;Compression format.&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;If you compress a file under a folder being scraped, &lt;code&gt;loki.source.file&lt;/code&gt; might
try to ingest your file before you finish compressing it. To avoid it, pick
an &lt;code&gt;initial_delay&lt;/code&gt; that is enough to avoid it.&lt;/p&gt;
&lt;p&gt;Currently supported compression formats are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;gz&lt;/code&gt; - for gzip&lt;/li&gt;
&lt;li&gt;&lt;code&gt;z&lt;/code&gt; - for zlib&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bz2&lt;/code&gt; - for bzip2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component can only support one compression format at a time, in order to
handle multiple formats, you will need to create multiple components.&lt;/p&gt;
&lt;h3 id=&#34;file_watch-block&#34;&gt;file_watch block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;file_watch&lt;/code&gt; block configures how often log files are polled from disk for changes.
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_poll_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum frequency to poll for files.&lt;/td&gt;
              &lt;td&gt;250ms&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_poll_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum frequency to poll for files.&lt;/td&gt;
              &lt;td&gt;250ms&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 file changes are detected, the poll frequency doubles until a file change is detected or the poll frequency reaches the &lt;code&gt;max_poll_frequency&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If file changes are detected, the poll frequency is reset to &lt;code&gt;min_poll_frequency&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.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;If the decompression feature is deactivated, the component will continuously monitor and &amp;rsquo;tail&amp;rsquo; the files.
In this mode, upon reaching the end of a file, the component remains active, awaiting and reading new entries in real-time as they are appended.&lt;/p&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 local.file_match --&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 if a component or Grafana Agent restarts,
&lt;code&gt;loki.source.file&lt;/code&gt; can pick up tailing from the same spot.&lt;/p&gt;
&lt;p&gt;The data path is inside the directory configured by the &lt;code&gt;--storage.path&lt;/code&gt; &lt;a href=&#34;../../cli/run/&#34;&gt;command line argument&lt;/a&gt;.&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;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;static-targets&#34;&gt;Static targets&lt;/h3&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 to 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;
&lt;h3 id=&#34;file-globbing&#34;&gt;File globbing&lt;/h3&gt;
&lt;p&gt;This example collects log entries from the files matching &lt;code&gt;*.log&lt;/code&gt; pattern
using &lt;code&gt;local.file_match&lt;/code&gt; component. When files appear or disappear, the list of
targets will be updated accordingly.&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;
local.file_match &amp;#34;logs&amp;#34; {
  path_targets = [
    {__path__ = &amp;#34;/tmp/*.log&amp;#34;},
  ]
}

loki.source.file &amp;#34;tmpfiles&amp;#34; {
  targets    = local.file_match.logs.targets
  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;
&lt;h3 id=&#34;decompression&#34;&gt;Decompression&lt;/h3&gt;
&lt;p&gt;This example collects log entries from the compressed files matching &lt;code&gt;*.gz&lt;/code&gt;
pattern using &lt;code&gt;local.file_match&lt;/code&gt; component and the decompression configuration
on the &lt;code&gt;loki.source.file&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;
local.file_match &amp;#34;logs&amp;#34; {
  path_targets = [
    {__path__ = &amp;#34;/tmp/*.gz&amp;#34;},
  ]
}

loki.source.file &amp;#34;tmpfiles&amp;#34; {
  targets    = local.file_match.logs.targets
  forward_to = [loki.write.local.receiver]
  decompression {
    enabled       = true
    initial_delay = &amp;#34;10s&amp;#34;
    format        = &amp;#34;gz&amp;#34;
  }
}

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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.file&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/loki.source.gcplog/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;tr&gt;
              &lt;td&gt;push &amp;gt; http&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http&#34;&gt;http&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server that receives requests when using the &lt;code&gt;push&lt;/code&gt; mode.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;push &amp;gt; grpc&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#grpc&#34;&gt;grpc&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the gRPC server that receives requests when using the &lt;code&gt;push&lt;/code&gt; mode.&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. The &lt;code&gt;http&lt;/code&gt; and &lt;code&gt;grpc&lt;/code&gt; block
are just used when the &lt;code&gt;push&lt;/code&gt; block is configured.&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;tr&gt;
              &lt;td&gt;&lt;code&gt;use_full_line&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Send the full line from Cloud Logging even if &lt;code&gt;textPayload&lt;/code&gt; is available.&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 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;graceful_shutdown_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 servers graceful shutdown. If configured, should be greater than zero.&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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;use_full_line&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Send the full line from Cloud Logging even if &lt;code&gt;textPayload&lt;/code&gt; is available. By default, if &lt;code&gt;textPayload&lt;/code&gt; is present in the line, then it&amp;rsquo;s used as log line&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;h3 id=&#34;http&#34;&gt;http&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/loki-server-http.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block configures the HTTP server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;http&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;conn_limit&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 simultaneous HTTP connections. Defaults to no limit.&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;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. Defaults to accepting all incoming connections.&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;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections.&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;server_idle_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Idle timeout for HTTP server.&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;server_read_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read timeout for HTTP server.&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;server_write_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write timeout for HTTP server.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;

        
&lt;h3 id=&#34;grpc&#34;&gt;grpc&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/loki-server-grpc.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;grpc&lt;/code&gt; block configures the gRPC server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;grpc&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;conn_limit&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 simultaneous HTTP connections. Defaults to no limit.&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;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. It defaults to accepting all incoming connections.&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;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections. Defaults to a random free port.&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_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;An additive period after &lt;code&gt;max_connection_age&lt;/code&gt; after which the connection is forcibly closed.&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;The duration for the maximum time a connection may exist before it is closed.&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_idle&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which an idle connection is closed.&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;server_max_concurrent_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit on the number of concurrent streams for gRPC calls (0 = unlimited).&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;server_max_recv_msg_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit on the size of a gRPC message this server can receive (bytes).&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;4MB&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_max_send_msg_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit on the size of a gRPC message this server can send (bytes).&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;4MB&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&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;
&lt;p&gt;On the other hand, if we need the server to listen on &lt;code&gt;0.0.0.0:4040&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 {
    http {
        listen_port = 4040
    }
  }

  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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.gcplog&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/loki.source.gelf/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;The &lt;code&gt;relabel_rules&lt;/code&gt; argument can make use of the &lt;code&gt;rules&lt;/code&gt; export from a
&lt;a href=&#34;../loki.relabel/&#34;&gt;loki.relabel&lt;/a&gt; component to apply one or more relabling rules to log entries
before they&amp;rsquo;re forward to the list of receivers specified in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Incoming messages have the following internal 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;All labels starting with &lt;code&gt;__&lt;/code&gt; are removed prior to forwarding log entries. To
keep these labels, relabel them using a &lt;a href=&#34;../loki.relabel/&#34;&gt;loki.relabel&lt;/a&gt; component and pass its
&lt;code&gt;rules&lt;/code&gt; export to the &lt;code&gt;relabel_rules&lt;/code&gt; argument.&lt;/p&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.relabel &amp;#34;gelf&amp;#34; {
  rule {
    source_labels = [&amp;#34;__gelf_message_host&amp;#34;]
    target_label  = &amp;#34;host&amp;#34;
  }
}

loki.source.gelf &amp;#34;listen&amp;#34;  {
  forward_to    = [loki.write.endpoint.receiver]
  relabel_rules = loki.relabel.gelf.rules
}

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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.gelf&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/loki.source.heroku/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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 &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&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-shell&#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; {
    http {
        listen_address = &amp;#34;LISTEN_ADDRESS&amp;#34;
        listen_port    = LISTEN_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;tr&gt;
              &lt;td&gt;&lt;code&gt;graceful_shutdown_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 servers graceful shutdown. If configured, should be greater than zero.&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;/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;&lt;code&gt;http&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http&#34;&gt;http&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server that receives requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;grpc&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#grpc&#34;&gt;grpc&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the gRPC server that receives 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;http&#34;&gt;http&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/loki-server-http.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block configures the HTTP server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;http&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;conn_limit&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 simultaneous HTTP connections. Defaults to no limit.&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;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. Defaults to accepting all incoming connections.&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;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections.&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;server_idle_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Idle timeout for HTTP server.&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;server_read_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read timeout for HTTP server.&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;server_write_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write timeout for HTTP server.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;

        
&lt;h3 id=&#34;grpc&#34;&gt;grpc&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/loki-server-grpc.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;grpc&lt;/code&gt; block configures the gRPC server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;grpc&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;conn_limit&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 simultaneous HTTP connections. Defaults to no limit.&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;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. It defaults to accepting all incoming connections.&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;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections. Defaults to a random free port.&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_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;An additive period after &lt;code&gt;max_connection_age&lt;/code&gt; after which the connection is forcibly closed.&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;The duration for the maximum time a connection may exist before it is closed.&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_idle&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which an idle connection is closed.&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;server_max_concurrent_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit on the number of concurrent streams for gRPC calls (0 = unlimited).&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;server_max_recv_msg_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit on the size of a gRPC message this server can receive (bytes).&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;4MB&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_max_send_msg_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit on the size of a gRPC message this server can send (bytes).&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;4MB&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&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; {
    http {
        listen_address = &amp;#34;0.0.0.0&amp;#34;
        listen_port    = 4040
    }
    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;
&lt;p&gt;When using the default &lt;code&gt;http&lt;/code&gt; block settings, the server listen for new connection on port &lt;code&gt;8080&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;loki.source.heroku &amp;#34;local&amp;#34; {
    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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.heroku&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/loki.source.journal/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;Whether to forward the original journal entry as 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;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.&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. The &lt;code&gt;&#43;&lt;/code&gt; character 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;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;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 apply to every log coming out of the journal.&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;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;p&gt;When the &lt;code&gt;format_as_json&lt;/code&gt; argument is true, log messages are passed through as
JSON with all of the original fields from the journal entry. Otherwise, the log
message is taken from the content of the &lt;code&gt;MESSAGE&lt;/code&gt; field from the journal
entry.&lt;/p&gt;
&lt;p&gt;When the &lt;code&gt;path&lt;/code&gt; argument is empty, &lt;code&gt;/var/log/journal&lt;/code&gt; and &lt;code&gt;/run/log/journal&lt;/code&gt;
will be used for discovering journal entries.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;relabel_rules&lt;/code&gt; argument can make use of the &lt;code&gt;rules&lt;/code&gt; export value from a
&lt;a href=&#34;../loki.relabel/&#34;&gt;loki.relabel&lt;/a&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;p&gt;All messages read from the journal include internal labels following the
pattern of &lt;code&gt;__journal_FIELDNAME&lt;/code&gt; and will be dropped before sending to the list
of receivers specified in &lt;code&gt;forward_to&lt;/code&gt;. To keep these labels, use the
&lt;code&gt;relabel_rules&lt;/code&gt; argument and relabel them to not be prefixed with &lt;code&gt;__&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: many field names from journald start with an &lt;code&gt;_&lt;/code&gt;, such as
&lt;code&gt;_systemd_unit&lt;/code&gt;. The final internal label name would be
&lt;code&gt;__journal__systemd_unit&lt;/code&gt;, with &lt;em&gt;two&lt;/em&gt; underscores between &lt;code&gt;__journal&lt;/code&gt; and
&lt;code&gt;systemd_unit&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.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.relabel &amp;#34;journal&amp;#34; {
  forward_to = []

  rule {
    source_labels = [&amp;#34;__journal__systemd_unit&amp;#34;]
    target_label  = &amp;#34;unit&amp;#34;
  }
}

loki.source.journal &amp;#34;read&amp;#34;  {
  forward_to    = [loki.write.endpoint.receiver]
  relabel_rules = loki.relabel.journal.rules
  labels        = {component = &amp;#34;loki.source.journal&amp;#34;}
}

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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.journal&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.kafka</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.kafka/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.kafka/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcekafka&#34;&gt;loki.source.kafka&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.kafka&lt;/code&gt; reads messages from Kafka using a consumer group
and forwards them to other &lt;code&gt;loki.*&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;The component starts a new Kafka consumer group for the given arguments
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.kafka&lt;/code&gt;, Kafka should have at least one producer
writing events to at least one topic. Follow the steps in the
&lt;a href=&#34;https://kafka.apache.org/documentation/#quickstart&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kafka Quick Start&lt;/a&gt;
to get started with Kafka.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.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;loki.source.kafka &amp;#34;LABEL&amp;#34; {
  brokers    = BROKER_LIST
  topics     = TOPIC_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;&lt;code&gt;loki.source.kafka&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;brokers&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 brokers to connect to Kafka.&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;topics&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 Kafka topics to consume.&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;group_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Kafka consumer group id.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;loki.source.kafka&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;assignor&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The consumer group rebalancing strategy to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;range&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;version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kafka version to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2.2.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;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 Kafka.&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 Kafka event.&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;&lt;code&gt;assignor&lt;/code&gt; values can be either &lt;code&gt;&amp;quot;range&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;roundrobin&amp;quot;&lt;/code&gt;, or &lt;code&gt;&amp;quot;sticky&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Labels from the &lt;code&gt;labels&lt;/code&gt; argument are applied to every message that the component reads.&lt;/p&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;a href=&#34;../loki.relabel/&#34;&gt;loki.relabel&lt;/a&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;p&gt;In addition to custom labels, the following internal labels prefixed with &lt;code&gt;__&lt;/code&gt; are available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_message_key&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_message_offset&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_topic&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_partition&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_member_id&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kafka_group_id&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All labels starting with &lt;code&gt;__&lt;/code&gt; are removed prior to forwarding log entries. To
keep these labels, relabel them using a &lt;a href=&#34;../loki.relabel/&#34;&gt;loki.relabel&lt;/a&gt; component and pass its
&lt;code&gt;rules&lt;/code&gt; export to the &lt;code&gt;relabel_rules&lt;/code&gt; argument.&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.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;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;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;Optional authentication configuration with Kafka brokers.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication &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;Optional authentication configuration with Kafka brokers.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication &amp;gt; sasl_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#sasl_config-block&#34;&gt;sasl_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Optional authentication configuration with Kafka brokers.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication &amp;gt; sasl_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;Optional authentication configuration with Kafka brokers.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;authentication &amp;gt; sasl_config &amp;gt; oauth_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth_config-block&#34;&gt;oauth_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Optional authentication configuration with Kafka brokers.&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;authentication-block&#34;&gt;authentication block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;authentication&lt;/code&gt; block defines the authentication method when communicating with the Kafka event brokers.&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;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Type of authentication.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;none&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;type&lt;/code&gt; supports the values &lt;code&gt;&amp;quot;none&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;ssl&amp;quot;&lt;/code&gt;, and &lt;code&gt;&amp;quot;sasl&amp;quot;&lt;/code&gt;. If &lt;code&gt;&amp;quot;ssl&amp;quot;&lt;/code&gt; is used,
you must set the &lt;code&gt;tls_config&lt;/code&gt; block. If &lt;code&gt;&amp;quot;sasl&amp;quot;&lt;/code&gt; is used, you must set the &lt;code&gt;sasl_config&lt;/code&gt; block.&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;sasl_config-block&#34;&gt;sasl_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;sasl_config&lt;/code&gt; block defines the listen address and port where the listener
expects Kafka 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;mechanism&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies the SASL mechanism the client uses to authenticate with the broker.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;PLAIN&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;user&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The user name to use for SASL authentication.&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;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The password to use for SASL authentication.&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_tls&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If true, SASL authentication is executed over TLS.&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;oauth_config-block&#34;&gt;oauth_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;oauth_config&lt;/code&gt; is required when the SASL mechanism is set to &lt;code&gt;OAUTHBEARER&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;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_provider&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The OAuth provider to be used. The only supported provider is &lt;code&gt;azure&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;yes&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;The scopes to set in the access token&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;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.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;loki.source.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;loki.source.kafka&lt;/code&gt; does not expose additional debug info.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example consumes Kafka events from the specified brokers and topics
then forwards them to a &lt;code&gt;loki.write&lt;/code&gt; component using the Kafka 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.kafka &amp;#34;local&amp;#34; {
  brokers                = [&amp;#34;localhost:9092&amp;#34;]
  topics                 = [&amp;#34;quickstart-events&amp;#34;]
  labels                 = {component = &amp;#34;loki.source.kafka&amp;#34;}
  forward_to             = [loki.relabel.kafka.receiver]
  use_incoming_timestamp = true
  relabel_rules          = loki.relabel.kafka.rules
}

loki.relabel &amp;#34;kafka&amp;#34; {
  forward_to      = [loki.write.local.receiver]

  rule {
    source_labels = [&amp;#34;__meta_kafka_topic&amp;#34;]
    target_label  = &amp;#34;topic&amp;#34;
  }
}

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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.kafka&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="lokisourcekafka">loki.source.kafka&lt;/h1>
&lt;p>&lt;code>loki.source.kafka&lt;/code> reads messages from Kafka using a consumer group
and forwards them to other &lt;code>loki.*&lt;/code> components.&lt;/p>
&lt;p>The component starts a new Kafka consumer group for the given arguments
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.kubernetes</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.kubernetes/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.kubernetes/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcekubernetes&#34;&gt;loki.source.kubernetes&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&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 Grafana 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; 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;tr&gt;
              &lt;td&gt;clustering&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering-block&#34;&gt;clustering&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Grafana Agent Flow is running in clustered mode.&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 a &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 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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;clustering-block&#34;&gt;clustering 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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Distribute log collection with other cluster nodes.&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;When Grafana Agent is &lt;a href=&#34;../../../concepts/clustering/&#34;&gt;using clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true, then this
&lt;code&gt;loki.source.kubernetes&lt;/code&gt; component instance opts-in to participating in the
cluster to distribute the load of log collection between all cluster nodes.&lt;/p&gt;
&lt;p&gt;If Grafana Agent is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op and
&lt;code&gt;loki.source.kubernetes&lt;/code&gt; collects logs from every target it receives in its
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.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 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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="lokisourcekubernetes">loki.source.kubernetes&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&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></description></item><item><title>loki.source.kubernetes_events</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.kubernetes_events/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.kubernetes_events/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcekubernetes_events&#34;&gt;loki.source.kubernetes_events&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes_events&lt;/code&gt; tails events from the Kubernetes API and
converts them into log lines to forward to other &lt;code&gt;loki&lt;/code&gt; components.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;loki.source.kubernetes_events&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_events &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.kubernetes_events&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;job_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Value to use for &lt;code&gt;job&lt;/code&gt; label for generated logs.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;loki.source.kubernetes_events&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;log_format&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Format of the log.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;logfmt&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;namespaces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Namespaces to watch for Events in.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;By default, &lt;code&gt;loki.source.kubernetes_events&lt;/code&gt; will watch for events in all
namespaces. A list of explicit namespaces to watch can be provided in the
&lt;code&gt;namespaces&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;By default, the generated log lines will be in the &lt;code&gt;logfmt&lt;/code&gt; format. Use the
&lt;code&gt;log_format&lt;/code&gt; argument to change it to &lt;code&gt;json&lt;/code&gt;. These formats are also names of
LogQL parsers, which can be used for processing the logs.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: When watching all namespaces, Grafana Agent Flow must have permissions
to watch events at the cluster scope (such as using a ClusterRoleBinding). If
an explicit list of namespaces is provided, Grafana Agent Flow only needs
permissions to watch events for those namespaces.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Log lines generated by &lt;code&gt;loki.source.kubernetes_events&lt;/code&gt; have the following
labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;namespace&lt;/code&gt;: Namespace of the Kubernetes object involved in the event.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;job&lt;/code&gt;: Value specified by the &lt;code&gt;job_name&lt;/code&gt; argument.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;instance&lt;/code&gt;: Value matching the component ID.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;job_name&lt;/code&gt; argument is the empty string, the component will fail to load. To
remove the job label, forward the output of &lt;code&gt;loki.source.kubernetes_events&lt;/code&gt; to
&lt;a href=&#34;../loki.relabel/&#34;&gt;a &lt;code&gt;loki.relabel&lt;/code&gt; component&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For compatibility with the &lt;code&gt;eventhandler&lt;/code&gt; integration from static mode,
&lt;code&gt;job_name&lt;/code&gt; can be set to &lt;code&gt;&amp;quot;integrations/kubernetes/eventhandler&amp;quot;&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.kubernetes_events&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; 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 a &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 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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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.kubernetes_events&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_events&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_events&lt;/code&gt; exposes the most recently read timestamp for
events in each watched namespace.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes_events&lt;/code&gt; does not expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;component-behavior&#34;&gt;Component behavior&lt;/h2&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 if a component or Grafana Agent restarts,
&lt;code&gt;loki.source.kubernetes_events&lt;/code&gt; can pick up tailing from the same spot.&lt;/p&gt;
&lt;p&gt;The data path is inside the directory configured by the &lt;code&gt;--storage.path&lt;/code&gt; &lt;a href=&#34;../../cli/run/&#34;&gt;command line argument&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the Static mode&amp;rsquo;s &lt;a href=&#34;../../../../static/configuration/integrations/integrations-next/eventhandler-config/&#34;&gt;eventhandler integration&lt;/a&gt;, a &lt;code&gt;cache_path&lt;/code&gt; argument is used to configure a positions file.
In Flow mode, this argument is no longer necessary.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example collects watches events in the &lt;code&gt;kube-system&lt;/code&gt; namespace and
forwards them to a &lt;code&gt;loki.write&lt;/code&gt; component so they are 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.kubernetes_events &amp;#34;example&amp;#34; {
  // Only watch for events in the kube-system namespace.
  namespaces = [&amp;#34;kube-system&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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.kubernetes_events&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="lokisourcekubernetes_events">loki.source.kubernetes_events&lt;/h1>
&lt;p>&lt;code>loki.source.kubernetes_events&lt;/code> tails events from the Kubernetes API and
converts them into log lines to forward to other &lt;code>loki&lt;/code> components.&lt;/p>
&lt;p>Multiple &lt;code>loki.source.kubernetes_events&lt;/code> components can be specified by giving them
different labels.&lt;/p></description></item><item><title>loki.source.podlogs</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.podlogs/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.podlogs/</guid><content><![CDATA[&lt;h1 id=&#34;lokisourcepodlogs&#34;&gt;loki.source.podlogs&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&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 Grafana Agents. To avoid collecting
duplicate logs, only one Grafana 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; 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;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;tr&gt;
              &lt;td&gt;clustering&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering-block&#34;&gt;clustering&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Grafana Agent is running in clustered mode.&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 a &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 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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;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;h3 id=&#34;clustering-block&#34;&gt;clustering 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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Distribute log collection with other cluster nodes.&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;When Grafana Agent Flow is &lt;a href=&#34;../../../concepts/clustering/&#34;&gt;using clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true, then this
&lt;code&gt;loki.source.podlogs&lt;/code&gt; component instance opts-in to participating in the
cluster to distribute the load of log collection between all cluster nodes.&lt;/p&gt;
&lt;p&gt;If Grafana Agent Flow is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op and
&lt;code&gt;loki.source.podlogs&lt;/code&gt; collects logs based on every PodLogs resource discovered.&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 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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="lokisourcepodlogs">loki.source.podlogs&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&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></description></item><item><title>loki.source.syslog</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/loki.source.syslog/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;a href=&#34;../loki.relabel/&#34;&gt;loki.relabel&lt;/a&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.syslog&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/loki.source.windowsevent/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;exclude_event_message&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exclude the human-friendly event 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;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;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;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 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;legacy_bookmark_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The location of the Grafana Agent Static bookmark path.&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;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;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;legacy_bookmark_path&lt;/code&gt; is used to convert the Grafana Agent Static to a Grafana Agent Flow bookmark, if &lt;code&gt;bookmark_path&lt;/code&gt; does not exist.&lt;/p&gt;&lt;/blockquote&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.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 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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.source.windowsevent&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/loki.write/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;Maximum number of active streams.&lt;/td&gt;
              &lt;td&gt;0 (no limit)&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;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;Write-ahead log configuration.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &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; 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; 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; 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; 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;When WAL is enabled, configures the queue 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;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; basic_auth&lt;/code&gt; refers to a &lt;code&gt;basic_auth&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;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;batch_wait&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 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;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;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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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;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, the retry mechanism will be governed by the backoff configuration specified through &lt;code&gt;min_backoff_period&lt;/code&gt;, &lt;code&gt;max_backoff_period &lt;/code&gt; and &lt;code&gt;max_backoff_retries&lt;/code&gt; attributes.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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-experimental&#34;&gt;queue_config block (experimental)&lt;/h3&gt;
&lt;p&gt;The optional &lt;code&gt;queue_config&lt;/code&gt; block configures, when WAL is enabled (see &lt;a href=&#34;#wal-block-experimental&#34;&gt;Write-Ahead block&lt;/a&gt;), how the
underlying client queues batches of logs to be sent to Loki.&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;capacity&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls the size of the underlying send queue buffer. This setting should be considered a worst-case scenario of memory consumption, in which all enqueued batches are full.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10MiB&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;drain_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures the maximum time the client can take to drain the send queue upon shutdown. During that time, it will enqueue pending batches and drain the send queue sending each.&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;h3 id=&#34;wal-block-experimental&#34;&gt;wal block (experimental)&lt;/h3&gt;
&lt;p&gt;The optional &lt;code&gt;wal&lt;/code&gt; block configures the Write-Ahead Log (WAL) used in the Loki remote-write client. To enable the WAL,
you must include the &lt;code&gt;wal&lt;/code&gt; block in your configuration. When the WAL is enabled, the log entries sent to the &lt;code&gt;loki.write&lt;/code&gt;
component are first written to a WAL under the &lt;code&gt;dir&lt;/code&gt; directory and then read into the remote-write client. This process
provides durability guarantees when an entry reaches this component. The client knows when to read from the WAL using the
following two mechanisms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The WAL-writer side of the &lt;code&gt;loki.write&lt;/code&gt; component notifies the reader side that new data is available.&lt;/li&gt;
&lt;li&gt;The WAL-reader side periodically checks if there is new data, increasing the wait time exponentially between
&lt;code&gt;min_read_frequency&lt;/code&gt; and &lt;code&gt;max_read_frequency&lt;/code&gt;.&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 Flow 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 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;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to enable the WAL.&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;max_segment_age&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time a WAL segment should be allowed to live. Segments older than this setting will be eventually deleted.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1h&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_read_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum backoff time in the backup read mechanism.&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;tr&gt;
              &lt;td&gt;&lt;code&gt;max_read_frequency&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 in the backup read mechanism.&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;drain_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time the WAL drain procedure can take, before being forcefully stopped.&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;/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;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;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show you how to create &lt;code&gt;loki.write&lt;/code&gt; components that send log entries to different destinations.&lt;/p&gt;
&lt;h3 id=&#34;send-log-entries-to-a-local-loki-instance&#34;&gt;Send log entries to a local Loki instance&lt;/h3&gt;
&lt;p&gt;You can create a &lt;code&gt;loki.write&lt;/code&gt; component that sends your log 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;http://loki:3100/loki/api/v1/push&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;send-log-entries-to-a-managed-service&#34;&gt;Send log entries to a managed service&lt;/h3&gt;
&lt;p&gt;You can create a &lt;code&gt;loki.write&lt;/code&gt; component that sends your log entries to a managed service, for example, Grafana Cloud. The Loki username and Grafana Cloud API Key are injected in this example through environment variables.&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;default&amp;#34; {
    endpoint {
        url = &amp;#34;https://logs-xxx.grafana.net/loki/api/v1/push&amp;#34;
        basic_auth {
            username = env(&amp;#34;LOKI_USERNAME&amp;#34;)
            password = env(&amp;#34;GRAFANA_CLOUD_API_KEY&amp;#34;)
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;technical-details&#34;&gt;Technical details&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.write&lt;/code&gt; uses &lt;a href=&#34;https://en.wikipedia.org/wiki/Snappy_%28compression%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;snappy&lt;/a&gt; for compression.&lt;/p&gt;
&lt;p&gt;Any labels that start with &lt;code&gt;__&lt;/code&gt; will be removed before sending to the endpoint.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;loki.write&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#loki-logsreceiver-consumers&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/mimir.rules.kubernetes/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/mimir.rules.kubernetes/</guid><content><![CDATA[&lt;h1 id=&#34;mimirruleskubernetes&#34;&gt;mimir.rules.kubernetes&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&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;li&gt;This component accesses the Kubernetes REST API from &lt;a href=&#34;https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;within a Pod&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: This component requires &lt;a href=&#34;https://kubernetes.io/docs/reference/access-authn-authz/rbac/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Role-based access control (RBAC)&lt;/a&gt; to be setup
in Kubernetes in order for the Agent to access it via the Kubernetes REST API.
For an example RBAC configuration please click &lt;a href=&#34;#example&#34;&gt;here&lt;/a&gt;.&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;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][gem-2_2] 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;prometheus_http_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path prefix for [Mimir&amp;rsquo;s Prometheus endpoint][gem-path-prefix].&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/prometheus&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;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;5m&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 Grafana Agent Flow 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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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 Grafana Agent Flow deployments across your infrastructure. It should be set to a
unique value for each deployment.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;use_legacy_routes&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; contacts Mimir on a &lt;code&gt;/api/v1/rules&lt;/code&gt; endpoint.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;prometheus_http_prefix&lt;/code&gt; is set to &lt;code&gt;/mimir&lt;/code&gt;, &lt;code&gt;mimir.rules.kubernetes&lt;/code&gt; contacts Mimir on a &lt;code&gt;/mimir/config/v1/rules&lt;/code&gt; endpoint.
This is useful if you configure Mimir to use a different [prefix][gem-path-prefix] for its Prometheus endpoints than the default one.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;prometheus_http_prefix&lt;/code&gt; is ignored if &lt;code&gt;use_legacy_routes&lt;/code&gt; is set to &lt;code&gt;true&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;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;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;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;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;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;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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&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;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 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;li&gt;&lt;code&gt;&amp;quot;DoesNotExist&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;values&lt;/code&gt; argument must not be provided when &lt;code&gt;operator&lt;/code&gt; is set to &lt;code&gt;&amp;quot;Exists&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;DoesNotExist&amp;quot;&lt;/code&gt;.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;
    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;
&lt;p&gt;The following example is an RBAC configuration for Kubernetes. It authorizes the Agent to query the Kubernetes REST 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;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: ServiceAccount
metadata:
  name: grafana-agent
  namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: grafana-agent
rules:
- apiGroups: [&amp;#34;&amp;#34;]
  resources: [&amp;#34;namespaces&amp;#34;]
  verbs: [&amp;#34;get&amp;#34;, &amp;#34;list&amp;#34;, &amp;#34;watch&amp;#34;]
- apiGroups: [&amp;#34;monitoring.coreos.com&amp;#34;]
  resources: [&amp;#34;prometheusrules&amp;#34;]
  verbs: [&amp;#34;get&amp;#34;, &amp;#34;list&amp;#34;, &amp;#34;watch&amp;#34;]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: grafana-agent
subjects:
- kind: ServiceAccount
  name: grafana-agent
  namespace: default
roleRef:
  kind: ClusterRole
  name: grafana-agent
  apiGroup: rbac.authorization.k8s.io&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="mimirruleskubernetes">mimir.rules.kubernetes&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>module.file</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/module.file/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/module.file/</guid><content><![CDATA[&lt;h1 id=&#34;modulefile-deprecated&#34;&gt;module.file (deprecated)&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Starting with release v0.40, &lt;code&gt;module.string&lt;/code&gt; is deprecated and is replaced by &lt;code&gt;import.string&lt;/code&gt;.
&lt;code&gt;module.string&lt;/code&gt; will be removed in a future release.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;module.file&lt;/code&gt; is a &lt;em&gt;module loader&lt;/em&gt; component. A module loader is a Grafana Agent Flow
component which retrieves a &lt;a href=&#34;../../../concepts/modules/&#34;&gt;module&lt;/a&gt; and runs the components defined inside of it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;module.file&lt;/code&gt; simplifies the configurations for modules loaded from a file by embedding
a &lt;a href=&#34;../local.file/&#34;&gt;local.file&lt;/a&gt; component. This allows a single module loader to do the equivalence of
using the more generic &lt;a href=&#34;../module.string/&#34;&gt;module.string&lt;/a&gt; paired with a &lt;a href=&#34;../local.file/&#34;&gt;local.file&lt;/a&gt; component.&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;module.file &amp;#34;LABEL&amp;#34; {
  filename = FILENAME

  arguments {
    MODULE_ARGUMENT_1 = VALUE_1
    MODULE_ARGUMENT_2 = VALUE_2
    ...
  }
}&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;../../../concepts/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;div data-shared=&#34;flow/reference/components/local-file-arguments-text.md&#34;&gt;
            &lt;h3 id=&#34;file-change-detectors&#34;&gt;File change detectors&lt;/h3&gt;
&lt;p&gt;File change detectors detect 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 is updated.
This detector requires a filesystem that 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;The component re-reads the watched file when a filesystem event is received.
This re-read happens for any filesystem event related to the file, including a permissions change.&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; stops receiving filesystem events if the watched file has been deleted, renamed, or moved.
The subscription is 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 causes the watched file to be re-read every &lt;code&gt;poll_frequency&lt;/code&gt;, regardless of whether the file changed.&lt;/p&gt;
&lt;/div&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;module.file&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;arguments&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#arguments-block&#34;&gt;arguments&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Arguments to pass to the module.&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;arguments-block&#34;&gt;arguments block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;arguments&lt;/code&gt; block specifies the list of values to pass to the loaded
module.&lt;/p&gt;
&lt;p&gt;The attributes provided in the &lt;code&gt;arguments&lt;/code&gt; block are validated based on the
&lt;a href=&#34;../../config-blocks/argument/&#34;&gt;argument blocks&lt;/a&gt; defined in the module source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If a module source marks one of its arguments as required, it must be
provided as an attribute in the &lt;code&gt;arguments&lt;/code&gt; block of the module loader.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Attributes in the &lt;code&gt;argument&lt;/code&gt; block of the module loader will be rejected if
they are not defined in the module source.&lt;/p&gt;
&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;exports&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(any)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The exports of the Module loader.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;exports&lt;/code&gt; exposes the &lt;code&gt;export&lt;/code&gt; config block inside a module. It can be accessed
from the parent config via &lt;code&gt;module.file.LABEL.exports.EXPORT_LABEL&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Values in &lt;code&gt;exports&lt;/code&gt; correspond to &lt;a href=&#34;../../config-blocks/export/&#34;&gt;export blocks&lt;/a&gt; defined in the module
source.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;module.file&lt;/code&gt; is reported as healthy if the most recent load of the module was
successful.&lt;/p&gt;
&lt;p&gt;If the module is not loaded successfully, the current health displays as
unhealthy and the health includes the error from loading the module.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;module.file&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;module.file&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;In this example, we pass credentials from a parent config to a module which loads
a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component. The exports of the
&lt;code&gt;prometheus.remote_write&lt;/code&gt; component are exposed to parent config, allowing
the parent config to pass metrics to it.&lt;/p&gt;
&lt;p&gt;Parent:&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;module.file &amp;#34;metrics&amp;#34; {
  filename = &amp;#34;/path/to/prometheus_remote_write_module.river&amp;#34;

  arguments {
    username = env(&amp;#34;PROMETHEUS_USERNAME&amp;#34;)
    password = env(&amp;#34;PROMETHEUS_PASSWORD&amp;#34;)
  }
}

prometheus.exporter.unix &amp;#34;default&amp;#34; { }

prometheus.scrape &amp;#34;local_agent&amp;#34; {
  targets         = prometheus.exporter.unix.default.targets
  forward_to      = [module.file.metrics.exports.prometheus_remote_write.receiver]
  scrape_interval = &amp;#34;10s&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Module:&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;argument &amp;#34;username&amp;#34; { }

argument &amp;#34;password&amp;#34; { }

export &amp;#34;prometheus_remote_write&amp;#34; {
  value = prometheus.remote_write.grafana_cloud
}

prometheus.remote_write &amp;#34;grafana_cloud&amp;#34; {
  endpoint {
    url = &amp;#34;https://prometheus-us-central1.grafana.net/api/prom/push&amp;#34;

    basic_auth {
      username = argument.username.value
      password = argument.password.value
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="modulefile-deprecated">module.file (deprecated)&lt;/h1>
&lt;div class="admonition admonition-caution">&lt;blockquote>&lt;p class="title text-uppercase">Caution&lt;/p>&lt;p>Starting with release v0.40, &lt;code>module.string&lt;/code> is deprecated and is replaced by &lt;code>import.string&lt;/code>.
&lt;code>module.string&lt;/code> will be removed in a future release.&lt;/p>&lt;/blockquote>&lt;/div>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>module.git</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/module.git/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/module.git/</guid><content><![CDATA[&lt;h1 id=&#34;modulegit-deprecated&#34;&gt;module.git (deprecated)&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Starting with release v0.40, &lt;code&gt;module.git&lt;/code&gt; is deprecated and is replaced by &lt;code&gt;import.git&lt;/code&gt;.
&lt;code&gt;module.git&lt;/code&gt; will be removed in a future release.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;module.git&lt;/code&gt; is a &lt;em&gt;module loader&lt;/em&gt; component. A module loader is a Grafana Agent Flow
component which retrieves a &lt;a href=&#34;../../../concepts/modules/&#34;&gt;module&lt;/a&gt; and runs the components defined inside of it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;module.git&lt;/code&gt; retrieves a module source from a file in a Git repository.&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;module.git &amp;#34;LABEL&amp;#34; {
  repository = &amp;#34;GIT_REPOSTORY&amp;#34;
  path       = &amp;#34;PATH_TO_MODULE&amp;#34;

  arguments {
    MODULE_ARGUMENT_1 = VALUE_1
    MODULE_ARGUMENT_2 = VALUE_2
    ...
  }
}&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;repository&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Git repository address to retrieve the module 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;revision&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Git revision to retrieve the module from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;HEAD&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;The path in the repository where the module is stored.&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;pull_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The frequency to pull the repository for updates.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;repository&lt;/code&gt; attribute must be set to a repository address that would be
recognized by Git with a &lt;code&gt;git clone REPOSITORY_ADDRESS&lt;/code&gt; command, such as
&lt;code&gt;htts://github.com/grafana/agent.git&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;revision&lt;/code&gt; attribute, when provided, must be set to a valid branch, tag, or
commit SHA within the repository.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;path&lt;/code&gt; attribute must be set to a path which is accessible from the root of
the repository, such as &lt;code&gt;FILE_NAME.river&lt;/code&gt; or &lt;code&gt;FOLDER_NAME/FILE_NAME.river&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;pull_frequency&lt;/code&gt; is not &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the Git repository will be pulled for
updates at the frequency specified, causing the loaded module to update with
the retrieved changes.&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;module.git&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;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 repo.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;ssh_key&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#ssh_key-block&#34;&gt;ssh_key&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure a SSH Key for authenticating to the repo.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;arguments&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#arguments-block&#34;&gt;arguments&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Arguments to pass to the module.&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;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;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;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;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;/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 mutually exclusive, and only one can be provided inside a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;ssh_key-block&#34;&gt;ssh_key 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;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SSH username.&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;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SSH private 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;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SSH private key path.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;passphrase&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Passphrase for SSH key if needed.&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;arguments-block&#34;&gt;arguments block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;arguments&lt;/code&gt; block specifies the list of values to pass to the loaded
module.&lt;/p&gt;
&lt;p&gt;The attributes provided in the &lt;code&gt;arguments&lt;/code&gt; block are validated based on the
&lt;a href=&#34;../../config-blocks/argument/&#34;&gt;argument blocks&lt;/a&gt; defined in the module source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If a module source marks one of its arguments as required, it must be
provided as an attribute in the &lt;code&gt;arguments&lt;/code&gt; block of the module loader.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Attributes in the &lt;code&gt;argument&lt;/code&gt; block of the module loader will be rejected if
they are not defined in the module source.&lt;/p&gt;
&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;exports&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(any)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The exports of the Module loader.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;exports&lt;/code&gt; exposes the &lt;code&gt;export&lt;/code&gt; config block inside a module. It can be accessed
from the parent config via &lt;code&gt;module.git.COMPONENT_LABEL.exports.EXPORT_LABEL&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Values in &lt;code&gt;exports&lt;/code&gt; correspond to &lt;a href=&#34;../../config-blocks/export/&#34;&gt;export blocks&lt;/a&gt; defined in the module
source.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;module.git&lt;/code&gt; is reported as healthy if the repository was cloned successfully
and most recent load of the module was successful.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;module.git&lt;/code&gt; includes debug information for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The full SHA of the currently checked out revision.&lt;/li&gt;
&lt;li&gt;The most recent error when trying to fetch the repository, 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;module.git&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 uses a module loaded from a Git repository which adds two numbers:&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;module.git &amp;#34;add&amp;#34; {
  repository = &amp;#34;https://github.com/rfratto/agent-modules.git&amp;#34;
  revision   = &amp;#34;main&amp;#34;
  path       = &amp;#34;add/module.river&amp;#34;

  arguments {
    a = 15
    b = 45
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The same example as above using basic auth:&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;module.git &amp;#34;add&amp;#34; {
  repository = &amp;#34;https://github.com/rfratto/agent-modules.git&amp;#34;
  revision   = &amp;#34;main&amp;#34;
  path       = &amp;#34;add/module.river&amp;#34;

  basic_auth {
    username = &amp;#34;USERNAME&amp;#34;
    password = &amp;#34;PASSWORD&amp;#34;
  }

  arguments {
    a = 15
    b = 45
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Using SSH Key from another 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;local.file &amp;#34;ssh_key&amp;#34; {
  filename = &amp;#34;PATH/TO/SSH.KEY&amp;#34;
  is_secret = true
}

module.git &amp;#34;add&amp;#34; {
  repository = &amp;#34;github.com:rfratto/agent-modules.git&amp;#34;
  revision   = &amp;#34;main&amp;#34;
  path       = &amp;#34;add/module.river&amp;#34;

  ssh_key {
    username = &amp;#34;git&amp;#34;
    key = local.file.ssh_key.content
  }

  arguments {
    a = 15
    b = 45
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The same example as above using SSH Key auth:&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;module.git &amp;#34;add&amp;#34; {
  repository = &amp;#34;github.com:rfratto/agent-modules.git&amp;#34;
  revision   = &amp;#34;main&amp;#34;
  path       = &amp;#34;add/module.river&amp;#34;

  ssh_key {
    username = &amp;#34;git&amp;#34;
    key_file = &amp;#34;PATH/TO/SSH.KEY&amp;#34;
  }

  arguments {
    a = 15
    b = 45
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="modulegit-deprecated">module.git (deprecated)&lt;/h1>
&lt;div class="admonition admonition-caution">&lt;blockquote>&lt;p class="title text-uppercase">Caution&lt;/p>&lt;p>Starting with release v0.40, &lt;code>module.git&lt;/code> is deprecated and is replaced by &lt;code>import.git&lt;/code>.
&lt;code>module.git&lt;/code> will be removed in a future release.&lt;/p>&lt;/blockquote>&lt;/div>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>module.http</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/module.http/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/module.http/</guid><content><![CDATA[&lt;h1 id=&#34;modulehttp-deprecated&#34;&gt;module.http (deprecated)&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Starting with release v0.40, &lt;code&gt;module.http&lt;/code&gt; is deprecated and is replaced by &lt;code&gt;import.http&lt;/code&gt;.
&lt;code&gt;module.http&lt;/code&gt; will be removed in a future release.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;module.http&lt;/code&gt; is a &lt;a href=&#34;../../../concepts/modules/#module-loaders&#34;&gt;module loader&lt;/a&gt; component.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;module.http&lt;/code&gt; embeds a &lt;a href=&#34;../remote.http/&#34;&gt;remote.http&lt;/a&gt; component to retrieve the module from a remote
HTTP server. This allows you to use a single module loader, rather than a &lt;code&gt;remote.http&lt;/code&gt;
component paired with a &lt;a href=&#34;../module.string/&#34;&gt;module.string&lt;/a&gt; component.&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;module.http &amp;#34;LABEL&amp;#34; {
  url = URL

  arguments {
    MODULE_ARGUMENT_1 = VALUE_1
    ...
  }
}&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;method&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Define HTTP method for the request&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;GET&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;Custom headers for 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;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;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;module.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;arguments&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#arguments-block&#34;&gt;arguments&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Arguments to pass to the module.&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;arguments-block&#34;&gt;arguments block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;arguments&lt;/code&gt; block specifies the list of values to pass to the loaded
module.&lt;/p&gt;
&lt;p&gt;The attributes provided in the &lt;code&gt;arguments&lt;/code&gt; block are validated based on the
&lt;a href=&#34;../../config-blocks/argument/&#34;&gt;argument blocks&lt;/a&gt; defined in the module source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If a module source marks one of its arguments as required, it must be
provided as an attribute in the &lt;code&gt;arguments&lt;/code&gt; block of the module loader.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Attributes in the &lt;code&gt;argument&lt;/code&gt; block of the module loader are rejected if
they are not defined in the module source.&lt;/p&gt;
&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;exports&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(any)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The exports of the Module loader.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;exports&lt;/code&gt; exposes the &lt;code&gt;export&lt;/code&gt; config block inside a module. It can be accessed
from the parent config via &lt;code&gt;module.http.LABEL.exports.EXPORT_LABEL&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Values in &lt;code&gt;exports&lt;/code&gt; correspond to &lt;a href=&#34;../../config-blocks/export/&#34;&gt;export blocks&lt;/a&gt; defined in the module
source.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;module.http&lt;/code&gt; is reported as healthy if the most recent load of the module was
successful.&lt;/p&gt;
&lt;p&gt;Before the first load of the module, the health is reported as &lt;code&gt;Unknown&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the module is not loaded successfully, the current health displays as
unhealthy, and the health includes the error from loading the module.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;module.http&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;module.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;In this example, the &lt;code&gt;module.http&lt;/code&gt; component loads a module from a locally running
HTTP server, polling for changes once every minute.&lt;/p&gt;
&lt;p&gt;The module sets up a Redis exporter and exports the list of targets to the parent config to scrape
and remote write.&lt;/p&gt;
&lt;p&gt;Parent:&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;module.http &amp;#34;remote_module&amp;#34; {
  url              = &amp;#34;http://localhost:8080/redis_module.yaml&amp;#34;
  poll_frequency   = &amp;#34;1m&amp;#34;
}

prometheus.exporter.unix &amp;#34;default&amp;#34; { }

prometheus.scrape &amp;#34;local_agent&amp;#34; {
  targets         = concat(prometheus.exporter.unix.default.targets, module.http.remote_module.exports.targets)
  forward_to      = [module.http.metrics.exports.prometheus_remote_write.receiver]
  scrape_interval = &amp;#34;10s&amp;#34;
}

prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
        username = USERNAME
        password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Module:&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.exporter.redis &amp;#34;local_redis&amp;#34; {
  redis_addr          = REDIS_ADDR
  redis_password_file = REDIS_PASSWORD_FILE
}

export &amp;#34;redis_targets&amp;#34; {
  value = prometheus.exporter.redis.local_redis.targets
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;REDIS_ADDR&lt;/code&gt;: The address of your Redis instance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;REDIS_PASSWORD_FILE&lt;/code&gt;: The path to a file containing the password for your Redis instance.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="modulehttp-deprecated">module.http (deprecated)&lt;/h1>
&lt;div class="admonition admonition-caution">&lt;blockquote>&lt;p class="title text-uppercase">Caution&lt;/p>&lt;p>Starting with release v0.40, &lt;code>module.http&lt;/code> is deprecated and is replaced by &lt;code>import.http&lt;/code>.
&lt;code>module.http&lt;/code> will be removed in a future release.&lt;/p>&lt;/blockquote>&lt;/div>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>module.string</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/module.string/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/module.string/</guid><content><![CDATA[&lt;h1 id=&#34;modulestring-deprecated&#34;&gt;module.string (deprecated)&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Starting with release v0.40, &lt;code&gt;module.string&lt;/code&gt; is deprecated and is replaced by &lt;code&gt;import.string&lt;/code&gt;.
&lt;code&gt;module.string&lt;/code&gt; will be removed in a future release.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;module.string&lt;/code&gt; is a &lt;em&gt;module loader&lt;/em&gt; component. A module loader is a Grafana Agent Flow
component which retrieves a &lt;a href=&#34;../../../concepts/modules/&#34;&gt;module&lt;/a&gt; and runs the components defined inside of 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;module.string &amp;#34;LABEL&amp;#34; {
  content = CONTENT

  arguments {
    MODULE_ARGUMENT_1 = VALUE_1
    MODULE_ARGUMENT_2 = VALUE_2
    ...
  }
}&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;content&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt; or &lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The contents of the module to load as a secret or string.&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;content&lt;/code&gt; is a string that contains the configuration of the module to load.
&lt;code&gt;content&lt;/code&gt; is typically loaded by using the exports of another component. For example,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;local.file.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.http.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.s3.LABEL.content&lt;/code&gt;&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;module.string&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;arguments&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#arguments-block&#34;&gt;arguments&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Arguments to pass to the module.&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;arguments-block&#34;&gt;arguments block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;arguments&lt;/code&gt; block specifies the list of values to pass to the loaded
module.&lt;/p&gt;
&lt;p&gt;The attributes provided in the &lt;code&gt;arguments&lt;/code&gt; block are validated based on the
&lt;a href=&#34;../../config-blocks/argument/&#34;&gt;argument blocks&lt;/a&gt; defined in the module source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If a module source marks one of its arguments as required, it must be
provided as an attribute in the &lt;code&gt;arguments&lt;/code&gt; block of the module loader.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Attributes in the &lt;code&gt;argument&lt;/code&gt; block of the module loader will be rejected if
they are not defined in the module source.&lt;/p&gt;
&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;exports&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(any)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The exports of the Module loader.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;exports&lt;/code&gt; exposes the &lt;code&gt;export&lt;/code&gt; config block inside a module. It can be accessed
from the parent config via &lt;code&gt;module.string.LABEL.exports.EXPORT_LABEL&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Values in &lt;code&gt;exports&lt;/code&gt; correspond to &lt;a href=&#34;../../config-blocks/export/&#34;&gt;export blocks&lt;/a&gt; defined in the module
source.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;module.string&lt;/code&gt; is reported as healthy if the most recent load of the module was
successful.&lt;/p&gt;
&lt;p&gt;If the module is not loaded successfully, the current health displays as
unhealthy and the health includes the error from loading the module.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;module.string&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;module.string&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;In this example, we pass credentials from a parent config to a module which loads
a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component. The exports of the
&lt;code&gt;prometheus.remote_write&lt;/code&gt; component are exposed to parent config, allowing
the parent config to pass metrics to it.&lt;/p&gt;
&lt;p&gt;Parent:&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;local.file &amp;#34;metrics&amp;#34; {
  filename = &amp;#34;/path/to/prometheus_remote_write_module.river&amp;#34;
}

module.string &amp;#34;metrics&amp;#34; {
  content = local.file.metrics.content

  arguments {
    username = env(&amp;#34;PROMETHEUS_USERNAME&amp;#34;)
    password = env(&amp;#34;PROMETHEUS_PASSWORD&amp;#34;)
  }
}

prometheus.exporter.unix &amp;#34;default&amp;#34; { }

prometheus.scrape &amp;#34;local_agent&amp;#34; {
  targets         = prometheus.exporter.unix.default.targets
  forward_to      = [module.string.metrics.exports.prometheus_remote_write.receiver]
  scrape_interval = &amp;#34;10s&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Module:&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;argument &amp;#34;username&amp;#34; { }

argument &amp;#34;password&amp;#34; { }

export &amp;#34;prometheus_remote_write&amp;#34; {
  value = prometheus.remote_write.grafana_cloud
}

prometheus.remote_write &amp;#34;grafana_cloud&amp;#34; {
  endpoint {
    url = &amp;#34;https://prometheus-us-central1.grafana.net/api/prom/push&amp;#34;

    basic_auth {
      username = argument.username.value
      password = argument.password.value
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="modulestring-deprecated">module.string (deprecated)&lt;/h1>
&lt;div class="admonition admonition-caution">&lt;blockquote>&lt;p class="title text-uppercase">Caution&lt;/p>&lt;p>Starting with release v0.40, &lt;code>module.string&lt;/code> is deprecated and is replaced by &lt;code>import.string&lt;/code>.
&lt;code>module.string&lt;/code> will be removed in a future release.&lt;/p>&lt;/blockquote>&lt;/div>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>otelcol.auth.basic</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.auth.basic/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;p&gt;This extension supports both server and client 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;p>This extension supports both server and client authentication.&lt;/p></description></item><item><title>otelcol.auth.bearer</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.auth.bearer/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;p&gt;This extension supports both server and client 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;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;Authentication scheme name.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;Bearer&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;When sending the token, the value of &lt;code&gt;scheme&lt;/code&gt; is prepended to the &lt;code&gt;token&lt;/code&gt; value.
The string is then sent out as either a header (in case of HTTP) or as metadata (in case of gRPC).&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;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;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;default-scheme-via-grpc-transport&#34;&gt;Default scheme via gRPC transport&lt;/h3&gt;
&lt;p&gt;The example below configures &lt;a href=&#34;../otelcol.exporter.otlp/&#34;&gt;otelcol.exporter.otlp&lt;/a&gt; to use a bearer token authentication.&lt;/p&gt;
&lt;p&gt;If we assume that the value of the &lt;code&gt;API_KEY&lt;/code&gt; environment variable is &lt;code&gt;SECRET_API_KEY&lt;/code&gt;, then
the &lt;code&gt;Authorization&lt;/code&gt; RPC metadata is set to &lt;code&gt;Bearer SECRET_API_KEY&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.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;
&lt;h3 id=&#34;custom-scheme-via-http-transport&#34;&gt;Custom scheme via HTTP transport&lt;/h3&gt;
&lt;p&gt;The example below configures &lt;a href=&#34;../otelcol.exporter.otlphttp/&#34;&gt;otelcol.exporter.otlphttp&lt;/a&gt; to use a bearer token authentication.&lt;/p&gt;
&lt;p&gt;If we assume that the value of the &lt;code&gt;API_KEY&lt;/code&gt; environment variable is &lt;code&gt;SECRET_API_KEY&lt;/code&gt;, then
the &lt;code&gt;Authorization&lt;/code&gt; HTTP header is set to &lt;code&gt;MyScheme SECRET_API_KEY&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.exporter.otlphttp &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;)
  scheme = &amp;#34;MyScheme&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;p>This extension supports both server and client authentication.&lt;/p></description></item><item><title>otelcol.auth.headers</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.auth.headers/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;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;An action to perform on the header&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;upsert&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 supported values for &lt;code&gt;action&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;insert&lt;/code&gt;: Inserts the new header if it does not exist.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;update&lt;/code&gt;: Updates the header value if it exists.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;upsert&lt;/code&gt;: Inserts a header if it does not exist and updates the header if it exists.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;delete&lt;/code&gt;: Deletes the header.&lt;/li&gt;
&lt;/ul&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.
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;p&gt;For &lt;code&gt;from_context&lt;/code&gt; to work, other components in the pipeline also need to be configured appropriately:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If an &lt;code&gt;otelcol.processor.batch&lt;/code&gt; is present in the pipeline, it must be configured to preserve client metadata.
Do this by adding the value that &lt;code&gt;from_context&lt;/code&gt; needs to the &lt;code&gt;metadata_keys&lt;/code&gt; of the batch processor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;otelcol&lt;/code&gt; receivers must be configured with &lt;code&gt;include_metadata&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt; so that metadata keys are available to the pipeline.&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;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.receiver.otlp &amp;#34;default&amp;#34; {
  http {
    include_metadata = true
  }
  grpc {
    include_metadata = 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; {
  // Preserve the tenant_id metadata.
  metadata_keys = [&amp;#34;tenant_id&amp;#34;]

  output {
    metrics = [otelcol.exporter.otlp.production.input]
    logs    = [otelcol.exporter.otlp.production.input]
    traces  = [otelcol.exporter.otlp.production.input]
  }
}

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;
  }
}

otelcol.exporter.otlp &amp;#34;production&amp;#34; {
  client {
    endpoint = env(&amp;#34;OTLP_SERVER_ENDPOINT&amp;#34;)
    auth     = otelcol.auth.headers.creds.handler
  }
}&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.auth.oauth2</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.auth.oauth2/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.auth.oauth2/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolauthoauth2&#34;&gt;otelcol.auth.oauth2&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.oauth2&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 OAuth 2.0.&lt;/p&gt;
&lt;p&gt;The authorization tokens can be used by HTTP and gRPC based OpenTelemetry exporters.
This component can fetch and refresh expired tokens automatically. For further details about
OAuth 2.0 Client Credentials flow (2-legged workflow) see &lt;a href=&#34;https://datatracker.ietf.org/doc/html/rfc6749#section-4.4&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;this document&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.auth.oauth2&lt;/code&gt; is a wrapper over the upstream OpenTelemetry
Collector &lt;code&gt;oauth2client&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.oauth2&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.oauth2 &amp;#34;LABEL&amp;#34; {
    client_id     = &amp;#34;CLIENT_ID&amp;#34;
    client_secret = &amp;#34;CLIENT_SECRET&amp;#34;
    token_url     = &amp;#34;TOKEN_URL&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;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &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;The client identifier issued to the client.&lt;/td&gt;
              &lt;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_id_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The file path to retrieve the client identifier issued to the client.&lt;/td&gt;
              &lt;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;The secret string associated with the client identifier.&lt;/td&gt;
              &lt;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;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The file path to retrieve the secret string associated with the client identifier.&lt;/td&gt;
              &lt;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;The server endpoint URL from which to get tokens.&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;endpoint_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;Additional parameters that are sent to the token endpoint.&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;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Requested permissions associated for the client.&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;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 on the client connecting to &lt;code&gt;token_url&lt;/code&gt;.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;timeout&lt;/code&gt; argument is used both for requesting initial tokens and for refreshing tokens. &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt; implies no timeout.&lt;/p&gt;
&lt;p&gt;At least one of the &lt;code&gt;client_id&lt;/code&gt; and &lt;code&gt;client_id_file&lt;/code&gt; pair of arguments must be
set. In case both are set, &lt;code&gt;client_id_file&lt;/code&gt; takes precedence.&lt;/p&gt;
&lt;p&gt;Similarly, at least one of the &lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; pair of
arguments must be set. In case both are set, &lt;code&gt;client_secret_file&lt;/code&gt; also takes
precedence.&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.oauth2&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;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;TLS settings for the token 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;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 token client. 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;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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&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;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.oauth2&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.oauth2&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 OAuth 2.0 for 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.oauth2.creds.handler
  }
}

otelcol.auth.oauth2 &amp;#34;creds&amp;#34; {
    client_id     = &amp;#34;someclientid&amp;#34;
    client_secret = &amp;#34;someclientsecret&amp;#34;
    token_url     = &amp;#34;https://example.com/oauth2/default/v1/token&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Here is another example with some optional attributes specified:&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.oauth2.creds.handler
  }
}

otelcol.auth.oauth2 &amp;#34;creds&amp;#34; {
    client_id       = &amp;#34;someclientid2&amp;#34;
    client_secret   = &amp;#34;someclientsecret2&amp;#34;
    token_url       = &amp;#34;https://example.com/oauth2/default/v1/token&amp;#34;
    endpoint_params = {&amp;#34;audience&amp;#34; = [&amp;#34;someaudience&amp;#34;]}
    scopes          = [&amp;#34;api.metrics&amp;#34;]
    timeout         = &amp;#34;3600s&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolauthoauth2">otelcol.auth.oauth2&lt;/h1>
&lt;p>&lt;code>otelcol.auth.oauth2&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 OAuth 2.0.&lt;/p>
&lt;p>The authorization tokens can be used by HTTP and gRPC based OpenTelemetry exporters.
This component can fetch and refresh expired tokens automatically. For further details about
OAuth 2.0 Client Credentials flow (2-legged workflow) see &lt;a href="https://datatracker.ietf.org/doc/html/rfc6749#section-4.4" target="_blank" rel="noopener noreferrer">this document&lt;/a>.&lt;/p></description></item><item><title>otelcol.auth.sigv4</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.auth.sigv4/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.auth.sigv4/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolauthsigv4&#34;&gt;otelcol.auth.sigv4&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.auth.sigv4&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 to AWS services using the AWS Signature Version 4 (SigV4) protocol.
For more information about SigV4 see the AWS documentation about
&lt;a href=&#34;https://docs.aws.amazon.com/general/latest/gr/signing-aws-api-requests.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Signing AWS API requests&lt;/a&gt; .&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.auth.sigv4&lt;/code&gt; is a wrapper over the upstream OpenTelemetry
Collector &lt;code&gt;sigv4auth&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.sigv4&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: The Agent must have valid AWS credentials as used by the
&lt;a href=&#34;https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS SDK for Go&lt;/a&gt;.&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;otelcol.auth.sigv4 &amp;#34;LABEL&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;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &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;The AWS region to sign with.&lt;/td&gt;
              &lt;td&gt;&amp;quot;&amp;quot;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;service&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The AWS service to sign with.&lt;/td&gt;
              &lt;td&gt;&amp;quot;&amp;quot;&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;region&lt;/code&gt; and &lt;code&gt;service&lt;/code&gt; are left empty, their values are inferred from the URL of the exporter
using the following rules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If the exporter URL starts with &lt;code&gt;aps-workspaces&lt;/code&gt; and &lt;code&gt;service&lt;/code&gt; is empty, &lt;code&gt;service&lt;/code&gt; will be set to &lt;code&gt;aps&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If the exporter URL starts with &lt;code&gt;search-&lt;/code&gt; and &lt;code&gt;service&lt;/code&gt; is empty, &lt;code&gt;service&lt;/code&gt; will be set to &lt;code&gt;es&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If the exporter URL starts with either &lt;code&gt;aps-workspaces&lt;/code&gt; or &lt;code&gt;search-&lt;/code&gt; and &lt;code&gt;region&lt;/code&gt; is empty, &lt;code&gt;region&lt;/code&gt; .
will be set to the value between the first and second &lt;code&gt;.&lt;/code&gt; character in the exporter URL.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If none of the above rules apply, then &lt;code&gt;region&lt;/code&gt; and &lt;code&gt;service&lt;/code&gt; must be specified.&lt;/p&gt;
&lt;p&gt;A list of valid AWS regions can be found on Amazon&amp;rsquo;s documentation for
&lt;a href=&#34;https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Regions, Availability Zones, and Local Zones&lt;/a&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.auth.sigv4&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;assume_role&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#assume_role-block&#34;&gt;assume_role&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for assuming a role.&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;assume_role-block&#34;&gt;assume_role block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;assume_role&lt;/code&gt; block specifies the configuration needed to assume a role.&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;arn&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Amazon Resource Name (ARN) of a role to assume.&lt;/td&gt;
              &lt;td&gt;&amp;quot;&amp;quot;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;session_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of a role session.&lt;/td&gt;
              &lt;td&gt;&amp;quot;&amp;quot;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sts_region&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The AWS region where STS is used to assume the configured role.&lt;/td&gt;
              &lt;td&gt;&amp;quot;&amp;quot;&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;assume_role&lt;/code&gt; block is specified in the config and &lt;code&gt;sts_region&lt;/code&gt; is not set, then &lt;code&gt;sts_region&lt;/code&gt;
will default to the value for &lt;code&gt;region&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For cross region authentication, &lt;code&gt;region&lt;/code&gt; and &lt;code&gt;sts_region&lt;/code&gt; can be set different to different values.&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;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.sigv4&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.sigv4&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;inferring-the-region-and-service-from-an-aps-workspaces-exporter-endpoint&#34;&gt;Inferring the &amp;ldquo;region&amp;rdquo; and &amp;ldquo;service&amp;rdquo; from an &amp;ldquo;aps-workspaces&amp;rdquo; exporter endpoint&lt;/h3&gt;
&lt;p&gt;In this example the exporter endpoint starts with &lt;code&gt;aps-workspaces&lt;/code&gt;. Hence &lt;code&gt;service&lt;/code&gt; is inferred to be &lt;code&gt;aps&lt;/code&gt;
and &lt;code&gt;region&lt;/code&gt; is inferred to be &lt;code&gt;us-east-1&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.exporter.otlp &amp;#34;example&amp;#34; {
  client {
    endpoint = &amp;#34;https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-XXX/api/v1/remote_write&amp;#34;
    auth     = otelcol.auth.sigv4.creds.handler
  }
}

otelcol.auth.sigv4 &amp;#34;creds&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;inferring-the-region-and-service-from-a-search--exporter-endpoint&#34;&gt;Inferring the &amp;ldquo;region&amp;rdquo; and &amp;ldquo;service&amp;rdquo; from a &amp;ldquo;search-&amp;rdquo; exporter endpoint&lt;/h3&gt;
&lt;p&gt;In this example the exporter endpoint starts with &lt;code&gt;search-&lt;/code&gt;. Hence &lt;code&gt;service&lt;/code&gt; is inferred to be &lt;code&gt;es&lt;/code&gt;
and &lt;code&gt;region&lt;/code&gt; is inferred to be &lt;code&gt;us-east-1&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.exporter.otlp &amp;#34;example&amp;#34; {
  client {
    endpoint = &amp;#34;https://search-my-domain.us-east-1.es.amazonaws.com/_search?q=house&amp;#34;
    auth     = otelcol.auth.sigv4.creds.handler
  }
}

otelcol.auth.sigv4 &amp;#34;creds&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;specifying-region-and-service-explicitly&#34;&gt;Specifying &amp;ldquo;region&amp;rdquo; and &amp;ldquo;service&amp;rdquo; explicitly&lt;/h3&gt;
&lt;p&gt;In this example the exporter endpoint does not begin with &lt;code&gt;search-&lt;/code&gt; or with &lt;code&gt;aps-workspaces&lt;/code&gt;.
Hence, we need to specify &lt;code&gt;region&lt;/code&gt; and &lt;code&gt;service&lt;/code&gt; explicitly.&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.sigv4.creds.handler
  }
}

otelcol.auth.sigv4 &amp;#34;creds&amp;#34; {
    region = &amp;#34;example_region&amp;#34;
    service = &amp;#34;example_service&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;specifying-region-and-service-explicitly-and-adding-a-role-to-assume&#34;&gt;Specifying &amp;ldquo;region&amp;rdquo; and &amp;ldquo;service&amp;rdquo; explicitly and adding a &amp;ldquo;role&amp;rdquo; to assume&lt;/h3&gt;
&lt;p&gt;In this example we have also specified configuration to assume a role. &lt;code&gt;sts_region&lt;/code&gt; has not been
provided, so it will default to the value of &lt;code&gt;region&lt;/code&gt; which is &lt;code&gt;example_region&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.exporter.otlp &amp;#34;example&amp;#34; {
  client {
    endpoint = &amp;#34;my-otlp-grpc-server:4317&amp;#34;
    auth     = otelcol.auth.sigv4.creds.handler
  }
}

otelcol.auth.sigv4 &amp;#34;creds&amp;#34; {
  region  = &amp;#34;example_region&amp;#34;
  service = &amp;#34;example_service&amp;#34;
  
  assume_role {
    session_name = &amp;#34;role_session_name&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolauthsigv4">otelcol.auth.sigv4&lt;/h1>
&lt;p>&lt;code>otelcol.auth.sigv4&lt;/code> exposes a &lt;code>handler&lt;/code> that can be used by other &lt;code>otelcol&lt;/code>
components to authenticate requests to AWS services using the AWS Signature Version 4 (SigV4) protocol.
For more information about SigV4 see the AWS documentation about
&lt;a href="https://docs.aws.amazon.com/general/latest/gr/signing-aws-api-requests.html" target="_blank" rel="noopener noreferrer">Signing AWS API requests&lt;/a> .&lt;/p></description></item><item><title>otelcol.connector.host_info</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.connector.host_info/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.connector.host_info/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolconnectorhost_info&#34;&gt;otelcol.connector.host_info&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otel.connector.host_info&lt;/code&gt; accepts span data from other &lt;code&gt;otelcol&lt;/code&gt; components and generates usage metrics.&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.connector.host_info &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.connector.host_info&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;host_identifiers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Ordered list of resource attributes used to identify unique hosts.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;host.id&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_flush_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 flush generated metrics.&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;/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.connector.host_info&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-metrics.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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
Configure the &lt;code&gt;metrics&lt;/code&gt; argument accordingly to send telemetry data to other components.&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; traces telemetry data. It does not accept metrics and logs.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The example below accepts traces, adds the &lt;code&gt;host.id&lt;/code&gt; resource attribute via the &lt;code&gt;otelcol.processor.resourcedetection&lt;/code&gt; component,
creates usage metrics from these traces, and writes the metrics to Mimir.&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;otlp&amp;#34; {
  http {}
  grpc {}

  output {
    traces = [otelcol.processor.resourcedetection.otlp_resources.input]
  }
}

otelcol.processor.resourcedetection &amp;#34;otlp_resources&amp;#34; {
  detectors = [&amp;#34;system&amp;#34;]
  system {
    hostname_sources = [ &amp;#34;os&amp;#34; ]
    resource_attributes {
      host.id {
        enabled = true
      }
    }
  }
  output {
    traces = [otelcol.connector.host_info.default.input]
  }
}

otelcol.connector.host_info &amp;#34;default&amp;#34; {
  output {
    metrics = [otelcol.exporter.prometheus.otlp_metrics.input]
  }
}

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

prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = &amp;#34;https://prometheus-xxx.grafana.net/api/prom/push&amp;#34;
    basic_auth {
      username = env(&amp;#34;PROMETHEUS_USERNAME&amp;#34;)
      password = env(&amp;#34;GRAFANA_CLOUD_API_KEY&amp;#34;)
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.host_info&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.host_info&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="otelcolconnectorhost_info">otelcol.connector.host_info&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>otel.connector.host_info&lt;/code> accepts span data from other &lt;code>otelcol&lt;/code> components and generates usage metrics.&lt;/p></description></item><item><title>otelcol.connector.servicegraph</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.connector.servicegraph/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.connector.servicegraph/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolconnectorservicegraph&#34;&gt;otelcol.connector.servicegraph&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt; accepts span data from other &lt;code&gt;otelcol&lt;/code&gt; components and
outputs metrics representing the relationship between various services in a system.
A metric represents an edge in the service graph.
Those metrics can then be used by a data visualization application (e.g.
&lt;a href=&#34;/docs/grafana/latest/explore/trace-integration/#service-graph&#34;&gt;Grafana&lt;/a&gt;)
to draw the service graph.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;servicegraph&lt;/code&gt; connector. 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.connector.servicegraph&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;p&gt;This component is based on &lt;a href=&#34;https://github.com/grafana/tempo/tree/main/modules/generator/processor/servicegraphs&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Tempo&amp;rsquo;s service graph processor&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Service graphs are useful for a number of use-cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Infer the topology of a distributed system. As distributed systems grow, they become more complex.
Service graphs can help you understand the structure of the system.&lt;/li&gt;
&lt;li&gt;Provide a high level overview of the health of your system.
Service graphs show error rates, latencies, and other relevant data.&lt;/li&gt;
&lt;li&gt;Provide a historic view of a system’s topology.
Distributed systems change very frequently,
and service graphs offer a way of seeing how these systems have evolved over time.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since &lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt; has to process both sides of an edge,
it needs to process all spans of a trace to function properly.
If spans of a trace are spread out over multiple Agent instances, spans cannot be paired reliably.
A solution to this problem is using &lt;a href=&#34;../otelcol.exporter.loadbalancing/&#34;&gt;otelcol.exporter.loadbalancing&lt;/a&gt;
in front of Agent instances running &lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt;.&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.connector.servicegraph &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.connector.servicegraph&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;latency_histogram_buckets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(duration)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Buckets for latency histogram metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;2ms&amp;quot;, &amp;quot;4ms&amp;quot;, &amp;quot;6ms&amp;quot;, &amp;quot;8ms&amp;quot;, &amp;quot;10ms&amp;quot;, &amp;quot;50ms&amp;quot;, &amp;quot;100ms&amp;quot;, &amp;quot;200ms&amp;quot;, &amp;quot;400ms&amp;quot;, &amp;quot;800ms&amp;quot;, &amp;quot;1s&amp;quot;, &amp;quot;1400ms&amp;quot;, &amp;quot;2s&amp;quot;, &amp;quot;5s&amp;quot;, &amp;quot;10s&amp;quot;, &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;dimensions&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 dimensions to add with the default dimensions.&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;cache_loop&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures how often to delete series which have not been updated.&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;store_expiration_loop&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time to expire old entries from the store periodically.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2s&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_flush_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The interval at which metrics are flushed to downstream components.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Service graphs work by inspecting traces and looking for spans with
parent-children relationship that represent a request.
&lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt; uses OpenTelemetry semantic conventions
to detect a myriad of requests.
The following requests are currently supported:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A direct request between two services, where the outgoing and the incoming span
must have a &lt;a href=&#34;https://opentelemetry.io/docs/concepts/signals/traces/#span-kind&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Span Kind&lt;/a&gt; value of &lt;code&gt;client&lt;/code&gt; and &lt;code&gt;server&lt;/code&gt; respectively.&lt;/li&gt;
&lt;li&gt;A request across a messaging system, where the outgoing and the incoming span
must have a &lt;a href=&#34;https://opentelemetry.io/docs/concepts/signals/traces/#span-kind&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Span Kind&lt;/a&gt; value of &lt;code&gt;producer&lt;/code&gt; and &lt;code&gt;consumer&lt;/code&gt; respectively.&lt;/li&gt;
&lt;li&gt;A database request, where spans have a &lt;a href=&#34;https://opentelemetry.io/docs/concepts/signals/traces/#span-kind&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Span Kind&lt;/a&gt; with a value of &lt;code&gt;client&lt;/code&gt;,
as well as an attribute with a key of &lt;code&gt;db.name&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Every span which can be paired up to form a request is kept in an in-memory store:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If the TTL of the span expires before it can be paired, it is deleted from the store.
TTL is configured in the &lt;a href=&#34;#store-block&#34;&gt;store&lt;/a&gt; block.&lt;/li&gt;
&lt;li&gt;If the span is paired prior to its expiration, a metric is recorded and the span is deleted from the store.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following metrics are emitted by the processor:&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&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Labels&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;traces_service_graph_request_total&lt;/td&gt;
              &lt;td&gt;Counter&lt;/td&gt;
              &lt;td&gt;client, server, connection_type&lt;/td&gt;
              &lt;td&gt;Total count of requests between two nodes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;traces_service_graph_request_failed_total&lt;/td&gt;
              &lt;td&gt;Counter&lt;/td&gt;
              &lt;td&gt;client, server, connection_type&lt;/td&gt;
              &lt;td&gt;Total count of failed requests between two nodes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;traces_service_graph_request_server_seconds&lt;/td&gt;
              &lt;td&gt;Histogram&lt;/td&gt;
              &lt;td&gt;client, server, connection_type&lt;/td&gt;
              &lt;td&gt;Time for a request between two nodes as seen from the server&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;traces_service_graph_request_client_seconds&lt;/td&gt;
              &lt;td&gt;Histogram&lt;/td&gt;
              &lt;td&gt;client, server, connection_type&lt;/td&gt;
              &lt;td&gt;Time for a request between two nodes as seen from the client&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;traces_service_graph_unpaired_spans_total&lt;/td&gt;
              &lt;td&gt;Counter&lt;/td&gt;
              &lt;td&gt;client, server, connection_type&lt;/td&gt;
              &lt;td&gt;Total count of unpaired spans&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;traces_service_graph_dropped_spans_total&lt;/td&gt;
              &lt;td&gt;Counter&lt;/td&gt;
              &lt;td&gt;client, server, connection_type&lt;/td&gt;
              &lt;td&gt;Total count of dropped spans&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Duration is measured both from the client and the server sides.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;latency_histogram_buckets&lt;/code&gt; argument controls the buckets for
&lt;code&gt;traces_service_graph_request_server_seconds&lt;/code&gt; and &lt;code&gt;traces_service_graph_request_client_seconds&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Each emitted metrics series have a &lt;code&gt;client&lt;/code&gt; and a &lt;code&gt;server&lt;/code&gt; label corresponding with the
service doing the request and the service receiving the request. The value of the label
is derived from the &lt;code&gt;service.name&lt;/code&gt; resource attribute of the two spans.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;connection_type&lt;/code&gt; label may not be set. If it is set, its value will be either &lt;code&gt;messaging_system&lt;/code&gt; or &lt;code&gt;database&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Additional labels can be included using the &lt;code&gt;dimensions&lt;/code&gt; configuration option:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Those labels will have a prefix to mark where they originate (client or server span kinds).
The &lt;code&gt;client_&lt;/code&gt; prefix relates to the dimensions coming from spans with a &lt;a href=&#34;https://opentelemetry.io/docs/concepts/signals/traces/#span-kind&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Span Kind&lt;/a&gt; of &lt;code&gt;client&lt;/code&gt;.
The &lt;code&gt;server_&lt;/code&gt; prefix relates to the dimensions coming from spans with a &lt;a href=&#34;https://opentelemetry.io/docs/concepts/signals/traces/#span-kind&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Span Kind&lt;/a&gt; of &lt;code&gt;server&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Firstly the resource attributes will be searched. If the attribute is not found,
the span attributes will be searched.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When &lt;code&gt;metrics_flush_interval&lt;/code&gt; is set to &lt;code&gt;0s&lt;/code&gt;, metrics will be flushed on every received batch of traces.&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.connector.servicegraph&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;store&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#store-block&#34;&gt;store&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the in-memory store for spans.&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 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;store-block&#34;&gt;store block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;store&lt;/code&gt; block configures the in-memory store for spans.&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_items&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 items to keep in the store.&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;ttl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time to live for spans in the store.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2s&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;output-block&#34;&gt;output block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/output-block-metrics.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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
Configure the &lt;code&gt;metrics&lt;/code&gt; argument accordingly to send telemetry data to other components.&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; traces telemetry data. It does not accept metrics and logs.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.servicegraph&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.connector.servicegraph&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;The example below accepts traces, creates service graph metrics from them, and writes the metrics to Mimir.
The traces are written to Tempo.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt; also adds a label to each metric with the value of the &amp;ldquo;http.method&amp;rdquo;
span/resource attribute.&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 {
    endpoint = &amp;#34;0.0.0.0:4320&amp;#34;
  }
  
  output {
    traces  = [otelcol.connector.servicegraph.default.input,otelcol.exporter.otlp.grafana_cloud_tempo.input]
  }
}

otelcol.connector.servicegraph &amp;#34;default&amp;#34; {
  dimensions = [&amp;#34;http.method&amp;#34;]
  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;https://prometheus-xxx.grafana.net/api/prom/push&amp;#34;
    
    basic_auth {
      username = env(&amp;#34;PROMETHEUS_USERNAME&amp;#34;)
      password = env(&amp;#34;GRAFANA_CLOUD_API_KEY&amp;#34;)
    }
  }
}

otelcol.exporter.otlp &amp;#34;grafana_cloud_tempo&amp;#34; {
  client {
    endpoint = &amp;#34;https://tempo-xxx.grafana.net/tempo&amp;#34;
    auth     = otelcol.auth.basic.grafana_cloud_tempo.handler
  }
}

otelcol.auth.basic &amp;#34;grafana_cloud_tempo&amp;#34; {
  username = env(&amp;#34;TEMPO_USERNAME&amp;#34;)
  password = env(&amp;#34;GRAFANA_CLOUD_API_KEY&amp;#34;)
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Some of the metrics in Mimir may look 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;traces_service_graph_request_total{client=&amp;#34;shop-backend&amp;#34;,failed=&amp;#34;false&amp;#34;,server=&amp;#34;article-service&amp;#34;,client_http_method=&amp;#34;DELETE&amp;#34;,server_http_method=&amp;#34;DELETE&amp;#34;}
traces_service_graph_request_failed_total{client=&amp;#34;shop-backend&amp;#34;,client_http_method=&amp;#34;POST&amp;#34;,failed=&amp;#34;false&amp;#34;,server=&amp;#34;auth-service&amp;#34;,server_http_method=&amp;#34;POST&amp;#34;}
```&amp;lt;!-- START GENERATED COMPATIBLE COMPONENTS --&amp;gt;

## Compatible components

`otelcol.connector.servicegraph` can accept arguments from the following components:

- Components that export [OpenTelemetry `otelcol.Consumer`](../../compatibility/#opentelemetry-otelcolconsumer-exporters)

`otelcol.connector.servicegraph` has exports that can be consumed by the following components:

- Components that consume [OpenTelemetry `otelcol.Consumer`](../../compatibility/#opentelemetry-otelcolconsumer-consumers)



&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&amp;lt;!-- END GENERATED COMPATIBLE COMPONENTS --&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolconnectorservicegraph">otelcol.connector.servicegraph&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>otelcol.connector.servicegraph&lt;/code> accepts span data from other &lt;code>otelcol&lt;/code> components and
outputs metrics representing the relationship between various services in a system.
A metric represents an edge in the service graph.
Those metrics can then be used by a data visualization application (e.g.
&lt;a href="/docs/grafana/latest/explore/trace-integration/#service-graph">Grafana&lt;/a>)
to draw the service graph.&lt;/p></description></item><item><title>otelcol.connector.spanlogs</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.connector.spanlogs/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.connector.spanlogs/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolconnectorspanlogs&#34;&gt;otelcol.connector.spanlogs&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.spanlogs&lt;/code&gt; accepts traces telemetry data from other &lt;code&gt;otelcol&lt;/code&gt;
components and outputs logs telemetry data for each span, root, or process.
This allows you to automatically build a mechanism for trace discovery.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.connector.spanlogs&lt;/code&gt; is a custom component unrelated
to any components from the OpenTelemetry Collector. It is based on the
&lt;code&gt;automatic_logging&lt;/code&gt; component in the &lt;a href=&#34;../../../../static/configuration/traces-config/&#34;&gt;traces&lt;/a&gt; subsystem of the Agent static mode.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;otelcol.connector.spanlogs&lt;/code&gt; components 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.connector.spanlogs &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.connector.spanlogs&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;spans&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Log one line per span.&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;roots&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Log one line for every root span of a trace.&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;processes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Log one line for every process.&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;span_attributes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Additional span attributes to log.&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;process_attributes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Additional process attributes to log.&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;labels&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 keys that will be logged as labels.&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 values listed in &lt;code&gt;labels&lt;/code&gt; should be the values of either span or process attributes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;WARNING&lt;/strong&gt;: Setting &lt;code&gt;spans&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; could lead to a high volume of logs.&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;otelcol.connector.spanlogs&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;overrides&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#overrides-block&#34;&gt;overrides&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Overrides for keys in the log body.&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;h3 id=&#34;overrides-block&#34;&gt;overrides block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;overrides&lt;/code&gt; block configures overrides for keys that will be logged in the body of the log line.&lt;/p&gt;
&lt;p&gt;The following attributes 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;logs_instance_tag&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Indicates if the log line is for a span, root, or process.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;traces&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;service_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Log key for the service name of the resource.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;svc&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;span_name_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Log key for the name of the span.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;span&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;status_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Log key for the status of the span.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;status&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;duration_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Log key for the duration of the span.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;dur&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;trace_id_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Log key for the trace ID of the span.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;tid&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-logs.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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
Configure the &lt;code&gt;logs&lt;/code&gt; argument accordingly to send telemetry data to other components, .&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.connector.spanlogs&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.connector.spanlogs&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;The following configuration sends logs derived from spans to Loki.&lt;/p&gt;
&lt;p&gt;Additionally, &lt;code&gt;otelcol.processor.attributes&lt;/code&gt; is configured with a &amp;ldquo;hint&amp;rdquo; so that
&lt;code&gt;otelcol.exporter.loki&lt;/code&gt; promotes the span&amp;rsquo;s &amp;ldquo;attribute1&amp;rdquo; attribute to a Loki 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;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
  grpc {}

  output {
    traces = [otelcol.connector.spanlogs.default.input]
  }
}

otelcol.connector.spanlogs &amp;#34;default&amp;#34; {
  spans              = true
  roots              = true
  processes          = true
  labels             = [&amp;#34;attribute1&amp;#34;, &amp;#34;res_attribute1&amp;#34;]
  span_attributes    = [&amp;#34;attribute1&amp;#34;]
  process_attributes = [&amp;#34;res_attribute1&amp;#34;]

  output {
    logs = [otelcol.processor.attributes.default.input]
  }
}

otelcol.processor.attributes &amp;#34;default&amp;#34; {
  action {
    key = &amp;#34;loki.attribute.labels&amp;#34;
    action = &amp;#34;insert&amp;#34;
    value = &amp;#34;attribute1&amp;#34;
  }

  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;
&lt;p&gt;For an input trace like this&amp;hellip;&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;JSON&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-json&#34;&gt;{
  &amp;#34;resourceSpans&amp;#34;: [
    {
      &amp;#34;resource&amp;#34;: {
        &amp;#34;attributes&amp;#34;: [
          {
            &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;res_attribute1&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;unused_res_attribute1&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;str&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;res_account_id&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;2245&amp;#34; }
          }
        ]
      },
      &amp;#34;scopeSpans&amp;#34;: [
        {
          &amp;#34;spans&amp;#34;: [
            {
              &amp;#34;trace_id&amp;#34;: &amp;#34;7bba9f33312b3dbb8b2c2c62bb7abe2d&amp;#34;,
              &amp;#34;span_id&amp;#34;: &amp;#34;086e83747d0e381e&amp;#34;,
              &amp;#34;name&amp;#34;: &amp;#34;TestSpan&amp;#34;,
              &amp;#34;attributes&amp;#34;: [
                {
                  &amp;#34;key&amp;#34;: &amp;#34;attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                },
                {
                  &amp;#34;key&amp;#34;: &amp;#34;unused_attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                },
                {
                  &amp;#34;key&amp;#34;: &amp;#34;account_id&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;2245&amp;#34; }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;hellip; the output log coming out of &lt;code&gt;otelcol.connector.spanlogs&lt;/code&gt; will look like this:&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;JSON&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-json&#34;&gt;{
  &amp;#34;resourceLogs&amp;#34;: [
    {
      &amp;#34;scopeLogs&amp;#34;: [
        {
          &amp;#34;log_records&amp;#34;: [
            {
              &amp;#34;body&amp;#34;: {
                &amp;#34;stringValue&amp;#34;: &amp;#34;span=TestSpan dur=0ns attribute1=78 svc=TestSvcName res_attribute1=78 tid=7bba9f33312b3dbb8b2c2c62bb7abe2d&amp;#34;
              },
              &amp;#34;attributes&amp;#34;: [
                {
                  &amp;#34;key&amp;#34;: &amp;#34;traces&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;span&amp;#34; }
                },
                {
                  &amp;#34;key&amp;#34;: &amp;#34;attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                },
                {
                  &amp;#34;key&amp;#34;: &amp;#34;res_attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                }
              ]
            },
            {
              &amp;#34;body&amp;#34;: {
                &amp;#34;stringValue&amp;#34;: &amp;#34;span=TestSpan dur=0ns attribute1=78 svc=TestSvcName res_attribute1=78 tid=7bba9f33312b3dbb8b2c2c62bb7abe2d&amp;#34;
              },
              &amp;#34;attributes&amp;#34;: [
                {
                  &amp;#34;key&amp;#34;: &amp;#34;traces&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;root&amp;#34; }
                },
                {
                  &amp;#34;key&amp;#34;: &amp;#34;attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                },
                {
                  &amp;#34;key&amp;#34;: &amp;#34;res_attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                }
              ]
            },
            {
              &amp;#34;body&amp;#34;: {
                &amp;#34;stringValue&amp;#34;: &amp;#34;svc=TestSvcName res_attribute1=78 tid=7bba9f33312b3dbb8b2c2c62bb7abe2d&amp;#34;
              },
              &amp;#34;attributes&amp;#34;: [
                {
                  &amp;#34;key&amp;#34;: &amp;#34;traces&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;process&amp;#34; }
                },
                {
                  &amp;#34;key&amp;#34;: &amp;#34;res_attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.spanlogs&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.spanlogs&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolconnectorspanlogs">otelcol.connector.spanlogs&lt;/h1>
&lt;p>&lt;code>otelcol.connector.spanlogs&lt;/code> accepts traces telemetry data from other &lt;code>otelcol&lt;/code>
components and outputs logs telemetry data for each span, root, or process.
This allows you to automatically build a mechanism for trace discovery.&lt;/p></description></item><item><title>otelcol.connector.spanmetrics</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.connector.spanmetrics/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.connector.spanmetrics/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolconnectorspanmetrics&#34;&gt;otelcol.connector.spanmetrics&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; accepts span data from other &lt;code&gt;otelcol&lt;/code&gt; components and
aggregates Request, Error and Duration (R.E.D) OpenTelemetry metrics from the spans:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Request&lt;/strong&gt; counts are computed as the number of spans seen per unique set of dimensions,
including Errors. Multiple metrics can be aggregated if, for instance, a user wishes to
view call counts just on &lt;code&gt;service.name&lt;/code&gt; and &lt;code&gt;span.name&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Requests are tracked using a &lt;code&gt;calls&lt;/code&gt; metric with a &lt;code&gt;status.code&lt;/code&gt; datapoint attribute set to &lt;code&gt;Ok&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;calls { service.name=&amp;#34;shipping&amp;#34;, span.name=&amp;#34;get_shipping/{shippingId}&amp;#34;, span.kind=&amp;#34;SERVER&amp;#34;, status.code=&amp;#34;Ok&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Error&lt;/strong&gt; counts are computed from the number of spans with an &lt;code&gt;Error&lt;/code&gt; status code.&lt;/p&gt;
&lt;p&gt;Errors are tracked using a &lt;code&gt;calls&lt;/code&gt; metric with a &lt;code&gt;status.code&lt;/code&gt; datapoint attribute set to &lt;code&gt;Error&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;calls { service.name=&amp;#34;shipping&amp;#34;, span.name=&amp;#34;get_shipping/{shippingId}, span.kind=&amp;#34;SERVER&amp;#34;, status.code=&amp;#34;Error&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Duration&lt;/strong&gt; is computed from the difference between the span start and end times and inserted
into the relevant duration histogram time bucket for each unique set dimensions.&lt;/p&gt;
&lt;p&gt;Span durations are tracked using a &lt;code&gt;duration&lt;/code&gt; histogram metric:&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;duration { service.name=&amp;#34;shipping&amp;#34;, span.name=&amp;#34;get_shipping/{shippingId}&amp;#34;, span.kind=&amp;#34;SERVER&amp;#34;, status.code=&amp;#34;Ok&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;spanmetrics&lt;/code&gt; connector. 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.connector.spanmetrics&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.connector.spanmetrics &amp;#34;LABEL&amp;#34; {
  histogram {
    ...
  }

  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.connector.spanmetrics&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;aggregation_temporality&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures whether to reset the metrics after flushing.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;CUMULATIVE&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;dimensions_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How many dimensions to cache.&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;exclude_dimensions&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 dimensions to be excluded from the default set of dimensions.&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;metrics_flush_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 flush generated metrics.&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;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Metric namespace.&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;resource_metrics_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The size of the cache holding metrics for a service.&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;resource_metrics_key_attributes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limits the resource attributes used to create the metrics.&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;Adjusting &lt;code&gt;dimensions_cache_size&lt;/code&gt; can improve the Agent process&amp;rsquo; memory usage.&lt;/p&gt;
&lt;p&gt;The supported values for &lt;code&gt;aggregation_temporality&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;CUMULATIVE&amp;quot;&lt;/code&gt;: The metrics will &lt;strong&gt;not&lt;/strong&gt; be reset after they are flushed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;DELTA&amp;quot;&lt;/code&gt;: The metrics will be reset after they are flushed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;namespace&lt;/code&gt; is set, the generated metric name will be added a &lt;code&gt;namespace.&lt;/code&gt; prefix.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;resource_metrics_cache_size&lt;/code&gt; is mostly relevant for cumulative temporality. It helps avoid issues with increasing memory and with incorrect metric timestamp resets.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;resource_metrics_key_attributes&lt;/code&gt; can be used to avoid situations where resource attributes may change across service restarts,
causing metric counters to break (and duplicate). A resource does not need to have all of the attributes.
The list must include enough attributes to properly identify unique resources or risk aggregating data from more than one service and span.
For example, &lt;code&gt;[&amp;quot;service.name&amp;quot;, &amp;quot;telemetry.sdk.language&amp;quot;, &amp;quot;telemetry.sdk.name&amp;quot;]&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.connector.spanmetrics&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;dimension&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#dimension-block&#34;&gt;dimension&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Dimensions to be added in addition to the default ones.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;events&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#events-block&#34;&gt;events&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the events metric.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;events &amp;gt; dimension&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#dimension-block&#34;&gt;dimension&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Span event attributes to add as dimensions to the events metric, &lt;em&gt;on top of&lt;/em&gt; the default ones and the ones configured in the top-level &lt;code&gt;dimension&lt;/code&gt; block.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exemplars&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#exemplars-block&#34;&gt;exemplars&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures how to attach exemplars to histograms.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;histogram&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#histogram-block&#34;&gt;histogram&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the histogram derived from spans durations.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;histogram &amp;gt; explicit&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#explicit-block&#34;&gt;explicit&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for a histogram with explicit buckets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;histogram &amp;gt; exponential&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#exponential-block&#34;&gt;exponential&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for a histogram with exponential buckets.&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 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;It is necessary to specify either a &amp;ldquo;&lt;a href=&#34;#exponential-block&#34;&gt;exponential&lt;/a&gt;&amp;rdquo; or an &amp;ldquo;&lt;a href=&#34;#explicit-block&#34;&gt;explicit&lt;/a&gt;&amp;rdquo; block:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Specifying both an &amp;ldquo;&lt;a href=&#34;#exponential-block&#34;&gt;exponential&lt;/a&gt;&amp;rdquo; and an &amp;ldquo;&lt;a href=&#34;#explicit-block&#34;&gt;explicit&lt;/a&gt;&amp;rdquo; block is not allowed.&lt;/li&gt;
&lt;li&gt;Specifying neither an &amp;ldquo;&lt;a href=&#34;#exponential-block&#34;&gt;exponential&lt;/a&gt;&amp;rdquo; nor an &amp;ldquo;&lt;a href=&#34;#explicit-block&#34;&gt;explicit&lt;/a&gt;&amp;rdquo; block is not allowed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;dimension-block&#34;&gt;dimension block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;dimension&lt;/code&gt; block configures dimensions to be added in addition to the default ones.&lt;/p&gt;
&lt;p&gt;The default dimensions are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;service.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;span.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;span.kind&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;status.code&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The default dimensions are always added. If no additional dimensions are specified,
only the default ones will be added.&lt;/p&gt;
&lt;p&gt;The following attributes 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;default&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Value to use if the attribute is missing.&lt;/td&gt;
              &lt;td&gt;null&lt;/td&gt;
              &lt;td&gt;no&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;Span attribute or resource attribute to look up.&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;otelcol.connector.spanmetrics&lt;/code&gt; will look for the &lt;code&gt;name&lt;/code&gt; attribute in the span&amp;rsquo;s
collection of attributes. If it is not found, the resource attributes will be checked.&lt;/p&gt;
&lt;p&gt;If the attribute is missing in both the span and resource attributes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;default&lt;/code&gt; is not set, the dimension will be omitted.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;default&lt;/code&gt; is set, the dimension will be added and its value will be set to the value of &lt;code&gt;default&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;events-block&#34;&gt;events block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;events&lt;/code&gt; block configures the &lt;code&gt;events&lt;/code&gt; metric, which tracks &lt;a href=&#34;https://opentelemetry.io/docs/concepts/signals/traces/#span-events&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;span events&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following attributes 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;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables all events metric.&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;At least one &lt;code&gt;dimension&lt;/code&gt; block is required if &lt;code&gt;enabled&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;histogram-block&#34;&gt;histogram block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;histogram&lt;/code&gt; block configures the histogram derived from spans&amp;rsquo; durations.&lt;/p&gt;
&lt;p&gt;The following attributes 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;disable&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable all histogram metrics.&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;unit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures the histogram units.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;ms&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 supported values for &lt;code&gt;unit&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;ms&amp;quot;&lt;/code&gt;: milliseconds&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;s&amp;quot;&lt;/code&gt;: seconds&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;exponential-block&#34;&gt;exponential block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;exponential&lt;/code&gt; block configures a histogram with exponential buckets.&lt;/p&gt;
&lt;p&gt;The following attributes 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_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 buckets per positive or negative number range.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;160&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;explicit-block&#34;&gt;explicit block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;explicit&lt;/code&gt; block configures a histogram with explicit buckets.&lt;/p&gt;
&lt;p&gt;The following attributes 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;buckets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(duration)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of histogram buckets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;2ms&amp;quot;, &amp;quot;4ms&amp;quot;, &amp;quot;6ms&amp;quot;, &amp;quot;8ms&amp;quot;, &amp;quot;10ms&amp;quot;, &amp;quot;50ms&amp;quot;, &amp;quot;100ms&amp;quot;, &amp;quot;200ms&amp;quot;, &amp;quot;400ms&amp;quot;, &amp;quot;800ms&amp;quot;, &amp;quot;1s&amp;quot;, &amp;quot;1400ms&amp;quot;, &amp;quot;2s&amp;quot;, &amp;quot;5s&amp;quot;, &amp;quot;10s&amp;quot;, &amp;quot;15s&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;exemplars-block&#34;&gt;exemplars block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;exemplars&lt;/code&gt; block configures how to attach exemplars to histograms.&lt;/p&gt;
&lt;p&gt;The following attributes 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;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures whether to add exemplars to histograms.&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_per_data_point&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limits the number of exemplars that can be added to a unique dimension set.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&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;max_per_data_point&lt;/code&gt; can help with reducing memory consumption.&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-metrics.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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
Configure the &lt;code&gt;metrics&lt;/code&gt; argument accordingly to send telemetry data to other components.&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; traces telemetry data. It does not accept metrics and logs.&lt;/p&gt;
&lt;h2 id=&#34;handling-of-resource-attributes&#34;&gt;Handling of resource attributes&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; is an OTLP-native component. As such, it aims to preserve the resource attributes of spans.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;For example, let&amp;rsquo;s assume that there are two incoming resources spans with the same &lt;code&gt;service.name&lt;/code&gt; and &lt;code&gt;k8s.pod.name&lt;/code&gt; resource attributes.
&lt;div class=&#34;collapse&#34; x-data=&#34;app_collapse()&#34;&gt;
  &lt;button class=&#34;collapse-trigger&#34; @click=&#34;toggle()&#34;&gt;
    &lt;span class=&#34;body-large&#34;&gt;Example JSON of two incoming spans.&lt;/span&gt;
    &lt;span class=&#34;collapse-trigger__icon&#34; :class=&#34;{ &#39;collapse-trigger__icon-open&#39; : open }&#34;&gt;
      
  &lt;svg width=&#34;27&#34; height=&#34;26&#34; viewBox=&#34;0 0 27 26&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path opacity=&#34;0.2&#34; d=&#34;M1.73047 12.8359C1.73047 19.4634 7.10305 24.8359 13.7305 24.8359C20.3579 24.8359 25.7305 19.4634 25.7305 12.8359C25.7305 6.20852 20.3579 0.835937 13.7305 0.835937C7.10305 0.835937 1.73047 6.20852 1.73047 12.8359Z&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M18.2344 12.8359L9.23438 12.8359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M13.7344 8.33594L13.7344 17.3359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;


    &lt;/span&gt;
  &lt;/button&gt;
  &lt;div class=&#34;collapse-content&#34; x-ref=&#34;content&#34; hidden=&#34;until-found&#34;&gt;
    &lt;div class=&#34;collapse-content__inner&#34; x-ref=&#34;content-inner&#34;&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;JSON&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-json&#34;&gt;{
  &amp;#34;resourceSpans&amp;#34;: [
    {
      &amp;#34;resource&amp;#34;: {
        &amp;#34;attributes&amp;#34;: [
          {
            &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;k8s.pod.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;first&amp;#34; }
          }
        ]
      },
      &amp;#34;scopeSpans&amp;#34;: [
        {
          &amp;#34;spans&amp;#34;: [
            {
              &amp;#34;trace_id&amp;#34;: &amp;#34;7bba9f33312b3dbb8b2c2c62bb7abe2d&amp;#34;,
              &amp;#34;span_id&amp;#34;: &amp;#34;086e83747d0e381e&amp;#34;,
              &amp;#34;name&amp;#34;: &amp;#34;TestSpan&amp;#34;,
              &amp;#34;attributes&amp;#34;: [
                {
                  &amp;#34;key&amp;#34;: &amp;#34;attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                }
              ]
            }
          ]
        }
      ]
    },
    {
      &amp;#34;resource&amp;#34;: {
        &amp;#34;attributes&amp;#34;: [
          {
            &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;k8s.pod.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;first&amp;#34; }
          }
        ]
      },
      &amp;#34;scopeSpans&amp;#34;: [
        {
          &amp;#34;spans&amp;#34;: [
            {
              &amp;#34;trace_id&amp;#34;: &amp;#34;7bba9f33312b3dbb8b2c2c62bb7abe2d&amp;#34;,
              &amp;#34;span_id&amp;#34;: &amp;#34;086e83747d0e381b&amp;#34;,
              &amp;#34;name&amp;#34;: &amp;#34;TestSpan&amp;#34;,
              &amp;#34;attributes&amp;#34;: [
                {
                  &amp;#34;key&amp;#34;: &amp;#34;attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; will preserve the incoming &lt;code&gt;service.name&lt;/code&gt; and &lt;code&gt;k8s.pod.name&lt;/code&gt; resource attributes by attaching them to the output metrics resource.
Only one metric resource will be created, because both span resources have identical resource attributes.
&lt;div class=&#34;collapse&#34; x-data=&#34;app_collapse()&#34;&gt;
  &lt;button class=&#34;collapse-trigger&#34; @click=&#34;toggle()&#34;&gt;
    &lt;span class=&#34;body-large&#34;&gt;Example JSON of one outgoing metric resource.&lt;/span&gt;
    &lt;span class=&#34;collapse-trigger__icon&#34; :class=&#34;{ &#39;collapse-trigger__icon-open&#39; : open }&#34;&gt;
      
  &lt;svg width=&#34;27&#34; height=&#34;26&#34; viewBox=&#34;0 0 27 26&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path opacity=&#34;0.2&#34; d=&#34;M1.73047 12.8359C1.73047 19.4634 7.10305 24.8359 13.7305 24.8359C20.3579 24.8359 25.7305 19.4634 25.7305 12.8359C25.7305 6.20852 20.3579 0.835937 13.7305 0.835937C7.10305 0.835937 1.73047 6.20852 1.73047 12.8359Z&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M18.2344 12.8359L9.23438 12.8359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M13.7344 8.33594L13.7344 17.3359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;


    &lt;/span&gt;
  &lt;/button&gt;
  &lt;div class=&#34;collapse-content&#34; x-ref=&#34;content&#34; hidden=&#34;until-found&#34;&gt;
    &lt;div class=&#34;collapse-content__inner&#34; x-ref=&#34;content-inner&#34;&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;JSON&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-json&#34;&gt;{
  &amp;#34;resourceMetrics&amp;#34;: [
    {
      &amp;#34;resource&amp;#34;: {
        &amp;#34;attributes&amp;#34;: [
          {
            &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;k8s.pod.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;first&amp;#34; }
          }
        ]
      },
      &amp;#34;scopeMetrics&amp;#34;: [
        {
          &amp;#34;scope&amp;#34;: { &amp;#34;name&amp;#34;: &amp;#34;spanmetricsconnector&amp;#34; },
          &amp;#34;metrics&amp;#34;: [
            {
              &amp;#34;name&amp;#34;: &amp;#34;calls&amp;#34;,
              &amp;#34;sum&amp;#34;: {
                &amp;#34;dataPoints&amp;#34;: [
                  {
                    &amp;#34;attributes&amp;#34;: [
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
                      },
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;span.name&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSpan&amp;#34; }
                      },
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;span.kind&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;SPAN_KIND_UNSPECIFIED&amp;#34; }
                      },
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;status.code&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;STATUS_CODE_UNSET&amp;#34; }
                      }
                    ],
                    &amp;#34;startTimeUnixNano&amp;#34;: &amp;#34;1702582936761872000&amp;#34;,
                    &amp;#34;timeUnixNano&amp;#34;: &amp;#34;1702582936761872012&amp;#34;,
                    &amp;#34;asInt&amp;#34;: &amp;#34;2&amp;#34;
                  }
                ],
                &amp;#34;aggregationTemporality&amp;#34;: 2,
                &amp;#34;isMonotonic&amp;#34;: true
              }
            }
          ]
        }
      ]
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now assume that &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; receives two incoming resource spans, each with a different value for the &lt;code&gt;k8s.pod.name&lt;/code&gt; recourse attribute.
&lt;div class=&#34;collapse&#34; x-data=&#34;app_collapse()&#34;&gt;
  &lt;button class=&#34;collapse-trigger&#34; @click=&#34;toggle()&#34;&gt;
    &lt;span class=&#34;body-large&#34;&gt;Example JSON of two incoming spans.&lt;/span&gt;
    &lt;span class=&#34;collapse-trigger__icon&#34; :class=&#34;{ &#39;collapse-trigger__icon-open&#39; : open }&#34;&gt;
      
  &lt;svg width=&#34;27&#34; height=&#34;26&#34; viewBox=&#34;0 0 27 26&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path opacity=&#34;0.2&#34; d=&#34;M1.73047 12.8359C1.73047 19.4634 7.10305 24.8359 13.7305 24.8359C20.3579 24.8359 25.7305 19.4634 25.7305 12.8359C25.7305 6.20852 20.3579 0.835937 13.7305 0.835937C7.10305 0.835937 1.73047 6.20852 1.73047 12.8359Z&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M18.2344 12.8359L9.23438 12.8359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M13.7344 8.33594L13.7344 17.3359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;


    &lt;/span&gt;
  &lt;/button&gt;
  &lt;div class=&#34;collapse-content&#34; x-ref=&#34;content&#34; hidden=&#34;until-found&#34;&gt;
    &lt;div class=&#34;collapse-content__inner&#34; x-ref=&#34;content-inner&#34;&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;JSON&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-json&#34;&gt;{
  &amp;#34;resourceSpans&amp;#34;: [
    {
      &amp;#34;resource&amp;#34;: {
        &amp;#34;attributes&amp;#34;: [
          {
            &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;k8s.pod.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;first&amp;#34; }
          }
        ]
      },
      &amp;#34;scopeSpans&amp;#34;: [
        {
          &amp;#34;spans&amp;#34;: [
            {
              &amp;#34;trace_id&amp;#34;: &amp;#34;7bba9f33312b3dbb8b2c2c62bb7abe2d&amp;#34;,
              &amp;#34;span_id&amp;#34;: &amp;#34;086e83747d0e381e&amp;#34;,
              &amp;#34;name&amp;#34;: &amp;#34;TestSpan&amp;#34;,
              &amp;#34;attributes&amp;#34;: [
                {
                  &amp;#34;key&amp;#34;: &amp;#34;attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                }
              ]
            }
          ]
        }
      ]
    },
    {
      &amp;#34;resource&amp;#34;: {
        &amp;#34;attributes&amp;#34;: [
          {
            &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;k8s.pod.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;second&amp;#34; }
          }
        ]
      },
      &amp;#34;scopeSpans&amp;#34;: [
        {
          &amp;#34;spans&amp;#34;: [
            {
              &amp;#34;trace_id&amp;#34;: &amp;#34;7bba9f33312b3dbb8b2c2c62bb7abe2d&amp;#34;,
              &amp;#34;span_id&amp;#34;: &amp;#34;086e83747d0e381b&amp;#34;,
              &amp;#34;name&amp;#34;: &amp;#34;TestSpan&amp;#34;,
              &amp;#34;attributes&amp;#34;: [
                {
                  &amp;#34;key&amp;#34;: &amp;#34;attribute1&amp;#34;,
                  &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;78&amp;#34; }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To preserve the values of all resource attributes, &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; will produce two resource metrics.
Each resource metric will have a different value for the &lt;code&gt;k8s.pod.name&lt;/code&gt; recourse attribute.
This way none of the resource attributes will be lost during the generation of metrics.
&lt;div class=&#34;collapse&#34; x-data=&#34;app_collapse()&#34;&gt;
  &lt;button class=&#34;collapse-trigger&#34; @click=&#34;toggle()&#34;&gt;
    &lt;span class=&#34;body-large&#34;&gt;Example JSON of two outgoing metric resources.&lt;/span&gt;
    &lt;span class=&#34;collapse-trigger__icon&#34; :class=&#34;{ &#39;collapse-trigger__icon-open&#39; : open }&#34;&gt;
      
  &lt;svg width=&#34;27&#34; height=&#34;26&#34; viewBox=&#34;0 0 27 26&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path opacity=&#34;0.2&#34; d=&#34;M1.73047 12.8359C1.73047 19.4634 7.10305 24.8359 13.7305 24.8359C20.3579 24.8359 25.7305 19.4634 25.7305 12.8359C25.7305 6.20852 20.3579 0.835937 13.7305 0.835937C7.10305 0.835937 1.73047 6.20852 1.73047 12.8359Z&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M18.2344 12.8359L9.23438 12.8359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M13.7344 8.33594L13.7344 17.3359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;


    &lt;/span&gt;
  &lt;/button&gt;
  &lt;div class=&#34;collapse-content&#34; x-ref=&#34;content&#34; hidden=&#34;until-found&#34;&gt;
    &lt;div class=&#34;collapse-content__inner&#34; x-ref=&#34;content-inner&#34;&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;JSON&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-json&#34;&gt;{
  &amp;#34;resourceMetrics&amp;#34;: [
    {
      &amp;#34;resource&amp;#34;: {
        &amp;#34;attributes&amp;#34;: [
          {
            &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;k8s.pod.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;first&amp;#34; }
          }
        ]
      },
      &amp;#34;scopeMetrics&amp;#34;: [
        {
          &amp;#34;scope&amp;#34;: {
            &amp;#34;name&amp;#34;: &amp;#34;spanmetricsconnector&amp;#34;
          },
          &amp;#34;metrics&amp;#34;: [
            {
              &amp;#34;name&amp;#34;: &amp;#34;calls&amp;#34;,
              &amp;#34;sum&amp;#34;: {
                &amp;#34;dataPoints&amp;#34;: [
                  {
                    &amp;#34;attributes&amp;#34;: [
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
                      },
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;span.name&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSpan&amp;#34; }
                      },
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;span.kind&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;SPAN_KIND_UNSPECIFIED&amp;#34; }
                      },
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;status.code&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;STATUS_CODE_UNSET&amp;#34; }
                      }
                    ],
                    &amp;#34;startTimeUnixNano&amp;#34;: &amp;#34;1702582936761872000&amp;#34;,
                    &amp;#34;timeUnixNano&amp;#34;: &amp;#34;1702582936761872012&amp;#34;,
                    &amp;#34;asInt&amp;#34;: &amp;#34;1&amp;#34;
                  }
                ],
                &amp;#34;aggregationTemporality&amp;#34;: 2,
                &amp;#34;isMonotonic&amp;#34;: true
              }
            }
          ]
        }
      ]
    },
    {
      &amp;#34;resource&amp;#34;: {
        &amp;#34;attributes&amp;#34;: [
          {
            &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
          },
          {
            &amp;#34;key&amp;#34;: &amp;#34;k8s.pod.name&amp;#34;,
            &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;second&amp;#34; }
          }
        ]
      },
      &amp;#34;scopeMetrics&amp;#34;: [
        {
          &amp;#34;scope&amp;#34;: {
            &amp;#34;name&amp;#34;: &amp;#34;spanmetricsconnector&amp;#34;
          },
          &amp;#34;metrics&amp;#34;: [
            {
              &amp;#34;name&amp;#34;: &amp;#34;calls&amp;#34;,
              &amp;#34;sum&amp;#34;: {
                &amp;#34;dataPoints&amp;#34;: [
                  {
                    &amp;#34;attributes&amp;#34;: [
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSvcName&amp;#34; }
                      },
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;span.name&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;TestSpan&amp;#34; }
                      },
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;span.kind&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;SPAN_KIND_UNSPECIFIED&amp;#34; }
                      },
                      {
                        &amp;#34;key&amp;#34;: &amp;#34;status.code&amp;#34;,
                        &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;STATUS_CODE_UNSET&amp;#34; }
                      }
                    ],
                    &amp;#34;startTimeUnixNano&amp;#34;: &amp;#34;1702582936761872000&amp;#34;,
                    &amp;#34;timeUnixNano&amp;#34;: &amp;#34;1702582936761872012&amp;#34;,
                    &amp;#34;asInt&amp;#34;: &amp;#34;1&amp;#34;
                  }
                ],
                &amp;#34;aggregationTemporality&amp;#34;: 2,
                &amp;#34;isMonotonic&amp;#34;: true
              }
            }
          ]
        }
      ]
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.spanmetrics&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.connector.spanmetrics&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;explicit-histogram-and-extra-dimensions&#34;&gt;Explicit histogram and extra dimensions&lt;/h3&gt;
&lt;p&gt;In the example below, &lt;code&gt;http.status_code&lt;/code&gt; and &lt;code&gt;http.method&lt;/code&gt; are additional dimensions on top of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;service.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;span.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;span.kind&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;status.code&lt;/code&gt;&lt;/li&gt;
&lt;/ul&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 {
    traces  = [otelcol.connector.spanmetrics.default.input]
  }
}

otelcol.connector.spanmetrics &amp;#34;default&amp;#34; {
  // Since a default is not provided, the http.status_code dimension will be omitted
  // if the span does not contain http.status_code.
  dimension {
    name = &amp;#34;http.status_code&amp;#34;
  }

  // If the span is missing http.method, the connector will insert
  // the http.method dimension with value &amp;#39;GET&amp;#39;.
  dimension {
    name = &amp;#34;http.method&amp;#34;
    default = &amp;#34;GET&amp;#34;
  }

  dimensions_cache_size = 333

  aggregation_temporality = &amp;#34;DELTA&amp;#34;

  histogram {
    unit = &amp;#34;s&amp;#34;
    explicit {
      buckets = [&amp;#34;333ms&amp;#34;, &amp;#34;777s&amp;#34;, &amp;#34;999h&amp;#34;]
    }
  }

  // The period on which all metrics (whose dimension keys remain in cache) will be emitted.
  metrics_flush_interval = &amp;#34;33s&amp;#34;

  namespace = &amp;#34;test.namespace&amp;#34;

  output {
    metrics = [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;
&lt;h3 id=&#34;sending-metrics-via-a-prometheus-remote-write&#34;&gt;Sending metrics via a Prometheus remote write&lt;/h3&gt;
&lt;p&gt;The generated metrics can be sent to a Prometheus-compatible database such as Grafana Mimir.
However, extra steps are required in order to make sure all metric samples are received.
This is because &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; aims to &lt;a href=&#34;#handling-of-resource-attributes&#34;&gt;preserve resource attributes&lt;/a&gt; in the metrics which it outputs.&lt;/p&gt;
&lt;p&gt;Unfortunately, the &lt;a href=&#34;https://prometheus.io/docs/concepts/data_model/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus data model&lt;/a&gt; has no notion of resource attributes.
This means that if &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; outputs metrics with identical metric attributes,
but different resource attributes, &lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; will convert the metrics into the same metric series.
This problem can be solved by doing &lt;strong&gt;either&lt;/strong&gt; of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Recommended approach:&lt;/strong&gt; Prior to &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt;, remove all resource attributes from the incoming spans which are not needed by &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt;.
&lt;div class=&#34;collapse&#34; x-data=&#34;app_collapse()&#34;&gt;
  &lt;button class=&#34;collapse-trigger&#34; @click=&#34;toggle()&#34;&gt;
    &lt;span class=&#34;body-large&#34;&gt;Example River configuration to remove unnecessary resource attributes.&lt;/span&gt;
    &lt;span class=&#34;collapse-trigger__icon&#34; :class=&#34;{ &#39;collapse-trigger__icon-open&#39; : open }&#34;&gt;
      
  &lt;svg width=&#34;27&#34; height=&#34;26&#34; viewBox=&#34;0 0 27 26&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path opacity=&#34;0.2&#34; d=&#34;M1.73047 12.8359C1.73047 19.4634 7.10305 24.8359 13.7305 24.8359C20.3579 24.8359 25.7305 19.4634 25.7305 12.8359C25.7305 6.20852 20.3579 0.835937 13.7305 0.835937C7.10305 0.835937 1.73047 6.20852 1.73047 12.8359Z&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M18.2344 12.8359L9.23438 12.8359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M13.7344 8.33594L13.7344 17.3359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;


    &lt;/span&gt;
  &lt;/button&gt;
  &lt;div class=&#34;collapse-content&#34; x-ref=&#34;content&#34; hidden=&#34;until-found&#34;&gt;
    &lt;div class=&#34;collapse-content__inner&#34; x-ref=&#34;content-inner&#34;&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 {
    traces  = [otelcol.processor.transform.default.input]
  }
}

// Remove all resource attributes except the ones which
// the otelcol.connector.spanmetrics needs.
// If this is not done, otelcol.exporter.prometheus may fail to
// write some samples due to an &amp;#34;err-mimir-sample-duplicate-timestamp&amp;#34; error.
// This is because the spanmetricsconnector will create a new
// metrics resource scope for each traces resource scope.
otelcol.processor.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  trace_statements {
    context = &amp;#34;resource&amp;#34;
    statements = [
      // We keep only the &amp;#34;service.name&amp;#34; and &amp;#34;special.attr&amp;#34; resource attributes,
      // because they are the only ones which otelcol.connector.spanmetrics needs.
      //
      // There is no need to list &amp;#34;span.name&amp;#34;, &amp;#34;span.kind&amp;#34;, and &amp;#34;status.code&amp;#34;
      // here because they are properties of the span (and not resource attributes):
      // https://github.com/open-telemetry/opentelemetry-proto/blob/v1.0.0/opentelemetry/proto/trace/v1/trace.proto
      `keep_keys(attributes, [&amp;#34;service.name&amp;#34;, &amp;#34;special.attr&amp;#34;])`,
    ]
  }

  output {
    traces  = [otelcol.connector.spanmetrics.default.input]
  }
}

otelcol.connector.spanmetrics &amp;#34;default&amp;#34; {
  histogram {
    explicit {}
  }

  dimension {
    name = &amp;#34;special.attr&amp;#34;
  }
  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;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Or, after &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt;, copy each of the resource attributes as a metric datapoint attribute.
This has the advantage that the resource attributes will be visible as metric labels.
However, the &lt;span class=&#34;term&#34; x-data=&#34;app_term(&#39;cardinality&#39;, `The total combination of key/value pairs, such as labels and label values for a given metric series or log stream, and how many unique combinations they generate.`)&#34; x-init=&#34;init()&#34; :class=&#34;{ &#39;term-hover&#39; : open }&#34;&gt;&lt;span x-ref=&#34;tooltip&#34;&gt;cardinality&lt;/span&gt;&lt;/span&gt; of the metrics may be much higher, which could increase the cost of storing and querying them.
The example below uses the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/ottlfuncs/README.md#merge_maps&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;merge_maps&lt;/a&gt; OTTL function.&lt;/p&gt;
&lt;div class=&#34;collapse&#34; x-data=&#34;app_collapse()&#34;&gt;
  &lt;button class=&#34;collapse-trigger&#34; @click=&#34;toggle()&#34;&gt;
    &lt;span class=&#34;body-large&#34;&gt;Example River configuration to add all resource attributes as metric datapoint attributes.&lt;/span&gt;
    &lt;span class=&#34;collapse-trigger__icon&#34; :class=&#34;{ &#39;collapse-trigger__icon-open&#39; : open }&#34;&gt;
      
  &lt;svg width=&#34;27&#34; height=&#34;26&#34; viewBox=&#34;0 0 27 26&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path opacity=&#34;0.2&#34; d=&#34;M1.73047 12.8359C1.73047 19.4634 7.10305 24.8359 13.7305 24.8359C20.3579 24.8359 25.7305 19.4634 25.7305 12.8359C25.7305 6.20852 20.3579 0.835937 13.7305 0.835937C7.10305 0.835937 1.73047 6.20852 1.73047 12.8359Z&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M18.2344 12.8359L9.23438 12.8359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M13.7344 8.33594L13.7344 17.3359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;


    &lt;/span&gt;
  &lt;/button&gt;
  &lt;div class=&#34;collapse-content&#34; x-ref=&#34;content&#34; hidden=&#34;until-found&#34;&gt;
    &lt;div class=&#34;collapse-content__inner&#34; x-ref=&#34;content-inner&#34;&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 {
    traces  = [otelcol.connector.spanmetrics.default.input]
  }
}

otelcol.connector.spanmetrics &amp;#34;default&amp;#34; {
  histogram {
    explicit {}
  }

  dimension {
    name = &amp;#34;special.attr&amp;#34;
  }
  output {
    metrics = [otelcol.processor.transform.default.input]
  }
}

// Insert resource attributes as metric data point attributes.
otelcol.processor.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  metric_statements {
    context = &amp;#34;datapoint&amp;#34;
    statements = [
      // &amp;#34;insert&amp;#34; means that a metric datapoint attribute will be inserted
      // only if an attribute with the same key does not already exist.
      `merge_maps(attributes, resource.attributes, &amp;#34;insert&amp;#34;)`,
    ]
  }

  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;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the resource attributes are not treated in either of the ways described above, an error such as this one could be logged by &lt;code&gt;prometheus.remote_write&lt;/code&gt;:
&lt;code&gt;the sample has been rejected because another sample with the same timestamp, but a different value, has already been ingested (err-mimir-sample-duplicate-timestamp)&lt;/code&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;In order for a Prometheus &lt;code&gt;target_info&lt;/code&gt; metric to be generated, the incoming spans resource scope
attributes must contain &lt;code&gt;service.name&lt;/code&gt; and &lt;code&gt;service.instance.id&lt;/code&gt; attributes.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;target_info&lt;/code&gt; metric will be generated for each resource scope, while OpenTelemetry
metric names and attributes will be normalized to be compliant with Prometheus naming rules.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="otelcolconnectorspanmetrics">otelcol.connector.spanmetrics&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>otelcol.connector.spanmetrics&lt;/code> accepts span data from other &lt;code>otelcol&lt;/code> components and
aggregates Request, Error and Duration (R.E.D) OpenTelemetry metrics from the spans:&lt;/p></description></item><item><title>otelcol.exporter.debug</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.exporter.debug/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.exporter.debug/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolexporterdebug&#34;&gt;otelcol.exporter.debug&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.debug&lt;/code&gt; accepts telemetry data from other &lt;code&gt;otelcol&lt;/code&gt; components and writes them to the console (stderr).
You can control the verbosity of the logs.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;otelcol.exporter.debug&lt;/code&gt; is a wrapper over the upstream OpenTelemetry Collector &lt;code&gt;debug&lt;/code&gt; exporter.
If necessary, bug reports or feature requests are redirected to the upstream repository.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Multiple &lt;code&gt;otelcol.exporter.debug&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.debug &amp;#34;LABEL&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.debug&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;verbosity&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Verbosity of the generated logs.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;normal&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;sampling_initial&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of messages initially logged each second.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2&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;sampling_thereafter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sampling rate after the initial messages are logged.&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;p&gt;The &lt;code&gt;verbosity&lt;/code&gt; argument must be one of &lt;code&gt;&amp;quot;basic&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;normal&amp;quot;&lt;/code&gt;, or &lt;code&gt;&amp;quot;detailed&amp;quot;&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;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.debug&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.debug&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 scrapes Prometheus UNIX metrics and writes them to the console:&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.exporter.unix &amp;#34;default&amp;#34; { }

prometheus.scrape &amp;#34;default&amp;#34; {
    targets    = prometheus.exporter.unix.default.targets
    forward_to = [otelcol.receiver.prometheus.default.receiver]
}

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

otelcol.exporter.debug &amp;#34;default&amp;#34; {
    verbosity           = &amp;#34;detailed&amp;#34;
    sampling_initial    = 1
    sampling_thereafter = 1
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.debug&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolexporterdebug">otelcol.exporter.debug&lt;/h1>
&lt;p>&lt;code>otelcol.exporter.debug&lt;/code> accepts telemetry data from other &lt;code>otelcol&lt;/code> components and writes them to the console (stderr).
You can control the verbosity of the logs.&lt;/p>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p></description></item><item><title>otelcol.exporter.loadbalancing</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.exporter.loadbalancing/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.exporter.loadbalancing/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolexporterloadbalancing&#34;&gt;otelcol.exporter.loadbalancing&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;!-- Include a picture of the LB architecture? --&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; accepts logs and traces from other &lt;code&gt;otelcol&lt;/code&gt; components
and writes them over the network using the OpenTelemetry Protocol (OTLP) protocol.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;loadbalancing&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.loadbalancing&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;p&gt;The decision which backend to use depends on the trace ID or the service name.
The backend load doesn&amp;rsquo;t influence the choice. Even though this load-balancer won&amp;rsquo;t do
round-robin balancing of the batches, the load distribution should be very similar among backends,
with a standard deviation under 5% at the current configuration.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; is especially useful for backends configured with tail-based samplers
which choose a backend based on the view of the full trace.&lt;/p&gt;
&lt;p&gt;When a list of backends is updated, some of the signals will be rerouted to different backends.
Around R/N of the &amp;ldquo;routes&amp;rdquo; will be rerouted differently, where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &amp;ldquo;route&amp;rdquo; is either a trace ID or a service name mapped to a certain backend.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;R&amp;rdquo; is the total number of routes.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;N&amp;rdquo; is the total number of backends.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This should be stable enough for most cases, and the larger the number of backends, the less disruption it should cause.&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.loadbalancing &amp;#34;LABEL&amp;#34; {
  resolver {
    ...
  }
  protocol {
    otlp {
      client {}
    }
  }
}&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.loadbalancing&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;routing_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Routing strategy for load balancing.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;traceID&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;routing_key&lt;/code&gt; attribute determines how to route signals across endpoints. Its value could be one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;service&amp;quot;&lt;/code&gt;: spans with the same &lt;code&gt;service.name&lt;/code&gt; will be exported to the same backend.
This is useful when using processors like the span metrics, so all spans for each service are sent to consistent Agent instances
for metric collection. Otherwise, metrics for the same services would be sent to different Agents, making aggregations inaccurate.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;traceID&amp;quot;&lt;/code&gt;: spans belonging to the same traceID will be exported to the same backend.&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;otelcol.exporter.loadbalancing&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;resolver&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resolver-block&#34;&gt;resolver&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures discovering the endpoints to export to.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;resolver &amp;gt; static&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#static-block&#34;&gt;static&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Static list of endpoints to export to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;resolver &amp;gt; dns&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#dns-block&#34;&gt;dns&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;DNS-sourced list of endpoints to export to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;resolver &amp;gt; kubernetes&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#kubernetes-block&#34;&gt;kubernetes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Kubernetes-sourced list of endpoints to export to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocol&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#protocol-block&#34;&gt;protocol&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Protocol settings. Only OTLP is supported at the moment.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocol &amp;gt; otlp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#otlp-block&#34;&gt;otlp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures an OTLP exporter.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocol &amp;gt; otlp &amp;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 exporter gRPC client.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;protocol &amp;gt; otlp &amp;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;protocol &amp;gt; otlp &amp;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;protocol &amp;gt; otlp &amp;gt; queue&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#queue-block&#34;&gt;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;protocol &amp;gt; otlp &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 retry mechanism for failed requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics that this component generates to monitor its state.&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;resolver &amp;gt; static&lt;/code&gt;
refers to a &lt;code&gt;static&lt;/code&gt; block defined inside a &lt;code&gt;resolver&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;resolver-block&#34;&gt;resolver block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;resolver&lt;/code&gt; block configures how to retrieve the endpoint to which this exporter will send data.&lt;/p&gt;
&lt;p&gt;Inside the &lt;code&gt;resolver&lt;/code&gt; block, either the &lt;a href=&#34;#dns-block&#34;&gt;dns&lt;/a&gt; block or the &lt;a href=&#34;#static-block&#34;&gt;static&lt;/a&gt; block
should be specified. If both &lt;code&gt;dns&lt;/code&gt; and &lt;code&gt;static&lt;/code&gt; are specified, &lt;code&gt;dns&lt;/code&gt; takes precedence.&lt;/p&gt;
&lt;h3 id=&#34;static-block&#34;&gt;static block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;static&lt;/code&gt; block configures a list of endpoints which this exporter will send 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;hostnames&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 endpoints to export 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;h3 id=&#34;dns-block&#34;&gt;dns block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;dns&lt;/code&gt; block periodically resolves an IP address via the DNS &lt;code&gt;hostname&lt;/code&gt; attribute. This IP address
and the port specified via the &lt;code&gt;port&lt;/code&gt; attribute will then be used by the gRPC exporter
as the endpoint to which to export 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;hostname&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;DNS hostname to resolve.&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;interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Resolver interval.&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;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Resolver timeout.&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;port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port to be used with the IP addresses resolved from the DNS hostname.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;4317&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;kubernetes-block&#34;&gt;kubernetes block&lt;/h3&gt;
&lt;p&gt;You can use the &lt;code&gt;kubernetes&lt;/code&gt; block to load balance across the pods of a Kubernetes service.
The Kubernetes API notifies Grafana Agent Flow whenever a new pod is added or removed from the service.
The &lt;code&gt;kubernetes&lt;/code&gt; resolver has a much faster response time than the &lt;code&gt;dns&lt;/code&gt; resolver because it doesn&amp;rsquo;t require polling.&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&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kubernetes service to resolve.&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;ports&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(number)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Ports to use with the IP addresses resolved from &lt;code&gt;service&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[4317]&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 no namespace is specified inside &lt;code&gt;service&lt;/code&gt;, an attempt will be made to infer the namespace for this Agent.
If this fails, the &lt;code&gt;default&lt;/code&gt; namespace will be used.&lt;/p&gt;
&lt;p&gt;Each of the ports listed in &lt;code&gt;ports&lt;/code&gt; will be used with each of the IPs resolved from &lt;code&gt;service&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;get&amp;rdquo;, &amp;ldquo;list&amp;rdquo;, and &amp;ldquo;watch&amp;rdquo; &lt;a href=&#34;https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-example&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;roles&lt;/a&gt;
must be granted in Kubernetes for the resolver to work.&lt;/p&gt;
&lt;h3 id=&#34;protocol-block&#34;&gt;protocol block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;protocol&lt;/code&gt; block configures protocol-related settings for exporting.
At the moment only the OTLP protocol is supported.&lt;/p&gt;
&lt;h3 id=&#34;otlp-block&#34;&gt;otlp block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;otlp&lt;/code&gt; block configures OTLP-related settings for exporting.&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.
The endpoints used by the client block are the ones from the &lt;code&gt;resolver&lt;/code&gt; block&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;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;code&gt;pick_first&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;authority&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Overrides the default &lt;code&gt;:authority&lt;/code&gt; header in gRPC requests from the gRPC client.&lt;/td&gt;
              &lt;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;div data-shared=&#34;flow/reference/components/otelcol-grpc-balancer-name.md&#34;&gt;
            &lt;p&gt;The supported values for &lt;code&gt;balancer_name&lt;/code&gt; are listed in 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;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pick_first&lt;/code&gt;: Tries to connect to the first address, uses it for all RPCs if it connects, or tries the next address if it fails (and keeps doing that until one connection is successful).
Because of this, all the RPCs will be sent to the same backend.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;round_robin&lt;/code&gt;: Connects to all the addresses it sees and sends an RPC to each backend one at a time in order.
For example, the first RPC is sent to backend-1, the second RPC is sent to backend-2, and the third RPC is sent to backend-1.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        


&lt;div data-shared=&#34;flow/reference/components/otelcol-grpc-authority.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;:authority&lt;/code&gt; header in gRPC specifies the host to which the request is being sent.
It&amp;rsquo;s similar to the &lt;code&gt;Host&lt;/code&gt; &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;header&lt;/a&gt; in HTTP requests.
By default, the value for &lt;code&gt;:authority&lt;/code&gt; is derived from the endpoint URL used for the gRPC call.
Overriding &lt;code&gt;:authority&lt;/code&gt; could be useful when routing traffic using a proxy like Envoy, which &lt;a href=&#34;https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/route_matching&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;makes routing decisions&lt;/a&gt; based on the value of the &lt;code&gt;:authority&lt;/code&gt; header.&lt;/p&gt;
&lt;/div&gt;

        
&lt;p&gt;You can configure an HTTP proxy with 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.loadbalancing&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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&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;queue-block&#34;&gt;queue block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;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 the same time.&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;/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 doesn&amp;rsquo;t 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; determines how long an endpoint outage is tolerated.
Assuming 100 requests/second, the default queue size &lt;code&gt;1000&lt;/code&gt; provides about 10 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 time in seconds that outages are tolerated. A very high value can cause Out Of Memory (OOM) kills.&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-block&#34;&gt;retry block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;retry&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_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 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;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;multiplier&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Factor to grow wait time before retrying.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1.5&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;randomization_factor&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Factor to randomize wait time before retrying.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0.5&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 by the factor specified by the &lt;code&gt;multiplier&lt;/code&gt; argument, which must be greater than &lt;code&gt;1.0&lt;/code&gt;.
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;The &lt;code&gt;randomization_factor&lt;/code&gt; argument is useful for adding jitter between retrying agents.
If &lt;code&gt;randomization_factor&lt;/code&gt; is greater than &lt;code&gt;0&lt;/code&gt;, the wait time before retries is multiplied by a random factor in the range &lt;code&gt;[ I - randomization_factor * I, I &#43; randomization_factor * I]&lt;/code&gt;, where &lt;code&gt;I&lt;/code&gt; is the current interval.&lt;/p&gt;
&lt;p&gt;If a batch hasn&amp;rsquo;t been 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;h3 id=&#34;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&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; OTLP-formatted data for telemetry signals of these types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;logs&lt;/li&gt;
&lt;li&gt;traces&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;choose-a-load-balancing-strategy&#34;&gt;Choose a load balancing strategy&lt;/h2&gt;
&lt;!-- TODO: Mention gropubytrace processor when Flow supports it --&gt;
&lt;!-- TODO: Should we run more than 1 LB instance for better resiliency and spreading out the load? --&gt;
&lt;p&gt;Different Grafana Agent Flow components require different load-balancing strategies.
The use of &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; is only necessary for &lt;a href=&#34;../../../get-started/deploy-agent/#stateful-and-stateless-components&#34;&gt;stateful Flow components&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;otelcolprocessortail_sampling&#34;&gt;otelcol.processor.tail_sampling&lt;/h3&gt;
&lt;!-- TODO: Add a picture of the architecture?  --&gt;
&lt;p&gt;All spans for a given trace ID must go to the same tail sampling Grafana Agent instance.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This can be done by configuring &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; with &lt;code&gt;routing_key = &amp;quot;traceID&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you do not configure &lt;code&gt;routing_key = &amp;quot;traceID&amp;quot;&lt;/code&gt;, the sampling decision may be incorrect.
The tail sampler must have a full view of the trace when making a sampling decision.
For example, a &lt;code&gt;rate_limiting&lt;/code&gt; tail sampling strategy may incorrectly pass through
more spans than expected if the spans for the same trace are spread out to more than
one Grafana Agent Flow instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- Make &#34;rate limiting&#34; a URL to the tail sampler doc --&gt;
&lt;h3 id=&#34;otelcolconnectorspanmetrics&#34;&gt;otelcol.connector.spanmetrics&lt;/h3&gt;
&lt;p&gt;All spans for a given &lt;code&gt;service.name&lt;/code&gt; must go to the same spanmetrics Grafana Agent.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This can be done by configuring &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; with &lt;code&gt;routing_key = &amp;quot;service&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you do not configure &lt;code&gt;routing_key = &amp;quot;service&amp;quot;&lt;/code&gt;, metrics generated from spans might be incorrect.
For example, if similar spans for the same &lt;code&gt;service.name&lt;/code&gt; end up on different Grafana Agent instances, the two Grafana Agents will have identical metric series for calculating span latency, errors, and number of requests.
When both Grafana Agent instances attempt to write the metrics to a database such as Mimir, the series may clash with each other.
At best, this will lead to an error in Grafana Agent and a rejected write to the metrics database.
At worst, it could lead to inaccurate data due to overlapping samples for the metric series.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, there are ways to scale &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; without the need for a load balancer:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Each Grafana Agent could add an attribute such as &lt;code&gt;collector.id&lt;/code&gt; in order to make its series unique.
Then, for example, you could use a &lt;code&gt;sum by&lt;/code&gt; PromQL query to aggregate the metrics from different Grafana Agents.
Unfortunately, an extra &lt;code&gt;collector.id&lt;/code&gt; attribute has a downside that the metrics stored in the database will have higher &lt;span class=&#34;term&#34; x-data=&#34;app_term(&#39;cardinality&#39;, `The total combination of key/value pairs, such as labels and label values for a given metric series or log stream, and how many unique combinations they generate.`)&#34; x-init=&#34;init()&#34; :class=&#34;{ &#39;term-hover&#39; : open }&#34;&gt;&lt;span x-ref=&#34;tooltip&#34;&gt;cardinality&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;Spanmetrics could be generated in the backend database instead of in Grafana Agent.
For example, span metrics can be &lt;a href=&#34;/docs/tempo/latest/metrics-generator/span_metrics/&#34;&gt;generated&lt;/a&gt; in Grafana Cloud by the Tempo traces database.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;otelcolconnectorservicegraph&#34;&gt;otelcol.connector.servicegraph&lt;/h3&gt;
&lt;p&gt;It is challenging to scale &lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt; over multiple Grafana Agent instances.
For &lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt; to work correctly, each &amp;ldquo;client&amp;rdquo; span must be paired with a &amp;ldquo;server&amp;rdquo; span to calculate metrics such as span duration.
If a &amp;ldquo;client&amp;rdquo; span goes to one Grafana Agent, but a &amp;ldquo;server&amp;rdquo; span goes to another Grafana Agent,  then no single Grafana Agent will be able to pair the spans and a metric won&amp;rsquo;t be generated.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; can solve this problem partially if it is configured with &lt;code&gt;routing_key = &amp;quot;traceID&amp;quot;&lt;/code&gt;.
Each Grafana Agent will then be able to calculate a service graph for each &amp;ldquo;client&amp;rdquo;/&amp;ldquo;server&amp;rdquo; pair in a trace.
It is possible to have a span with similar &amp;ldquo;server&amp;rdquo;/&amp;ldquo;client&amp;rdquo; values in a different trace, processed by another Grafana Agent.
If two different Grafana Agent instances process similar &amp;ldquo;server&amp;rdquo;/&amp;ldquo;client&amp;rdquo; spans, they will generate the same service graph metric series.
If the series from two Grafana Agent are the same, this will lead to issues when writing them to the backend database.
You could differentiate the series by adding an attribute such as &lt;code&gt;&amp;quot;collector.id&amp;quot;&lt;/code&gt;.
The series from different Grafana Agents can be aggregated using PromQL queries on the backed metrics database.
If the metrics are stored in Grafana Mimir, cardinality issues due to &lt;code&gt;&amp;quot;collector.id&amp;quot;&lt;/code&gt; labels can be solved using &lt;a href=&#34;/docs/grafana-cloud/cost-management-and-billing/reduce-costs/metrics-costs/control-metrics-usage-via-adaptive-metrics/&#34;&gt;Adaptive Metrics&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A simpler, more scalable alternative to generating service graph metrics in Grafana Agent is to generate them entirely in the backend database.
For example, service graphs can be &lt;a href=&#34;/docs/tempo/latest/metrics-generator/service_graphs/&#34;&gt;generated&lt;/a&gt; in Grafana Cloud by the Tempo traces database.&lt;/p&gt;
&lt;h3 id=&#34;mixing-stateful-components&#34;&gt;Mixing stateful components&lt;/h3&gt;
&lt;!-- TODO: Add a picture of the architecture?  --&gt;
&lt;p&gt;Different Grafana Agent Flow components may require a different &lt;code&gt;routing_key&lt;/code&gt; for &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt;.
For example, &lt;code&gt;otelcol.processor.tail_sampling&lt;/code&gt; requires &lt;code&gt;routing_key = &amp;quot;traceID&amp;quot;&lt;/code&gt; whereas &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; requires &lt;code&gt;routing_key = &amp;quot;service&amp;quot;&lt;/code&gt;.
To load balance both types of components, two different sets of load balancers have to be set up:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One set of &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; with &lt;code&gt;routing_key = &amp;quot;traceID&amp;quot;&lt;/code&gt;, sending spans to Grafana Agents doing tail sampling and no span metrics.&lt;/li&gt;
&lt;li&gt;Another set of &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; with &lt;code&gt;routing_key = &amp;quot;service&amp;quot;&lt;/code&gt;, sending spans to Grafana Agents doing span metrics and no service graphs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unfortunately, this can also lead to side effects.
For example, if &lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt; is configured to generate exemplars, the tail sampling Grafana Agents might drop the trace that the exemplar points to.
There is no coordination between the tail sampling Grafana Agents and the span metrics Grafana Agents to make sure trace IDs for exemplars are kept.&lt;/p&gt;
&lt;!--
TODO: Add a troubleshooting section?
1. Use GODEBUG for DNS resolver logging
2. Enable debug logging on the Agent
3. gRPC debug env variables?
 --&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loadbalancing&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.loadbalancing&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;static-resolver&#34;&gt;Static resolver&lt;/h3&gt;
&lt;p&gt;This example accepts OTLP logs and traces over gRPC. It then sends them in a load-balanced
way to &amp;ldquo;localhost:55690&amp;rdquo; or &amp;ldquo;localhost:55700&amp;rdquo;.&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.exporter.loadbalancing.default.input]
        logs    = [otelcol.exporter.loadbalancing.default.input]
    }
}

otelcol.exporter.loadbalancing &amp;#34;default&amp;#34; {
    resolver {
        static {
            hostnames = [&amp;#34;localhost:55690&amp;#34;, &amp;#34;localhost:55700&amp;#34;]
        }
    }
    protocol {
        otlp {
            client {}
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;dns-resolver&#34;&gt;DNS resolver&lt;/h3&gt;
&lt;p&gt;When configured with a &lt;code&gt;dns&lt;/code&gt; resolver, &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; will do a DNS lookup
on regular intervals. Spans are exported to the addresses the DNS lookup returned.&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.loadbalancing &amp;#34;default&amp;#34; {
    resolver {
        dns {
            hostname = &amp;#34;grafana-agent-traces-sampling.grafana-cloud-monitoring.svc.cluster.local&amp;#34;
            port     = &amp;#34;34621&amp;#34;
            interval = &amp;#34;5s&amp;#34;
            timeout  = &amp;#34;1s&amp;#34;
        }
    }
    protocol {
        otlp {
            client {}
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example shows a Kubernetes configuration that configures two sets of Grafana Agents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A pool of load-balancer Grafana Agents:
&lt;ul&gt;
&lt;li&gt;Spans are received from instrumented applications via &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Spans are exported via &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;A pool of sampling Grafana Agents:
&lt;ul&gt;
&lt;li&gt;The sampling Grafana Agents run behind a headless service to enable the load-balancer Grafana Agents to discover them.&lt;/li&gt;
&lt;li&gt;Spans are received from the load-balancer Grafana Agents via &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Traces are sampled via &lt;code&gt;otelcol.processor.tail_sampling&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The traces are exported via &lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; to an OTLP-compatible database such as Tempo.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;collapse&#34; x-data=&#34;app_collapse()&#34;&gt;
  &lt;button class=&#34;collapse-trigger&#34; @click=&#34;toggle()&#34;&gt;
    &lt;span class=&#34;body-large&#34;&gt;Example Kubernetes configuration&lt;/span&gt;
    &lt;span class=&#34;collapse-trigger__icon&#34; :class=&#34;{ &#39;collapse-trigger__icon-open&#39; : open }&#34;&gt;
      
  &lt;svg width=&#34;27&#34; height=&#34;26&#34; viewBox=&#34;0 0 27 26&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path opacity=&#34;0.2&#34; d=&#34;M1.73047 12.8359C1.73047 19.4634 7.10305 24.8359 13.7305 24.8359C20.3579 24.8359 25.7305 19.4634 25.7305 12.8359C25.7305 6.20852 20.3579 0.835937 13.7305 0.835937C7.10305 0.835937 1.73047 6.20852 1.73047 12.8359Z&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M18.2344 12.8359L9.23438 12.8359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M13.7344 8.33594L13.7344 17.3359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;


    &lt;/span&gt;
  &lt;/button&gt;
  &lt;div class=&#34;collapse-content&#34; x-ref=&#34;content&#34; hidden=&#34;until-found&#34;&gt;
    &lt;div class=&#34;collapse-content__inner&#34; x-ref=&#34;content-inner&#34;&gt;
&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: Namespace
metadata:
  name: grafana-cloud-monitoring
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: k6-trace-generator
  namespace: grafana-cloud-monitoring
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      name: k6-trace-generator
  template:
    metadata:
      labels:
        name: k6-trace-generator
    spec:
      containers:
      - env:
        - name: ENDPOINT
          value: agent-traces-lb.grafana-cloud-monitoring.svc.cluster.local:9411
        image: ghcr.io/grafana/xk6-client-tracing:v0.0.2
        imagePullPolicy: IfNotPresent
        name: k6-trace-generator
---
apiVersion: v1
kind: Service
metadata:
  name: agent-traces-lb
  namespace: grafana-cloud-monitoring
spec:
  clusterIP: None
  ports:
  - name: agent-traces-otlp-grpc
    port: 9411
    protocol: TCP
    targetPort: 9411
  selector:
    name: agent-traces-lb
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: agent-traces-lb
  namespace: grafana-cloud-monitoring
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      name: agent-traces-lb
  template:
    metadata:
      labels:
        name: agent-traces-lb
    spec:
      containers:
      - args:
        - run
        - /etc/agent/agent_lb.river
        command:
        - /bin/grafana-agent
        env:
        - name: AGENT_MODE
          value: flow
        image: grafana/agent:v0.38.0
        imagePullPolicy: IfNotPresent
        name: agent-traces
        ports:
        - containerPort: 9411
          name: otlp-grpc
          protocol: TCP
        - containerPort: 34621
          name: agent-lb
          protocol: TCP
        volumeMounts:
        - mountPath: /etc/agent
          name: agent-traces
      volumes:
      - configMap:
          name: agent-traces
        name: agent-traces
---
apiVersion: v1
kind: Service
metadata:
  name: agent-traces-sampling
  namespace: grafana-cloud-monitoring
spec:
  clusterIP: None
  ports:
  - name: agent-lb
    port: 34621
    protocol: TCP
    targetPort: agent-lb
  selector:
    name: agent-traces-sampling
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: agent-traces-sampling
  namespace: grafana-cloud-monitoring
spec:
  minReadySeconds: 10
  replicas: 3
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      name: agent-traces-sampling
  template:
    metadata:
      labels:
        name: agent-traces-sampling
    spec:
      containers:
      - args:
        - run
        - /etc/agent/agent_sampling.river
        command:
        - /bin/grafana-agent
        env:
        - name: AGENT_MODE
          value: flow
        image: grafana/agent:v0.38.0
        imagePullPolicy: IfNotPresent
        name: agent-traces
        ports:
        - containerPort: 9411
          name: otlp-grpc
          protocol: TCP
        - containerPort: 34621
          name: agent-lb
          protocol: TCP
        volumeMounts:
        - mountPath: /etc/agent
          name: agent-traces
      volumes:
      - configMap:
          name: agent-traces
        name: agent-traces
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: agent-traces
  namespace: grafana-cloud-monitoring
data:
  agent_lb.river: |
    otelcol.receiver.otlp &amp;#34;default&amp;#34; {
      grpc {
        endpoint = &amp;#34;0.0.0.0:9411&amp;#34;
      }
      output {
        traces = [otelcol.exporter.loadbalancing.default.input,otelcol.exporter.logging.default.input]
      }
    }

    otelcol.exporter.logging &amp;#34;default&amp;#34; {
      verbosity = &amp;#34;detailed&amp;#34;
    }

    otelcol.exporter.loadbalancing &amp;#34;default&amp;#34; {
      resolver {
        dns {
          hostname = &amp;#34;agent-traces-sampling.grafana-cloud-monitoring.svc.cluster.local&amp;#34;
          port = &amp;#34;34621&amp;#34;
        }
      }
      protocol {
        otlp {
          client {
            tls {
              insecure = true
            }
          }
        }
      }
    }

  agent_sampling.river: |
    otelcol.receiver.otlp &amp;#34;default&amp;#34; {
      grpc {
        endpoint = &amp;#34;0.0.0.0:34621&amp;#34;
      }
      output {
        traces = [otelcol.exporter.otlp.default.input,otelcol.exporter.logging.default.input]
      }
    }

    otelcol.exporter.logging &amp;#34;default&amp;#34; {
      verbosity = &amp;#34;detailed&amp;#34;
    }

    otelcol.exporter.otlp &amp;#34;default&amp;#34; {
      client {
        endpoint = &amp;#34;tempo-prod-06-prod-gb-south-0.grafana.net:443&amp;#34;
        auth     = otelcol.auth.basic.creds.handler
      }
    }

    otelcol.auth.basic &amp;#34;creds&amp;#34; {
      username = &amp;#34;111111&amp;#34;
      password = &amp;#34;pass&amp;#34;
    }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;You must fill in the correct OTLP credentials prior to running the example.
You can use &lt;a href=&#34;https://k3d.io/v5.6.0/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;k3d&lt;/a&gt; to start the example:&lt;/p&gt;
&lt;!-- TODO: Link to the k3d page --&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;k3d cluster create grafana-agent-lb-test
kubectl apply -f kubernetes_config.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To delete the cluster, 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;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;k3d cluster delete grafana-agent-lb-test&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;kubernetes-resolver&#34;&gt;Kubernetes resolver&lt;/h3&gt;
&lt;p&gt;When you configure &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt;  with a &lt;code&gt;kubernetes&lt;/code&gt; resolver, the Kubernetes API notifies Grafana Agent Flow whenever a new pod is added or removed from the service.
Spans are exported to the addresses from the Kubernetes API, combined with all the possible &lt;code&gt;ports&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.exporter.loadbalancing &amp;#34;default&amp;#34; {
    resolver {
        kubernetes {
            service = &amp;#34;grafana-agent-traces-headless&amp;#34;
            ports   = [ 34621 ]
        }
    }
    protocol {
        otlp {
            client {}
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example shows a Kubernetes configuration that sets up two sets of Grafana Agents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A pool of load-balancer Grafana Agents:
&lt;ul&gt;
&lt;li&gt;Spans are received from instrumented applications via &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Spans are exported via &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The load-balancer Grafana Agents will get notified by the Kubernetes API any time a pod
is added or removed from the pool of sampling Grafana Agents.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;A pool of sampling Grafana Agents:
&lt;ul&gt;
&lt;li&gt;The sampling Grafana Agents do not need to run behind a headless service.&lt;/li&gt;
&lt;li&gt;Spans are received from the load-balancer Grafana Agents via &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Traces are sampled via &lt;code&gt;otelcol.processor.tail_sampling&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The traces are exported via &lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; to a an OTLP-compatible database such as Tempo.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- TODO: In the k8s config, why does the LB service has to be headless? --&gt;
&lt;div class=&#34;collapse&#34; x-data=&#34;app_collapse()&#34;&gt;
  &lt;button class=&#34;collapse-trigger&#34; @click=&#34;toggle()&#34;&gt;
    &lt;span class=&#34;body-large&#34;&gt;Example Kubernetes configuration&lt;/span&gt;
    &lt;span class=&#34;collapse-trigger__icon&#34; :class=&#34;{ &#39;collapse-trigger__icon-open&#39; : open }&#34;&gt;
      
  &lt;svg width=&#34;27&#34; height=&#34;26&#34; viewBox=&#34;0 0 27 26&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
&lt;path opacity=&#34;0.2&#34; d=&#34;M1.73047 12.8359C1.73047 19.4634 7.10305 24.8359 13.7305 24.8359C20.3579 24.8359 25.7305 19.4634 25.7305 12.8359C25.7305 6.20852 20.3579 0.835937 13.7305 0.835937C7.10305 0.835937 1.73047 6.20852 1.73047 12.8359Z&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M18.2344 12.8359L9.23438 12.8359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;path d=&#34;M13.7344 8.33594L13.7344 17.3359&#34; stroke=&#34;black&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;


    &lt;/span&gt;
  &lt;/button&gt;
  &lt;div class=&#34;collapse-content&#34; x-ref=&#34;content&#34; hidden=&#34;until-found&#34;&gt;
    &lt;div class=&#34;collapse-content__inner&#34; x-ref=&#34;content-inner&#34;&gt;
&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: Namespace
metadata:
  name: grafana-cloud-monitoring
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: agent-traces
  namespace: grafana-cloud-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: agent-traces-role
  namespace: grafana-cloud-monitoring
rules:
- apiGroups:
  - &amp;#34;&amp;#34;
  resources:
  - endpoints
  verbs:
  - list
  - watch
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: agent-traces-rolebinding
  namespace: grafana-cloud-monitoring
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: agent-traces-role
subjects:
- kind: ServiceAccount
  name: agent-traces
  namespace: grafana-cloud-monitoring
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: k6-trace-generator
  namespace: grafana-cloud-monitoring
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      name: k6-trace-generator
  template:
    metadata:
      labels:
        name: k6-trace-generator
    spec:
      containers:
      - env:
        - name: ENDPOINT
          value: agent-traces-lb.grafana-cloud-monitoring.svc.cluster.local:9411
        image: ghcr.io/grafana/xk6-client-tracing:v0.0.2
        imagePullPolicy: IfNotPresent
        name: k6-trace-generator
---
apiVersion: v1
kind: Service
metadata:
  name: agent-traces-lb
  namespace: grafana-cloud-monitoring
spec:
  clusterIP: None
  ports:
  - name: agent-traces-otlp-grpc
    port: 9411
    protocol: TCP
    targetPort: 9411
  selector:
    name: agent-traces-lb
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: agent-traces-lb
  namespace: grafana-cloud-monitoring
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      name: agent-traces-lb
  template:
    metadata:
      labels:
        name: agent-traces-lb
    spec:
      containers:
      - args:
        - run
        - /etc/agent/agent_lb.river
        command:
        - /bin/grafana-agent
        env:
        - name: AGENT_MODE
          value: flow
        image: grafana/agent:v0.38.0
        imagePullPolicy: IfNotPresent
        name: agent-traces
        ports:
        - containerPort: 9411
          name: otlp-grpc
          protocol: TCP
        volumeMounts:
        - mountPath: /etc/agent
          name: agent-traces
      serviceAccount: agent-traces
      volumes:
      - configMap:
          name: agent-traces
        name: agent-traces
---
apiVersion: v1
kind: Service
metadata:
  name: agent-traces-sampling
  namespace: grafana-cloud-monitoring
spec:
  ports:
  - name: agent-lb
    port: 34621
    protocol: TCP
    targetPort: agent-lb
  selector:
    name: agent-traces-sampling
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: agent-traces-sampling
  namespace: grafana-cloud-monitoring
spec:
  minReadySeconds: 10
  replicas: 3
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      name: agent-traces-sampling
  template:
    metadata:
      labels:
        name: agent-traces-sampling
    spec:
      containers:
      - args:
        - run
        - /etc/agent/agent_sampling.river
        command:
        - /bin/grafana-agent
        env:
        - name: AGENT_MODE
          value: flow
        image: grafana/agent:v0.38.0
        imagePullPolicy: IfNotPresent
        name: agent-traces
        ports:
        - containerPort: 34621
          name: agent-lb
          protocol: TCP
        volumeMounts:
        - mountPath: /etc/agent
          name: agent-traces
      volumes:
      - configMap:
          name: agent-traces
        name: agent-traces
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: agent-traces
  namespace: grafana-cloud-monitoring
data:
  agent_lb.river: |
    otelcol.receiver.otlp &amp;#34;default&amp;#34; {
      grpc {
        endpoint = &amp;#34;0.0.0.0:9411&amp;#34;
      }
      output {
        traces = [otelcol.exporter.loadbalancing.default.input,otelcol.exporter.logging.default.input]
      }
    }

    otelcol.exporter.logging &amp;#34;default&amp;#34; {
      verbosity = &amp;#34;detailed&amp;#34;
    }

    otelcol.exporter.loadbalancing &amp;#34;default&amp;#34; {
      resolver {
        kubernetes {
          service = &amp;#34;agent-traces-sampling&amp;#34;
          ports = [&amp;#34;34621&amp;#34;]
        }
      }
      protocol {
        otlp {
          client {
            tls {
              insecure = true
            }
          }
        }
      }
    }

  agent_sampling.river: |
    otelcol.receiver.otlp &amp;#34;default&amp;#34; {
      grpc {
        endpoint = &amp;#34;0.0.0.0:34621&amp;#34;
      }
      output {
        traces = [otelcol.exporter.otlp.default.input,otelcol.exporter.logging.default.input]
      }
    }

    otelcol.exporter.logging &amp;#34;default&amp;#34; {
      verbosity = &amp;#34;detailed&amp;#34;
    }

    otelcol.exporter.otlp &amp;#34;default&amp;#34; {
      client {
        endpoint = &amp;#34;tempo-prod-06-prod-gb-south-0.grafana.net:443&amp;#34;
        auth     = otelcol.auth.basic.creds.handler
      }
    }

    otelcol.auth.basic &amp;#34;creds&amp;#34; {
      username = &amp;#34;111111&amp;#34;
      password = &amp;#34;pass&amp;#34;
    }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;You must fill in the correct OTLP credentials prior to running the example.
You can use &lt;a href=&#34;https://k3d.io/v5.6.0/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;k3d&lt;/a&gt; to start the example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;k3d cluster create grafana-agent-lb-test
kubectl apply -f kubernetes_config.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To delete the cluster, 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;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;k3d cluster delete grafana-agent-lb-test&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="otelcolexporterloadbalancing">otelcol.exporter.loadbalancing&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>otelcol.exporter.logging</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.exporter.logging/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.exporter.logging/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolexporterlogging&#34;&gt;otelcol.exporter.logging&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.logging&lt;/code&gt; accepts telemetry data from other &lt;code&gt;otelcol&lt;/code&gt; components
and writes them to the console.&lt;/p&gt;
&lt;p&gt;This component writes logs at the info level. The &lt;a href=&#34;../../config-blocks/logging/&#34;&gt;logging config block&lt;/a&gt; must be
configured to write logs at the info level.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.exporter.logging&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;logging&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.logging&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.logging &amp;#34;LABEL&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.logging&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;verbosity&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Verbosity of the generated logs.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;normal&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;sampling_initial&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of messages initially logged each second.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2&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;sampling_thereafter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sampling rate after the initial messages are logged.&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;p&gt;The &lt;code&gt;verbosity&lt;/code&gt; argument must be one of &lt;code&gt;&amp;quot;basic&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;normal&amp;quot;&lt;/code&gt;, or &lt;code&gt;&amp;quot;detailed&amp;quot;&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.exporter.logging&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;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics that this component generates to monitor its state.&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;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&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.logging&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.logging&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 scrapes prometheus unix metrics and writes them to the console:&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.exporter.unix &amp;#34;default&amp;#34; { }

prometheus.scrape &amp;#34;default&amp;#34; {
    targets    = prometheus.exporter.unix.default.targets
    forward_to = [otelcol.receiver.prometheus.default.receiver]
}

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

otelcol.exporter.logging &amp;#34;default&amp;#34; {
    verbosity           = &amp;#34;detailed&amp;#34;
    sampling_initial    = 1
    sampling_thereafter = 1
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.logging&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolexporterlogging">otelcol.exporter.logging&lt;/h1>
&lt;p>&lt;code>otelcol.exporter.logging&lt;/code> accepts telemetry data from other &lt;code>otelcol&lt;/code> components
and writes them to the console.&lt;/p>
&lt;p>This component writes logs at the info level. The &lt;a href="../../config-blocks/logging/">logging config block&lt;/a> must be
configured to write logs at the info level.&lt;/p></description></item><item><title>otelcol.exporter.loki</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.exporter.loki/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;/blockquote&gt;
&lt;p&gt;The attributes of the OTLP log are not converted to Loki attributes by default.
To convert them, the OTLP log should contain special &amp;ldquo;hint&amp;rdquo; attributes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To convert OTLP resource attributes to Loki labels,
use the &lt;code&gt;loki.resource.labels&lt;/code&gt; hint attribute.&lt;/li&gt;
&lt;li&gt;To convert OTLP log attributes to Loki labels,
use the &lt;code&gt;loki.attribute.labels&lt;/code&gt; hint attribute.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Labels will be translated to a [Prometheus format][], which is more constrained
than the OTLP format. For examples on label translation, see the
&lt;a href=&#34;#converting-otlp-attributes-to-loki-labels&#34;&gt;Converting OTLP attributes to Loki labels&lt;/a&gt; section.&lt;/p&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;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;basic-usage&#34;&gt;Basic usage&lt;/h3&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;
&lt;h3 id=&#34;converting-otlp-attributes-to-loki-labels&#34;&gt;Converting OTLP attributes to Loki labels&lt;/h3&gt;
&lt;p&gt;The example below will convert the following attributes to Loki labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;service.name&lt;/code&gt; and &lt;code&gt;service.namespace&lt;/code&gt; OTLP resource attributes.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;event.domain&lt;/code&gt; and &lt;code&gt;event.name&lt;/code&gt; OTLP log attributes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Labels will be translated to a [Prometheus format][]. For example:&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;OpenTelemetry Attribute&lt;/th&gt;
              &lt;th&gt;Prometheus Label&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;name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;host.name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host_name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;host_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;host_name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name (of the host)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;name__of_the_host_&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;2 cents&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;key_2_cents&lt;/code&gt;&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;__name&lt;/code&gt;&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;key_name&lt;/code&gt;&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;_name&lt;/code&gt; (if &lt;code&gt;PermissiveLabelSanitization&lt;/code&gt; is enabled)&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;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
  grpc {}

  output {
    logs = [otelcol.processor.attributes.default.input]
  }
}

otelcol.processor.attributes &amp;#34;default&amp;#34; {
  action {
    key = &amp;#34;loki.attribute.labels&amp;#34;
    action = &amp;#34;insert&amp;#34;
    value = &amp;#34;event.domain, event.name&amp;#34;
  }
  
  action {
    key = &amp;#34;loki.resource.labels&amp;#34;
    action = &amp;#34;insert&amp;#34;
    value = &amp;#34;service.name, service.namespace&amp;#34;
  }
  
  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;
&lt;p&gt;&lt;a href=&#34;https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus format&lt;/a&gt;&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loki&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#loki-logsreceiver-exporters&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.loki&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/otelcol.exporter.otlp/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;tr&gt;
              &lt;td&gt;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics that this component generates to monitor its state.&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;code&gt;pick_first&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;authority&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Overrides the default &lt;code&gt;:authority&lt;/code&gt; header in gRPC requests from the gRPC client.&lt;/td&gt;
              &lt;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;div data-shared=&#34;flow/reference/components/otelcol-grpc-balancer-name.md&#34;&gt;
            &lt;p&gt;The supported values for &lt;code&gt;balancer_name&lt;/code&gt; are listed in 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;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pick_first&lt;/code&gt;: Tries to connect to the first address, uses it for all RPCs if it connects, or tries the next address if it fails (and keeps doing that until one connection is successful).
Because of this, all the RPCs will be sent to the same backend.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;round_robin&lt;/code&gt;: Connects to all the addresses it sees and sends an RPC to each backend one at a time in order.
For example, the first RPC is sent to backend-1, the second RPC is sent to backend-2, and the third RPC is sent to backend-1.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        


&lt;div data-shared=&#34;flow/reference/components/otelcol-grpc-authority.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;:authority&lt;/code&gt; header in gRPC specifies the host to which the request is being sent.
It&amp;rsquo;s similar to the &lt;code&gt;Host&lt;/code&gt; &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;header&lt;/a&gt; in HTTP requests.
By default, the value for &lt;code&gt;:authority&lt;/code&gt; is derived from the endpoint URL used for the gRPC call.
Overriding &lt;code&gt;:authority&lt;/code&gt; could be useful when routing traffic using a proxy like Envoy, which &lt;a href=&#34;https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/route_matching&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;makes routing decisions&lt;/a&gt; based on the value of the &lt;code&gt;:authority&lt;/code&gt; header.&lt;/p&gt;
&lt;/div&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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&lt;/p&gt;
&lt;/div&gt;

        
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; uses gRPC, which does not allow you to send sensitive credentials (like &lt;code&gt;auth&lt;/code&gt;) over insecure channels.
Sending sensitive credentials over insecure non-TLS connections is supported by non-gRPC exporters such as &lt;a href=&#34;../otelcol.exporter.otlphttp/&#34;&gt;otelcol.exporter.otlphttp&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&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 the same time.&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;/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 doesn&amp;rsquo;t 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; determines how long an endpoint outage is tolerated.
Assuming 100 requests/second, the default queue size &lt;code&gt;1000&lt;/code&gt; provides about 10 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 time in seconds that outages are tolerated. A very high value can cause Out Of Memory (OOM) kills.&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_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 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;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;multiplier&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Factor to grow wait time before retrying.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1.5&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;randomization_factor&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Factor to randomize wait time before retrying.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0.5&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 by the factor specified by the &lt;code&gt;multiplier&lt;/code&gt; argument, which must be greater than &lt;code&gt;1.0&lt;/code&gt;.
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;The &lt;code&gt;randomization_factor&lt;/code&gt; argument is useful for adding jitter between retrying agents.
If &lt;code&gt;randomization_factor&lt;/code&gt; is greater than &lt;code&gt;0&lt;/code&gt;, the wait time before retries is multiplied by a random factor in the range &lt;code&gt;[ I - randomization_factor * I, I &#43; randomization_factor * I]&lt;/code&gt;, where &lt;code&gt;I&lt;/code&gt; is the current interval.&lt;/p&gt;
&lt;p&gt;If a batch hasn&amp;rsquo;t been 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;h3 id=&#34;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&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;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;exporter_sent_spans_ratio_total&lt;/code&gt; (counter): Number of spans successfully sent to destination.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;exporter_send_failed_spans_ratio_total&lt;/code&gt; (counter): Number of spans in failed attempts to send to destination.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;exporter_queue_capacity_ratio&lt;/code&gt; (gauge): Fixed capacity of the retry queue (in batches)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;exporter_queue_size_ratio&lt;/code&gt; (gauge): Current size of the retry queue (in batches)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_client_duration_milliseconds&lt;/code&gt; (histogram): Measures the duration of inbound RPC.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_client_request_size_bytes&lt;/code&gt; (histogram): Measures size of RPC request messages (uncompressed).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_client_requests_per_rpc&lt;/code&gt; (histogram): Measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_client_response_size_bytes&lt;/code&gt; (histogram): Measures size of RPC response messages (uncompressed).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_client_responses_per_rpc&lt;/code&gt; (histogram): Measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show you how to create an exporter to send data to different destinations.&lt;/p&gt;
&lt;h3 id=&#34;send-data-to-a-local-tempo-instance&#34;&gt;Send data to a local Tempo instance&lt;/h3&gt;
&lt;p&gt;You can create an exporter that sends your data to a local Grafana Tempo instance 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;
&lt;h3 id=&#34;send-data-to-a-managed-service&#34;&gt;Send data to a managed service&lt;/h3&gt;
&lt;p&gt;You can create an &lt;code&gt;otlp&lt;/code&gt; exporter that sends your data to a managed service, for example, Grafana Cloud. The Tempo username and Grafana Cloud API Key are injected in this example through environment variables.&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;grafana_cloud_tempo&amp;#34; {
    client {
        endpoint = &amp;#34;tempo-xxx.grafana.net/tempo:443&amp;#34;
        auth     = otelcol.auth.basic.grafana_cloud_tempo.handler
    }
}
otelcol.auth.basic &amp;#34;grafana_cloud_tempo&amp;#34; {
    username = env(&amp;#34;TEMPO_USERNAME&amp;#34;)
    password = env(&amp;#34;GRAFANA_CLOUD_API_KEY&amp;#34;)
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/otelcol.exporter.otlphttp/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;tr&gt;
              &lt;td&gt;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics that this component generates to monitor its state.&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;The target URL 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;encoding&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The encoding to use for messages. Should be either &lt;code&gt;&amp;quot;proto&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;json&amp;quot;&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;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;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;disable_keep_alives&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable HTTP keep-alive.&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;http2_read_idle_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout after which a health check using ping frame will be carried out if no frame is received on the connection.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0s&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;http2_ping_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout after which the connection will be closed if a response to Ping is not received.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;15s&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;p&gt;When setting &lt;code&gt;headers&lt;/code&gt;, note that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Certain headers such as &lt;code&gt;Content-Length&lt;/code&gt; and &lt;code&gt;Connection&lt;/code&gt; are automatically written when needed and values in &lt;code&gt;headers&lt;/code&gt; may be ignored.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Host&lt;/code&gt; header is automatically derived from the &lt;code&gt;endpoint&lt;/code&gt; value. However, this automatic assignment can be overridden by explicitly setting a &lt;code&gt;Host&lt;/code&gt; header in &lt;code&gt;headers&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Setting &lt;code&gt;disable_keep_alives&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; will result in significant overhead establishing a new HTTP(s) connection for every request.
Before enabling this option, consider whether changes to idle connection settings can achieve your goal.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;http2_ping_timeout&lt;/code&gt; is unset or set to &lt;code&gt;0s&lt;/code&gt;, it will default to &lt;code&gt;15s&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;http2_read_idle_timeout&lt;/code&gt; is unset or set to &lt;code&gt;0s&lt;/code&gt;, then no health check will be performed.&lt;/p&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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&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 the same time.&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;/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 doesn&amp;rsquo;t 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; determines how long an endpoint outage is tolerated.
Assuming 100 requests/second, the default queue size &lt;code&gt;1000&lt;/code&gt; provides about 10 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 time in seconds that outages are tolerated. A very high value can cause Out Of Memory (OOM) kills.&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_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 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;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;multiplier&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Factor to grow wait time before retrying.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1.5&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;randomization_factor&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Factor to randomize wait time before retrying.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0.5&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 by the factor specified by the &lt;code&gt;multiplier&lt;/code&gt; argument, which must be greater than &lt;code&gt;1.0&lt;/code&gt;.
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;The &lt;code&gt;randomization_factor&lt;/code&gt; argument is useful for adding jitter between retrying agents.
If &lt;code&gt;randomization_factor&lt;/code&gt; is greater than &lt;code&gt;0&lt;/code&gt;, the wait time before retries is multiplied by a random factor in the range &lt;code&gt;[ I - randomization_factor * I, I &#43; randomization_factor * I]&lt;/code&gt;, where &lt;code&gt;I&lt;/code&gt; is the current interval.&lt;/p&gt;
&lt;p&gt;If a batch hasn&amp;rsquo;t been 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;h3 id=&#34;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&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;http://tempo:4317&amp;#34;
        tls {
            insecure             = true
            insecure_skip_verify = true
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.otlphttp&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/otelcol.exporter.prometheus/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;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_scope_labels&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 additional OTLP labels in all 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;add_metric_suffixes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to add type and unit suffixes to metrics names.&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(MetricsReceiver)&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;tr&gt;
              &lt;td&gt;&lt;code&gt;resource_to_telemetry_conversion&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to convert OTel resource attributes to Prometheus 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;/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.
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_labels&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;  the &lt;code&gt;otel_scope_name&lt;/code&gt; and
&lt;code&gt;otel_scope_version&lt;/code&gt; labels are added to every converted metric sample.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;include_target_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;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;OTLP metrics can have a lot of resource attributes.
Setting &lt;code&gt;resource_to_telemetry_conversion&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; would convert all of them to Prometheus labels, which may not be what you want.
Instead of using &lt;code&gt;resource_to_telemetry_conversion&lt;/code&gt;, most users need to use &lt;code&gt;otelcol.processor.transform&lt;/code&gt;
to convert OTLP resource attributes to OTLP metric datapoint attributes before using &lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt;.
See &lt;a href=&#34;#creating-prometheus-labels-from-otlp-resource-attributes&#34;&gt;Creating Prometheus labels from OTLP resource attributes&lt;/a&gt; for an example.&lt;/p&gt;&lt;/blockquote&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 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;/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;h2 id=&#34;basic-usage&#34;&gt;Basic usage&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;
&lt;h2 id=&#34;create-prometheus-labels-from-otlp-resource-attributes&#34;&gt;Create Prometheus labels from OTLP resource attributes&lt;/h2&gt;
&lt;p&gt;This example uses &lt;code&gt;otelcol.processor.transform&lt;/code&gt; to add extra &lt;code&gt;key1&lt;/code&gt; and &lt;code&gt;key2&lt;/code&gt; OTLP metric datapoint attributes from the
&lt;code&gt;key1&lt;/code&gt; and &lt;code&gt;key2&lt;/code&gt; OTLP resource attributes.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; then converts &lt;code&gt;key1&lt;/code&gt; and &lt;code&gt;key2&lt;/code&gt; to Prometheus labels along with any other OTLP metric datapoint attributes.&lt;/p&gt;
&lt;p&gt;This avoids the need to set &lt;code&gt;resource_to_telemetry_conversion&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;,
which could have created too many unnecessary metric labels.&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.processor.transform.default.input]
  }
}

otelcol.processor.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  metric_statements {
    context = &amp;#34;datapoint&amp;#34;

    statements = [
      `set(attributes[&amp;#34;key1&amp;#34;], resource.attributes[&amp;#34;key1&amp;#34;])`,
      `set(attributes[&amp;#34;key2&amp;#34;], resource.attributes[&amp;#34;key2&amp;#34;])`,
    ]
  }

  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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.exporter.prometheus&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.extension.jaeger_remote_sampling</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.extension.jaeger_remote_sampling/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.extension.jaeger_remote_sampling/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolextensionjaeger_remote_sampling&#34;&gt;otelcol.extension.jaeger_remote_sampling&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.extension.jaeger_remote_sampling&lt;/code&gt; serves a specified Jaeger remote sampling
document.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.extension.jaeger_remote_sampling&lt;/code&gt; is a wrapper over the upstream OpenTelemetry
Collector &lt;code&gt;jaegerremotesampling&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.extension.jaeger_remote_sampling&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.extension.jaeger_remote_sampling &amp;#34;LABEL&amp;#34; {
  source {
  }
}&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.extension.jaeger_remote_sampling&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.extension.jaeger_remote_sampling&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 serve Jaeger remote sampling.&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;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 serve Jaeger remote sampling.&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;source&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#source-block&#34;&gt;source&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the Jaeger remote sampling document.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;source &amp;gt; remote&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#remote-block&#34;&gt;remote&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the gRPC client used to retrieve the Jaeger remote sampling document.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;source &amp;gt; remote &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;source &amp;gt; remote &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;/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 an HTTP server which serves the Jaeger remote
sampling document.&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:5778&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;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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&lt;/p&gt;
&lt;/div&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;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 serves the Jaeger remote
sampling document.&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;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;source-block&#34;&gt;source block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;source&lt;/code&gt; block configures the method of retrieving the Jaeger remote sampling document
that is served by the servers specified in the &lt;code&gt;grpc&lt;/code&gt; and &lt;code&gt;http&lt;/code&gt; blocks.&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;file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A local file containing a Jaeger remote sampling document.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The interval at which to reload the specified file. Leave at 0 to never reload.&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;content&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A string containing the Jaeger remote sampling contents directly.&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;Exactly one of the &lt;code&gt;file&lt;/code&gt; argument, &lt;code&gt;content&lt;/code&gt; argument or &lt;code&gt;remote&lt;/code&gt; block must be specified.&lt;/p&gt;
&lt;h3 id=&#34;remote-block&#34;&gt;remote block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;remote&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;code&gt;pick_first&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;authority&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Overrides the default &lt;code&gt;:authority&lt;/code&gt; header in gRPC requests from the gRPC client.&lt;/td&gt;
              &lt;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;div data-shared=&#34;flow/reference/components/otelcol-grpc-balancer-name.md&#34;&gt;
            &lt;p&gt;The supported values for &lt;code&gt;balancer_name&lt;/code&gt; are listed in 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;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pick_first&lt;/code&gt;: Tries to connect to the first address, uses it for all RPCs if it connects, or tries the next address if it fails (and keeps doing that until one connection is successful).
Because of this, all the RPCs will be sent to the same backend.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;round_robin&lt;/code&gt;: Connects to all the addresses it sees and sends an RPC to each backend one at a time in order.
For example, the first RPC is sent to backend-1, the second RPC is sent to backend-2, and the third RPC is sent to backend-1.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        


&lt;div data-shared=&#34;flow/reference/components/otelcol-grpc-authority.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;:authority&lt;/code&gt; header in gRPC specifies the host to which the request is being sent.
It&amp;rsquo;s similar to the &lt;code&gt;Host&lt;/code&gt; &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;header&lt;/a&gt; in HTTP requests.
By default, the value for &lt;code&gt;:authority&lt;/code&gt; is derived from the endpoint URL used for the gRPC call.
Overriding &lt;code&gt;:authority&lt;/code&gt; could be useful when routing traffic using a proxy like Envoy, which &lt;a href=&#34;https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/route_matching&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;makes routing decisions&lt;/a&gt; based on the value of the &lt;code&gt;:authority&lt;/code&gt; header.&lt;/p&gt;
&lt;/div&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.extension.jaeger_remote_sampling&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-client-block&#34;&gt;tls client 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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;keepalive-client-block&#34;&gt;keepalive client 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;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.extension.jaeger_remote_sampling&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.extension.jaeger_remote_sampling&lt;/code&gt; does not expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;serving-from-a-file&#34;&gt;Serving from a file&lt;/h3&gt;
&lt;p&gt;This example configures the Jaeger remote sampling extension to load a local json document and
serve it over the default http port of 5778. Currently this config style exists for consistency
with upstream Opentelemetry Collector components and may be removed.&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.extension.jaeger_remote_sampling &amp;#34;example&amp;#34; {
  http {
  }
  source {
    file             = &amp;#34;/path/to/jaeger-sampling.json&amp;#34;
    reload_interval  = &amp;#34;10s&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;serving-from-another-component&#34;&gt;Serving from another component&lt;/h3&gt;
&lt;p&gt;This example uses the output of a component to determine what sampling
rules to serve:&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;local.file &amp;#34;sampling&amp;#34; {
  filename  = &amp;#34;/path/to/jaeger-sampling.json&amp;#34;
}

otelcol.extension.jaeger_remote_sampling &amp;#34;example&amp;#34; {
  http {
  }
  source {
    content = local.file.sampling.content
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="otelcolextensionjaeger_remote_sampling">otelcol.extension.jaeger_remote_sampling&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>otelcol.extension.jaeger_remote_sampling&lt;/code> serves a specified Jaeger remote sampling
document.&lt;/p></description></item><item><title>otelcol.processor.attributes</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.attributes/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.attributes/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessorattributes&#34;&gt;otelcol.processor.attributes&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.attributes&lt;/code&gt; accepts telemetry data from other &lt;code&gt;otelcol&lt;/code&gt;
components and modifies attributes of a span, log, or metric.
It also supports the ability to filter and match input data to determine if
it should be included or excluded for attribute modifications.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.processor.attributes&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;attributes&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;You can specify multiple &lt;code&gt;otelcol.processor.attributes&lt;/code&gt; components 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.attributes &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.attributes&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.processor.attributes&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;tr&gt;
              &lt;td&gt;action&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#action-block&#34;&gt;action&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Actions to take on the attributes of incoming metrics/logs/traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#include-block&#34;&gt;include&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Filter for data included in this processor&amp;rsquo;s actions.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include &amp;gt; regexp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#regexp-block&#34;&gt;regexp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Regex cache settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include &amp;gt; attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of attributes to match against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include &amp;gt; resource&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of items to match the resources against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include &amp;gt; library&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of items to match the implementation library against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include &amp;gt; log_severity&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;How to match against a log record&amp;rsquo;s SeverityNumber, if defined.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#exclude-block&#34;&gt;exclude&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Filter for data excluded from this processor&amp;rsquo;s actions&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; regexp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#regexp-block&#34;&gt;regexp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Regex cache settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of attributes to match against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; resource&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of items to match the resources against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; library&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of items to match the implementation library against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; log_severity&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#log_severity-block&#34;&gt;log_severity&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;How to match against a log record&amp;rsquo;s SeverityNumber, if defined.&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;include &amp;gt; attribute&lt;/code&gt;
refers to an &lt;code&gt;attribute&lt;/code&gt; block defined inside an &lt;code&gt;include&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;If both an &lt;code&gt;include&lt;/code&gt; block and an &lt;code&gt;exclude&lt;/code&gt;block are specified, the &lt;code&gt;include&lt;/code&gt; properties are checked before the &lt;code&gt;exclude&lt;/code&gt; properties.&lt;/p&gt;
&lt;h3 id=&#34;action-block&#34;&gt;action block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;action&lt;/code&gt; block configures how to modify the span, log, or metric.&lt;/p&gt;
&lt;p&gt;The following attributes 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 attribute that the action relates 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;action&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The type of action performed.&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;any&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value to populate for the 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;pattern&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A regex pattern.&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;from_attribute&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The attribute from the input data used to populate the attribute 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;from_context&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The context value used to populate the attribute 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;converted_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The type to convert the attribute value to.&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;value&lt;/code&gt; data type must be either a number, string, or boolean.&lt;/p&gt;
&lt;p&gt;The supported values for &lt;code&gt;action&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;insert&lt;/code&gt;: Inserts a new attribute in input data where the key does not already exist.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;key&lt;/code&gt; attribute is required. It specifies the attribute to act upon.&lt;/li&gt;
&lt;li&gt;One of the &lt;code&gt;value&lt;/code&gt;, &lt;code&gt;from_attribute&lt;/code&gt; or &lt;code&gt;from_context&lt;/code&gt; attributes is required.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;update&lt;/code&gt;: Updates an attribute in input data where the key does exist.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;key&lt;/code&gt;attribute is required. It specifies the attribute to act upon.&lt;/li&gt;
&lt;li&gt;One of the &lt;code&gt;value&lt;/code&gt;, &lt;code&gt;from_attribute&lt;/code&gt; or &lt;code&gt;from_context&lt;/code&gt; attributes is required.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;upsert&lt;/code&gt;: Either inserts a new attribute in input data where the key does not already exist
or updates an attribute in input data where the key does exist.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;key&lt;/code&gt;attribute is required. It specifies the attribute to act upon.&lt;/li&gt;
&lt;li&gt;One of the &lt;code&gt;value&lt;/code&gt;, &lt;code&gt;from_attribute&lt;/code&gt; or &lt;code&gt;from_context&lt;/code&gt;attributes is required:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;value&lt;/code&gt; specifies the value to populate for the key.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;from_attribute&lt;/code&gt; specifies the attribute from the input data to use to populate
the value. If the attribute doesn&amp;rsquo;t exist, no action is performed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;from_context&lt;/code&gt; specifies the context value used to populate the attribute value.
If the key is prefixed with &lt;code&gt;metadata.&lt;/code&gt;, the values are searched
in the receiver&amp;rsquo;s transport protocol for additional information like gRPC Metadata or HTTP Headers.
If the key is prefixed with &lt;code&gt;auth.&lt;/code&gt;, the values are searched
in the authentication information set by the server authenticator.
Refer to the server authenticator&amp;rsquo;s documentation part of your pipeline
for more information about which attributes are available.
If the key doesn&amp;rsquo;t exist, no action is performed.
If the key has multiple values the values will be joined with a &lt;code&gt;;&lt;/code&gt; separator.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;hash&lt;/code&gt;: Hashes (SHA1) an existing attribute value.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;key&lt;/code&gt; attribute and/or the &lt;code&gt;pattern&lt;/code&gt; attributes is required.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;extract&lt;/code&gt;: Extracts values using a regular expression rule from the input key to target keys specified in the rule.
If a target key already exists, it will be overridden. Note: It behaves similarly to the Span Processor &lt;code&gt;to_attributes&lt;/code&gt;
setting with the existing attribute as the source.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;key&lt;/code&gt; attribute is required. It specifies the attribute to extract values from. The value of &lt;code&gt;key&lt;/code&gt; is NOT altered.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;pattern&lt;/code&gt; attribute is required. It is the regex pattern used to extract attributes from the value of &lt;code&gt;key&lt;/code&gt;.
The submatchers must be named. If attributes already exist, they will be overwritten.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;convert&lt;/code&gt;: Converts an existing attribute to a specified type.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;key&lt;/code&gt; attribute is required. It specifies the attribute to act upon.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;converted_type&lt;/code&gt; attribute is required and must be one of int, double or string.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;delete&lt;/code&gt;: Deletes an attribute from the input data.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;key&lt;/code&gt; attribute and/or the &lt;code&gt;pattern&lt;/code&gt; attribute is required. It specifies the attribute to act upon.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;include-block&#34;&gt;include block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;include&lt;/code&gt; block provides an option to include data being fed into the &lt;a href=&#34;#action-block&#34;&gt;action&lt;/a&gt; blocks based on the properties of a span, log, or metric records.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/match-properties-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;match_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls how items to match against are interpreted.&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;log_bodies&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 strings that the LogRecord&amp;rsquo;s body field must match against.&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;log_severity_texts&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 strings that the LogRecord&amp;rsquo;s severity text field must match against.&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;metric_names&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 strings to match the metric name against.&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;services&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 items to match the service name against.&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;span_kinds&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 items to match the span kind against.&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;span_names&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 items to match the span name against.&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;match_type&lt;/code&gt; is required and must be set to either &lt;code&gt;&amp;quot;regexp&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;strict&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A match occurs if at least one item in the lists matches.&lt;/p&gt;
&lt;/div&gt;

        
&lt;p&gt;One of the following is also required:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For spans, one of &lt;code&gt;services&lt;/code&gt;, &lt;code&gt;span_names&lt;/code&gt;, &lt;code&gt;span_kinds&lt;/code&gt;, &lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;, &lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;, or &lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt; must be specified
with a non-empty value for a valid configuration. The &lt;code&gt;log_bodies&lt;/code&gt;, &lt;code&gt;log_severity_texts&lt;/code&gt;, &lt;code&gt;log_severity&lt;/code&gt;, and &lt;code&gt;metric_names&lt;/code&gt; attributes are invalid.&lt;/li&gt;
&lt;li&gt;For logs, one of &lt;code&gt;log_bodies&lt;/code&gt;, &lt;code&gt;log_severity_texts&lt;/code&gt;, &lt;code&gt;log_severity&lt;/code&gt;, &lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;, &lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;, or &lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt; must be
specified with a non-empty value for a valid configuration. The &lt;code&gt;span_names&lt;/code&gt;, &lt;code&gt;span_kinds&lt;/code&gt;, &lt;code&gt;metric_names&lt;/code&gt;, and &lt;code&gt;services&lt;/code&gt; attributes are invalid.&lt;/li&gt;
&lt;li&gt;For metrics, &lt;code&gt;metric_names&lt;/code&gt; must be specified with a valid non-empty value for a valid configuration. The &lt;code&gt;span_names&lt;/code&gt;,
&lt;code&gt;span_kinds&lt;/code&gt;, &lt;code&gt;log_bodies&lt;/code&gt;, &lt;code&gt;log_severity_texts&lt;/code&gt;, &lt;code&gt;log_severity&lt;/code&gt;, &lt;code&gt;services&lt;/code&gt;, &lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;, &lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;, and &lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt; attributes are invalid.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the configuration includes filters which are specific to a particular signal type, it is best to include only that signal type in the component&amp;rsquo;s output.
For example, adding a &lt;code&gt;span_names&lt;/code&gt; filter could cause the component to error if logs are configured in the component&amp;rsquo;s outputs.&lt;/p&gt;
&lt;h3 id=&#34;exclude-block&#34;&gt;exclude block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;exclude&lt;/code&gt; block provides an option to exclude data from being fed into the &lt;a href=&#34;#action-block&#34;&gt;action&lt;/a&gt; blocks based on the properties of a span, log, or metric records.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Signals excluded by the &lt;code&gt;exclude&lt;/code&gt; block will still be propagated to downstream components as-is.
If you would like to not propagate certain signals to downstream components,
consider a processor such as &lt;a href=&#34;../otelcol.processor.tail_sampling/&#34;&gt;otelcol.processor.tail_sampling&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div data-shared=&#34;flow/reference/components/match-properties-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;match_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls how items to match against are interpreted.&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;log_bodies&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 strings that the LogRecord&amp;rsquo;s body field must match against.&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;log_severity_texts&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 strings that the LogRecord&amp;rsquo;s severity text field must match against.&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;metric_names&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 strings to match the metric name against.&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;services&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 items to match the service name against.&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;span_kinds&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 items to match the span kind against.&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;span_names&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 items to match the span name against.&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;match_type&lt;/code&gt; is required and must be set to either &lt;code&gt;&amp;quot;regexp&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;strict&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A match occurs if at least one item in the lists matches.&lt;/p&gt;
&lt;/div&gt;

        
&lt;p&gt;One of the following is also required:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For spans, one of &lt;code&gt;services&lt;/code&gt;, &lt;code&gt;span_names&lt;/code&gt;, &lt;code&gt;span_kinds&lt;/code&gt;, &lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;, &lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;, or &lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt; must be specified
with a non-empty value for a valid configuration. The &lt;code&gt;log_bodies&lt;/code&gt;, &lt;code&gt;log_severity_texts&lt;/code&gt;, &lt;code&gt;log_severity&lt;/code&gt;, and &lt;code&gt;metric_names&lt;/code&gt; attributes are invalid.&lt;/li&gt;
&lt;li&gt;For logs, one of &lt;code&gt;log_bodies&lt;/code&gt;, &lt;code&gt;log_severity_texts&lt;/code&gt;, &lt;code&gt;log_severity&lt;/code&gt;, &lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;, &lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;, or &lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt; must be
specified with a non-empty value for a valid configuration. The &lt;code&gt;span_names&lt;/code&gt;, &lt;code&gt;span_kinds&lt;/code&gt;, &lt;code&gt;metric_names&lt;/code&gt;, and &lt;code&gt;services&lt;/code&gt; attributes are invalid.&lt;/li&gt;
&lt;li&gt;For metrics, &lt;code&gt;metric_names&lt;/code&gt; must be specified with a valid non-empty value for a valid configuration. The &lt;code&gt;span_names&lt;/code&gt;,
&lt;code&gt;span_kinds&lt;/code&gt;, &lt;code&gt;log_bodies&lt;/code&gt;, &lt;code&gt;log_severity_texts&lt;/code&gt;, &lt;code&gt;log_severity&lt;/code&gt;, &lt;code&gt;services&lt;/code&gt;, &lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;, &lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;, and &lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt; attributes are invalid.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the configuration includes filters which are specific to a particular signal type, it is best to include only that signal type in the component&amp;rsquo;s output.
For example, adding a &lt;code&gt;span_names&lt;/code&gt; filter could cause the component to error if logs are configured in the component&amp;rsquo;s outputs.&lt;/p&gt;
&lt;h3 id=&#34;regexp-block&#34;&gt;regexp block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-filter-regexp-block.md&#34;&gt;
            &lt;p&gt;This block is an optional configuration for the &lt;code&gt;match_type&lt;/code&gt; of &lt;code&gt;&amp;quot;regexp&amp;quot;&lt;/code&gt;.
It configures a Least Recently Used (LRU) cache.&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;cache_enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Determines whether match results are LRU cached.&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;cache_max_num_entries&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The max number of entries of the LRU cache that stores match results.&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;Enabling &lt;code&gt;cache_enabled&lt;/code&gt; could make subsequent matches faster.
Cache size is unlimited unless &lt;code&gt;cache_max_num_entries&lt;/code&gt; is also specified.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cache_max_num_entries&lt;/code&gt; is ignored if &lt;code&gt;cache_enabled&lt;/code&gt; is false.&lt;/p&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/otelcol-filter-attribute-block.md&#34;&gt;
            &lt;p&gt;This block specifies an attribute to match against:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More than one &lt;code&gt;attribute&lt;/code&gt; block can be defined.&lt;/li&gt;
&lt;li&gt;Only &lt;code&gt;match_type = &amp;quot;strict&amp;quot;&lt;/code&gt; is allowed if &lt;code&gt;attribute&lt;/code&gt; is specified.&lt;/li&gt;
&lt;li&gt;All &lt;code&gt;attribute&lt;/code&gt; blocks must match exactly for a match to occur.&lt;/li&gt;
&lt;/ul&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 attribute key.&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;any&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The attribute value to match against.&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 &lt;code&gt;value&lt;/code&gt; isn&amp;rsquo;t set, any value will match.
The type of &lt;code&gt;value&lt;/code&gt; could be a number, a string, or a boolean.&lt;/p&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/otelcol-filter-resource-block.md&#34;&gt;
            &lt;p&gt;This block specifies items to match the resources against:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More than one &lt;code&gt;resource&lt;/code&gt; block can be defined.&lt;/li&gt;
&lt;li&gt;A match occurs if the input data resources match at least one &lt;code&gt;resource&lt;/code&gt; block.&lt;/li&gt;
&lt;/ul&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 resource key.&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;any&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The resource value to match against.&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 &lt;code&gt;value&lt;/code&gt; is not set, any value will match.
The type of &lt;code&gt;value&lt;/code&gt; could be a number, a string, or a boolean.&lt;/p&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/otelcol-filter-library-block.md&#34;&gt;
            &lt;p&gt;This block specifies properties to match the implementation library against:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More than one &lt;code&gt;library&lt;/code&gt; block can be defined.&lt;/li&gt;
&lt;li&gt;A match occurs if the span&amp;rsquo;s implementation library matches at least one &lt;code&gt;library&lt;/code&gt; block.&lt;/li&gt;
&lt;/ul&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The attribute key.&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;version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The version to match against.&lt;/td&gt;
              &lt;td&gt;null&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;version&lt;/code&gt; is unset, any version matches.
If &lt;code&gt;version&lt;/code&gt; is set to an empty string, it only matches a library version, which is also an empty string.&lt;/p&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/otelcol-filter-log-severity-block.md&#34;&gt;
            &lt;p&gt;This block defines how to match based on a log record&amp;rsquo;s SeverityNumber field.&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_undefined&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether logs with &amp;ldquo;undefined&amp;rdquo; severity match.&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;min&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The lowest severity that may be matched.&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;If &lt;code&gt;match_undefined&lt;/code&gt; is true, entries with undefined severity will match.&lt;/p&gt;
&lt;p&gt;The following table lists the severities supported by OTel.
The value for &lt;code&gt;min&lt;/code&gt; should be one of the values in the &amp;ldquo;Log Severity&amp;rdquo; column.&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;Log Severity&lt;/th&gt;
              &lt;th&gt;Severity number&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;TRACE&lt;/td&gt;
              &lt;td&gt;1&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;TRACE2&lt;/td&gt;
              &lt;td&gt;2&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;TRACE3&lt;/td&gt;
              &lt;td&gt;3&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;TRACE4&lt;/td&gt;
              &lt;td&gt;4&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;DEBUG&lt;/td&gt;
              &lt;td&gt;5&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;DEBUG2&lt;/td&gt;
              &lt;td&gt;6&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;DEBUG3&lt;/td&gt;
              &lt;td&gt;7&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;DEBUG4&lt;/td&gt;
              &lt;td&gt;8&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;INFO&lt;/td&gt;
              &lt;td&gt;9&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;INFO2&lt;/td&gt;
              &lt;td&gt;10&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;INFO3&lt;/td&gt;
              &lt;td&gt;11&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;INFO4&lt;/td&gt;
              &lt;td&gt;12&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;WARN&lt;/td&gt;
              &lt;td&gt;13&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;WARN2&lt;/td&gt;
              &lt;td&gt;14&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;WARN3&lt;/td&gt;
              &lt;td&gt;15&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;WARN4&lt;/td&gt;
              &lt;td&gt;16&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;ERROR&lt;/td&gt;
              &lt;td&gt;17&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;ERROR2&lt;/td&gt;
              &lt;td&gt;18&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;ERROR3&lt;/td&gt;
              &lt;td&gt;19&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;ERROR4&lt;/td&gt;
              &lt;td&gt;20&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;FATAL&lt;/td&gt;
              &lt;td&gt;21&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;FATAL2&lt;/td&gt;
              &lt;td&gt;22&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;FATAL3&lt;/td&gt;
              &lt;td&gt;23&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;FATAL4&lt;/td&gt;
              &lt;td&gt;24&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, if the &lt;code&gt;min&lt;/code&gt; attribute in the &lt;code&gt;log_severity&lt;/code&gt; block is &amp;ldquo;INFO&amp;rdquo;, then INFO, WARN, ERROR, and FATAL logs will match.&lt;/p&gt;
&lt;/div&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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.attributes&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.attributes&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;various-uses-of-the-action-block&#34;&gt;Various uses of the &amp;ldquo;action&amp;rdquo; block&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
  http {}
  grpc {}

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

otelcol.processor.attributes &amp;#34;default&amp;#34; {
    // Inserts a new attribute &amp;#34;attribute1&amp;#34; to spans where
    // the key &amp;#34;attribute1&amp;#34; doesn&amp;#39;t exist.
    // The type of `attribute1` is inferred by the configuration.
    // `123` is an integer and is stored as an integer in the attributes.
    action {
        key = &amp;#34;attribute1&amp;#34;
        value = 123
        action = &amp;#34;insert&amp;#34;
    }

    // Inserts a new attribute with a key of &amp;#34;string key&amp;#34; and
    // a string value of &amp;#34;anotherkey&amp;#34;.
    action {
        key = &amp;#34;string key&amp;#34;
        value = &amp;#34;anotherkey&amp;#34;
        action = &amp;#34;insert&amp;#34;
    }

    // Setting an attribute on all spans.
    // Any spans that already had `region` now have value `planet-earth`.
    // This can be done to set properties for all traces without
    // requiring an instrumentation change.
    action {
        key = &amp;#34;region&amp;#34;
        value = &amp;#34;planet-earth&amp;#34;
        action = &amp;#34;upsert&amp;#34;
    }

    // The following demonstrates copying a value to a new key.
    // If a span doesn&amp;#39;t contain `user_key`, no new attribute `new_user_key` is created.
    action {
        key = &amp;#34;new_user_key&amp;#34;
        from_attribute = &amp;#34;user_key&amp;#34;
        action = &amp;#34;upsert&amp;#34;
    }

    // Hashing existing attribute values.
    action {
        key = &amp;#34;user.email&amp;#34;
        action = &amp;#34;hash&amp;#34;
    }

    // Uses the value from key `example_user_key` to upsert attributes
    // to the target keys specified in the `pattern`.
    // (Insert attributes for target keys that do not exist and update keys that exist.)
    // Given example_user_key = /api/v1/document/12345678/update/v1
    // then the following attributes will be inserted:
    // new_example_user_key: 12345678
    // version: v1
    //
    // Note: Similar to the Span Processor, if a target key already exists,
    // it will be updated.
    //
    // Note: The regex pattern is enclosed in backticks instead of quotation marks.
    // This constitutes a raw River string, and lets us avoid the need to escape backslash characters.
    action {
        key = &amp;#34;example_user_key&amp;#34;
        pattern = `\/api\/v1\/document\/(?P&amp;lt;new_user_key&amp;gt;.*)\/update\/(?P&amp;lt;version&amp;gt;.*)$`
        action = &amp;#34;extract&amp;#34;
    }

    // Converting the type of an existing attribute value.
    action {
        key = &amp;#34;http.status_code&amp;#34;
        converted_type = &amp;#34;int&amp;#34;
        action = &amp;#34;convert&amp;#34;
    }

    // Deleting keys from an attribute.
    action {
        key = &amp;#34;credit_card&amp;#34;
        action = &amp;#34;delete&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;
&lt;h3 id=&#34;excluding-spans-based-on-attributes&#34;&gt;Excluding spans based on attributes&lt;/h3&gt;
&lt;p&gt;For example, the following spans match the properties and won&amp;rsquo;t be processed by the processor:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Span1 Name: &amp;ldquo;svcB&amp;rdquo;, Attributes: {env: &amp;ldquo;dev&amp;rdquo;, test_request: 123, credit_card: 1234}&lt;/li&gt;
&lt;li&gt;Span2 Name: &amp;ldquo;svcA&amp;rdquo;, Attributes: {env: &amp;ldquo;dev&amp;rdquo;, test_request: false}&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following spans do not match the properties and the processor actions are applied to it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Span3 Name: &amp;ldquo;svcB&amp;rdquo;, Attributes: {env: 1, test_request: &amp;ldquo;dev&amp;rdquo;, credit_card: 1234}&lt;/li&gt;
&lt;li&gt;Span4 Name: &amp;ldquo;svcC&amp;rdquo;, Attributes: {env: &amp;ldquo;dev&amp;rdquo;, test_request: false}&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that due to the presence of the &lt;code&gt;services&lt;/code&gt; attribute, this configuration works only for
trace signals. This is why only traces are configured in the &lt;code&gt;output&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;otelcol.processor.attributes &amp;#34;default&amp;#34; {
    exclude {
        match_type = &amp;#34;strict&amp;#34;
        services = [&amp;#34;svcA&amp;#34;, &amp;#34;svcB&amp;#34;]
        attribute {
            key = &amp;#34;env&amp;#34;
            value = &amp;#34;dev&amp;#34;
        }
        attribute {
            key = &amp;#34;test_request&amp;#34;
        }
    }
    action {
        key = &amp;#34;credit_card&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }
    action {
        key = &amp;#34;duplicate_key&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }
    output {
        traces  = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;excluding-spans-based-on-resources&#34;&gt;Excluding spans based on resources&lt;/h3&gt;
&lt;p&gt;A &amp;ldquo;strict&amp;rdquo; &lt;code&gt;match_type&lt;/code&gt; means that we must strictly match the &lt;code&gt;resource&lt;/code&gt; key/value pairs.&lt;/p&gt;
&lt;p&gt;Note that the &lt;code&gt;resource&lt;/code&gt; attribute is not used for metrics, which is why metrics are not configured
in the component output.&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.attributes &amp;#34;default&amp;#34; {
    exclude {
        match_type = &amp;#34;strict&amp;#34;
        resource {
            key = &amp;#34;host.type&amp;#34;
            value = &amp;#34;n1-standard-1&amp;#34;
        }
    }
    action {
        key = &amp;#34;credit_card&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }
    action {
        key = &amp;#34;duplicate_key&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }
    output {
        logs    = [otelcol.exporter.otlp.default.input]
        traces  = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;excluding-spans-based-on-a-specific-library-version&#34;&gt;Excluding spans based on a specific library version&lt;/h3&gt;
&lt;p&gt;A &amp;ldquo;strict&amp;rdquo; &lt;code&gt;match_type&lt;/code&gt; means that we must strictly match the &lt;code&gt;library&lt;/code&gt; key/value pairs.&lt;/p&gt;
&lt;p&gt;Note that the &lt;code&gt;library&lt;/code&gt; attribute is not used for metrics, which is why metrics are not configured
in the component output.&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.attributes &amp;#34;default&amp;#34; {
    exclude {
        match_type = &amp;#34;strict&amp;#34;
        library {
            name = &amp;#34;mongo-java-driver&amp;#34;
            version = &amp;#34;3.8.0&amp;#34;
        }
    }
    action {
        key = &amp;#34;credit_card&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }
    action {
        key = &amp;#34;duplicate_key&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }
    output {
        logs    = [otelcol.exporter.otlp.default.input]
        traces  = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;including-and-excluding-spans-based-on-regex-and-services&#34;&gt;Including and excluding spans based on regex and services&lt;/h3&gt;
&lt;p&gt;This processor will remove the &amp;ldquo;token&amp;rdquo; attribute and will obfuscate the &amp;ldquo;password&amp;rdquo; attribute
in spans where the service name matches &lt;code&gt;&amp;quot;auth.*&amp;quot;&lt;/code&gt; and where the span name does not match &lt;code&gt;&amp;quot;login.*&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Note that due to the presence of the &lt;code&gt;services&lt;/code&gt; and &lt;code&gt;span_names&lt;/code&gt; attributes, this configuration
works only for trace signals. This is why only traces are configured in the &lt;code&gt;output&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;otelcol.processor.attributes &amp;#34;default&amp;#34; {
    // Specifies the span properties that must exist for the processor to be applied.
    include {
        // &amp;#34;match_type&amp;#34; defines that &amp;#34;services&amp;#34; is an array of regexp-es.
        match_type = &amp;#34;regexp&amp;#34;
        // The span service name must match &amp;#34;auth.*&amp;#34; pattern.
        services = [&amp;#34;auth.*&amp;#34;]
    }

    exclude {
        // &amp;#34;match_type&amp;#34; defines that &amp;#34;span_names&amp;#34; is an array of regexp-es.
        match_type = &amp;#34;regexp&amp;#34;
        // The span name must not match &amp;#34;login.*&amp;#34; pattern.
        span_names = [&amp;#34;login.*&amp;#34;]
    }

    action {
        key = &amp;#34;password&amp;#34;
        action = &amp;#34;update&amp;#34;
        value = &amp;#34;obfuscated&amp;#34;
    }

    action {
        key = &amp;#34;token&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }

    output {
        traces  = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;including-spans-based-on-regex-and-attributes&#34;&gt;Including spans based on regex and attributes&lt;/h3&gt;
&lt;p&gt;The following demonstrates how to process spans with attributes that match a regexp pattern.
This processor will obfuscate the &amp;ldquo;db.statement&amp;rdquo; attribute in spans where the &amp;ldquo;db.statement&amp;rdquo; attribute
matches a regex pattern.&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.attributes &amp;#34;default&amp;#34; {
    include {
        // &amp;#34;match_type&amp;#34; of &amp;#34;regexp&amp;#34; defines that the &amp;#34;value&amp;#34; attributes 
        // in the &amp;#34;attribute&amp;#34; blocks are regexp-es.
        match_type = &amp;#34;regexp&amp;#34;

        // This attribute (&amp;#39;db.statement&amp;#39;) must exist in the span and match 
        // the regex (&amp;#39;SELECT \* FROM USERS.*&amp;#39;) for a match.
        attribute {
            key = &amp;#34;db.statement&amp;#34;
            value = &amp;#34;SELECT \* FROM USERS.*&amp;#34;
        }
    }

    action {
        key = &amp;#34;db.statement&amp;#34;
        action = &amp;#34;update&amp;#34;
        value = &amp;#34;SELECT * FROM USERS [obfuscated]&amp;#34;
    }

    output {
        metrics = [otelcol.exporter.otlp.default.input]
        logs    = [otelcol.exporter.otlp.default.input]
        traces  = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;including-spans-based-on-regex-of-log-body&#34;&gt;Including spans based on regex of log body&lt;/h3&gt;
&lt;p&gt;This processor will remove the &amp;ldquo;token&amp;rdquo; attribute and will obfuscate the &amp;ldquo;password&amp;rdquo;
attribute in spans where the log body matches &amp;ldquo;AUTH.*&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Note that due to the presence of the &lt;code&gt;log_bodies&lt;/code&gt; attribute, this configuration works only for
log signals. This is why only logs are configured in the &lt;code&gt;output&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;otelcol.processor.attributes &amp;#34;default&amp;#34; {
    include {
        match_type = &amp;#34;regexp&amp;#34;
        log_bodies = [&amp;#34;AUTH.*&amp;#34;]
    }
    action {
        key = &amp;#34;password&amp;#34;
        action = &amp;#34;update&amp;#34;
        value = &amp;#34;obfuscated&amp;#34;
    }
    action {
        key = &amp;#34;token&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }

    output {
        logs    = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;including-spans-based-on-regex-of-log-severity&#34;&gt;Including spans based on regex of log severity&lt;/h3&gt;
&lt;p&gt;The following demonstrates how to process logs that have a severity level which is equal to or higher than
the level specified in the &lt;code&gt;log_severity&lt;/code&gt; block. This processor will remove the &amp;ldquo;token&amp;rdquo; attribute and will
obfuscate the &amp;ldquo;password&amp;rdquo; attribute in logs where the severity is at least &amp;ldquo;INFO&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Note that due to the presence of the &lt;code&gt;log_severity&lt;/code&gt; attribute, this configuration works only for
log signals. This is why only logs are configured in the &lt;code&gt;output&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;otelcol.processor.attributes &amp;#34;default&amp;#34; {
    include {
        match_type = &amp;#34;regexp&amp;#34;
		log_severity {
			min = &amp;#34;INFO&amp;#34;
			match_undefined = true
		}
    }
    action {
        key = &amp;#34;password&amp;#34;
        action = &amp;#34;update&amp;#34;
        value = &amp;#34;obfuscated&amp;#34;
    }
    action {
        key = &amp;#34;token&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }

    output {
        logs    = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;including-spans-based-on-regex-of-log-severity-text&#34;&gt;Including spans based on regex of log severity text&lt;/h3&gt;
&lt;p&gt;The following demonstrates how to process logs that have a severity text that match regexp
patterns. This processor will remove the &amp;ldquo;token&amp;rdquo; attribute and will obfuscate the &amp;ldquo;password&amp;rdquo;
attribute in logs where severity matches &amp;ldquo;info&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Note that due to the presence of the &lt;code&gt;log_severity_texts&lt;/code&gt; attribute, this configuration works only for
log signals. This is why only logs are configured in the &lt;code&gt;output&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;otelcol.processor.attributes &amp;#34;default&amp;#34; {
    include {
        match_type = &amp;#34;regexp&amp;#34;
        log_severity_texts = [&amp;#34;info.*&amp;#34;]
    }
    action {
        key = &amp;#34;password&amp;#34;
        action = &amp;#34;update&amp;#34;
        value = &amp;#34;obfuscated&amp;#34;
    }
    action {
        key = &amp;#34;token&amp;#34;
        action = &amp;#34;delete&amp;#34;
    }

    output {
        logs    = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;including-metrics-based-on-metric-names&#34;&gt;Including metrics based on metric names&lt;/h3&gt;
&lt;p&gt;The following demonstrates how to process metrics that have a name starting with &amp;ldquo;counter&amp;rdquo;.
This processor will add a label called &amp;ldquo;important_label&amp;rdquo; with a value of &amp;ldquo;label_val&amp;rdquo; to the metric.
If the label already exists, its value will be updated.&lt;/p&gt;
&lt;p&gt;Note that due to the presence of the &lt;code&gt;metric_names&lt;/code&gt; attribute, this configuration works only for
metric signals. This is why only metrics are configured in the &lt;code&gt;output&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;otelcol.processor.attributes &amp;#34;default&amp;#34; {
	include {
		match_type = &amp;#34;regexp&amp;#34;
		metric_names = [&amp;#34;counter.*&amp;#34;]
	}
	action {
		key = &amp;#34;important_label&amp;#34;
		action = &amp;#34;upsert&amp;#34;
		value = &amp;#34;label_val&amp;#34;
	}

    output {
        metrics = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.attributes&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.attributes&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolprocessorattributes">otelcol.processor.attributes&lt;/h1>
&lt;p>&lt;code>otelcol.processor.attributes&lt;/code> accepts telemetry data from other &lt;code>otelcol&lt;/code>
components and modifies attributes of a span, log, or metric.
It also supports the ability to filter and match input data to determine if
it should be included or excluded for attribute modifications.&lt;/p></description></item><item><title>otelcol.processor.batch</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.batch/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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. This processor supports both size and time based batching.&lt;/p&gt;
&lt;p&gt;We strongly recommend that you configure the batch processor on every Agent that
uses OpenTelemetry (otelcol) Flow components.  The batch processor should be
defined in the pipeline after the &lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt; as well
as any sampling processors. This is because batching should happen after any
data drops such as sampling.&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;tr&gt;
              &lt;td&gt;&lt;code&gt;metadata_keys&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Creates a different batcher for each key/value combination of metadata.&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;metadata_cardinality_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit of the unique metadata key/value combinations.&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;/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 is greater than
or equal to 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;Logs, traces, and metrics are processed independently.
For example, if &lt;code&gt;send_batch_size&lt;/code&gt; is set to &lt;code&gt;1000&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The processor may, at the same time, buffer 1,000 spans,
1,000 log lines, and 1,000 metric samples before flushing them.&lt;/li&gt;
&lt;li&gt;If there are enough spans for a batch of spans (1,000 or more), but not enough for a
batch of metric samples (less than 1,000) then only the spans will be flushed.&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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When set to &lt;code&gt;0&lt;/code&gt;, batches can be any size.&lt;/li&gt;
&lt;li&gt;When set to a non-zero value, &lt;code&gt;send_batch_max_size&lt;/code&gt; must be greater than or equal to &lt;code&gt;send_batch_size&lt;/code&gt;.
Every batch will contain up to the &lt;code&gt;send_batch_max_size&lt;/code&gt; number of spans, log lines, or metric samples.
The excess spans, log lines, or metric samples will not be lost - instead, they will be added to
the next batch.&lt;/li&gt;
&lt;/ul&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 8,000 batched spans. If the batch processor receives 8,000 more
spans at once, its behavior depends on how &lt;code&gt;send_batch_max_size&lt;/code&gt; is configured:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;send_batch_max_size&lt;/code&gt; is set to &lt;code&gt;0&lt;/code&gt;, the total batch size would be 16,000
which would then be flushed as a single batch.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;send_batch_max_size&lt;/code&gt; is set to &lt;code&gt;10000&lt;/code&gt;, then the total batch size will be
10,000 and the remaining 6,000 spans will be flushed in a subsequent batch.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;metadata_cardinality_limit&lt;/code&gt; applies for the lifetime of the process.&lt;/p&gt;
&lt;p&gt;Receivers should be configured with &lt;code&gt;include_metadata = true&lt;/code&gt; so that metadata
keys are available to the processor.&lt;/p&gt;
&lt;p&gt;Each distinct combination of metadata triggers the allocation of a new
background task in the Agent that runs for the lifetime of the process, and each
background task holds one pending batch of up to &lt;code&gt;send_batch_size&lt;/code&gt; records. Batching
by metadata can therefore substantially increase the amount of memory dedicated to batching.&lt;/p&gt;
&lt;p&gt;The maximum number of distinct combinations is limited to the configured &lt;code&gt;metadata_cardinality_limit&lt;/code&gt;,
which defaults to 1000 to limit memory impact.&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;processor_batch_batch_send_size_ratio&lt;/code&gt; (histogram): Number of units in the batch.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;processor_batch_metadata_cardinality_ratio&lt;/code&gt; (gauge): Number of distinct metadata value combinations being processed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;processor_batch_timeout_trigger_send_ratio_total&lt;/code&gt; (counter): Number of times the batch was sent due to a timeout trigger.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;processor_batch_batch_size_trigger_send_ratio_total&lt;/code&gt; (counter): Number of times the batch was sent due to a size trigger.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;basic-usage&#34;&gt;Basic usage&lt;/h3&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;
&lt;h3 id=&#34;batching-with-a-timeout&#34;&gt;Batching with a timeout&lt;/h3&gt;
&lt;p&gt;This example will buffer up to 10,000 spans, metric data points, or log records for up to 10 seconds.
Because &lt;code&gt;send_batch_max_size&lt;/code&gt; is not set, the batch size may exceed 10,000.&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; {
  timeout = &amp;#34;10s&amp;#34;
  send_batch_size = 10000

  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;
&lt;h3 id=&#34;batching-based-on-metadata&#34;&gt;Batching based on metadata&lt;/h3&gt;
&lt;p&gt;Batching by metadata enables support for multi-tenant OpenTelemetry pipelines
with batching over groups of data having the same authorization metadata.&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 {
      include_metadata = true
    }
    thrift_http {}
    thrift_binary {}
    thrift_compact {}
  }

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

otelcol.processor.batch &amp;#34;default&amp;#34; {
  // batch data by tenant id
  metadata_keys = [&amp;#34;tenant_id&amp;#34;]
  // limit to 10 batcher processes before raising errors
  metadata_cardinality_limit = 123

  output {
    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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.batch&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.batch&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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. This processor supports both size and time based batching.&lt;/p></description></item><item><title>otelcol.processor.discovery</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.discovery/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.discovery/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessordiscovery&#34;&gt;otelcol.processor.discovery&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.discovery&lt;/code&gt; accepts traces telemetry data from other &lt;code&gt;otelcol&lt;/code&gt;
components. It can be paired with &lt;code&gt;discovery.*&lt;/code&gt; components, which supply a list
of labels for each discovered target.
&lt;code&gt;otelcol.processor.discovery&lt;/code&gt; adds resource attributes to spans which have a hostname
matching the one in the &lt;code&gt;__address__&lt;/code&gt; label provided by the &lt;code&gt;discovery.*&lt;/code&gt; component.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;otelcol.processor.discovery&lt;/code&gt; is a custom component unrelated to any
processors from the OpenTelemetry Collector.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Multiple &lt;code&gt;otelcol.processor.discovery&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;It can be difficult to follow &lt;a href=&#34;https://github.com/open-telemetry/semantic-conventions/blob/main/docs/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry semantic conventions&lt;/a&gt; when
adding resource attributes via &lt;code&gt;otelcol.processor.discovery&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;discovery.relabel&lt;/code&gt; and most &lt;code&gt;discovery.*&lt;/code&gt; processes such as &lt;code&gt;discovery.kubernetes&lt;/code&gt;
can only emit &lt;a href=&#34;https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus-compatible labels&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Prometheus labels use underscores (&lt;code&gt;_&lt;/code&gt;) in labels names, whereas
&lt;a href=&#34;https://github.com/open-telemetry/semantic-conventions/blob/main/docs/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry semantic conventions&lt;/a&gt; use dots (&lt;code&gt;.&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Although &lt;code&gt;otelcol.processor.discovery&lt;/code&gt; is able to work with non-Prometheus labels
such as ones containing dots, the fact that &lt;code&gt;discovery.*&lt;/code&gt; components are generally
only compatible with Prometheus naming conventions makes it hard to follow OpenTelemetry
semantic conventions in &lt;code&gt;otelcol.processor.discovery&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If your use case is to add resource attributes which contain Kubernetes metadata,
consider using &lt;code&gt;otelcol.processor.k8sattributes&lt;/code&gt; instead.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;The main use case for &lt;code&gt;otelcol.processor.discovery&lt;/code&gt; is for users who migrate to Grafana Agent Flow
from Static mode&amp;rsquo;s &lt;code&gt;prom_sd_operation_type&lt;/code&gt;/&lt;code&gt;prom_sd_pod_associations&lt;/code&gt; &lt;a href=&#34;../../../../static/configuration/traces-config/&#34;&gt;configuration options&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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.discovery &amp;#34;LABEL&amp;#34; {
  targets = [...]
  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.processor.discovery&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 target labels to apply to the spans.&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;operation_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures whether to update a span&amp;rsquo;s attribute if it already exists.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;upsert&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;pod_associations&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures how to decide the hostname of the span.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;ip&amp;quot;, &amp;quot;net.host.ip&amp;quot;, &amp;quot;k8s.pod.ip&amp;quot;, &amp;quot;hostname&amp;quot;, &amp;quot;connection&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;targets&lt;/code&gt; could come from &lt;code&gt;discovery.*&lt;/code&gt; components:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;__address__&lt;/code&gt; label will be matched against the IP address of incoming spans.
&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;__address__&lt;/code&gt; contains a port, it is ignored.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If a match is found, then relabeling rules are applied.
&lt;ul&gt;
&lt;li&gt;Note that labels starting with &lt;code&gt;__&lt;/code&gt; will not be added to the spans.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The supported values for &lt;code&gt;operation_type&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;insert&lt;/code&gt;: Inserts a new resource attribute if the key does not already exist.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;update&lt;/code&gt;: Updates a resource attribute if the key already exists.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;upsert&lt;/code&gt;: Either inserts a new resource attribute if the key does not already exist,
or updates a resource attribute if the key does exist.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The supported values for &lt;code&gt;pod_associations&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ip&lt;/code&gt;: The hostname will be sourced from an &lt;code&gt;ip&lt;/code&gt; resource attribute.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;net.host.ip&lt;/code&gt;: The hostname will be sourced from a &lt;code&gt;net.host.ip&lt;/code&gt; resource attribute.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.ip&lt;/code&gt;: The hostname will be sourced from a &lt;code&gt;k8s.pod.ip&lt;/code&gt; resource attribute.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hostname&lt;/code&gt;: The hostname will be sourced from a &lt;code&gt;host.name&lt;/code&gt; resource attribute.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;connection&lt;/code&gt;: The hostname will be sourced from the context from the incoming requests (gRPC and HTTP).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If multiple &lt;code&gt;pod_associations&lt;/code&gt; methods are enabled, the order of evaluation is honored.
For example, when &lt;code&gt;pod_associations&lt;/code&gt; is &lt;code&gt;[&amp;quot;ip&amp;quot;, &amp;quot;net.host.ip&amp;quot;]&lt;/code&gt;, &lt;code&gt;&amp;quot;net.host.ip&amp;quot;&lt;/code&gt; may be matched
only if &lt;code&gt;&amp;quot;ip&amp;quot;&lt;/code&gt; has not already matched.&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.discovery&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-traces.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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
Configure the &lt;code&gt;traces&lt;/code&gt; argument accordingly to send telemetry data to other components.&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; OTLP-formatted data for telemetry signals of these types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;traces&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.processor.discovery&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.discovery&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;basic-usage&#34;&gt;Basic usage&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;discovery.http &amp;#34;dynamic_targets&amp;#34; {
    url              = &amp;#34;https://example.com/scrape_targets&amp;#34;
    refresh_interval = &amp;#34;15s&amp;#34;
}

otelcol.processor.discovery &amp;#34;default&amp;#34; {
    targets = discovery.http.dynamic_targets.targets

    output {
        traces = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;using-more-than-one-discovery-process&#34;&gt;Using more than one discovery process&lt;/h3&gt;
&lt;p&gt;Outputs from more than one discovery process can be combined via the &lt;code&gt;concat&lt;/code&gt; function.&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.http &amp;#34;dynamic_targets&amp;#34; {
    url              = &amp;#34;https://example.com/scrape_targets&amp;#34;
    refresh_interval = &amp;#34;15s&amp;#34;
}

discovery.kubelet &amp;#34;k8s_pods&amp;#34; {
  bearer_token_file = &amp;#34;/var/run/secrets/kubernetes.io/serviceaccount/token&amp;#34;
  namespaces        = [&amp;#34;default&amp;#34;, &amp;#34;kube-system&amp;#34;]
}

otelcol.processor.discovery &amp;#34;default&amp;#34; {
    targets = concat(discovery.http.dynamic_targets.targets, discovery.kubelet.k8s_pods.targets)

    output {
        traces = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;using-a-preconfigured-list-of-attributes&#34;&gt;Using a preconfigured list of attributes&lt;/h3&gt;
&lt;p&gt;It is not necessary to use a discovery component. In the example below, both a &lt;code&gt;test_label&lt;/code&gt; and
a &lt;code&gt;test.label.with.dots&lt;/code&gt; resource attributes will be added to a span if its IP address is
&amp;ldquo;1.2.2.2&amp;rdquo;. The &lt;code&gt;__internal_label__&lt;/code&gt; will be not be added to the span, because it begins with
a double underscore (&lt;code&gt;__&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.processor.discovery &amp;#34;default&amp;#34; {
    targets = [{
        &amp;#34;__address__&amp;#34;          = &amp;#34;1.2.2.2&amp;#34;, 
        &amp;#34;__internal_label__&amp;#34;   = &amp;#34;test_val&amp;#34;,
        &amp;#34;test_label&amp;#34;           = &amp;#34;test_val2&amp;#34;,
        &amp;#34;test.label.with.dots&amp;#34; = &amp;#34;test.val2.with.dots&amp;#34;}]

    output {
        traces = [otelcol.exporter.otlp.default.input]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.discovery&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.discovery&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="otelcolprocessordiscovery">otelcol.processor.discovery&lt;/h1>
&lt;p>&lt;code>otelcol.processor.discovery&lt;/code> accepts traces telemetry data from other &lt;code>otelcol&lt;/code>
components. It can be paired with &lt;code>discovery.*&lt;/code> components, which supply a list
of labels for each discovered target.
&lt;code>otelcol.processor.discovery&lt;/code> adds resource attributes to spans which have a hostname
matching the one in the &lt;code>__address__&lt;/code> label provided by the &lt;code>discovery.*&lt;/code> component.&lt;/p></description></item><item><title>otelcol.processor.filter</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.filter/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.filter/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessorfilter&#34;&gt;otelcol.processor.filter&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.processor.filter&lt;/code&gt; accepts and filters telemetry data from other &lt;code&gt;otelcol&lt;/code&gt;
components using the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.85.0/pkg/ottl/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Transformation Language (OTTL)&lt;/a&gt;.
If any of the OTTL statements evaluates to true, the telemetry data is dropped.&lt;/p&gt;
&lt;p&gt;OTTL statements consist of &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#converters&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL Converter functions&lt;/a&gt;, which act on paths.
A path is a reference to a telemetry data such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Resource attributes.&lt;/li&gt;
&lt;li&gt;Instrumentation scope name.&lt;/li&gt;
&lt;li&gt;Span attributes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#converters&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;standard OTTL Converter functions&lt;/a&gt;,
the following metrics-only functions are used exclusively by the processor:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/filterprocessor/README.md#hasattrkeyondatapoint&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HasAttrKeyOnDataPoint&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/filterprocessor/README.md#hasattrondatapoint&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HasAttrOnDataPoint&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.85.0/pkg/ottl/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL&lt;/a&gt; statements used in &lt;code&gt;otelcol.processor.filter&lt;/code&gt; mostly contain constructs such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.85.0/pkg/ottl#booleans&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Booleans&lt;/a&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;not true&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;not IsMatch(name, &amp;quot;http_.*&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.85.0/pkg/ottl#math-expressions&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Math expressions&lt;/a&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;1 &#43; 1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;end_time_unix_nano - start_time_unix_nano&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sum([1, 2, 3, 4]) &#43; (10 / 1) - 1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Raw River strings can be used to write OTTL statements.
For example, the OTTL statement &lt;code&gt;attributes[&amp;quot;grpc&amp;quot;] == true&lt;/code&gt;
is written in River as `attributes[&amp;ldquo;grpc&amp;rdquo;] == true`&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;otelcol.processor.filter&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;filter&lt;/code&gt; processor. If necessary, bug reports or feature requests
will be redirected to the upstream repository.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can specify multiple &lt;code&gt;otelcol.processor.filter&lt;/code&gt; components by giving them different labels.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;Exercise caution when using &lt;code&gt;otelcol.processor.filter&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Make sure you understand schema/format of the incoming data and test the configuration thoroughly.
In general, use a configuration that is as specific as possible ensure you retain only the data you want to keep.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector/blob/v0.85.0/docs/standard-warnings.md#orphaned-telemetry&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Orphaned Telemetry&lt;/a&gt;: The processor allows dropping spans. Dropping a span may lead to
orphaned spans if the dropped span is a parent. Dropping a span may lead to orphaned logs
if the log references the dropped span.&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&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.filter &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.filter&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;error_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How to react to errors if they occur while processing a statement.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;propagate&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 supported values for &lt;code&gt;error_mode&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ignore&lt;/code&gt;: Ignore errors returned by conditions, log them, and continue on to the next condition. This is the recommended mode.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;silent&lt;/code&gt;: Ignore errors returned by conditions, do not log them, and continue on to the next condition.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;propagate&lt;/code&gt;: Return the error up the pipeline. This will result in the payload being dropped from Grafana Agent.&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;otelcol.processor.filter&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;traces&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#traces-block&#34;&gt;traces&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Statements which filter traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metrics-block&#34;&gt;metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Statements which filter metrics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;logs&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#logs-block&#34;&gt;logs&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Statements which filter logs.&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;h3 id=&#34;traces-block&#34;&gt;traces block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;traces&lt;/code&gt; block specifies statements that filter trace telemetry signals.
Only one &lt;code&gt;traces&lt;/code&gt; block can be specified.&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;span&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 OTTL statements filtering OTLP spans.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spanevent&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 OTTL statements filtering OTLP span events.&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 syntax of OTTL statements depends on the OTTL context. See the OpenTelemetry documentation for more information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottlspan/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL span context&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottlspanevent/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL spanevent context&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Statements are checked in order from &amp;ldquo;high level&amp;rdquo; to &amp;ldquo;low level&amp;rdquo; telemetry, in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;span&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;spanevent&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If at least one &lt;code&gt;span&lt;/code&gt; condition is satisfied, the &lt;code&gt;spanevent&lt;/code&gt; conditions will not be checked.
Only one of the statements inside the list of statements has to be satisfied.&lt;/p&gt;
&lt;p&gt;If all span events for a span are dropped, the span will be left intact.&lt;/p&gt;
&lt;h3 id=&#34;metrics-block&#34;&gt;metrics block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;metrics&lt;/code&gt; block specifies statements that filter metric telemetry signals.
Only one &lt;code&gt;metrics&lt;/code&gt; blocks can be specified.&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;metric&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 OTTL statements filtering OTLP metric.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;datapoint&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 OTTL statements filtering OTLP metric datapoints.&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 syntax of OTTL statements depends on the OTTL context. See the OpenTelemetry
documentation for more information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottlmetric/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL metric context&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottldatapoint/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL datapoint context&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Statements are checked in order from &amp;ldquo;high level&amp;rdquo; to &amp;ldquo;low level&amp;rdquo; telemetry, in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;metric&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;datapoint&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If at least one &lt;code&gt;metric&lt;/code&gt; condition is satisfied, the &lt;code&gt;datapoint&lt;/code&gt; conditions will not be checked.
Only one of the statements inside the list of statements has to be satisfied.&lt;/p&gt;
&lt;p&gt;If all datapoints for a metric are dropped, the metric will also be dropped.&lt;/p&gt;
&lt;h3 id=&#34;logs-block&#34;&gt;logs block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;logs&lt;/code&gt; block specifies statements that filter log telemetry signals.
Only &lt;code&gt;logs&lt;/code&gt; blocks can be specified.&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;log_record&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 OTTL statements filtering OTLP metric.&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 syntax of OTTL statements depends on the OTTL context. See the OpenTelemetry
documentation for more information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottllog/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL log context&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Only one of the statements inside the list of statements has to be satisfied.&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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.filter&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.filter&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;otelcol.processor.filter&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;drop-spans-which-contain-a-certain-span-attribute&#34;&gt;Drop spans which contain a certain span attribute&lt;/h3&gt;
&lt;p&gt;This example sets the attribute &lt;code&gt;test&lt;/code&gt; to &lt;code&gt;pass&lt;/code&gt; if the attribute &lt;code&gt;test&lt;/code&gt; does not exist.&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.filter &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  traces {
    span = [
      &amp;#34;attributes[\&amp;#34;container.name\&amp;#34;] == \&amp;#34;app_container_1\&amp;#34;&amp;#34;,
    ]
  }

  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Each &lt;code&gt;&amp;quot;&lt;/code&gt; is 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;escaped&lt;/a&gt; with &lt;code&gt;\&amp;quot;&lt;/code&gt; inside the River string.&lt;/p&gt;
&lt;h3 id=&#34;drop-metrics-based-on-either-of-two-criteria&#34;&gt;Drop metrics based on either of two criteria&lt;/h3&gt;
&lt;p&gt;This example drops metrics which satisfy at least one of two OTTL statements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The metric name is &lt;code&gt;my.metric&lt;/code&gt; and there is a &lt;code&gt;my_label&lt;/code&gt; resource attribute with a value of &lt;code&gt;abc123 &lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The metric is a histogram.&lt;/li&gt;
&lt;/ul&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.filter &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  metrics {
    metric = [
       &amp;#34;name == \&amp;#34;my.metric\&amp;#34; and resource.attributes[\&amp;#34;my_label\&amp;#34;] == \&amp;#34;abc123\&amp;#34;&amp;#34;
       &amp;#34;type == METRIC_DATA_TYPE_HISTOGRAM&amp;#34;
    ]
  }

  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Some values in the River string are 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;escaped&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;\&lt;/code&gt; is escaped with &lt;code&gt;\\&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;&lt;/code&gt; is escaped with &lt;code&gt;\&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;drop-non-http-spans-and-sensitive-logs&#34;&gt;Drop non-HTTP spans and sensitive logs&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.processor.filter &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  traces {
    span = [
      &amp;#34;attributes[\&amp;#34;http.request.method\&amp;#34;] == nil&amp;#34;,
    ]
  }

  logs {
    log_record = [
      &amp;#34;IsMatch(body, \&amp;#34;.*password.*\&amp;#34;)&amp;#34;,
      &amp;#34;severity_number &amp;lt; SEVERITY_NUMBER_WARN&amp;#34;,
    ]
  }

  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Each &lt;code&gt;&amp;quot;&lt;/code&gt; is 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;escaped&lt;/a&gt; with &lt;code&gt;\&amp;quot;&lt;/code&gt; inside the River string.&lt;/p&gt;
&lt;p&gt;Some values in the River strings are 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;escaped&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;\&lt;/code&gt; is escaped with &lt;code&gt;\\&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;&lt;/code&gt; is escaped with &lt;code&gt;\&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.filter&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.filter&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolprocessorfilter">otelcol.processor.filter&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>otelcol.processor.filter&lt;/code> accepts and filters telemetry data from other &lt;code>otelcol&lt;/code>
components using the &lt;a href="https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.85.0/pkg/ottl/README.md" target="_blank" rel="noopener noreferrer">OpenTelemetry Transformation Language (OTTL)&lt;/a>.
If any of the OTTL statements evaluates to true, the telemetry data is dropped.&lt;/p></description></item><item><title>otelcol.processor.k8sattributes</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.k8sattributes/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.k8sattributes/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessork8sattributes&#34;&gt;otelcol.processor.k8sattributes&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.k8sattributes&lt;/code&gt; accepts telemetry data from other &lt;code&gt;otelcol&lt;/code&gt;
components and adds Kubernetes metadata to the resource attributes of spans, logs, or metrics.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;otelcol.processor.k8sattributes&lt;/code&gt; is a wrapper over the upstream OpenTelemetry
Collector &lt;code&gt;k8sattributes&lt;/code&gt; processor. If necessary, bug reports or feature requests
will be redirected to the upstream repository.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can specify multiple &lt;code&gt;otelcol.processor.k8sattributes&lt;/code&gt; components 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.k8sattributes &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;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;auth_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authentication method when connecting to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;serviceAccount&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;passthrough&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Passthrough signals as-is, only adding a &lt;code&gt;k8s.pod.ip&lt;/code&gt; resource attribute.&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 supported values for &lt;code&gt;auth_type&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;none&lt;/code&gt;: No authentication is required.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;serviceAccount&lt;/code&gt;: Use the built-in service account that Kubernetes automatically provisions for each pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubeConfig&lt;/code&gt;: Use local credentials like those used by kubectl.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tls&lt;/code&gt;: Use client TLS authentication.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Setting &lt;code&gt;passthrough&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; enables the &amp;ldquo;passthrough mode&amp;rdquo; of &lt;code&gt;otelcol.processor.k8sattributes&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Only a &lt;code&gt;k8s.pod.ip&lt;/code&gt; resource attribute will be added.&lt;/li&gt;
&lt;li&gt;No other metadata will be added.&lt;/li&gt;
&lt;li&gt;The Kubernetes API will not be accessed.&lt;/li&gt;
&lt;li&gt;To correctly detect the pod IPs, Grafana Agent must receive spans directly from services.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;passthrough&lt;/code&gt; setting is useful when configuring the Agent as a Kubernetes Deployment.
A Grafana Agent running as a Deployment cannot detect the IP addresses of pods generating telemetry
data without any of the well-known IP attributes. If the Deployment Grafana Agent receives telemetry from
Grafana Agents deployed as DaemonSet, then some of those attributes might be missing. As a workaround,
you can configure the DaemonSet Grafana Agents with &lt;code&gt;passthrough&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt;.&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;otelcol.processor.k8sattributes&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;tr&gt;
              &lt;td&gt;extract&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#extract-block&#34;&gt;extract&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Rules for extracting data from Kubernetes.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;extract &amp;gt; annotation&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#annotation-block&#34;&gt;annotation&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Creating resource attributes from Kubernetes annotations.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;extract &amp;gt; label&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#extract-label-block&#34;&gt;extract_label&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Creating resource attributes from Kubernetes labels.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&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 the data loaded from Kubernetes.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;filter &amp;gt; field&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#field-block&#34;&gt;field&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Filter pods by generic Kubernetes fields.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;filter &amp;gt; label&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#filter-label-block&#34;&gt;filter_label&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Filter pods by Kubernetes labels.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;pod_association&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#pod_association-block&#34;&gt;pod_association&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Rules to associate pod metadata with telemetry signals.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;pod_association &amp;gt; source&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#source-block&#34;&gt;source&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Source information to identify a pod.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#exclude-block&#34;&gt;exclude&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Exclude pods from being processed.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; pod&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#pod-block&#34;&gt;pod&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Pod information.&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;extract &amp;gt; annotation&lt;/code&gt;
refers to an &lt;code&gt;annotation&lt;/code&gt; block defined inside an &lt;code&gt;extract&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;extract-block&#34;&gt;extract block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;extract&lt;/code&gt; block configures which metadata, annotations, and labels to extract from the pod.&lt;/p&gt;
&lt;p&gt;The following attributes 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;metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Pre-configured metadata keys to add.&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;The currently supported &lt;code&gt;metadata&lt;/code&gt; keys are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.uid&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.deployment.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.node.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.namespace.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.start_time&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.replicaset.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.replicaset.uid&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.daemonset.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.daemonset.uid&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.job.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.job.uid&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.cronjob.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.statefulset.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.statefulset.uid&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.container.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container.image.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container.image.tag&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container.id&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By default, if &lt;code&gt;metadata&lt;/code&gt; is not specified, the following fields are extracted and added to spans, metrics, and logs as resource attributes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.uid&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.start_time&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.namespace.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.node.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.deployment.name&lt;/code&gt; (if the pod is controlled by a deployment)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.container.name&lt;/code&gt; (requires an additional attribute to be set: &lt;code&gt;container.id&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container.image.name&lt;/code&gt; (requires one of the following additional attributes to be set: &lt;code&gt;container.id&lt;/code&gt; or &lt;code&gt;k8s.container.name&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container.image.tag&lt;/code&gt; (requires one of the following additional attributes to be set: &lt;code&gt;container.id&lt;/code&gt; or &lt;code&gt;k8s.container.name&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;annotation-block&#34;&gt;annotation block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;annotation&lt;/code&gt; block configures how to extract Kubernetes annotations.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/extract-field-block.md&#34;&gt;
            &lt;p&gt;The following attributes 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;from&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The source of the labels or annotations. Allowed values are &lt;code&gt;pod&lt;/code&gt;, &lt;code&gt;namespace&lt;/code&gt;, and &lt;code&gt;node&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;pod&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;key_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A regular expression used to extract a key that matches the 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;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The annotation or label name. This key must exactly match an annotation or label name.&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;regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An optional field used to extract a sub-string from a complex field 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;tag_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of the resource attribute added to logs, metrics, or spans.&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;When you don&amp;rsquo;t specify the &lt;code&gt;tag_name&lt;/code&gt;, a default tag name is used with the format:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.annotations.&amp;lt;annotation key&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.labels.&amp;lt;label key&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, if &lt;code&gt;tag_name&lt;/code&gt; isn&amp;rsquo;t specified and the key is &lt;code&gt;git_sha&lt;/code&gt;, the attribute name will be &lt;code&gt;k8s.pod.annotations.git_sha&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can set either the &lt;code&gt;key&lt;/code&gt; attribute or the &lt;code&gt;key_regex&lt;/code&gt; attribute, but not both.
When &lt;code&gt;key_regex&lt;/code&gt; is present, &lt;code&gt;tag_name&lt;/code&gt; supports back reference to both named capturing and positioned capturing.&lt;/p&gt;
&lt;p&gt;For example, assume your pod spec contains the following labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;app.kubernetes.io/component: mysql&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;app.kubernetes.io/version: 5.7.21&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;d like to add tags for all labels with the prefix &lt;code&gt;app.kubernetes.io/&lt;/code&gt; and trim the prefix, then you can specify the following extraction rules:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;extract {
	label {
	    from = &amp;#34;pod&amp;#34;
		key_regex = &amp;#34;kubernetes.io/(.*)&amp;#34;
		tag_name  = &amp;#34;$1&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These rules add the &lt;code&gt;component&lt;/code&gt; and &lt;code&gt;version&lt;/code&gt; tags to the spans or metrics.&lt;/p&gt;
&lt;p&gt;You can set the &lt;code&gt;from&lt;/code&gt; attribute to either &lt;code&gt;&amp;quot;pod&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;namespace&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;extract-label-block&#34;&gt;label block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;label&lt;/code&gt; block configures how to extract Kubernetes labels.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/extract-field-block.md&#34;&gt;
            &lt;p&gt;The following attributes 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;from&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The source of the labels or annotations. Allowed values are &lt;code&gt;pod&lt;/code&gt;, &lt;code&gt;namespace&lt;/code&gt;, and &lt;code&gt;node&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;pod&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;key_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A regular expression used to extract a key that matches the 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;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The annotation or label name. This key must exactly match an annotation or label name.&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;regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An optional field used to extract a sub-string from a complex field 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;tag_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of the resource attribute added to logs, metrics, or spans.&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;When you don&amp;rsquo;t specify the &lt;code&gt;tag_name&lt;/code&gt;, a default tag name is used with the format:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.annotations.&amp;lt;annotation key&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.labels.&amp;lt;label key&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, if &lt;code&gt;tag_name&lt;/code&gt; isn&amp;rsquo;t specified and the key is &lt;code&gt;git_sha&lt;/code&gt;, the attribute name will be &lt;code&gt;k8s.pod.annotations.git_sha&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can set either the &lt;code&gt;key&lt;/code&gt; attribute or the &lt;code&gt;key_regex&lt;/code&gt; attribute, but not both.
When &lt;code&gt;key_regex&lt;/code&gt; is present, &lt;code&gt;tag_name&lt;/code&gt; supports back reference to both named capturing and positioned capturing.&lt;/p&gt;
&lt;p&gt;For example, assume your pod spec contains the following labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;app.kubernetes.io/component: mysql&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;app.kubernetes.io/version: 5.7.21&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;d like to add tags for all labels with the prefix &lt;code&gt;app.kubernetes.io/&lt;/code&gt; and trim the prefix, then you can specify the following extraction rules:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;extract {
	label {
	    from = &amp;#34;pod&amp;#34;
		key_regex = &amp;#34;kubernetes.io/(.*)&amp;#34;
		tag_name  = &amp;#34;$1&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These rules add the &lt;code&gt;component&lt;/code&gt; and &lt;code&gt;version&lt;/code&gt; tags to the spans or metrics.&lt;/p&gt;
&lt;p&gt;You can set the &lt;code&gt;from&lt;/code&gt; attribute to either &lt;code&gt;&amp;quot;pod&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;namespace&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;/div&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 which nodes to get data from and which fields and labels to fetch.&lt;/p&gt;
&lt;p&gt;The following attributes 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;node&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures a Kubernetes node name or host name.&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;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filters all pods by the provided namespace. All other pods are ignored.&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;If &lt;code&gt;node&lt;/code&gt; is specified, then any pods not running on the specified node will be ignored by &lt;code&gt;otelcol.processor.k8sattributes&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;field-block&#34;&gt;field block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;field&lt;/code&gt; block allows you to filter pods by generic Kubernetes fields.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/field-filter-block.md&#34;&gt;
            &lt;p&gt;The following attributes 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 key or name of the field or labels that a filter can 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;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value associated with the key that a filter can 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;op&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The filter operation to apply on the given key: value pair.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;equals&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;For &lt;code&gt;op&lt;/code&gt;, the following values are allowed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;equals&lt;/code&gt;: The field value must equal the provided value.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;not-equals&lt;/code&gt;: The field value must not be equal to the provided value.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;exists&lt;/code&gt;: The field value must exist. Only applicable to &lt;code&gt;annotation&lt;/code&gt; fields.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;does-not-exist&lt;/code&gt;: The field value must not exist. Only applicable to &lt;code&gt;annotation&lt;/code&gt; fields.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;filter-label-block&#34;&gt;label block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;label&lt;/code&gt; block allows you to filter pods by generic Kubernetes labels.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/field-filter-block.md&#34;&gt;
            &lt;p&gt;The following attributes 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 key or name of the field or labels that a filter can 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;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value associated with the key that a filter can 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;op&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The filter operation to apply on the given key: value pair.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;equals&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;For &lt;code&gt;op&lt;/code&gt;, the following values are allowed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;equals&lt;/code&gt;: The field value must equal the provided value.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;not-equals&lt;/code&gt;: The field value must not be equal to the provided value.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;exists&lt;/code&gt;: The field value must exist. Only applicable to &lt;code&gt;annotation&lt;/code&gt; fields.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;does-not-exist&lt;/code&gt;: The field value must not exist. Only applicable to &lt;code&gt;annotation&lt;/code&gt; fields.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;pod_association-block&#34;&gt;pod_association block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;pod_association&lt;/code&gt; block configures rules on how to associate logs/traces/metrics to pods.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;pod_association&lt;/code&gt; block does not support any arguments and is configured
fully through child blocks.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;pod_association&lt;/code&gt; block can be repeated multiple times, to configure additional rules.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;pod_association {
    source {
        from = &amp;#34;resource_attribute&amp;#34;
        name = &amp;#34;k8s.pod.ip&amp;#34;
    }
}

pod_association {
    source {
        from = &amp;#34;resource_attribute&amp;#34;
        name = &amp;#34;k8s.pod.uid&amp;#34;
    }
    source {
        from = &amp;#34;connection&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;source-block&#34;&gt;source block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;source&lt;/code&gt; block configures a pod association rule. This is used by the &lt;code&gt;k8sattributes&lt;/code&gt; processor to determine the
pod associated with a telemetry signal.&lt;/p&gt;
&lt;p&gt;When multiple &lt;code&gt;source&lt;/code&gt; blocks are specified inside a &lt;code&gt;pod_association&lt;/code&gt; block, both &lt;code&gt;source&lt;/code&gt; blocks has to match for the
pod to be associated with the telemetry signal.&lt;/p&gt;
&lt;p&gt;The following attributes 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;from&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The association method. Currently supports &lt;code&gt;resource_attribute&lt;/code&gt; and &lt;code&gt;connection&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name represents extracted key name. For example, &lt;code&gt;ip&lt;/code&gt;, &lt;code&gt;pod_uid&lt;/code&gt;, &lt;code&gt;k8s.pod.ip&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;exclude-block&#34;&gt;exclude block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;exclude&lt;/code&gt; block configures which pods to exclude from the processor.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Pods with the name &lt;code&gt;jaeger-agent&lt;/code&gt; or &lt;code&gt;jaeger-collector&lt;/code&gt; are excluded by default.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;pod-block&#34;&gt;pod block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;pod&lt;/code&gt; block configures a pod to be excluded from the processor.&lt;/p&gt;
&lt;p&gt;The following attributes 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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of the pod&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;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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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.k8sattributes&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.k8sattributes&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;basic-usage&#34;&gt;Basic usage&lt;/h3&gt;
&lt;p&gt;In most cases, this is enough to get started. It&amp;rsquo;ll add these resource attributes to all logs, metrics, and traces:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s.namespace.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.uid&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.start_time&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.deployment.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.node.name&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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.k8sattributes.default.input]
    logs    = [otelcol.processor.k8sattributes.default.input]
    traces  = [otelcol.processor.k8sattributes.default.input]
  }
}

otelcol.processor.k8sattributes &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;
&lt;h3 id=&#34;add-additional-metadata-and-labels&#34;&gt;Add additional metadata and labels&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
  http {}
  grpc {}

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

otelcol.processor.k8sattributes &amp;#34;default&amp;#34; {
  extract {
    label {
      from      = &amp;#34;pod&amp;#34;
      key_regex = &amp;#34;(.*)/(.*)&amp;#34;
      tag_name  = &amp;#34;$1.$2&amp;#34;
    }

    metadata = [
      &amp;#34;k8s.namespace.name&amp;#34;,
      &amp;#34;k8s.deployment.name&amp;#34;,
      &amp;#34;k8s.statefulset.name&amp;#34;,
      &amp;#34;k8s.daemonset.name&amp;#34;,
      &amp;#34;k8s.cronjob.name&amp;#34;,
      &amp;#34;k8s.job.name&amp;#34;,
      &amp;#34;k8s.node.name&amp;#34;,
      &amp;#34;k8s.pod.name&amp;#34;,
      &amp;#34;k8s.pod.uid&amp;#34;,
      &amp;#34;k8s.pod.start_time&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;
&lt;h3 id=&#34;adding-kubernetes-metadata-to-prometheus-metrics&#34;&gt;Adding Kubernetes metadata to Prometheus metrics&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.k8sattributes&lt;/code&gt; adds metadata to metrics signals in the form of resource attributes.
To display the metadata as labels of Prometheus metrics, the OTLP attributes must be converted from
resource attributes to datapoint attributes. One way to do this is by using an &lt;code&gt;otelcol.processor.transform&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;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
  http {}
  grpc {}

  output {
    metrics = [otelcol.processor.k8sattributes.default.input]
  }
}

otelcol.processor.k8sattributes &amp;#34;default&amp;#34; {
  extract {
    label {
      from = &amp;#34;pod&amp;#34;
    }

    metadata = [
      &amp;#34;k8s.namespace.name&amp;#34;,
      &amp;#34;k8s.pod.name&amp;#34;,
    ]
  }

  output {
    metrics = [otelcol.processor.transform.add_kube_attrs.input]
  }
}

otelcol.processor.transform &amp;#34;add_kube_attrs&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  metric_statements {
    context = &amp;#34;datapoint&amp;#34;
    statements = [
      &amp;#34;set(attributes[\&amp;#34;k8s.pod.name\&amp;#34;], resource.attributes[\&amp;#34;k8s.pod.name\&amp;#34;])&amp;#34;,
      &amp;#34;set(attributes[\&amp;#34;k8s.namespace.name\&amp;#34;], resource.attributes[\&amp;#34;k8s.namespace.name\&amp;#34;])&amp;#34;,
    ]
  }

  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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.k8sattributes&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.k8sattributes&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolprocessork8sattributes">otelcol.processor.k8sattributes&lt;/h1>
&lt;p>&lt;code>otelcol.processor.k8sattributes&lt;/code> accepts telemetry data from other &lt;code>otelcol&lt;/code>
components and adds Kubernetes metadata to the resource attributes of spans, logs, or metrics.&lt;/p>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>&lt;code>otelcol.processor.k8sattributes&lt;/code> is a wrapper over the upstream OpenTelemetry
Collector &lt;code>k8sattributes&lt;/code> processor. If necessary, bug reports or feature requests
will be redirected to the upstream repository.&lt;/p></description></item><item><title>otelcol.processor.memory_limiter</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.memory_limiter/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.processor.probabilistic_sampler</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.probabilistic_sampler/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.probabilistic_sampler/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessorprobabilistic_sampler&#34;&gt;otelcol.processor.probabilistic_sampler&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.processor.probabilistic_sampler&lt;/code&gt; accepts logs and traces data from other otelcol components and applies probabilistic sampling based on configuration options.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;otelcol.processor.probabilistic_sampler&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector Contrib &lt;code&gt;probabilistic_sampler&lt;/code&gt; processor. If necessary,
bug reports or feature requests will be redirected to the upstream repository.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can specify multiple &lt;code&gt;otelcol.processor.probabilistic_sampler&lt;/code&gt; components 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.probabilistic_sampler &amp;#34;LABEL&amp;#34; {
  output {
    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.probabilistic_sampler&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;hash_seed&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint32&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An integer used to compute the hash algorithm.&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;sampling_percentage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;float32&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Percentage of traces or logs sampled.&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;attribute_source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Defines where to look for the attribute in &lt;code&gt;from_attribute&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;traceID&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;from_attribute&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of a log record attribute used for sampling purposes.&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;sampling_priority&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of a log record attribute used to set a different sampling priority from the &lt;code&gt;sampling_percentage&lt;/code&gt; setting.&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;&lt;code&gt;hash_seed&lt;/code&gt; determines an integer to compute the hash algorithm. This argument could be used for both traces and logs.
When used for logs, it computes the hash of a log record.
For hashing to work, all collectors for a given tier, for example, behind the same load balancer, must have the same &lt;code&gt;hash_seed&lt;/code&gt;.
It is also possible to leverage a different &lt;code&gt;hash_seed&lt;/code&gt; at different collector tiers to support additional sampling requirements.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sampling_percentage&lt;/code&gt; determines the percentage at which traces or logs are sampled. All traces or logs are sampled if you set this argument to a value greater than or equal to 100.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;attribute_source&lt;/code&gt; (logs only) determines where to look for the attribute in &lt;code&gt;from_attribute&lt;/code&gt;. The allowed values are &lt;code&gt;traceID&lt;/code&gt; or &lt;code&gt;record&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;from_attribute&lt;/code&gt; (logs only) determines the name of a log record attribute used for sampling purposes, such as a unique log record ID. The value of the attribute is only used if the trace ID is absent or if &lt;code&gt;attribute_source&lt;/code&gt; is set to &lt;code&gt;record&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sampling_priority&lt;/code&gt; (logs only) determines the name of a log record attribute used to set a different sampling priority from the &lt;code&gt;sampling_percentage&lt;/code&gt; setting. 0 means to never sample the log record, and greater than or equal to 100 means to always sample the log record.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;probabilistic_sampler&lt;/code&gt; supports two types of sampling for traces:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;sampling.priority&lt;/code&gt; &lt;a href=&#34;https://github.com/opentracing/specification/blob/master/semantic_conventions.md#span-tags-table&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;semantic
convention&lt;/a&gt; as defined by OpenTracing.&lt;/li&gt;
&lt;li&gt;Trace ID hashing.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The &lt;code&gt;sampling.priority&lt;/code&gt; semantic convention takes priority over trace ID hashing.
Trace ID hashing samples based on hash values determined by trace IDs.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;probabilistic_sampler&lt;/code&gt; supports sampling logs according to their trace ID, or by a specific log record attribute.&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; OTLP-formatted data for any telemetry signal of these types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;logs&lt;/li&gt;
&lt;li&gt;traces&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.processor.probabilistic_sampler&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.probabilistic_sampler&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;basic-usage&#34;&gt;Basic usage&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.processor.probabilistic_sampler &amp;#34;default&amp;#34; {
  hash_seed           = 123
  sampling_percentage = 15.3

  output {
    logs = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;sample-15-of-the-logs&#34;&gt;Sample 15% of the logs&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.processor.probabilistic_sampler &amp;#34;default&amp;#34; {
  sampling_percentage = 15

  output {
    logs = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;sample-logs-according-to-their-logid-attribute&#34;&gt;Sample logs according to their &amp;ldquo;logID&amp;rdquo; attribute&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.processor.probabilistic_sampler &amp;#34;default&amp;#34; {
  sampling_percentage = 15
  attribute_source    = &amp;#34;record&amp;#34;
  from_attribute      = &amp;#34;logID&amp;#34;

  output {
    logs = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;sample-logs-according-to-a-priority-attribute&#34;&gt;Sample logs according to a &amp;ldquo;priority&amp;rdquo; attribute&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.processor.probabilistic_sampler &amp;#34;default&amp;#34; {
  sampling_percentage = 15
  sampling_priority   = &amp;#34;priority&amp;#34;

  output {
    logs = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.probabilistic_sampler&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.probabilistic_sampler&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolprocessorprobabilistic_sampler">otelcol.processor.probabilistic_sampler&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>otelcol.processor.probabilistic_sampler&lt;/code> accepts logs and traces data from other otelcol components and applies probabilistic sampling based on configuration options.&lt;/p></description></item><item><title>otelcol.processor.resourcedetection</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.resourcedetection/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.resourcedetection/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessorresourcedetection&#34;&gt;otelcol.processor.resourcedetection&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.processor.resourcedetection&lt;/code&gt; detects resource information from the host
in a format that conforms to the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/resource/semantic_conventions/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry resource semantic conventions&lt;/a&gt;, and appends or
overrides the resource values in the telemetry data with this information.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;otelcol.processor.resourcedetection&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector Contrib &lt;code&gt;resourcedetection&lt;/code&gt; processor. If necessary,
bug reports or feature requests are redirected to the upstream repository.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can specify multiple &lt;code&gt;otelcol.processor.resourcedetection&lt;/code&gt; components 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.resourcedetection &amp;#34;LABEL&amp;#34; {
  output {
    logs    = [...]
    metrics = [...]
    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.resourcedetection&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;detectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An ordered list of named detectors used to detect resource information.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;env&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;override&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures whether existing resource attributes should be overridden or preserved.&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;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout by which all specified detectors must complete.&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;detectors&lt;/code&gt; could contain the following values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;env&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ec2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ecs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;eks&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;elasticbeanstalk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;azure&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aks&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;consul&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;docker&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gcp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;heroku&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;system&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openshift&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubernetes_node&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;env&lt;/code&gt; is the only detector that is not configured through a River block.
The &lt;code&gt;env&lt;/code&gt; detector reads resource information from the &lt;code&gt;OTEL_RESOURCE_ATTRIBUTES&lt;/code&gt; environment variable.
This variable must be in the format &lt;code&gt;&amp;lt;key1&amp;gt;=&amp;lt;value1&amp;gt;,&amp;lt;key2&amp;gt;=&amp;lt;value2&amp;gt;,...&lt;/code&gt;,
the details of which are currently pending confirmation in the OpenTelemetry specification.&lt;/p&gt;
&lt;p&gt;If a detector other than &lt;code&gt;env&lt;/code&gt; is needed, you can customize it with the relevant River block.
For example, you can customize the &lt;code&gt;ec2&lt;/code&gt; detector with the &lt;a href=&#34;#ec2&#34;&gt;ec2&lt;/a&gt; block.
If you omit the &lt;a href=&#34;#ec2&#34;&gt;ec2&lt;/a&gt; block, the defaults specified in the &lt;a href=&#34;#ec2&#34;&gt;ec2&lt;/a&gt; block documentation are used.&lt;/p&gt;
&lt;p&gt;If multiple detectors are inserting the same attribute name, the first detector to insert wins.
For example, if you had &lt;code&gt;detectors = [&amp;quot;eks&amp;quot;, &amp;quot;ec2&amp;quot;]&lt;/code&gt; then &lt;code&gt;cloud.platform&lt;/code&gt; will be &lt;code&gt;aws_eks&lt;/code&gt; instead of &lt;code&gt;ec2&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following order is recommended for AWS:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;#lambda&#34;&gt;lambda&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#elasticbeanstalk&#34;&gt;elasticbeanstalk&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#eks&#34;&gt;eks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ecs&#34;&gt;ecs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ec2&#34;&gt;ec2&lt;/a&gt;&lt;/li&gt;
&lt;/ol&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.resourcedetection&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&#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;tr&gt;
              &lt;td&gt;ec2&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#ec2&#34;&gt;ec2&lt;/a&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;ecs&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#ecs&#34;&gt;ecs&lt;/a&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;eks&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#eks&#34;&gt;eks&lt;/a&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;elasticbeanstalk&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#elasticbeanstalk&#34;&gt;elasticbeanstalk&lt;/a&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;lambda&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#lambda&#34;&gt;lambda&lt;/a&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;azure&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#azure&#34;&gt;azure&lt;/a&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;aks&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#aks&#34;&gt;aks&lt;/a&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;consul&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#consul&#34;&gt;consul&lt;/a&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;docker&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#docker&#34;&gt;docker&lt;/a&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;gcp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#gcp&#34;&gt;gcp&lt;/a&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;heroku&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#heroku&#34;&gt;heroku&lt;/a&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;system&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#system&#34;&gt;system&lt;/a&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;openshift&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#openshift&#34;&gt;openshift&lt;/a&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;kubernetes_node&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#kubernetes_node&#34;&gt;kubernetes_node&lt;/a&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;output&#34;&gt;output&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;ec2&#34;&gt;ec2&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;ec2&lt;/code&gt; block reads resource information from the &lt;a href=&#34;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;EC2 instance metadata API&lt;/a&gt; using the &lt;a href=&#34;https://docs.aws.amazon.com/sdk-for-go/api/aws/ec2metadata/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS SDK for Go&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;ec2&lt;/code&gt; block supports 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;Attribute&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;tags&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 regular expressions to match against tag keys of an EC2 instance.&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;If you are using a proxy server on your EC2 instance, it&amp;rsquo;s important that you exempt requests for instance metadata as described in the &lt;a href=&#34;https://github.com/awsdocs/aws-cli-user-guide/blob/a2393582590b64bd2a1d9978af15b350e1f9eb8e/doc_source/cli-configure-proxy.md#using-a-proxy-on-amazon-ec2-instances&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS cli user guide&lt;/a&gt;.
Failing to do so can result in proxied or missing instance data.&lt;/p&gt;
&lt;p&gt;If the instance is part of AWS ParallelCluster and the detector is failing to connect to the metadata server,
check the iptable and make sure the chain &lt;code&gt;PARALLELCLUSTER_IMDS&lt;/code&gt; contains a rule that allows the Grafana Agent user to access &lt;code&gt;169.254.169.254/32&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;tags&lt;/code&gt; can be used to gather tags for the EC2 instance which Grafana Agent is running on.
To fetch EC2 tags, the IAM role assigned to the EC2 instance must have a policy that includes the &lt;code&gt;ec2:DescribeTags&lt;/code&gt; permission.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;ec2&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#ec2--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h5 id=&#34;ec2--resource_attributes&#34;&gt;ec2 &amp;gt; resource_attributes&lt;/h5&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.account.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.account.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.availability_zone&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.availability_zone&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.platform&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.platform&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.region&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.region&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.image.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.image.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.type&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.type&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;ecs&#34;&gt;ecs&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;ecs&lt;/code&gt; block queries the Task Metadata Endpoint (TMDE) to record information about the current ECS Task. Only TMDE V4 and V3 are supported.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;ecs&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#ecs--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;ecs--resource_attributes&#34;&gt;ecs &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.ecs.cluster.arn&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.ecs.cluster.arn&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.ecs.launchtype&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.ecs.launchtype&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.ecs.task.arn&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.ecs.task.arn&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.ecs.task.family&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.ecs.task.family&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.ecs.task.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.ecs.task.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.ecs.task.revision&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.ecs.task.revision&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.log.group.arns&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.log.group.arns&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.log.group.names&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.log.group.names&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.log.stream.arns&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.log.stream.arns&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.log.stream.names&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.log.stream.names&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.account.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.account.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.availability_zone&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.availability_zone&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.platform&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.platform&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.region&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.region&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;eks&#34;&gt;eks&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;eks&lt;/code&gt; block adds resource attributes for Amazon EKS.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;eks&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#eks--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;eks--resource_attributes&#34;&gt;eks &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.platform&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.platform&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;k8s.cluster.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;k8s.cluster.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&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;Example values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;aws&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;aws_eks&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;elasticbeanstalk&#34;&gt;elasticbeanstalk&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;elasticbeanstalk&lt;/code&gt; block reads the AWS X-Ray configuration file available on all Beanstalk instances with &lt;a href=&#34;https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-configuration-debugging.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;X-Ray Enabled&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;elasticbeanstalk&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#elasticbeanstalk--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;elasticbeanstalk--resource_attributes&#34;&gt;elasticbeanstalk &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.platform&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.platform&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;deployment.envir&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;deployment.envir&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;service.instance&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;service.instance&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;service.version&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;service.version&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;Example values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;aws&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;aws_elastic_beanstalk&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;lambda&#34;&gt;lambda&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;lambda&lt;/code&gt; block uses the AWS Lambda &lt;a href=&#34;https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;runtime environment variables&lt;/a&gt; to retrieve various resource attributes.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;lambda&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#lambda--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;lambda--resource_attributes&#34;&gt;lambda &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.log.group.names&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.log.group.names&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;aws.log.stream.names&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;aws.log.stream.names&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.platform&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.platform&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.region&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.region&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;faas.instance&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;faas.instance&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;faas.max_memory&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;faas.max_memory&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;faas.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;faas.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;faas.version&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;faas.version&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/cloud.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Cloud semantic conventions&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;aws&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;aws_lambda&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.region&lt;/code&gt;: &lt;code&gt;$AWS_REGION&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/faas.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Function as a Service semantic conventions&lt;/a&gt; and &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/instrumentation/aws-lambda.md#resource-detector&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS Lambda semantic conventions&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;faas.name&lt;/code&gt;: &lt;code&gt;$AWS_LAMBDA_FUNCTION_NAME&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.version&lt;/code&gt;: &lt;code&gt;$AWS_LAMBDA_FUNCTION_VERSION&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.instance&lt;/code&gt;: &lt;code&gt;$AWS_LAMBDA_LOG_STREAM_NAME&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.max_memory&lt;/code&gt;: &lt;code&gt;$AWS_LAMBDA_FUNCTION_MEMORY_SIZE&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/cloud_provider/aws/logs.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS Logs semantic conventions&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;aws.log.group.names&lt;/code&gt;: &lt;code&gt;$AWS_LAMBDA_LOG_GROUP_NAME&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aws.log.stream.names&lt;/code&gt;: &lt;code&gt;$AWS_LAMBDA_LOG_STREAM_NAME&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;azure&#34;&gt;azure&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;azure&lt;/code&gt; block queries the &lt;a href=&#34;https://aka.ms/azureimds&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Instance Metadata Service&lt;/a&gt; to retrieve various resource attributes.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;azure&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#azure--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;azure--resource_attributes&#34;&gt;azure &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;azure.resourcegroup.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;azure.resourcegroup.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;azure.vm.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;azure.vm.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;azure.vm.scaleset.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;azure.vm.scaleset.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;azure.vm.size&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;azure.vm.size&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.account.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.account.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.platform&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.platform&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.region&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.region&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;Example values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;azure&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;azure_vm&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;aks&#34;&gt;aks&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;aks&lt;/code&gt; block adds resource attributes related to Azure AKS.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;aks&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#aks--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;aks--resource_attributes&#34;&gt;aks &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.platform&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.platform&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;k8s.cluster.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;k8s.cluster.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&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;Example values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;azure&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;azure_vm&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Azure AKS cluster name is derived from the Azure Instance Metadata Service&amp;rsquo;s (IMDS) infrastructure resource group field.
This field contains the resource group and name of the cluster, separated by underscores. For example: &lt;code&gt;MC_&amp;lt;resource group&amp;gt;_&amp;lt;cluster name&amp;gt;_&amp;lt;location&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Resource group: &lt;code&gt;my-resource-group&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Cluster name: &lt;code&gt;my-cluster&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Location: &lt;code&gt;eastus&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Generated name: &lt;code&gt;MC_my-resource-group_my-cluster_eastus&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The cluster name is detected if it does not contain underscores and if a custom infrastructure resource group name was not used.&lt;/p&gt;
&lt;p&gt;If accurate parsing cannot be performed, the infrastructure resource group value is returned.
This value can be used to uniquely identify the cluster, because Azure will not allow users to create multiple clusters with the same infrastructure resource group name.&lt;/p&gt;
&lt;h3 id=&#34;consul&#34;&gt;consul&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;consul&lt;/code&gt; block queries a Consul agent and reads its configuration endpoint to retrieve values for resource attributes.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;consul&lt;/code&gt; block supports 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;Attribute&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 address of the Consul server&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;datacenter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Datacenter to use. If not provided, the default agent datacenter is used.&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;token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A per-request ACL token which overrides the Consul agent&amp;rsquo;s default (empty) token.&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;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of the namespace to send along for the request.&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;meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allowlist of &lt;a href=&#34;https://www.consul.io/docs/agent/options#node_meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Consul Metadata&lt;/a&gt; keys to use as resource attributes.&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;token&lt;/code&gt; is only required if &lt;a href=&#34;https://www.consul.io/docs/security/acl/acl-system&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Consul&amp;rsquo;s ACL System&lt;/a&gt; is enabled.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;consul&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#consul--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;consul--resource_attributes&#34;&gt;consul &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.region&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.region&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;docker&#34;&gt;docker&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;docker&lt;/code&gt; block queries the Docker daemon to retrieve various resource attributes from the host machine.&lt;/p&gt;
&lt;p&gt;You need to mount the Docker socket (&lt;code&gt;/var/run/docker.sock&lt;/code&gt; on Linux) to contact the Docker daemon.
Docker detection does not work on MacOS.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;docker&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#docker--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;docker--resource_attributes&#34;&gt;docker &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;os.type&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;os.type&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;gcp&#34;&gt;gcp&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;gcp&lt;/code&gt; block detects resource attributes using the &lt;a href=&#34;https://github.com/googleapis/google-cloud-go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Google Cloud Client Libraries for Go&lt;/a&gt;, which reads resource information from the &lt;a href=&#34;https://cloud.google.com/compute/docs/storing-retrieving-metadata&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP metadata server&lt;/a&gt;.
The detector also uses environment variables to identify which GCP platform the application is running on, and assigns appropriate resource attributes for that platform.&lt;/p&gt;
&lt;p&gt;Use the &lt;code&gt;gcp&lt;/code&gt; detector regardless of the GCP platform Grafana Agent is running on.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;gcp&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#gcp--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;gcp--resource_attributes&#34;&gt;gcp &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.account.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.account.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.availability_zone&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.availability_zone&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.platform&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.platform&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.region&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.region&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;faas.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;faas.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;faas.instance&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;faas.instance&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;faas.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;faas.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;faas.version&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;faas.version&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;gcp.cloud_run.job.execution&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;gcp.cloud_run.job.execution&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;gcp.cloud_run.job.task_index&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;gcp.cloud_run.job.task_index&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;gcp.gce.instance.hostname&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;gcp.gce.instance.hostname&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;gcp.gce.instance.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;gcp.gce.instance.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.type&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.type&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;k8s.cluster.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;k8s.cluster.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;h4 id=&#34;google-compute-engine-gce-metadata&#34;&gt;Google Compute Engine (GCE) metadata&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp_compute_engine&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.account.id&lt;/code&gt;: project id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.region&lt;/code&gt;: e.g. &lt;code&gt;&amp;quot;us-central1&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.availability_zone&lt;/code&gt;: e.g. &lt;code&gt;&amp;quot;us-central1-c&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;host.id&lt;/code&gt;: instance id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;host.name&lt;/code&gt;: instance name&lt;/li&gt;
&lt;li&gt;&lt;code&gt;host.type&lt;/code&gt;: machine type&lt;/li&gt;
&lt;li&gt;(optional) &lt;code&gt;gcp.gce.instance.hostname&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;(optional) &lt;code&gt;gcp.gce.instance.name&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;google-kubernetes-engine-gke-metadata&#34;&gt;Google Kubernetes Engine (GKE) metadata&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp_kubernetes_engine&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.account.id&lt;/code&gt;: project id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.region&lt;/code&gt;: only for regional GKE clusters; e.g. &lt;code&gt;&amp;quot;us-central1&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.availability_zone&lt;/code&gt;: only for zonal GKE clusters; e.g. &lt;code&gt;&amp;quot;us-central1-c&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.cluster.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;host.id&lt;/code&gt;: instance id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;host.name&lt;/code&gt;: instance name; only when workload identity is disabled&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One known issue happens when GKE workload identity is enabled. The GCE metadata endpoints won&amp;rsquo;t be available,
and the GKE resource detector won&amp;rsquo;t be able to determine &lt;code&gt;host.name&lt;/code&gt;.
If this happens, you can set &lt;code&gt;host.name&lt;/code&gt; from one of the following resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Get the &lt;code&gt;node.name&lt;/code&gt; through the &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/downward-api/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;downward API&lt;/a&gt; with the &lt;code&gt;env&lt;/code&gt; detector.&lt;/li&gt;
&lt;li&gt;Get the Kubernetes node name from the Kubernetes API (with &lt;code&gt;k8s.io/client-go&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;google-cloud-run-services-metadata&#34;&gt;Google Cloud Run Services metadata&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp_cloud_run&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.account.id&lt;/code&gt;: project id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.region&lt;/code&gt;: e.g. &lt;code&gt;&amp;quot;us-central1&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.id&lt;/code&gt;: instance id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.name&lt;/code&gt;: service name&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.version&lt;/code&gt;: service revision&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;cloud-run-jobs-metadata&#34;&gt;Cloud Run Jobs metadata&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp_cloud_run&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.account.id&lt;/code&gt;: project id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.region&lt;/code&gt;: e.g. &lt;code&gt;&amp;quot;us-central1&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.id&lt;/code&gt;: instance id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.name&lt;/code&gt;: service name&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gcp.cloud_run.job.execution&lt;/code&gt;: e.g. &lt;code&gt;&amp;quot;my-service-ajg89&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gcp.cloud_run.job.task_index&lt;/code&gt;: e.g. &lt;code&gt;&amp;quot;0&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;google-cloud-functions-metadata&#34;&gt;Google Cloud Functions metadata&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp_cloud_functions&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.account.id&lt;/code&gt;: project id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.region&lt;/code&gt;: e.g. &lt;code&gt;&amp;quot;us-central1&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.id&lt;/code&gt;: instance id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.name&lt;/code&gt;: function name&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.version&lt;/code&gt;: function version&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;google-app-engine-metadata&#34;&gt;Google App Engine metadata&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloud.provider&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.platform&lt;/code&gt;: &lt;code&gt;&amp;quot;gcp_app_engine&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.account.id&lt;/code&gt;: project id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.region&lt;/code&gt;: e.g. &lt;code&gt;&amp;quot;us-central1&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.availability_zone&lt;/code&gt;: e.g. &lt;code&gt;&amp;quot;us-central1-c&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.id&lt;/code&gt;: instance id&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.name&lt;/code&gt;: service name&lt;/li&gt;
&lt;li&gt;&lt;code&gt;faas.version&lt;/code&gt;: service version&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;heroku&#34;&gt;heroku&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;heroku&lt;/code&gt; block adds resource attributes derived from &lt;a href=&#34;https://devcenter.heroku.com/articles/dyno-metadata&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Heroku dyno metadata&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;heroku&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#heroku--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;heroku--resource_attributes&#34;&gt;heroku &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;heroku.app.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;heroku.app.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;heroku.dyno.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;heroku.dyno.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;heroku.release.commit&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;heroku.release.commit&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;heroku.release.creation_timestamp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;heroku.release.creation_timestamp&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;service.instance.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;service.instance.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;service.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;service.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;service.version&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;service.version&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;a href=&#34;https://devcenter.heroku.com/articles/dyno-metadata&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Heroku dyno metadata&lt;/a&gt; is active, Heroku applications publish information through environment variables.
We map these environment variables to resource attributes as follows:&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;Dyno metadata environment variable&lt;/th&gt;
              &lt;th&gt;Resource attribute&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HEROKU_APP_ID&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;heroku.app.id&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HEROKU_APP_NAME&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;service.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HEROKU_DYNO_ID&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;service.instance.id&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HEROKU_RELEASE_CREATED_AT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;heroku.release.creation_timestamp&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HEROKU_RELEASE_VERSION&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;service.version&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HEROKU_SLUG_COMMIT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;heroku.release.commit&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For more information, see the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/cloud_provider/heroku.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Heroku cloud provider documentation&lt;/a&gt; under the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry specification semantic conventions&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;system&#34;&gt;system&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;system&lt;/code&gt; block queries the host machine to retrieve various resource attributes.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Use the &lt;a href=&#34;#docker&#34;&gt;Docker&lt;/a&gt; detector if running Grafana Agent as a Docker container.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;system&lt;/code&gt; block supports 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;Attribute&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;hostname_sources&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A priority list of sources from which the hostname will be fetched.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;dns&amp;quot;, &amp;quot;os&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 valid options for &lt;code&gt;hostname_sources&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;dns&amp;quot;&lt;/code&gt;: Uses multiple sources to get the fully qualified domain name.
Firstly, it looks up the host name in the local machine&amp;rsquo;s &lt;code&gt;hosts&lt;/code&gt; file. If that fails, it looks up the CNAME.
Lastly, if that fails, it does a reverse DNS query. Note: this hostname source may produce unreliable results on Windows.
To produce a FQDN, Windows hosts might have better results using the &amp;ldquo;lookup&amp;rdquo; hostname source, which is mentioned below.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;os&amp;quot;&lt;/code&gt;: Provides the hostname provided by the local machine&amp;rsquo;s kernel.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;cname&amp;quot;&lt;/code&gt;: Provides the canonical name, as provided by &lt;code&gt;net.LookupCNAME&lt;/code&gt; in the Go standard library.
Note: this hostname source may produce unreliable results on Windows.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;lookup&amp;quot;&lt;/code&gt;: Does a reverse DNS lookup of the current host&amp;rsquo;s IP address.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In case of an error in fetching a hostname from a source, the next source from the list of &lt;code&gt;hostname_sources&lt;/code&gt; will be considered.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;system&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#system--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;system--resource_attributes&#34;&gt;system &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.arch&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.arch&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.cpu.cache.l2.size&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.cpu.cache.l2.size&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.cpu.family&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.cpu.family&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.cpu.model.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.cpu.model.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.cpu.model.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.cpu.model.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.cpu.stepping&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.cpu.stepping&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.cpu.vendor.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.cpu.vendor.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.id&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.id&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.ip&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.ip&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.mac&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.mac&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;host.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;host.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;os.description&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;os.description&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;os.type&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;os.type&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;openshift&#34;&gt;openshift&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;openshift&lt;/code&gt; block queries the OpenShift and Kubernetes APIs to retrieve various resource attributes.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;openshift&lt;/code&gt; block supports 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;Attribute&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;Address of the OpenShift API server.&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;token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Token used to identify against the OpenShift API server.&lt;/td&gt;
              &lt;td&gt;&amp;quot;&amp;quot;&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 &amp;ldquo;get&amp;rdquo;, &amp;ldquo;watch&amp;rdquo;, and &amp;ldquo;list&amp;rdquo; permissions are required:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;kind: ClusterRole
metadata:
  name: grafana-agent
rules:
- apiGroups: [&amp;#34;config.openshift.io&amp;#34;]
  resources: [&amp;#34;infrastructures&amp;#34;, &amp;#34;infrastructures/status&amp;#34;]
  verbs: [&amp;#34;get&amp;#34;, &amp;#34;watch&amp;#34;, &amp;#34;list&amp;#34;]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;By default, the API address is determined from the environment variables &lt;code&gt;KUBERNETES_SERVICE_HOST&lt;/code&gt;,
&lt;code&gt;KUBERNETES_SERVICE_PORT&lt;/code&gt; and the service token is read from &lt;code&gt;/var/run/secrets/kubernetes.io/serviceaccount/token&lt;/code&gt;.
If TLS is not explicitly disabled and no &lt;code&gt;ca_file&lt;/code&gt; is configured, &lt;code&gt;/var/run/secrets/kubernetes.io/serviceaccount/ca.crt&lt;/code&gt; is used.
The determination of the API address, &lt;code&gt;ca_file&lt;/code&gt;, and the service token is skipped if they are set in the configuration.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;openshift&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#openshift--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#openshift--tls&#34;&gt;tls&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;TLS settings for the connection with the OpenShift API.&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;h4 id=&#34;openshift--tls&#34;&gt;openshift &amp;gt; tls&lt;/h4&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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h4 id=&#34;openshift--resource_attributes&#34;&gt;openshift &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.platform&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.platform&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.provider&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.provider&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;cloud.region&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;cloud.region&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;k8s.cluster.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;k8s.cluster.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;kubernetes_node&#34;&gt;kubernetes_node&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;kubernetes_node&lt;/code&gt; block queries the Kubernetes API server to retrieve various node resource attributes.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;kubernetes_node&lt;/code&gt; block supports 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;Attribute&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;auth_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures how to authenticate to the K8s API server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;none&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;context&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Override the current context when &lt;code&gt;auth_type&lt;/code&gt; is set to &lt;code&gt;&amp;quot;kubeConfig&amp;quot;&lt;/code&gt;.&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;node_from_env_var&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of an environment variable from which to retrieve the node name.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;K8S_NODE_NAME&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 &amp;ldquo;get&amp;rdquo; and &amp;ldquo;list&amp;rdquo; permissions are required:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;kind: ClusterRole
metadata:
  name: grafana-agent
rules:
  - apiGroups: [&amp;#34;&amp;#34;]
    resources: [&amp;#34;nodes&amp;#34;]
    verbs: [&amp;#34;get&amp;#34;, &amp;#34;list&amp;#34;]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;code&gt;auth_type&lt;/code&gt; can be set to one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;none&lt;/code&gt;: no authentication.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;serviceAccount&lt;/code&gt;: use the standard service account token provided to the Grafana Agent pod.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubeConfig&lt;/code&gt;: use credentials from &lt;code&gt;~/.kube/config&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;kubernetes_node&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#kubernetes_node--resource_attributes&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which resource attributes to add.&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;h4 id=&#34;kubernetes_node--resource_attributes&#34;&gt;kubernetes_node &amp;gt; resource_attributes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;resource_attributes&lt;/code&gt; block supports the following blocks:&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;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;&lt;a href=&#34;#resource-attribute-config&#34;&gt;k8s.node.name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;k8s.node.name&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-attribute-config&#34;&gt;k8s.node.uid&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Toggles the &lt;code&gt;k8s.node.uid&lt;/code&gt; resource attribute. &lt;br&gt; Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&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;common-configuration&#34;&gt;Common configuration&lt;/h2&gt;
&lt;h3 id=&#34;resource-attribute-config&#34;&gt;Resource attribute config&lt;/h3&gt;
&lt;p&gt;This block describes how to configure resource attributes such as &lt;code&gt;k8s.node.name&lt;/code&gt; and &lt;code&gt;azure.vm.name&lt;/code&gt;.
Every block is configured using the same set of attributes.
Only the default values for those attributes might differ across resource attributes.
For example, some resource attributes have &lt;code&gt;enabled&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt; by default, whereas others don&amp;rsquo;t.&lt;/p&gt;
&lt;p&gt;The following attributes 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;Attribute&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;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Toggles whether to add the resource attribute to the span, log, or metric resource.&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;To see the default value for &lt;code&gt;enabled&lt;/code&gt;, refer to the tables in the sections above which list the resource attributes blocks.
The &amp;ldquo;Description&amp;rdquo; column will state either&amp;hellip;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; by default.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;hellip; or:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Sets &lt;code&gt;enabled&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default.&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;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; OTLP-formatted data for any telemetry signal of these types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;logs&lt;/li&gt;
&lt;li&gt;metrics&lt;/li&gt;
&lt;li&gt;traces&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.processor.resourcedetection&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.resourcedetection&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;env-detector&#34;&gt;env detector&lt;/h3&gt;
&lt;p&gt;If you set up a &lt;code&gt;OTEL_RESOURCE_ATTRIBUTES&lt;/code&gt; environment variable with value of &lt;code&gt;TestKey=TestValue&lt;/code&gt;,
then all logs, metrics, and traces have a resource attribute with a key &lt;code&gt;TestKey&lt;/code&gt; and value of &lt;code&gt;TestValue&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.processor.resourcedetection &amp;#34;default&amp;#34; {
  detectors = [&amp;#34;env&amp;#34;]

  output {
    logs    = [otelcol.exporter.otlp.default.input]
    metrics = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;env-and-ec2&#34;&gt;env and ec2&lt;/h3&gt;
&lt;p&gt;There is no need to put in an &lt;code&gt;ec2 {}&lt;/code&gt; River block.
The &lt;code&gt;ec2&lt;/code&gt; defaults are applied automatically, as specified in &lt;a href=&#34;#ec2&#34;&gt;ec2&lt;/a&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.processor.resourcedetection &amp;#34;default&amp;#34; {
  detectors = [&amp;#34;env&amp;#34;, &amp;#34;ec2&amp;#34;]

  output {
    logs    = [otelcol.exporter.otlp.default.input]
    metrics = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;ec2-with-default-resource-attributes&#34;&gt;ec2 with default resource attributes&lt;/h3&gt;
&lt;p&gt;There is no need to put in a &lt;code&gt;ec2 {}&lt;/code&gt; River block.
The &lt;code&gt;ec2&lt;/code&gt; defaults are applied automatically, as specified in &lt;a href=&#34;#ec2&#34;&gt;ec2&lt;/a&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.processor.resourcedetection &amp;#34;default&amp;#34; {
  detectors = [&amp;#34;ec2&amp;#34;]

  output {
    logs    = [otelcol.exporter.otlp.default.input]
    metrics = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;ec2-with-explicit-resource-attributes&#34;&gt;ec2 with explicit resource attributes&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.processor.resourcedetection &amp;#34;default&amp;#34; {
  detectors = [&amp;#34;ec2&amp;#34;]
  ec2 {
    tags = [&amp;#34;^tag1$&amp;#34;, &amp;#34;^tag2$&amp;#34;, &amp;#34;^label.*$&amp;#34;]
    resource_attributes {
      cloud.account.id  { enabled = true }
      cloud.availability_zone  { enabled = true }
      cloud.platform  { enabled = true }
      cloud.provider  { enabled = true }
      cloud.region  { enabled = true }
      host.id  { enabled = true }
      host.image.id  { enabled = false }
      host.name  { enabled = false }
      host.type  { enabled = false }
    }
  }

  output {
    logs    = [otelcol.exporter.otlp.default.input]
    metrics = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;kubernetes_node-1&#34;&gt;kubernetes_node&lt;/h3&gt;
&lt;p&gt;This example uses the default &lt;code&gt;node_from_env_var&lt;/code&gt; option of &lt;code&gt;K8S_NODE_NAME&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;There is no need to put in a &lt;code&gt;kubernetes_node {}&lt;/code&gt; River block.
The &lt;code&gt;kubernetes_node&lt;/code&gt; defaults are applied automatically, as specified in &lt;a href=&#34;#kubernetes_node&#34;&gt;kubernetes_node&lt;/a&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.processor.resourcedetection &amp;#34;default&amp;#34; {
  detectors = [&amp;#34;kubernetes_node&amp;#34;]

  output {
    logs    = [otelcol.exporter.otlp.default.input]
    metrics = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You need to add this to your workload:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;        env:
          - name: K8S_NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;kubernetes_node-with-a-custom-environment-variable&#34;&gt;kubernetes_node with a custom environment variable&lt;/h3&gt;
&lt;p&gt;This example uses a custom &lt;code&gt;node_from_env_var&lt;/code&gt; set to &lt;code&gt;my_custom_var&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.processor.resourcedetection &amp;#34;default&amp;#34; {
  detectors = [&amp;#34;kubernetes_node&amp;#34;]
  kubernetes_node {
    node_from_env_var = &amp;#34;my_custom_var&amp;#34;
  }

  output {
    logs    = [otelcol.exporter.otlp.default.input]
    metrics = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You need to add this to your workload:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;        env:
          - name: my_custom_var
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.resourcedetection&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.resourcedetection&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolprocessorresourcedetection">otelcol.processor.resourcedetection&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>otelcol.processor.span</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.span/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.span/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessorspan&#34;&gt;otelcol.processor.span&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.processor.span&lt;/code&gt; accepts traces telemetry data from other &lt;code&gt;otelcol&lt;/code&gt;
components and modifies the names and attributes of the spans.
It also supports the ability to filter input data to determine if
it should be included or excluded from this processor.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;otelcol.processor.span&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;span&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;You can specify multiple &lt;code&gt;otelcol.processor.span&lt;/code&gt; components 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.span &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.processor.span&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.processor.span&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;tr&gt;
              &lt;td&gt;name&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#name-block&#34;&gt;name&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures how to rename a span and add attributes.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;name &amp;gt; to_attributes&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#to-attributes-block&#34;&gt;to-attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration to create attributes from a span name.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;status&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#status-block&#34;&gt;status&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specifies a status which should be set for this span.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#include-block&#34;&gt;include&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Filter for data included in this processor&amp;rsquo;s actions.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include &amp;gt; regexp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#regexp-block&#34;&gt;regexp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Regex cache settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include &amp;gt; attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of attributes to match against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include &amp;gt; resource&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of items to match the resources against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;include &amp;gt; library&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of items to match the implementation library against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#exclude-block&#34;&gt;exclude&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Filter for data excluded from this processor&amp;rsquo;s actions&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; regexp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#regexp-block&#34;&gt;regexp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Regex cache settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of attributes to match against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; resource&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of items to match the resources against.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude &amp;gt; library&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of items to match the implementation library against.&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;include &amp;gt; attribute&lt;/code&gt;
refers to an &lt;code&gt;attribute&lt;/code&gt; block defined inside an &lt;code&gt;include&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;If both an &lt;code&gt;include&lt;/code&gt; block and an &lt;code&gt;exclude&lt;/code&gt;block are specified, the &lt;code&gt;include&lt;/code&gt; properties are checked before the &lt;code&gt;exclude&lt;/code&gt; properties.&lt;/p&gt;
&lt;h3 id=&#34;name-block&#34;&gt;name block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;name&lt;/code&gt; block configures how to rename a span and add attributes.&lt;/p&gt;
&lt;p&gt;The following attributes 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;from_attributes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Attribute keys to pull values from, to generate a new span name.&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;separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Separates attributes values in the new span name.&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;Firstly &lt;code&gt;from_attributes&lt;/code&gt; rules are applied, then &lt;a href=&#34;#to-attributes-block&#34;&gt;to-attributes&lt;/a&gt; are applied.
At least one of these 2 fields must be set.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;from_attributes&lt;/code&gt; represents the attribute keys to pull the values from to
generate the new span name:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All attribute keys are required in the span to rename a span.
If any attribute is missing from the span, no rename will occur.&lt;/li&gt;
&lt;li&gt;The new span name is constructed in order of the &lt;code&gt;from_attributes&lt;/code&gt;
specified in the configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;separator&lt;/code&gt; is the string used to separate attributes values in the new
span name. If no value is set, no separator is used between attribute
values. &lt;code&gt;separator&lt;/code&gt; is used with &lt;code&gt;from_attributes&lt;/code&gt; only;
it is not used with &lt;a href=&#34;#to-attributes-block&#34;&gt;to-attributes&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;to_attributes-block&#34;&gt;to_attributes block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;to_attributes&lt;/code&gt; block configures how to create attributes from a span name.&lt;/p&gt;
&lt;p&gt;The following attributes 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;rules&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 regex rules to extract attribute values from span name.&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;break_after_match&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures if processing of rules should stop after the first match.&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 rule in the &lt;code&gt;rules&lt;/code&gt; list is a regex pattern string.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The span name is checked against each regex in the list.&lt;/li&gt;
&lt;li&gt;If it matches, then all named subexpressions of the regex are extracted as attributes and are added to the span.&lt;/li&gt;
&lt;li&gt;Each subexpression name becomes an attribute name and the subexpression matched portion becomes the attribute value.&lt;/li&gt;
&lt;li&gt;The matched portion in the span name is replaced by extracted attribute name.&lt;/li&gt;
&lt;li&gt;If the attributes already exist in the span then they will be overwritten.&lt;/li&gt;
&lt;li&gt;The process is repeated for all rules in the order they are specified.&lt;/li&gt;
&lt;li&gt;Each subsequent rule works on the span name that is the output after processing the previous rule.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;code&gt;break_after_match&lt;/code&gt; specifies if processing of rules should stop after the first
match. If it is &lt;code&gt;false&lt;/code&gt;, rule processing will continue to be performed over the
modified span name.&lt;/p&gt;
&lt;h3 id=&#34;status-block&#34;&gt;status block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;status&lt;/code&gt; block specifies a status which should be set for this span.&lt;/p&gt;
&lt;p&gt;The following attributes 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;code&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A status code.&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;description&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An optional field documenting Error status codes.&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 supported values for &lt;code&gt;code&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Ok&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Error&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Unset&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;description&lt;/code&gt; should only be specified if &lt;code&gt;code&lt;/code&gt; is set to &lt;code&gt;Error&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;include-block&#34;&gt;include block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;include&lt;/code&gt; block provides an option to include data being fed into the
&lt;a href=&#34;#name-block&#34;&gt;name&lt;/a&gt; and &lt;a href=&#34;#status-block&#34;&gt;status&lt;/a&gt; blocks based on the properties of a span.&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_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls how items to match against are interpreted.&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;services&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 items to match the service name against.&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;span_names&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 items to match the span name against.&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;span_kinds&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 items to match the span kind against.&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;match_type&lt;/code&gt; is required and must be set to either &lt;code&gt;&amp;quot;regexp&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;strict&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A match occurs if at least one item in the lists matches.&lt;/p&gt;
&lt;p&gt;One of &lt;code&gt;services&lt;/code&gt;, &lt;code&gt;span_names&lt;/code&gt;, &lt;code&gt;span_kinds&lt;/code&gt;, &lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;, &lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;, or &lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt; must be specified
with a non-empty value for a valid configuration.&lt;/p&gt;
&lt;h3 id=&#34;exclude-block&#34;&gt;exclude block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;exclude&lt;/code&gt; block provides an option to exclude data from being fed into the
&lt;a href=&#34;#name-block&#34;&gt;name&lt;/a&gt; and &lt;a href=&#34;#status-block&#34;&gt;status&lt;/a&gt; blocks based on the properties of a span.&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_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls how items to match against are interpreted.&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;services&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 items to match the service name against.&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;span_names&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 items to match the span name against.&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;span_kinds&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 items to match the span kind against.&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;match_type&lt;/code&gt; is required and must be set to either &lt;code&gt;&amp;quot;regexp&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;strict&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A match occurs if at least one item in the lists matches.&lt;/p&gt;
&lt;p&gt;One of &lt;code&gt;services&lt;/code&gt;, &lt;code&gt;span_names&lt;/code&gt;, &lt;code&gt;span_kinds&lt;/code&gt;, &lt;a href=&#34;#attribute-block&#34;&gt;attribute&lt;/a&gt;, &lt;a href=&#34;#resource-block&#34;&gt;resource&lt;/a&gt;, or &lt;a href=&#34;#library-block&#34;&gt;library&lt;/a&gt; must be specified
with a non-empty value for a valid configuration.&lt;/p&gt;
&lt;h3 id=&#34;regexp-block&#34;&gt;regexp block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-filter-regexp-block.md&#34;&gt;
            &lt;p&gt;This block is an optional configuration for the &lt;code&gt;match_type&lt;/code&gt; of &lt;code&gt;&amp;quot;regexp&amp;quot;&lt;/code&gt;.
It configures a Least Recently Used (LRU) cache.&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;cache_enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Determines whether match results are LRU cached.&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;cache_max_num_entries&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The max number of entries of the LRU cache that stores match results.&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;Enabling &lt;code&gt;cache_enabled&lt;/code&gt; could make subsequent matches faster.
Cache size is unlimited unless &lt;code&gt;cache_max_num_entries&lt;/code&gt; is also specified.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cache_max_num_entries&lt;/code&gt; is ignored if &lt;code&gt;cache_enabled&lt;/code&gt; is false.&lt;/p&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/otelcol-filter-attribute-block.md&#34;&gt;
            &lt;p&gt;This block specifies an attribute to match against:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More than one &lt;code&gt;attribute&lt;/code&gt; block can be defined.&lt;/li&gt;
&lt;li&gt;Only &lt;code&gt;match_type = &amp;quot;strict&amp;quot;&lt;/code&gt; is allowed if &lt;code&gt;attribute&lt;/code&gt; is specified.&lt;/li&gt;
&lt;li&gt;All &lt;code&gt;attribute&lt;/code&gt; blocks must match exactly for a match to occur.&lt;/li&gt;
&lt;/ul&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 attribute key.&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;any&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The attribute value to match against.&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 &lt;code&gt;value&lt;/code&gt; isn&amp;rsquo;t set, any value will match.
The type of &lt;code&gt;value&lt;/code&gt; could be a number, a string, or a boolean.&lt;/p&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/otelcol-filter-resource-block.md&#34;&gt;
            &lt;p&gt;This block specifies items to match the resources against:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More than one &lt;code&gt;resource&lt;/code&gt; block can be defined.&lt;/li&gt;
&lt;li&gt;A match occurs if the input data resources match at least one &lt;code&gt;resource&lt;/code&gt; block.&lt;/li&gt;
&lt;/ul&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 resource key.&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;any&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The resource value to match against.&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 &lt;code&gt;value&lt;/code&gt; is not set, any value will match.
The type of &lt;code&gt;value&lt;/code&gt; could be a number, a string, or a boolean.&lt;/p&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/otelcol-filter-library-block.md&#34;&gt;
            &lt;p&gt;This block specifies properties to match the implementation library against:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More than one &lt;code&gt;library&lt;/code&gt; block can be defined.&lt;/li&gt;
&lt;li&gt;A match occurs if the span&amp;rsquo;s implementation library matches at least one &lt;code&gt;library&lt;/code&gt; block.&lt;/li&gt;
&lt;/ul&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The attribute key.&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;version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The version to match against.&lt;/td&gt;
              &lt;td&gt;null&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;version&lt;/code&gt; is unset, any version matches.
If &lt;code&gt;version&lt;/code&gt; is set to an empty string, it only matches a library version, which is also an empty string.&lt;/p&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/output-block-traces.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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
Configure the &lt;code&gt;traces&lt;/code&gt; argument accordingly to send telemetry data to other components.&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; OTLP-formatted data for traces telemetry signals.
Logs and metrics are not supported.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.attributes&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.attributes&lt;/code&gt; does not expose any component-specific debug
information.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;creating-a-new-span-name-from-attribute-values&#34;&gt;Creating a new span name from attribute values&lt;/h3&gt;
&lt;p&gt;This example creates a new span name from the values of attributes &lt;code&gt;db.svc&lt;/code&gt;,
&lt;code&gt;operation&lt;/code&gt;, and &lt;code&gt;id&lt;/code&gt;, in that order, separated by the value &lt;code&gt;::&lt;/code&gt;.
All attribute keys need to be specified in the span for the processor to rename it.&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.span &amp;#34;default&amp;#34; {
  name {
    separator        = &amp;#34;::&amp;#34;
    from_attributes  = [&amp;#34;db.svc&amp;#34;, &amp;#34;operation&amp;#34;, &amp;#34;id&amp;#34;]
  }

  output {
      traces = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For a span with the following attributes key/value pairs, the above
Flow configuration will change the span name to &lt;code&gt;&amp;quot;location::get::1234&amp;quot;&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;JSON&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-json&#34;&gt;{ 
  &amp;#34;db.svc&amp;#34;: &amp;#34;location&amp;#34;, 
  &amp;#34;operation&amp;#34;: &amp;#34;get&amp;#34;, 
  &amp;#34;id&amp;#34;: &amp;#34;1234&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For a span with the following attributes key/value pairs, the above
Flow configuration will not change the span name.
This is because the attribute key &lt;code&gt;operation&lt;/code&gt; isn&amp;rsquo;t set:&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;JSON&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-json&#34;&gt;{ 
  &amp;#34;db.svc&amp;#34;: &amp;#34;location&amp;#34;, 
  &amp;#34;id&amp;#34;: &amp;#34;1234&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;creating-a-new-span-name-from-attribute-values-no-separator&#34;&gt;Creating a new span name from attribute values (no separator)&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.processor.span &amp;#34;default&amp;#34; {
  name {
    from_attributes = [&amp;#34;db.svc&amp;#34;, &amp;#34;operation&amp;#34;, &amp;#34;id&amp;#34;]
  }

  output {
      traces = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For a span with the following attributes key/value pairs, the above
Flow configuration will change the span name to &lt;code&gt;&amp;quot;locationget1234&amp;quot;&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;JSON&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-json&#34;&gt;{ 
  &amp;#34;db.svc&amp;#34;: &amp;#34;location&amp;#34;, 
  &amp;#34;operation&amp;#34;: &amp;#34;get&amp;#34;, 
  &amp;#34;id&amp;#34;: &amp;#34;1234&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;renaming-a-span-name-and-adding-attributes&#34;&gt;Renaming a span name and adding attributes&lt;/h3&gt;
&lt;p&gt;Example input and output using the Flow configuration below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Let&amp;rsquo;s assume input span name is &lt;code&gt;/api/v1/document/12345678/update&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The span name will be changed to &lt;code&gt;/api/v1/document/{documentId}/update&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;A new attribute &lt;code&gt;&amp;quot;documentId&amp;quot;=&amp;quot;12345678&amp;quot;&lt;/code&gt; will be added to the span.&lt;/li&gt;
&lt;/ol&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.span &amp;#34;default&amp;#34; {
  name {
    to_attributes {
      rules = [&amp;#34;^\\/api\\/v1\\/document\\/(?P&amp;lt;documentId&amp;gt;.*)\\/update$&amp;#34;]
    }
  }

  output {
      traces = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;filtering-renaming-a-span-name-and-adding-attributes&#34;&gt;Filtering, renaming a span name and adding attributes&lt;/h3&gt;
&lt;p&gt;This example renames the span name to &lt;code&gt;{operation_website}&lt;/code&gt;
and adds the attribute &lt;code&gt;{Key: operation_website, Value: &amp;lt;old span name&amp;gt; }&lt;/code&gt;
if the span has the following properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Service name contains the word &lt;code&gt;banks&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The span name contains &lt;code&gt;/&lt;/code&gt; anywhere in the string.&lt;/li&gt;
&lt;li&gt;The span name is not &lt;code&gt;donot/change&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&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.span &amp;#34;default&amp;#34; {
  include {
    match_type = &amp;#34;regexp&amp;#34;
    services   = [&amp;#34;banks&amp;#34;]
    span_names = [&amp;#34;^(.*?)/(.*?)$&amp;#34;]
  }
  exclude {
    match_type = &amp;#34;strict&amp;#34;
    span_names = [&amp;#34;donot/change&amp;#34;]
  }
  name {
    to_attributes {
      rules = [&amp;#34;(?P&amp;lt;operation_website&amp;gt;.*?)$&amp;#34;]
    }
  }

  output {
      traces = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;setting-a-status&#34;&gt;Setting a status&lt;/h3&gt;
&lt;p&gt;This example changes the status of a span to &amp;ldquo;Error&amp;rdquo; and sets an error description.&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.span &amp;#34;default&amp;#34; {
  status {
    code        = &amp;#34;Error&amp;#34;
    description = &amp;#34;some additional error description&amp;#34;
  }

  output {
      traces = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;setting-a-status-depending-on-an-attribute-value&#34;&gt;Setting a status depending on an attribute value&lt;/h3&gt;
&lt;p&gt;This example sets the status to success only when attribute &lt;code&gt;http.status_code&lt;/code&gt;
is equal to &lt;code&gt;400&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.processor.span &amp;#34;default&amp;#34; {
  include {
    match_type = &amp;#34;strict&amp;#34;
    attribute {
      key   = &amp;#34;http.status_code&amp;#34;
      value = 400
    }
  }
  status {
    code = &amp;#34;Ok&amp;#34;
  }

  output {
      traces = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.span&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.span&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolprocessorspan">otelcol.processor.span&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>otelcol.processor.span&lt;/code> accepts traces telemetry data from other &lt;code>otelcol&lt;/code>
components and modifies the names and attributes of the spans.
It also supports the ability to filter input data to determine if
it should be included or excluded from this processor.&lt;/p></description></item><item><title>otelcol.processor.tail_sampling</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.tail_sampling/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.tail_sampling/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessortail_sampling&#34;&gt;otelcol.processor.tail_sampling&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.processor.tail_sampling&lt;/code&gt; samples traces based on a set of defined
policies. All spans for a given trace &lt;em&gt;must&lt;/em&gt; be received by the same collector
instance for effective sampling decisions.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;tail_sampling&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.tail_sampling&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector Contrib &lt;code&gt;tail_sampling&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.tail_sampling&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.tail_sampling &amp;#34;LABEL&amp;#34; {
  policy {
    ...
  }
  ...

  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.processor.tail_sampling&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;decision_wait&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Wait time since the first span of a trace before making a sampling decision.&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;num_traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of traces kept in memory.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;50000&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;expected_new_traces_per_sec&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Expected number of new traces (helps in allocating data structures).&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;decision_wait&lt;/code&gt; determines the number of batches to maintain on a channel. Its value must convert to a number of seconds greater than zero.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;num_traces&lt;/code&gt; determines the buffer size of the trace delete channel which is composed of trace ids. Increasing the number will increase the memory usage of the component while decreasing the number will lower the maximum amount of traces kept in memory.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;expected_new_traces_per_sec&lt;/code&gt; determines the initial slice sizing of the current batch. A larger number will use more memory but be more efficient when adding traces to the batch.&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.tail_sampling&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;policy&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#policy-block&#34;&gt;policy&lt;/a&gt; []&lt;/td&gt;
              &lt;td&gt;Policies used to make a sampling decision.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; latency&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#latency-block&#34;&gt;latency&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on the duration of the trace.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; numeric_attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#numeric_attribute-block&#34;&gt;numeric_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on number attributes (resource and record).&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; probabilistic&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#probabilistic-block&#34;&gt;probabilistic&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample a percentage of traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; status_code&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#status_code-block&#34;&gt;status_code&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based upon the status code.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; string_attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#string_attribute-block&#34;&gt;string_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on string attributes (resource and record) value matches.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; rate_limiting&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#rate_limiting-block&#34;&gt;rate_limiting&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on rate.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; span_count&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#span_count-block&#34;&gt;span_count&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on the minimum number of spans within a batch.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; boolean_attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#boolean_attribute-block&#34;&gt;boolean_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on a boolean attribute (resource and record).&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; ottl_condition&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#ottl_condition-block&#34;&gt;ottl_condition&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on a given boolean OTTL condition (span and span event).&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; trace_state&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#trace_state-block&#34;&gt;trace_state&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on TraceState value matches.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#and-block&#34;&gt;and&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on multiple policies, creates an &lt;code&gt;and&lt;/code&gt; policy.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#and_sub_policy-block&#34;&gt;and_sub_policy&lt;/a&gt; []&lt;/td&gt;
              &lt;td&gt;A set of policies underneath an &lt;code&gt;and&lt;/code&gt; policy type.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; latency&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#latency-block&#34;&gt;latency&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on the duration of the trace.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; numeric_attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#numeric_attribute-block&#34;&gt;numeric_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on number attributes (resource and record).&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; probabilistic&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#probabilistic-block&#34;&gt;probabilistic&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample a percentage of traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; status_code&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#status_code-block&#34;&gt;status_code&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based upon the status code.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; string_attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#string_attribute-block&#34;&gt;string_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on string attributes (resource and record) value matches.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; rate_limiting&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#rate_limiting-block&#34;&gt;rate_limiting&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on rate.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; span_count&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#span_count-block&#34;&gt;span_count&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on the minimum number of spans within a batch.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; boolean_attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#boolean_attribute-block&#34;&gt;boolean_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on a boolean attribute (resource and record).&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; ottl_condition&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#ottl_condition-block&#34;&gt;ottl_condition&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on a given boolean OTTL condition (span and span event).&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; and &amp;gt; and_sub_policy &amp;gt; trace_state&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#trace_state-block&#34;&gt;trace_state&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on TraceState value matches.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#composite-block&#34;&gt;composite&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;This policy will sample based on a combination of above samplers, with ordering and rate allocation per sampler.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#composite_sub_policy-block&#34;&gt;composite_sub_policy&lt;/a&gt; []&lt;/td&gt;
              &lt;td&gt;A set of policies underneath a &lt;code&gt;composite&lt;/code&gt; policy type.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; latency&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#latency-block&#34;&gt;latency&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on the duration of the trace.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; numeric_attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#numeric_attribute-block&#34;&gt;numeric_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on number attributes (resource and record).&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; probabilistic&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#probabilistic-block&#34;&gt;probabilistic&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample a percentage of traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; status_code&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#status_code-block&#34;&gt;status_code&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based upon the status code.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; string_attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#string_attribute-block&#34;&gt;string_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on string attributes (resource and record) value matches.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; rate_limiting&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#rate_limiting-block&#34;&gt;rate_limiting&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on rate.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; span_count&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#span_count-block&#34;&gt;span_count&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on the minimum number of spans within a batch.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; boolean_attribute&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#boolean_attribute-block&#34;&gt;boolean_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on a boolean attribute (resource and record).&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; ottl_condition&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#ottl_condition-block&#34;&gt;ottl_condition&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on a given boolean OTTL condition (span and span event).&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;policy &amp;gt; composite &amp;gt; composite_sub_policy &amp;gt; trace_state&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#trace_state-block&#34;&gt;trace_state&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The policy will sample based on TraceState value matches.&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;h3 id=&#34;policy-block&#34;&gt;policy block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;policy&lt;/code&gt; block configures a sampling policy used by the component. At least one &lt;code&gt;policy&lt;/code&gt; block is required.&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The custom name given to the policy.&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;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The valid policy type for this policy.&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 policy results in a decision, and the processor evaluates them to make a final decision:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When there&amp;rsquo;s an &amp;ldquo;inverted not sample&amp;rdquo; decision, the trace is not sampled.&lt;/li&gt;
&lt;li&gt;When there&amp;rsquo;s a &amp;ldquo;sample&amp;rdquo; decision, the trace is sampled.&lt;/li&gt;
&lt;li&gt;When there&amp;rsquo;s an &amp;ldquo;inverted sample&amp;rdquo; decision and no &amp;ldquo;not sample&amp;rdquo; decisions, the trace is sampled.&lt;/li&gt;
&lt;li&gt;In all other cases, the trace is &lt;em&gt;not&lt;/em&gt; sampled.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An &amp;ldquo;inverted&amp;rdquo; decision is the one made based on the &amp;ldquo;invert_match&amp;rdquo; attribute, such as the one from the string tag policy.&lt;/p&gt;
&lt;h3 id=&#34;latency-block&#34;&gt;latency block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;latency&lt;/code&gt; block configures a policy of type &lt;code&gt;latency&lt;/code&gt;. The policy samples based on the duration of the trace. The duration is determined by looking at the earliest start time and latest end time, without taking into consideration what happened in between.&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;threshold_ms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Lower latency threshold for sampling, in milliseconds.&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;upper_threshold_ms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Upper latency threshold for sampling, in milliseconds.&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;For a trace to be sampled, its latency should be greater than &lt;code&gt;threshold_ms&lt;/code&gt; and lower than or equal to &lt;code&gt;upper_threshold_ms&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;An &lt;code&gt;upper_threshold_ms&lt;/code&gt; of &lt;code&gt;0&lt;/code&gt; will result in a policy which samples anything greater than &lt;code&gt;threshold_ms&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;numeric_attribute-block&#34;&gt;numeric_attribute block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;numeric_attribute&lt;/code&gt; block configures a policy of type &lt;code&gt;numeric_attribute&lt;/code&gt;. The policy samples based on number attributes (resource and record).&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;Tag that the filter is matched 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;min_value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The minimum value of the attribute to be considered a match.&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_value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum value of the attribute to be considered a match.&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;invert_match&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Indicates that values must not match against attribute values.&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;probabilistic-block&#34;&gt;probabilistic block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;probabilistic&lt;/code&gt; block configures a policy of type &lt;code&gt;probabilistic&lt;/code&gt;. The policy samples a percentage of traces.&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;sampling_percentage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The percentage rate at which traces are sampled.&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;hash_salt&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;See below.&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;Use &lt;code&gt;hash_salt&lt;/code&gt; to configure the hashing salts. This is important in scenarios where multiple layers of collectors
have different sampling rates. If multiple collectors use the same salt with different sampling rates, passing one
layer may pass the other even if the collectors have different sampling rates. Configuring different salts avoids that.&lt;/p&gt;
&lt;h3 id=&#34;status_code-block&#34;&gt;status_code block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;status_code&lt;/code&gt; block configures a policy of type &lt;code&gt;status_code&lt;/code&gt;. The policy samples based upon the status code.&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;status_codes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Holds the configurable settings to create a status code filter sampling policy evaluator.&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;status_codes&lt;/code&gt; values must be &amp;ldquo;OK&amp;rdquo;, &amp;ldquo;ERROR&amp;rdquo; or &amp;ldquo;UNSET&amp;rdquo;.&lt;/p&gt;
&lt;h3 id=&#34;string_attribute-block&#34;&gt;string_attribute block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;string_attribute&lt;/code&gt; block configures a policy of type &lt;code&gt;string_attribute&lt;/code&gt;. The policy samples based on string attributes (resource and record) value matches. Both exact and regex value matches are supported.&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;Tag that the filter is matched 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;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Set of values or regular expressions to use when matching against attribute values.&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;enabled_regex_matching&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Determines whether to match attribute values by regexp string.&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;cache_max_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of attribute entries of Least Recently Used (LRU) Cache that stores the matched result from the regular expressions defined in &lt;code&gt;values.&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;invert_match&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Indicates that values or regular expressions must not match against attribute values.&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;rate_limiting-block&#34;&gt;rate_limiting block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;rate_limiting&lt;/code&gt; block configures a policy of type &lt;code&gt;rate_limiting&lt;/code&gt;. The policy samples based on rate.&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;spans_per_second&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sets the maximum number of spans that can be processed each second.&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;span_count-block&#34;&gt;span_count block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;span_count&lt;/code&gt; block configures a policy of type &lt;code&gt;span_count&lt;/code&gt;. The policy samples based on the minimum number of spans within a batch. If all traces within the batch have fewer spans than the threshold, the batch is not sampled.&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_spans&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum number of spans in a trace.&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_spans&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 spans in a trace.&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;Set &lt;code&gt;max_spans&lt;/code&gt; to &lt;code&gt;0&lt;/code&gt;, if you do not want to limit the policy samples based on the maximum number of spans in a trace.&lt;/p&gt;
&lt;h3 id=&#34;boolean_attribute-block&#34;&gt;boolean_attribute block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;boolean_attribute&lt;/code&gt; block configures a policy of type &lt;code&gt;boolean_attribute&lt;/code&gt;.
The policy samples based on a boolean attribute (resource and record).&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;Attribute key 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;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The bool value (&lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;) to use when matching against attribute values.&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;ottl_condition-block&#34;&gt;ottl_condition block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;ottl_condition&lt;/code&gt; block configures a policy of type &lt;code&gt;ottl_condition&lt;/code&gt;. The policy samples based on a given boolean
&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL&lt;/a&gt; condition (span and span event).&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;error_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Error handling if OTTL conditions fail to evaluate.&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;span&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OTTL conditions for spans.&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;spanevent&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OTTL conditions for span events.&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 supported values for &lt;code&gt;error_mode&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ignore&lt;/code&gt;: Ignore errors returned by conditions, log them, and continue on to the next condition. This is the recommended mode.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;silent&lt;/code&gt;: Ignore errors returned by conditions, do not log them, and continue on to the next condition.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;propagate&lt;/code&gt;: Return the error up the pipeline. This will result in the payload being dropped from Grafana Agent.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At least one of &lt;code&gt;span&lt;/code&gt; or &lt;code&gt;spanevent&lt;/code&gt; should be specified. Both &lt;code&gt;span&lt;/code&gt; and &lt;code&gt;spanevent&lt;/code&gt; can also be specified.&lt;/p&gt;
&lt;h3 id=&#34;trace_state-block&#34;&gt;trace_state block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;trace_state&lt;/code&gt; block configures a policy of type &lt;code&gt;trace_state&lt;/code&gt;. The policy samples based on TraceState value matches.&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;Tag that the filter is matched 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;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Set of values to use when matching against trace_state values.&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;and-block&#34;&gt;and block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;and&lt;/code&gt; block configures a policy of type &lt;code&gt;and&lt;/code&gt;. The policy samples based on multiple policies by creating an &lt;code&gt;and&lt;/code&gt; policy.&lt;/p&gt;
&lt;h3 id=&#34;and_sub_policy-block&#34;&gt;and_sub_policy block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;and_sub_policy&lt;/code&gt; block configures a sampling policy used by the &lt;code&gt;and&lt;/code&gt; block. At least one &lt;code&gt;and_sub_policy&lt;/code&gt; block is required inside an &lt;code&gt;and&lt;/code&gt; block.&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The custom name given to the policy.&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;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The valid policy type for this policy.&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;composite-block&#34;&gt;composite block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;composite&lt;/code&gt; block configures a policy of type &lt;code&gt;composite&lt;/code&gt;. This policy samples based on a combination of the above samplers, with ordering and rate allocation per sampler. Rate allocation allocates certain percentages of spans per policy order. For example, if &lt;code&gt;max_total_spans_per_second&lt;/code&gt; is set to 100, then &lt;code&gt;rate_allocation&lt;/code&gt; is set as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;test-composite-policy-1 = 50% of max_total_spans_per_second = 50 spans_per_second&lt;/li&gt;
&lt;li&gt;test-composite-policy-2 = 25% of max_total_spans_per_second = 25 spans_per_second&lt;/li&gt;
&lt;li&gt;To ensure remaining capacity is filled, use always_sample as one of the policies.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;composite_sub_policy-block&#34;&gt;composite_sub_policy block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;composite_sub_policy&lt;/code&gt; block configures a sampling policy used by the &lt;code&gt;composite&lt;/code&gt; block. At least one&lt;code&gt;composite_sub_policy&lt;/code&gt; block is required inside a &lt;code&gt;composite&lt;/code&gt; block.&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The custom name given to the policy.&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;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The valid policy type for this policy.&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;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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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.tail_sampling&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.tail_sampling&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 trace data from Grafana Agent Flow before sending it to
&lt;a href=&#34;../otelcol.exporter.otlp/&#34;&gt;otelcol.exporter.otlp&lt;/a&gt; for further processing. This example shows an impractical number of policies for the purpose of demonstrating how to set up each type.&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;tracing {
  sampling_fraction = 1
  write_to          = [otelcol.processor.tail_sampling.default.input]
}

otelcol.processor.tail_sampling &amp;#34;default&amp;#34; {
  decision_wait               = &amp;#34;10s&amp;#34;
  num_traces                  = 100
  expected_new_traces_per_sec = 10

  policy {
    name = &amp;#34;test-policy-1&amp;#34;
    type = &amp;#34;always_sample&amp;#34;
  }

  policy {
    name = &amp;#34;test-policy-2&amp;#34;
    type = &amp;#34;latency&amp;#34;

    latency {
      threshold_ms = 5000
    }
  }

  policy {
    name = &amp;#34;test-policy-3&amp;#34;
    type = &amp;#34;numeric_attribute&amp;#34;

    numeric_attribute {
      key       = &amp;#34;key1&amp;#34;
      min_value = 50
      max_value = 100
    }
  }

  policy {
    name = &amp;#34;test-policy-4&amp;#34;
    type = &amp;#34;probabilistic&amp;#34;

    probabilistic {
      sampling_percentage = 10
    }
  }

  policy {
    name = &amp;#34;test-policy-5&amp;#34;
    type = &amp;#34;status_code&amp;#34;

    status_code {
      status_codes = [&amp;#34;ERROR&amp;#34;, &amp;#34;UNSET&amp;#34;]
    }
  }

  policy {
    name = &amp;#34;test-policy-6&amp;#34;
    type = &amp;#34;string_attribute&amp;#34;

    string_attribute {
      key    = &amp;#34;key2&amp;#34;
      values = [&amp;#34;value1&amp;#34;, &amp;#34;value2&amp;#34;]
    }
  }

  policy {
    name = &amp;#34;test-policy-7&amp;#34;
    type = &amp;#34;string_attribute&amp;#34;

    string_attribute {
      key                    = &amp;#34;key2&amp;#34;
      values                 = [&amp;#34;value1&amp;#34;, &amp;#34;val*&amp;#34;]
      enabled_regex_matching = true
      cache_max_size         = 10
    }
  }

  policy {
    name = &amp;#34;test-policy-8&amp;#34;
    type = &amp;#34;rate_limiting&amp;#34;

    rate_limiting {
      spans_per_second = 35
    }
  }

  policy {
    name = &amp;#34;test-policy-9&amp;#34;
    type = &amp;#34;string_attribute&amp;#34;

    string_attribute {
      key                    = &amp;#34;http.url&amp;#34;
      values                 = [&amp;#34;/health&amp;#34;, &amp;#34;/metrics&amp;#34;]
      enabled_regex_matching = true
      invert_match           = true
    }
  }

  policy {
    name = &amp;#34;test-policy-10&amp;#34;
    type = &amp;#34;span_count&amp;#34;

    span_count {
      min_spans = 2
    }
  }

  policy {
    name = &amp;#34;test-policy-11&amp;#34;
    type = &amp;#34;trace_state&amp;#34;

    trace_state {
      key    = &amp;#34;key3&amp;#34;
      values = [&amp;#34;value1&amp;#34;, &amp;#34;value2&amp;#34;]
    }
  }

  policy {
    name = &amp;#34;test-policy-12&amp;#34;
    type = &amp;#34;ottl_condition&amp;#34;
    ottl_condition {
      error_mode = &amp;#34;ignore&amp;#34;
      span = [
        &amp;#34;attributes[\&amp;#34;test_attr_key_1\&amp;#34;] == \&amp;#34;test_attr_val_1\&amp;#34;&amp;#34;,
        &amp;#34;attributes[\&amp;#34;test_attr_key_2\&amp;#34;] != \&amp;#34;test_attr_val_1\&amp;#34;&amp;#34;,
      ]
      spanevent = [
        &amp;#34;name != \&amp;#34;test_span_event_name\&amp;#34;&amp;#34;,
        &amp;#34;attributes[\&amp;#34;test_event_attr_key_2\&amp;#34;] != \&amp;#34;test_event_attr_val_1\&amp;#34;&amp;#34;,
      ]
    }
  }

  policy {
    name = &amp;#34;and-policy-1&amp;#34;
    type = &amp;#34;and&amp;#34;

    and {
      and_sub_policy {
        name = &amp;#34;test-and-policy-1&amp;#34;
        type = &amp;#34;numeric_attribute&amp;#34;

        numeric_attribute {
          key       = &amp;#34;key1&amp;#34;
          min_value = 50
          max_value = 100
        }
      }

      and_sub_policy {
        name = &amp;#34;test-and-policy-2&amp;#34;
        type = &amp;#34;string_attribute&amp;#34;

        string_attribute {
          key    = &amp;#34;key1&amp;#34;
          values = [&amp;#34;value1&amp;#34;, &amp;#34;value2&amp;#34;]
        }
      }
    }
  }

  policy {
    name = &amp;#34;composite-policy-1&amp;#34;
    type = &amp;#34;composite&amp;#34;

    composite {
      max_total_spans_per_second = 1000
      policy_order               = [&amp;#34;test-composite-policy-1&amp;#34;, &amp;#34;test-composite-policy-2&amp;#34;, &amp;#34;test-composite-policy-3&amp;#34;]

      composite_sub_policy {
        name = &amp;#34;test-composite-policy-1&amp;#34;
        type = &amp;#34;numeric_attribute&amp;#34;

        numeric_attribute {
          key       = &amp;#34;key1&amp;#34;
          min_value = 50
          max_value = 100
        }
      }

      composite_sub_policy {
        name = &amp;#34;test-composite-policy-2&amp;#34;
        type = &amp;#34;string_attribute&amp;#34;

        string_attribute {
          key    = &amp;#34;key1&amp;#34;
          values = [&amp;#34;value1&amp;#34;, &amp;#34;value2&amp;#34;]
        }
      }

      composite_sub_policy {
        name = &amp;#34;test-composite-policy-3&amp;#34;
        type = &amp;#34;always_sample&amp;#34;
      }

      rate_allocation {
        policy  = &amp;#34;test-composite-policy-1&amp;#34;
        percent = 50
      }

      rate_allocation {
        policy  = &amp;#34;test-composite-policy-2&amp;#34;
        percent = 50
      }
    }
  }

  output {
    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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.tail_sampling&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.tail_sampling&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolprocessortail_sampling">otelcol.processor.tail_sampling&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>otelcol.processor.transform</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.transform/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.processor.transform/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolprocessortransform&#34;&gt;otelcol.processor.transform&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.processor.transform&lt;/code&gt; accepts telemetry data from other &lt;code&gt;otelcol&lt;/code&gt;
components and modifies it using the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Transformation Language (OTTL)&lt;/a&gt;.
OTTL statements consist of &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/ottlfuncs/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL functions&lt;/a&gt;, which act on paths.
A path is a reference to a telemetry data such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Resource attributes.&lt;/li&gt;
&lt;li&gt;Instrumentation scope name.&lt;/li&gt;
&lt;li&gt;Span attributes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/ottlfuncs/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;standard OTTL functions&lt;/a&gt;,
there is also a set of metrics-only functions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/processor/transformprocessor#convert_sum_to_gauge&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;convert_sum_to_gauge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/processor/transformprocessor#convert_gauge_to_sum&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;convert_gauge_to_sum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/processor/transformprocessor#convert_summary_count_val_to_sum&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;convert_summary_count_val_to_sum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/processor/transformprocessor#convert_summary_sum_val_to_sum&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;convert_summary_sum_val_to_sum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/processor/transformprocessor#copy_metric&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;copy_metric&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTTL&lt;/a&gt; statements can also contain constructs such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/pkg/ottl#booleans&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Booleans&lt;/a&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;not true&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;not IsMatch(name, &amp;quot;http_.*&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/pkg/ottl#boolean-expressions&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Boolean Expressions&lt;/a&gt; consisting of a &lt;code&gt;where&lt;/code&gt; followed by one or more booleans:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;set(attributes[&amp;quot;whose_fault&amp;quot;], &amp;quot;ours&amp;quot;) where attributes[&amp;quot;http.status&amp;quot;] == 500&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;set(attributes[&amp;quot;whose_fault&amp;quot;], &amp;quot;theirs&amp;quot;) where attributes[&amp;quot;http.status&amp;quot;] == 400 or attributes[&amp;quot;http.status&amp;quot;] == 404&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/pkg/ottl#math-expressions&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Math expressions&lt;/a&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;1 &#43; 1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;end_time_unix_nano - start_time_unix_nano&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sum([1, 2, 3, 4]) &#43; (10 / 1) - 1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;There are two ways of inputting strings in River configuration files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using quotation marks (
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;normal River strings&lt;/a&gt;). Characters such as &lt;code&gt;\&lt;/code&gt; and
&lt;code&gt;&amp;quot;&lt;/code&gt; must be escaped by preceding them with a &lt;code&gt;\&lt;/code&gt; character.&lt;/li&gt;
&lt;li&gt;Using backticks (
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#raw-strings&#34;&gt;raw River strings&lt;/a&gt;). No characters must be escaped.
However, it&amp;rsquo;s not possible to have backticks inside the string.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, the OTTL statement &lt;code&gt;set(description, &amp;quot;Sum&amp;quot;) where type == &amp;quot;Sum&amp;quot;&lt;/code&gt; can be written as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A normal River string: &lt;code&gt;&amp;quot;set(description, \&amp;quot;Sum\&amp;quot;) where type == \&amp;quot;Sum\&amp;quot;&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A raw River string: &lt;code&gt;`set(description, &amp;quot;Sum&amp;quot;) where type == &amp;quot;Sum&amp;quot;`&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Raw strings are generally more convenient for writing OTTL statements.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;otelcol.processor.transform&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;transform&lt;/code&gt; processor. If necessary, bug reports or feature requests
will be redirected to the upstream repository.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can specify multiple &lt;code&gt;otelcol.processor.transform&lt;/code&gt; components by giving them different labels.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;&lt;code&gt;otelcol.processor.transform&lt;/code&gt; allows you to modify all aspects of your telemetry. Some specific risks are given below,
but this is not an exhaustive list. It is important to understand your data before using this processor.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector/blob/v0.96.0/docs/standard-warnings.md#unsound-transformations&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Unsound Transformations&lt;/a&gt;: Transformations between metric data types are not defined in the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification/blob/main//specification/metrics/data-model.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;metrics data model&lt;/a&gt;.
To use these functions, you must understand the incoming data and know that it can be meaningfully converted
to a new metric data type or can be used to create new metrics.
&lt;ul&gt;
&lt;li&gt;Although OTTL allows you to use the &lt;code&gt;set&lt;/code&gt; function with &lt;code&gt;metric.data_type&lt;/code&gt;,
its implementation in the transform processor is a &lt;a href=&#34;https://en.wikipedia.org/wiki/NOP_%28code%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;no-op&lt;/a&gt;.
To modify a data type, you must use a specific function such as &lt;code&gt;convert_gauge_to_sum&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector/blob/v0.96.0/docs/standard-warnings.md#identity-conflict&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Identity Conflict&lt;/a&gt;: Transformation of metrics can potentially affect a metric&amp;rsquo;s identity,
leading to an Identity Crisis. Be especially cautious when transforming a metric name and when reducing or changing
existing attributes. Adding new attributes is safe.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector/blob/v0.96.0/docs/standard-warnings.md#orphaned-telemetry&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Orphaned Telemetry&lt;/a&gt;: The processor allows you to modify &lt;code&gt;span_id&lt;/code&gt;, &lt;code&gt;trace_id&lt;/code&gt;, and &lt;code&gt;parent_span_id&lt;/code&gt; for traces
and &lt;code&gt;span_id&lt;/code&gt;, and &lt;code&gt;trace_id&lt;/code&gt; logs.  Modifying these fields could lead to orphaned spans or logs.&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&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.transform &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.transform&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;error_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How to react to errors if they occur while processing a statement.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;propagate&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 supported values for &lt;code&gt;error_mode&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ignore&lt;/code&gt;: Ignore errors returned by conditions, log them, and continue on to the next condition. This is the recommended mode.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;silent&lt;/code&gt;: Ignore errors returned by conditions, do not log them, and continue on to the next condition.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;propagate&lt;/code&gt;: Return the error up the pipeline. This will result in the payload being dropped from Grafana Agent.&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;otelcol.processor.transform&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;trace_statements&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#trace_statements-block&#34;&gt;trace_statements&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Statements which transform traces.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;metric_statements&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric_statements-block&#34;&gt;metric_statements&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Statements which transform metrics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;log_statements&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#log_statements-block&#34;&gt;log_statements&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Statements which transform logs.&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;h3 id=&#34;trace_statements-block&#34;&gt;trace_statements block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;trace_statements&lt;/code&gt; block specifies statements which transform trace telemetry signals.
Multiple &lt;code&gt;trace_statements&lt;/code&gt; blocks can be specified.&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;context&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OTTL Context to use when interpreting the associated statements.&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;statements&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 OTTL statements.&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 supported values for &lt;code&gt;context&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;resource&lt;/code&gt;: Use when interacting only with OTLP resources (for example, resource attributes).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;scope&lt;/code&gt;: Use when interacting only with OTLP instrumentation scope (for example, the name of the instrumentation scope).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;span&lt;/code&gt;: Use when interacting only with OTLP spans.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;spanevent&lt;/code&gt;: Use when interacting only with OTLP span events.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See &lt;a href=&#34;#ottl-context&#34;&gt;OTTL Context&lt;/a&gt; for more information about how ot use contexts.&lt;/p&gt;
&lt;h3 id=&#34;metric_statements-block&#34;&gt;metric_statements block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;metric_statements&lt;/code&gt; block specifies statements which transform metric telemetry signals.
Multiple &lt;code&gt;metric_statements&lt;/code&gt; blocks can be specified.&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;context&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OTTL Context to use when interpreting the associated statements.&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;statements&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 OTTL statements.&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 supported values for &lt;code&gt;context&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;resource&lt;/code&gt;: Use when interacting only with OTLP resources (for example, resource attributes).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;scope&lt;/code&gt;: Use when interacting only with OTLP instrumentation scope (for example, the name of the instrumentation scope).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;metric&lt;/code&gt;: Use when interacting only with individual OTLP metrics.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;datapoint&lt;/code&gt;: Use when interacting only with individual OTLP metric data points.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Refer to &lt;a href=&#34;#ottl-context&#34;&gt;OTTL Context&lt;/a&gt; for more information about how to use contexts.&lt;/p&gt;
&lt;h3 id=&#34;log_statements-block&#34;&gt;log_statements block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;log_statements&lt;/code&gt; block specifies statements which transform log telemetry signals.
Multiple &lt;code&gt;log_statements&lt;/code&gt; blocks can be specified.&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;context&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OTTL Context to use when interpreting the associated statements.&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;statements&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 OTTL statements.&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 supported values for &lt;code&gt;context&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;resource&lt;/code&gt;: Use when interacting only with OTLP resources (for example, resource attributes).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;scope&lt;/code&gt;: Use when interacting only with OTLP instrumentation scope (for example, the name of the instrumentation scope).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;log&lt;/code&gt;: Use when interacting only with OTLP logs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See &lt;a href=&#34;#ottl-context&#34;&gt;OTTL Context&lt;/a&gt; for more information about how ot use contexts.&lt;/p&gt;
&lt;h3 id=&#34;ottl-context&#34;&gt;OTTL Context&lt;/h3&gt;
&lt;p&gt;Each context allows the transformation of its type of telemetry.
For example, statements associated with a &lt;code&gt;resource&lt;/code&gt; context will be able to transform the resource&amp;rsquo;s
&lt;code&gt;attributes&lt;/code&gt; and &lt;code&gt;dropped_attributes_count&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Each type of &lt;code&gt;context&lt;/code&gt; defines its own paths and enums specific to that context.
Refer to the OpenTelemetry documentation for a list of paths and enums for each context:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottlresource/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;resource&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottlscope/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;scope&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottlspan/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;span&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottlspanevent/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;spanevent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottllog/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;log&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottlmetric/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;metric&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/contexts/ottldatapoint/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;datapoint&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contexts &lt;strong&gt;NEVER&lt;/strong&gt; supply access to individual items &amp;ldquo;lower&amp;rdquo; in the protobuf definition.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This means statements associated to a &lt;code&gt;resource&lt;/code&gt; &lt;strong&gt;WILL NOT&lt;/strong&gt; be able to access the underlying instrumentation scopes.&lt;/li&gt;
&lt;li&gt;This means statements associated to a &lt;code&gt;scope&lt;/code&gt; &lt;strong&gt;WILL NOT&lt;/strong&gt; be able to access the underlying telemetry slices (spans, metrics, or logs).&lt;/li&gt;
&lt;li&gt;Similarly, statements associated to a &lt;code&gt;metric&lt;/code&gt; &lt;strong&gt;WILL NOT&lt;/strong&gt; be able to access individual datapoints, but can access the entire datapoints slice.&lt;/li&gt;
&lt;li&gt;Similarly, statements associated to a &lt;code&gt;span&lt;/code&gt; &lt;strong&gt;WILL NOT&lt;/strong&gt; be able to access individual SpanEvents, but can access the entire SpanEvents slice.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For practical purposes, this means that a context cannot make decisions on its telemetry based on telemetry &amp;ldquo;lower&amp;rdquo; in the structure.
For example, &lt;strong&gt;the following context statement is not possible&lt;/strong&gt; because it attempts to use individual datapoint
attributes in the condition of a statement associated to a &lt;code&gt;metric&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;metric_statements {
  context = &amp;#34;metric&amp;#34;
  statements = [
    &amp;#34;set(description, \&amp;#34;test passed\&amp;#34;) where datapoints.attributes[\&amp;#34;test\&amp;#34;] == \&amp;#34;pass\&amp;#34;&amp;#34;,
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Context &lt;strong&gt;ALWAYS&lt;/strong&gt; supply access to the items &amp;ldquo;higher&amp;rdquo; in the protobuf definition that are associated to the telemetry being transformed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This means that statements associated to a &lt;code&gt;datapoint&lt;/code&gt; have access to a datapoint&amp;rsquo;s metric, instrumentation scope, and resource.&lt;/li&gt;
&lt;li&gt;This means that statements associated to a &lt;code&gt;spanevent&lt;/code&gt; have access to a spanevent&amp;rsquo;s span, instrumentation scope, and resource.&lt;/li&gt;
&lt;li&gt;This means that statements associated to a &lt;code&gt;span&lt;/code&gt;/&lt;code&gt;metric&lt;/code&gt;/&lt;code&gt;log&lt;/code&gt; have access to the telemetry&amp;rsquo;s instrumentation scope, and resource.&lt;/li&gt;
&lt;li&gt;This means that statements associated to a &lt;code&gt;scope&lt;/code&gt; have access to the scope&amp;rsquo;s resource.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, &lt;strong&gt;the following context statement is possible&lt;/strong&gt; because &lt;code&gt;datapoint&lt;/code&gt; statements can access the datapoint&amp;rsquo;s metric.&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;metric_statements {
  context = &amp;#34;datapoint&amp;#34;
  statements = [
    &amp;#34;set(metric.description, \&amp;#34;test passed\&amp;#34;) where attributes[\&amp;#34;test\&amp;#34;] == \&amp;#34;pass\&amp;#34;&amp;#34;,
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The protobuf definitions for OTLP signals are maintained on GitHub:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-proto/blob/v1.0.0/opentelemetry/proto/trace/v1/trace.proto&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;traces&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-proto/blob/v1.0.0/opentelemetry/proto/metrics/v1/metrics.proto&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;metrics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-proto/blob/v1.0.0/opentelemetry/proto/logs/v1/logs.proto&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;logs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whenever possible, associate your statements to the context which the statement intens to transform.
The contexts are nested, and the higher-level contexts don&amp;rsquo;t have to iterate through any of the
contexts at a lower level. For example, although you can modify resource attributes associated to a
span using the &lt;code&gt;span&lt;/code&gt; context, it is more efficient to use the &lt;code&gt;resource&lt;/code&gt; context.&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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.transform&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.transform&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;otelcol.processor.transform&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;perform-a-transformation-if-an-attribute-does-not-exist&#34;&gt;Perform a transformation if an attribute does not exist&lt;/h3&gt;
&lt;p&gt;This example sets the attribute &lt;code&gt;test&lt;/code&gt; to &lt;code&gt;pass&lt;/code&gt; if the attribute &lt;code&gt;test&lt;/code&gt; does not exist.&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.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  trace_statements {
    context = &amp;#34;span&amp;#34;
    statements = [
      // Accessing a map with a key that does not exist will return nil.
      `set(attributes[&amp;#34;test&amp;#34;], &amp;#34;pass&amp;#34;) where attributes[&amp;#34;test&amp;#34;] == nil`,
    ]
  }

  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Each statement is enclosed in backticks instead of quotation marks.
This constitutes a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#raw-strings&#34;&gt;raw string&lt;/a&gt;, and lets us avoid the need to escape
each &lt;code&gt;&amp;quot;&lt;/code&gt; with a &lt;code&gt;\&amp;quot;&lt;/code&gt; inside a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;normal&lt;/a&gt; River string.&lt;/p&gt;
&lt;h3 id=&#34;rename-a-resource-attribute&#34;&gt;Rename a resource attribute&lt;/h3&gt;
&lt;p&gt;The are two ways to rename an attribute key.
One way is to set a new attribute and delete the old one:&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.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  trace_statements {
    context = &amp;#34;resource&amp;#34;
    statements = [
      `set(attributes[&amp;#34;namespace&amp;#34;], attributes[&amp;#34;k8s.namespace.name&amp;#34;])`,
      `delete_key(attributes, &amp;#34;k8s.namespace.name&amp;#34;)`,
    ]
  }

  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Another way is to update the key using regular expressions:&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.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  trace_statements {
    context = &amp;#34;resource&amp;#34;
    statements = [
     `replace_all_patterns(attributes, &amp;#34;key&amp;#34;, &amp;#34;k8s\\.namespace\\.name&amp;#34;, &amp;#34;namespace&amp;#34;)`,
    ]
  }

  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Each statement is enclosed in backticks instead of quotation marks.
This constitutes a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#raw-strings&#34;&gt;raw string&lt;/a&gt;, and lets us avoid the need to escape
each &lt;code&gt;&amp;quot;&lt;/code&gt; with a &lt;code&gt;\&amp;quot;&lt;/code&gt;, and each &lt;code&gt;\&lt;/code&gt; with a &lt;code&gt;\\&lt;/code&gt; inside a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;normal&lt;/a&gt; River string.&lt;/p&gt;
&lt;h3 id=&#34;create-an-attribute-from-the-contents-of-a-log-body&#34;&gt;Create an attribute from the contents of a log body&lt;/h3&gt;
&lt;p&gt;This example sets the attribute &lt;code&gt;body&lt;/code&gt; to the value of the log body:&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.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  log_statements {
    context = &amp;#34;log&amp;#34;
    statements = [
      `set(attributes[&amp;#34;body&amp;#34;], body)`,
    ]
  }

  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Each statement is enclosed in backticks instead of quotation marks.
This constitutes a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#raw-strings&#34;&gt;raw string&lt;/a&gt;, and lets us avoid the need to escape
each &lt;code&gt;&amp;quot;&lt;/code&gt; with a &lt;code&gt;\&amp;quot;&lt;/code&gt; inside a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;normal&lt;/a&gt; River string.&lt;/p&gt;
&lt;h3 id=&#34;combine-two-attributes&#34;&gt;Combine two attributes&lt;/h3&gt;
&lt;p&gt;This example sets the attribute &lt;code&gt;test&lt;/code&gt; to the value of attributes &lt;code&gt;service.name&lt;/code&gt; and &lt;code&gt;service.version&lt;/code&gt; combined.&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.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  trace_statements {
    context = &amp;#34;resource&amp;#34;
    statements = [
      // The Concat function combines any number of strings, separated by a delimiter.
      `set(attributes[&amp;#34;test&amp;#34;], Concat([attributes[&amp;#34;foo&amp;#34;], attributes[&amp;#34;bar&amp;#34;]], &amp;#34; &amp;#34;))`,
    ]
  }

  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Each statement is enclosed in backticks instead of quotation marks.
This constitutes a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#raw-strings&#34;&gt;raw string&lt;/a&gt;, and lets us avoid the need to escape
each &lt;code&gt;&amp;quot;&lt;/code&gt; with a &lt;code&gt;\&amp;quot;&lt;/code&gt; inside a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;normal&lt;/a&gt; River string.&lt;/p&gt;
&lt;h3 id=&#34;parsing-json-logs&#34;&gt;Parsing JSON logs&lt;/h3&gt;
&lt;p&gt;Given the following JSON body:&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;JSON&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-json&#34;&gt;{
  &amp;#34;name&amp;#34;: &amp;#34;log&amp;#34;,
  &amp;#34;attr1&amp;#34;: &amp;#34;example value 1&amp;#34;,
  &amp;#34;attr2&amp;#34;: &amp;#34;example value 2&amp;#34;,
  &amp;#34;nested&amp;#34;: {
    &amp;#34;attr3&amp;#34;: &amp;#34;example value 3&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can add specific fields as attributes on the log:&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.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  log_statements {
    context = &amp;#34;log&amp;#34;

    statements = [
      // Parse body as JSON and merge the resulting map with the cache map, ignoring non-json bodies.
      // cache is a field exposed by OTTL that is a temporary storage place for complex operations.
      `merge_maps(cache, ParseJSON(body), &amp;#34;upsert&amp;#34;) where IsMatch(body, &amp;#34;^\\{&amp;#34;)`,

      // Set attributes using the values merged into cache.
      // If the attribute doesn&amp;#39;t exist in cache then nothing happens.
      `set(attributes[&amp;#34;attr1&amp;#34;], cache[&amp;#34;attr1&amp;#34;])`,
      `set(attributes[&amp;#34;attr2&amp;#34;], cache[&amp;#34;attr2&amp;#34;])`,

      // To access nested maps you can chain index ([]) operations.
      // If nested or attr3 do no exist in cache then nothing happens.
      `set(attributes[&amp;#34;nested.attr3&amp;#34;], cache[&amp;#34;nested&amp;#34;][&amp;#34;attr3&amp;#34;])`,
    ]
  }

  output {
    metrics = [otelcol.exporter.otlp.default.input]
    logs    = [otelcol.exporter.otlp.default.input]
    traces  = [otelcol.exporter.otlp.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Each statement is enclosed in backticks instead of quotation marks.
This constitutes a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#raw-strings&#34;&gt;raw string&lt;/a&gt;, and lets us avoid the need to escape
each &lt;code&gt;&amp;quot;&lt;/code&gt; with a &lt;code&gt;\&amp;quot;&lt;/code&gt;, and each &lt;code&gt;\&lt;/code&gt; with a &lt;code&gt;\\&lt;/code&gt; inside a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;normal&lt;/a&gt; River string.&lt;/p&gt;
&lt;h3 id=&#34;various-transformations-of-attributes-and-status-codes&#34;&gt;Various transformations of attributes and status codes&lt;/h3&gt;
&lt;p&gt;The example takes advantage of context efficiency by grouping transformations
with the context which it intends to transform.&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.transform.default.input]
    logs    = [otelcol.processor.transform.default.input]
    traces  = [otelcol.processor.transform.default.input]
  }
}

otelcol.processor.transform &amp;#34;default&amp;#34; {
  error_mode = &amp;#34;ignore&amp;#34;

  trace_statements {
    context = &amp;#34;resource&amp;#34;
    statements = [
      `keep_keys(attributes, [&amp;#34;service.name&amp;#34;, &amp;#34;service.namespace&amp;#34;, &amp;#34;cloud.region&amp;#34;, &amp;#34;process.command_line&amp;#34;])`,
      `replace_pattern(attributes[&amp;#34;process.command_line&amp;#34;], &amp;#34;password\\=[^\\s]*(\\s?)&amp;#34;, &amp;#34;password=***&amp;#34;)`,
      `limit(attributes, 100, [])`,
      `truncate_all(attributes, 4096)`,
    ]
  }

  trace_statements {
    context = &amp;#34;span&amp;#34;
    statements = [
      `set(status.code, 1) where attributes[&amp;#34;http.path&amp;#34;] == &amp;#34;/health&amp;#34;`,
      `set(name, attributes[&amp;#34;http.route&amp;#34;])`,
      `replace_match(attributes[&amp;#34;http.target&amp;#34;], &amp;#34;/user/*/list/*&amp;#34;, &amp;#34;/user/{userId}/list/{listId}&amp;#34;)`,
      `limit(attributes, 100, [])`,
      `truncate_all(attributes, 4096)`,
    ]
  }

  metric_statements {
    context = &amp;#34;resource&amp;#34;
    statements = [
      `keep_keys(attributes, [&amp;#34;host.name&amp;#34;])`,
      `truncate_all(attributes, 4096)`,
    ]
  }

  metric_statements {
    context = &amp;#34;metric&amp;#34;
    statements = [
      `set(description, &amp;#34;Sum&amp;#34;) where type == &amp;#34;Sum&amp;#34;`,
    ]
  }

  metric_statements {
    context = &amp;#34;datapoint&amp;#34;
    statements = [
      `limit(attributes, 100, [&amp;#34;host.name&amp;#34;])`,
      `truncate_all(attributes, 4096)`,
      `convert_sum_to_gauge() where metric.name == &amp;#34;system.processes.count&amp;#34;`,
      `convert_gauge_to_sum(&amp;#34;cumulative&amp;#34;, false) where metric.name == &amp;#34;prometheus_metric&amp;#34;`,
    ]
  }

  log_statements {
    context = &amp;#34;resource&amp;#34;
    statements = [
      `keep_keys(attributes, [&amp;#34;service.name&amp;#34;, &amp;#34;service.namespace&amp;#34;, &amp;#34;cloud.region&amp;#34;])`,
    ]
  }

  log_statements {
    context = &amp;#34;log&amp;#34;
    statements = [
      `set(severity_text, &amp;#34;FAIL&amp;#34;) where body == &amp;#34;request failed&amp;#34;`,
      `replace_all_matches(attributes, &amp;#34;/user/*/list/*&amp;#34;, &amp;#34;/user/{userId}/list/{listId}&amp;#34;)`,
      `replace_all_patterns(attributes, &amp;#34;value&amp;#34;, &amp;#34;/account/\\d{4}&amp;#34;, &amp;#34;/account/{accountId}&amp;#34;)`,
      `set(body, attributes[&amp;#34;http.route&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;
&lt;p&gt;Each statement is enclosed in backticks instead of quotation marks.
This constitutes a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#raw-strings&#34;&gt;raw string&lt;/a&gt;, and lets us avoid the need to escape
each &lt;code&gt;&amp;quot;&lt;/code&gt; with a &lt;code&gt;\&amp;quot;&lt;/code&gt;, and each &lt;code&gt;\&lt;/code&gt; with a &lt;code&gt;\\&lt;/code&gt; inside a 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/config-language/expressions/types_and_values/#strings&#34;&gt;normal&lt;/a&gt; River string.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.transform&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.processor.transform&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-consumers&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolprocessortransform">otelcol.processor.transform&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>otelcol.processor.transform&lt;/code> accepts telemetry data from other &lt;code>otelcol&lt;/code>
components and modifies it using the &lt;a href="https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/README.md" target="_blank" rel="noopener noreferrer">OpenTelemetry Transformation Language (OTTL)&lt;/a>.
OTTL statements consist of &lt;a href="https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/pkg/ottl/ottlfuncs/README.md" target="_blank" rel="noopener noreferrer">OTTL functions&lt;/a>, which act on paths.
A path is a reference to a telemetry data such as:&lt;/p></description></item><item><title>otelcol.receiver.jaeger</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.receiver.jaeger/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics that this component generates to monitor its state.&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;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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&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 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.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;20MiB&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_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;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&lt;/p&gt;
&lt;/div&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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;
&lt;h2 id=&#34;technical-details&#34;&gt;Technical details&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt; supports &lt;a href=&#34;https://en.wikipedia.org/wiki/Gzip&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;gzip&lt;/a&gt; for compression.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.jaeger&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/otelcol.receiver.kafka/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;/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;tr&gt;
              &lt;td&gt;&lt;code&gt;initial_offset&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Initial offset to use if no offset was previously committed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;latest&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;resolve_canonical_bootstrap_servers_only&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to resolve then reverse-lookup broker IPs during startup.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;false&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;If &lt;code&gt;topic&lt;/code&gt; is not set, different topics will be used for different telemetry signals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Metrics will be received from an &lt;code&gt;otlp_metrics&lt;/code&gt; topic.&lt;/li&gt;
&lt;li&gt;Traces will be received from an &lt;code&gt;otlp_spans&lt;/code&gt; topic.&lt;/li&gt;
&lt;li&gt;Logs will be received from an &lt;code&gt;otlp_logs&lt;/code&gt; topic.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;topic&lt;/code&gt; is set to a specific value, then only the signal type that corresponds to the data stored in the topic must be set in the output block.
For example, if &lt;code&gt;topic&lt;/code&gt; is set to &lt;code&gt;&amp;quot;my_telemetry&amp;quot;&lt;/code&gt;, then the &lt;code&gt;&amp;quot;my_telemetry&amp;quot;&lt;/code&gt; topic can only contain either metrics, logs, or traces.
If it contains only metrics, then &lt;code&gt;otelcol.receiver.kafka&lt;/code&gt; should be configured to output only metrics.&lt;/p&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 log message bytes into the body of a log record.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;text&amp;quot;&lt;/code&gt;: Decode the log message as text and insert it into the body of a log record.
By default, UTF-8 is used to decode. A different encoding can be chosen by using &lt;code&gt;text_&amp;lt;ENCODING&amp;gt;&lt;/code&gt;. For example, &lt;code&gt;text_utf-8&lt;/code&gt; or &lt;code&gt;text_shift_jis&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;json&amp;quot;&lt;/code&gt;: Decode the JSON payload and insert it into the body of a log record.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;azure_resource_logs&amp;quot;&lt;/code&gt;: The payload is converted from Azure Resource Logs format to an OTLP log.&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;p&gt;&lt;code&gt;initial_offset&lt;/code&gt; must be either &lt;code&gt;&amp;quot;latest&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;earliest&amp;quot;&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.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;header_extraction&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#header_extraction-block&#34;&gt;header_extraction&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Extract headers from Kafka records.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics which this component generates to monitor its state.&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;tr&gt;
              &lt;td&gt;&lt;code&gt;version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Version of the SASL Protocol to use when authenticating.&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 &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;p&gt;The &lt;code&gt;version&lt;/code&gt; argument can be set to either &lt;code&gt;0&lt;/code&gt; or &lt;code&gt;1&lt;/code&gt;.&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;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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&lt;/p&gt;
&lt;/div&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 example, &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;header_extraction-block&#34;&gt;header_extraction block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;header_extraction&lt;/code&gt; block configures how to extract headers from Kafka records.&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;extract_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables attaching header fields to resource attributes.&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;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of headers to extract from the Kafka 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Regular expressions are not allowed in the &lt;code&gt;headers&lt;/code&gt; argument. Only exact matching will be performed.&lt;/p&gt;
&lt;h3 id=&#34;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&lt;/p&gt;
&lt;/div&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.kafka&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/otelcol.receiver.loki/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.receiver.loki/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceiverloki&#34;&gt;otelcol.receiver.loki&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.loki&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.loki&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#loki-logsreceiver-consumers&#34;&gt;Loki &lt;code&gt;LogsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="otelcolreceiverloki">otelcol.receiver.loki&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>otelcol.receiver.opencensus</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.receiver.opencensus/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;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:55678&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;&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;p&gt;The &amp;ldquo;endpoint&amp;rdquo; parameter is the same for both gRPC and HTTP/JSON, 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 way so that the units are included
in the string, such as &amp;ldquo;512KiB&amp;rdquo; or &amp;ldquo;1024KB&amp;rdquo;.&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;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;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;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;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;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics that this component generates to monitor its state.&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;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;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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&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 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;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&lt;/p&gt;
&lt;/div&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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;]

    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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.opencensus&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/otelcol.receiver.otlp/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics that this component generates to monitor its state.&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;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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&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 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.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;20MiB&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_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;tr&gt;
              &lt;td&gt;&lt;code&gt;traces_url_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The URL path to receive traces on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/v1/traces&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_url_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The URL path to receive metrics on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&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_url_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The URL path to receive logs on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/v1/logs&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;To send telemetry signals to &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; with HTTP/JSON, POST to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;[endpoint][traces_url_path]&lt;/code&gt; for traces.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[endpoint][metrics_url_path]&lt;/code&gt; for metrics.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[endpoint][logs_url_path]&lt;/code&gt; for logs.&lt;/li&gt;
&lt;/ul&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;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&lt;/p&gt;
&lt;/div&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;receiver_accepted_spans_ratio_total&lt;/code&gt; (counter): Number of spans successfully pushed into the pipeline.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;receiver_refused_spans_ratio_total&lt;/code&gt; (counter): Number of spans that could not be pushed into the pipeline.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_server_duration_milliseconds&lt;/code&gt; (histogram): Duration of RPC requests from a gRPC server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_server_request_size_bytes&lt;/code&gt; (histogram): Measures size of RPC request messages (uncompressed).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_server_requests_per_rpc&lt;/code&gt; (histogram): Measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_server_response_size_bytes&lt;/code&gt; (histogram): Measures size of RPC response messages (uncompressed).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc_server_responses_per_rpc&lt;/code&gt; (histogram): Measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs.&lt;/li&gt;
&lt;/ul&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;
&lt;h2 id=&#34;technical-details&#34;&gt;Technical details&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; supports &lt;a href=&#34;https://en.wikipedia.org/wiki/Gzip&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;gzip&lt;/a&gt; for compression.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/otelcol.receiver.prometheus/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.receiver.prometheus/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceiverprometheus&#34;&gt;otelcol.receiver.prometheus&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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;MetricsReceiver&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 the 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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-consumers&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolreceiverprometheus">otelcol.receiver.prometheus&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>otelcol.receiver.vcenter</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.receiver.vcenter/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.receiver.vcenter/</guid><content><![CDATA[&lt;h1 id=&#34;otelcolreceivervcenter&#34;&gt;otelcol.receiver.vcenter&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#experimental&#34;&gt;experimental&lt;/a&gt; component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;otelcol.receiver.vcenter&lt;/code&gt; accepts metrics from a
vCenter or ESXi host running VMware vSphere APIs 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.vcenter&lt;/code&gt; is a wrapper over the upstream
OpenTelemetry Collector &lt;code&gt;vcenter&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.vcenter&lt;/code&gt; components can be specified by giving them
different labels.&lt;/p&gt;
&lt;p&gt;The full list of metrics that can be collected can be found in &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.96.0/receiver/vcenterreceiver/documentation.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;vcenter receiver documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;This receiver has been built to support ESXi and vCenter versions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;8&lt;/li&gt;
&lt;li&gt;7.0&lt;/li&gt;
&lt;li&gt;6.7&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A “Read Only” user assigned to a vSphere with permissions to the vCenter server, cluster and all subsequent resources being monitored must be specified in order for the receiver to retrieve information about them.&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.vcenter &amp;#34;LABEL&amp;#34; {
  endpoint = &amp;#34;VCENTER_ENDPOINT&amp;#34;
  username = &amp;#34;VCENTER_USERNAME&amp;#34;
  password = &amp;#34;VCENTER_PASSWORD&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.vcenter&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;endpoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Endpoint to a vCenter Server or ESXi host which has the SDK path enabled.&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;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 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;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Password to use for 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;collection_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Defines how often to collect metrics.&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;initial_delay&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Defines how long this receiver waits before starting.&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;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Defines the timeout for the underlying HTTP client.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;endpoint&lt;/code&gt; has the format &lt;code&gt;&amp;lt;protocol&amp;gt;://&amp;lt;hostname&amp;gt;&lt;/code&gt;. For example, &lt;code&gt;https://vcsa.hostname.localnet&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.receiver.vcenter&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;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;metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metrics-block&#34;&gt;metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures which metrics will be sent to downstream components.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;resource_attributes&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource_attributes-block&#34;&gt;resource_attributes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures resource attributes for metrics sent to downstream components.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics that this component generates to monitor its state.&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;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;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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;metrics-block&#34;&gt;metrics 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;vcenter.cluster.cpu.effective&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.cluster.cpu.effective&lt;/code&gt; metric.&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;vcenter.cluster.cpu.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.cluster.cpu.usage&lt;/code&gt; metric.&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;vcenter.cluster.host.count&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.cluster.host.count&lt;/code&gt; metric.&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;vcenter.cluster.memory.effective&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.cluster.memory.effective&lt;/code&gt; metric.&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;vcenter.cluster.memory.limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.cluster.memory.limit&lt;/code&gt; metric.&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;vcenter.cluster.memory.used&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.cluster.memory.used&lt;/code&gt; metric.&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;vcenter.cluster.vm.count&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.cluster.vm.count&lt;/code&gt; metric.&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;vcenter.datastore.disk.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.datastore.disk.usage&lt;/code&gt; metric.&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;vcenter.datastore.disk.utilization&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.datastore.disk.utilization&lt;/code&gt; metric.&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;vcenter.host.cpu.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.cpu.usage&lt;/code&gt; metric.&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;vcenter.host.cpu.utilization&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.cpu.utilization&lt;/code&gt; metric.&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;vcenter.host.disk.latency.avg&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.disk.latency.avg&lt;/code&gt; metric.&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;vcenter.host.disk.latency.max&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.disk.latency.max&lt;/code&gt; metric.&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;vcenter.host.disk.throughput&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.disk.throughput&lt;/code&gt; metric.&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;vcenter.host.memory.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.memory.usage&lt;/code&gt; metric.&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;vcenter.host.memory.utilization&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.memory.utilization&lt;/code&gt; metric.&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;vcenter.host.network.packet.count&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.network.packet.count&lt;/code&gt; metric.&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;vcenter.host.network.packet.errors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.network.packet.errors&lt;/code&gt; metric.&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;vcenter.host.network.throughput&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.network.throughput&lt;/code&gt; metric.&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;vcenter.host.network.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.network.usage&lt;/code&gt; metric.&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;vcenter.resource_pool.cpu.shares&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.resource_pool.cpu.shares&lt;/code&gt; metric.&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;vcenter.resource_pool.cpu.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.resource_pool.cpu.usage&lt;/code&gt; metric.&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;vcenter.resource_pool.memory.shares&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.resource_pool.memory.shares&lt;/code&gt; metric.&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;vcenter.resource_pool.memory.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.resource_pool.memory.usage&lt;/code&gt; metric.&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;vcenter.vm.cpu.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.cpu.usage&lt;/code&gt; metric.&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;vcenter.vm.cpu.utilization&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.cpu.utilization&lt;/code&gt; metric.&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;vcenter.vm.disk.latency.avg&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.disk.latency.avg&lt;/code&gt; metric.&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;vcenter.vm.disk.latency.max&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.disk.latency.max&lt;/code&gt; metric.&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;vcenter.vm.disk.throughput&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.disk.throughput&lt;/code&gt; metric.&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;vcenter.vm.disk.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.disk.usage&lt;/code&gt; metric.&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;vcenter.vm.disk.utilization&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.disk.utilization&lt;/code&gt; metric.&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;vcenter.vm.memory.ballooned&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.memory.ballooned&lt;/code&gt; metric.&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;vcenter.vm.memory.swapped&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.memory.swapped&lt;/code&gt; metric.&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;vcenter.vm.memory.swapped_ssd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.memory.swapped_ssd&lt;/code&gt; metric.&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;vcenter.vm.memory.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.memory.usage&lt;/code&gt; metric.&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;vcenter.vm.memory.utilization&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.memory.utilization&lt;/code&gt; metric.&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;vcenter.vm.network.packet.count&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.network.packet.count&lt;/code&gt; metric.&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;vcenter.vm.network.throughput&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.network.throughput&lt;/code&gt; metric.&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;vcenter.vm.network.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.network.usage&lt;/code&gt; metric.&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;h4 id=&#34;metric-block&#34;&gt;metric block&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &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;Whether to enable the metric.&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;h3 id=&#34;resource_attributes-block&#34;&gt;resource_attributes 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;vcenter.cluster.name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource_attribute-block&#34;&gt;resource_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.cluster.name&lt;/code&gt; resource attribute.&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;vcenter.datastore.name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource_attribute-block&#34;&gt;resource_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.cluster.resource_pool&lt;/code&gt; resource attribute.&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;vcenter.host.name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource_attribute-block&#34;&gt;resource_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.host.name&lt;/code&gt; resource attribute.&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;vcenter.resource_pool.inventory_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource_attribute-block&#34;&gt;resource_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.resource_pool.inventory_path&lt;/code&gt; resource attribute.&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;vcenter.resource_pool.name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource_attribute-block&#34;&gt;resource_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.resource_pool.name&lt;/code&gt; resource attribute.&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;vcenter.vm.id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource_attribute-block&#34;&gt;resource_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.id&lt;/code&gt; resource attribute.&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;vcenter.vm.name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#resource_attribute-block&#34;&gt;resource_attribute&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables the &lt;code&gt;vcenter.vm.name&lt;/code&gt; resource attribute.&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;h4 id=&#34;resource_attribute-block&#34;&gt;resource_attribute block&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &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;Whether to enable the resource attribute.&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;h3 id=&#34;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&lt;/p&gt;
&lt;/div&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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.vcenter&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.vcenter&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.vcenter&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.vcenter &amp;#34;default&amp;#34; {
  endpoint = &amp;#34;http://localhost:15672&amp;#34;
  username = &amp;#34;otelu&amp;#34;
  password = &amp;#34;password&amp;#34;

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

otelcol.processor.batch &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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.vcenter&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="otelcolreceivervcenter">otelcol.receiver.vcenter&lt;/h1>
&lt;div data-shared="flow/stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an
&lt;a href="/docs/agent/v0.42/stability/#experimental">experimental&lt;/a> component. Experimental
components are subject to frequent breaking changes, and may be removed with
no equivalent replacement.&lt;/p>&lt;/blockquote>
&lt;/div>
&lt;p>&lt;code>otelcol.receiver.vcenter&lt;/code> accepts metrics from a
vCenter or ESXi host running VMware vSphere APIs and
forwards it to other &lt;code>otelcol.*&lt;/code> components.&lt;/p></description></item><item><title>otelcol.receiver.zipkin</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/otelcol.receiver.zipkin/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;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.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;20MiB&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_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;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;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;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;debug_metrics&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#debug_metrics-block&#34;&gt;debug_metrics&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the metrics that this component generates to monitor its state.&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;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;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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;include_system_ca_certs_pool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to load the system certificate authorities pool alongside the certificate authority.&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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;cipher_suites&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 TLS cipher suites that the TLS transport can use.&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;reload_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which the certificate is reloaded.&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;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, you must set the &lt;code&gt;insecure&lt;/code&gt; argument to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&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;p&gt;If &lt;code&gt;reload_interval&lt;/code&gt; is set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the certificate never reloaded.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;cipher_suites&lt;/code&gt; is left blank, a safe default list is used.
See the &lt;a href=&#34;https://go.dev/src/crypto/tls/cipher_suites.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go TLS documentation&lt;/a&gt; for a list of supported cipher suites.&lt;/p&gt;
&lt;/div&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;debug_metrics-block&#34;&gt;debug_metrics block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/otelcol-debug-metrics-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;debug_metrics&lt;/code&gt; block configures the metrics that this component generates to monitor its state.&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;disable_high_cardinality_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to disable certain high cardinality 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;disable_high_cardinality_metrics&lt;/code&gt; is the Grafana Agent equivalent to the &lt;code&gt;telemetry.disableHighCardinalityMetrics&lt;/code&gt; feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.&lt;/p&gt;
&lt;/div&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;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;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;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;You must specify the &lt;code&gt;output&lt;/code&gt; block, but all its arguments are optional.
By default, telemetry data is dropped.
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 to send telemetry data to other components.&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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;otelcol.receiver.zipkin&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#opentelemetry-otelcolconsumer-exporters&#34;&gt;OpenTelemetry &lt;code&gt;otelcol.Consumer&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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>prometheus.exporter.apache</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.apache/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.apache/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterapache&#34;&gt;prometheus.exporter.apache&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.apache&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/Lusitaniae/apache_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;apache_exporter&lt;/a&gt; for collecting mod_status statistics from an apache server.&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.exporter.apache &amp;#34;LABEL&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 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;scrape_uri&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URI to Apache stub status page.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http://localhost/server-status?auto&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_override&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Override for HTTP Host 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;insecure&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Ignore server certificate if using https.&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;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.apache&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.exporter.apache&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.exporter.apache&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 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.exporter.apache&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.exporter.apache &amp;#34;example&amp;#34; {
  scrape_uri = &amp;#34;http://web.example.com/server-status?auto&amp;#34;
}

// Configure a prometheus.scrape component to collect apache metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.apache.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.apache&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterapache">prometheus.exporter.apache&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.apache&lt;/code> component embeds
&lt;a href="https://github.com/Lusitaniae/apache_exporter" target="_blank" rel="noopener noreferrer">apache_exporter&lt;/a> for collecting mod_status statistics from an apache server.&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">prometheus.exporter.apache &amp;#34;LABEL&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>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></description></item><item><title>prometheus.exporter.azure</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.azure/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.azure/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterazure&#34;&gt;prometheus.exporter.azure&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.azure&lt;/code&gt; component embeds &lt;a href=&#34;https://github.com/webdevops/azure-metrics-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;azure-metrics-exporter&lt;/code&gt;&lt;/a&gt; to collect metrics from &lt;a href=&#34;https://azure.microsoft.com/en-us/products/monitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Monitor&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The exporter supports all metrics defined by Azure Monitor. You can find the complete list of available metrics in the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Monitor documentation&lt;/a&gt;.
Metrics for this integration are exposed with the template &lt;code&gt;azure_{type}_{metric}_{aggregation}_{unit}&lt;/code&gt; by default. As an example,
the Egress metric for BlobService would be exported as &lt;code&gt;azure_microsoft_storage_storageaccounts_blobservices_egress_total_bytes&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The exporter offers the following two options for gathering metrics.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;(Default) Use an &lt;a href=&#34;https://azure.microsoft.com/en-us/get-started/azure-portal/resource-graph/#overview&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Resource Graph&lt;/a&gt; query to identify resources for gathering metrics.
&lt;ol&gt;
&lt;li&gt;This query will make one API call per resource identified.&lt;/li&gt;
&lt;li&gt;Subscriptions with a reasonable amount of resources can hit the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/request-limits-and-throttling#subscription-and-tenant-limits&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;12000 requests per hour rate limit&lt;/a&gt; Azure enforces.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Set the regions to gather metrics from and get metrics for all resources across those regions.
&lt;ol&gt;
&lt;li&gt;This option will make one API call per subscription, dramatically reducing the number of API calls.&lt;/li&gt;
&lt;li&gt;This approach does not work with all resource types, and Azure does not document which resource types do or do not work.&lt;/li&gt;
&lt;li&gt;A resource type that is not supported produces errors that look like &lt;code&gt;Resource type: microsoft.containerservice/managedclusters not enabled for Cross Resource metrics&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you encounter one of these errors you must use the default Azure Resource Graph based option to gather metrics.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;authentication&#34;&gt;Authentication&lt;/h2&gt;
&lt;p&gt;Grafana Agent Flow must be running in an environment with access to Azure. The exporter uses the Azure SDK for go and supports &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#2-authenticate-with-azure&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;authentication&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The account used by Grafana Agent Flow needs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When using an Azure Resource Graph query, &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/governance/resource-graph/overview#permissions-in-azure-resource-graph&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;read access to the resources that will be queried by Resource Graph&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Permissions to call the &lt;a href=&#34;https://learn.microsoft.com/en-us/rest/api/monitor/metrics/list&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft.Insights Metrics API&lt;/a&gt; which should be the &lt;code&gt;Microsoft.Insights/Metrics/Read&lt;/code&gt; permission&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;prometheus.exporter.azure LABEL {
        subscriptions = [
                SUB_ID_1,
                SUB_ID_2,
                ...
        ]

        resource_type = RESOURCE_TYPE

        metrics = [
                METRIC_1,
                METRIC_2,
                ...
        ]
}&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;You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
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;subscriptions&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 subscriptions to scrape metrics 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;resource_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Azure Resource Type to scrape metrics for.&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;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The metrics to scrape from resources.&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;resource_graph_query_filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kusto query&lt;/a&gt; filter to apply when searching for resources. Can&amp;rsquo;t be used if &lt;code&gt;regions&lt;/code&gt; is set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regions&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 regions for gathering metrics and enables gathering metrics for all resources in the subscription. Can&amp;rsquo;t be used if &lt;code&gt;resource_graph_query_filter&lt;/code&gt; is set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metric_aggregations&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Aggregations to apply for the metrics produced.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timespan&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/ISO_8601#Durations&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ISO8601 Duration&lt;/a&gt; over which the metrics are being queried.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;PT1M&amp;quot;&lt;/code&gt; (1 minute)&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;included_dimensions&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 dimensions to include on the final 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;included_resource_tags&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 resource tags to include on the final metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;owner&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;metric_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Namespace for &lt;code&gt;resource_type&lt;/code&gt; which have multiple levels of 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;azure_cloud_environment&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 cloud environment to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;azurecloud&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;metric_name_template&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Metric template used to expose the metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;azure_{type}_{metric}_{aggregation}_{unit}&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;metric_help_template&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Description of the metric.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;Azure metric {metric} for {type} with aggregation {aggregation} as {unit}&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;validate_dimensions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable dimension validation in the azure sdk&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 list of available &lt;code&gt;resource_type&lt;/code&gt; values and their corresponding &lt;code&gt;metrics&lt;/code&gt; can be found in &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Monitor essentials&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The list of available &lt;code&gt;regions&lt;/code&gt; to your subscription can be found by running the azure CLI command &lt;code&gt;az account list-locations --query &#39;[].name&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;resource_graph_query_filter&lt;/code&gt; can be embedded into a template query of the form &lt;code&gt;Resources | where type =~ &amp;quot;&amp;lt;resource_type&amp;gt;&amp;quot; &amp;lt;resource_graph_query_filter&amp;gt; | project id, tags&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Valid values for &lt;code&gt;metric_aggregations&lt;/code&gt; are &lt;code&gt;minimum&lt;/code&gt;, &lt;code&gt;maximum&lt;/code&gt;, &lt;code&gt;average&lt;/code&gt;, &lt;code&gt;total&lt;/code&gt;, and &lt;code&gt;count&lt;/code&gt;. If no aggregation is specified, the value is retrieved from the metric. For example, the aggregation value of the metric &lt;code&gt;Availability&lt;/code&gt; in &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-classicstorage-storageaccounts-metrics&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft.ClassicStorage/storageAccounts&lt;/a&gt; is &lt;code&gt;average&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Every metric has its own set of dimensions. For example, the dimensions for the metric &lt;code&gt;Availability&lt;/code&gt; in &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-classicstorage-storageaccounts-metrics&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft.ClassicStorage/storageAccounts&lt;/a&gt; are &lt;code&gt;GeoType&lt;/code&gt;, &lt;code&gt;ApiName&lt;/code&gt;, and &lt;code&gt;Authentication&lt;/code&gt;. If a single dimension is requested, it will have the name &lt;code&gt;dimension&lt;/code&gt;. If multiple dimensions are requested, they will have the name &lt;code&gt;dimension&amp;lt;dimension_name&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Tags in &lt;code&gt;included_resource_tags&lt;/code&gt; will be added as labels with the name &lt;code&gt;tag_&amp;lt;tag_name&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Valid values for &lt;code&gt;azure_cloud_environment&lt;/code&gt; are &lt;code&gt;azurecloud&lt;/code&gt;, &lt;code&gt;azurechinacloud&lt;/code&gt;, &lt;code&gt;azuregovernmentcloud&lt;/code&gt; and &lt;code&gt;azurepprivatecloud&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;validate_dimensions&lt;/code&gt; is disabled by default to reduce the number of Azure exporter instances requires when a &lt;code&gt;resource_type&lt;/code&gt; has metrics with varying dimensions. When &lt;code&gt;validate_dimensions&lt;/code&gt; is enabled you will need one exporter instance per metric &#43; dimension combination which is more tedious to maintain.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.azure&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.exporter.azure&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.exporter.azure&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;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.exporter.azure &amp;#34;example&amp;#34; {
	subscriptions    = SUBSCRIPTIONS
	resource_type    = &amp;#34;Microsoft.Storage/storageAccounts&amp;#34;
	regions          = [
	    &amp;#34;westeurope&amp;#34;,
	]
	metric_namespace = &amp;#34;Microsoft.Storage/storageAccounts/blobServices&amp;#34;
	metrics          = [
		&amp;#34;Availability&amp;#34;,
		&amp;#34;BlobCapacity&amp;#34;,
		&amp;#34;BlobCount&amp;#34;,
		&amp;#34;ContainerCount&amp;#34;,
		&amp;#34;Egress&amp;#34;,
		&amp;#34;IndexCapacity&amp;#34;,
		&amp;#34;Ingress&amp;#34;,
		&amp;#34;SuccessE2ELatency&amp;#34;,
		&amp;#34;SuccessServerLatency&amp;#34;,
		&amp;#34;Transactions&amp;#34;,
	]
	included_dimensions = [
        &amp;#34;ApiName&amp;#34;,
        &amp;#34;TransactionType&amp;#34;,
	]
	timespan                    = &amp;#34;PT1H&amp;#34;
}

// Configure a prometheus.scrape component to send metrics to.
prometheus.scrape &amp;#34;demo&amp;#34; {
	targets    = prometheus.exporter.azure.example.targets
	forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
	endpoint {
		url = PROMETHEUS_REMOTE_WRITE_URL

		basic_auth {
			username = USERNAME
			password = PASSWORD
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SUBSCRIPTIONS&lt;/code&gt;: The Azure subscription IDs holding the resources you are interested in.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.azure&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterazure">prometheus.exporter.azure&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.azure&lt;/code> component embeds &lt;a href="https://github.com/webdevops/azure-metrics-exporter" target="_blank" rel="noopener noreferrer">&lt;code>azure-metrics-exporter&lt;/code>&lt;/a> to collect metrics from &lt;a href="https://azure.microsoft.com/en-us/products/monitor" target="_blank" rel="noopener noreferrer">Azure Monitor&lt;/a>.&lt;/p>
&lt;p>The exporter supports all metrics defined by Azure Monitor. You can find the complete list of available metrics in the &lt;a href="https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported" target="_blank" rel="noopener noreferrer">Azure Monitor documentation&lt;/a>.
Metrics for this integration are exposed with the template &lt;code>azure_{type}_{metric}_{aggregation}_{unit}&lt;/code> by default. As an example,
the Egress metric for BlobService would be exported as &lt;code>azure_microsoft_storage_storageaccounts_blobservices_egress_total_bytes&lt;/code>.&lt;/p></description></item><item><title>prometheus.exporter.blackbox</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.blackbox/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.blackbox/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterblackbox&#34;&gt;prometheus.exporter.blackbox&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus/blackbox_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;blackbox_exporter&lt;/code&gt;&lt;/a&gt;. &lt;code&gt;blackbox_exporter&lt;/code&gt; lets you collect blackbox metrics (probes) and expose them as Prometheus metrics.&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.exporter.blackbox &amp;#34;LABEL&amp;#34; {
  target {
    name    = &amp;#34;example&amp;#34;
    address = &amp;#34;EXAMPLE_ADDRESS&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 can be used to configure the exporter&amp;rsquo;s behavior.
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;config_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;blackbox_exporter configuration file path.&lt;/td&gt;
              &lt;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&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;blackbox_exporter configuration as inline 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;probe_timeout_offset&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Offset in seconds to subtract from timeout when probing targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.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;Either &lt;code&gt;config_file&lt;/code&gt; or &lt;code&gt;config&lt;/code&gt; must be specified.
The &lt;code&gt;config_file&lt;/code&gt; argument points to a YAML file defining which blackbox_exporter modules to use.
The &lt;code&gt;config&lt;/code&gt; argument must be a YAML document as string defining which blackbox_exporter modules to use.
&lt;code&gt;config&lt;/code&gt; is typically loaded by using the exports of another component. For example,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;local.file.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.http.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.s3.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See &lt;a href=&#34;https://github.com/prometheus/blackbox_exporter/blob/master/example.yml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;blackbox_exporter&lt;/a&gt; for details on how to generate a config file.&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;prometheus.exporter.blackbox&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;target&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#target-block&#34;&gt;target&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a blackbox target.&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;target-block&#34;&gt;target block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;target&lt;/code&gt; block defines an individual blackbox target.
The &lt;code&gt;target&lt;/code&gt; block may be specified multiple times to define multiple targets. &lt;code&gt;name&lt;/code&gt; attribute is required and will be used in the target&amp;rsquo;s &lt;code&gt;job&lt;/code&gt; label.&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;The name of the target to probe.&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;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 of the target to probe.&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;module&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Blackbox module to use to probe.&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;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 the target.&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;Labels specified in the &lt;code&gt;labels&lt;/code&gt; argument will not override labels set by &lt;code&gt;blackbox_exporter&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.blackbox&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.exporter.blackbox&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.exporter.blackbox&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;collect-metrics-using-a-blackbox-exporter-config-file&#34;&gt;Collect metrics using a blackbox exporter config file&lt;/h3&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.exporter.blackbox&lt;/code&gt;. It adds an extra label, &lt;code&gt;env=&amp;quot;dev&amp;quot;&lt;/code&gt;, to the metrics emitted by the &lt;code&gt;grafana&lt;/code&gt; target. The &lt;code&gt;example&lt;/code&gt; target does not have any added labels.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;config_file&lt;/code&gt; argument is used to define which &lt;code&gt;blackbox_exporter&lt;/code&gt; modules to use. You can use the &lt;a href=&#34;https://github.com/prometheus/blackbox_exporter/blob/master/example.yml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;blackbox example config file&lt;/a&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.exporter.blackbox &amp;#34;example&amp;#34; {
  config_file = &amp;#34;blackbox_modules.yml&amp;#34;

  target {
    name    = &amp;#34;example&amp;#34;
    address = &amp;#34;http://example.com&amp;#34;
    module  = &amp;#34;http_2xx&amp;#34;
  }

  target {
    name    = &amp;#34;grafana&amp;#34; 
    address = &amp;#34;https://grafana.com&amp;#34;
    module  = &amp;#34;http_2xx&amp;#34;
    labels = {
      &amp;#34;env&amp;#34; = &amp;#34;dev&amp;#34;,
    }
  }
}

// Configure a prometheus.scrape component to collect Blackbox metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.blackbox.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;collect-metrics-using-an-embedded-configuration&#34;&gt;Collect metrics using an embedded configuration&lt;/h3&gt;
&lt;p&gt;This example is the same above with using an embedded configuration:&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.exporter.blackbox &amp;#34;example&amp;#34; {
  config = &amp;#34;{ modules: { http_2xx: { prober: http, timeout: 5s } } }&amp;#34;

  target {
    name    = &amp;#34;example&amp;#34;
    address = &amp;#34;http://example.com&amp;#34;
    module  = &amp;#34;http_2xx&amp;#34;
  }

  target {
    name    = &amp;#34;grafana&amp;#34;
    address = &amp;#34;https://grafana.com&amp;#34;
    module  = &amp;#34;http_2xx&amp;#34;
    labels = {
      &amp;#34;env&amp;#34; = &amp;#34;dev&amp;#34;,
    }
  }
}

// Configure a prometheus.scrape component to collect Blackbox metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.blackbox.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterblackbox">prometheus.exporter.blackbox&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.blackbox&lt;/code> component embeds
&lt;a href="https://github.com/prometheus/blackbox_exporter" target="_blank" rel="noopener noreferrer">&lt;code>blackbox_exporter&lt;/code>&lt;/a>. &lt;code>blackbox_exporter&lt;/code> lets you collect blackbox metrics (probes) and expose them as Prometheus metrics.&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">prometheus.exporter.blackbox &amp;#34;LABEL&amp;#34; {
target {
name = &amp;#34;example&amp;#34;
address = &amp;#34;EXAMPLE_ADDRESS&amp;#34;
}
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>The following arguments can be used to configure the exporter&amp;rsquo;s behavior.
Omitted fields take their default values.&lt;/p></description></item><item><title>prometheus.exporter.cadvisor</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.cadvisor/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.cadvisor/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportercadvisor&#34;&gt;prometheus.exporter.cadvisor&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; component exposes container metrics using
&lt;a href=&#34;https://github.com/google/cadvisor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;cAdvisor&lt;/a&gt;.&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.exporter.cadvisor &amp;#34;LABEL&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 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;store_container_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to convert container labels and environment variables into labels on Prometheus metrics for each container.&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;allowlisted_container_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allowlist of container labels to convert to Prometheus labels.&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;env_metadata_allowlist&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allowlist of environment variable keys matched with a specified prefix that needs to be collected for containers.&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;raw_cgroup_prefix_allowlist&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 cgroup path prefixes that need to be collected, even when docker_only is specified.&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;perf_events_config&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 JSON file containing the configuration of perf events to measure.&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;resctrl_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Interval to update resctrl mon groups.&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;disabled_metrics&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 metrics to be disabled which, if set, overrides the default disabled metrics.&lt;/td&gt;
              &lt;td&gt;(see below)&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_metrics&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 metrics to be enabled which, if set, overrides disabled_metrics.&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;storage_duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Length of time to keep data stored in memory.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2m&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;containerd_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Containerd endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/run/containerd/containerd.sock&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;containerd_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Containerd namespace.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.io&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;docker_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Docker endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;unix:///var/run/docker.sock&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_docker_tls&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use TLS to connect to docker.&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;docker_tls_cert&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to client certificate for TLS connection to docker.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;cert.pem&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;docker_tls_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to private key for TLS connection to docker.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;key.pem&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;docker_tls_ca&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 trusted CA for TLS connection to docker.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;ca.pem&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;docker_only&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Only report docker containers in addition to root stats.&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;disable_root_cgroup_stats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable collecting root Cgroup stats.&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;For &lt;code&gt;allowlisted_container_labels&lt;/code&gt; to take effect, &lt;code&gt;store_container_labels&lt;/code&gt; must be set to &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;env_metadata_allowlist&lt;/code&gt; is only supported for containerd and Docker runtimes.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;perf_events_config&lt;/code&gt; is not set, measurement of perf events is disabled.&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;resctrl_interval&lt;/code&gt; of &lt;code&gt;0&lt;/code&gt; disables updating mon groups.&lt;/p&gt;
&lt;p&gt;The values for &lt;code&gt;enabled_metrics&lt;/code&gt; and &lt;code&gt;disabled_metrics&lt;/code&gt; do not correspond to
Prometheus metrics, but to kinds of metrics that should (or shouldn&amp;rsquo;t) be
exposed. The full list of values that can be used 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;&amp;#34;cpu&amp;#34;, &amp;#34;sched&amp;#34;, &amp;#34;percpu&amp;#34;, &amp;#34;memory&amp;#34;, &amp;#34;memory_numa&amp;#34;, &amp;#34;cpuLoad&amp;#34;, &amp;#34;diskIO&amp;#34;, &amp;#34;disk&amp;#34;,
&amp;#34;network&amp;#34;, &amp;#34;tcp&amp;#34;, &amp;#34;advtcp&amp;#34;, &amp;#34;udp&amp;#34;, &amp;#34;app&amp;#34;, &amp;#34;process&amp;#34;, &amp;#34;hugetlb&amp;#34;, &amp;#34;perf_event&amp;#34;,
&amp;#34;referenced_memory&amp;#34;, &amp;#34;cpu_topology&amp;#34;, &amp;#34;resctrl&amp;#34;, &amp;#34;cpuset&amp;#34;, &amp;#34;oom_event&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;By default the following metric kinds are disabled: &lt;code&gt;&amp;quot;memory_numa&amp;quot;, &amp;quot;tcp&amp;quot;, &amp;quot;udp&amp;quot;, &amp;quot;advtcp&amp;quot;, &amp;quot;process&amp;quot;, &amp;quot;hugetlb&amp;quot;, &amp;quot;referenced_memory&amp;quot;, &amp;quot;cpu_topology&amp;quot;, &amp;quot;resctrl&amp;quot;, &amp;quot;cpuset&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; component does not support any blocks, and is configured
fully through arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cadvisor&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.exporter.cadvisor&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.exporter.cadvisor&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 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.exporter.cadvisor&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.exporter.cadvisor &amp;#34;example&amp;#34; {
  docker_host = &amp;#34;unix:///var/run/docker.sock&amp;#34;

  storage_duration = &amp;#34;5m&amp;#34;
}

// Configure a prometheus.scrape component to collect cadvisor metrics.
prometheus.scrape &amp;#34;scraper&amp;#34; {
  targets    = prometheus.exporter.cadvisor.example.targets
  forward_to = [ prometheus.remote_write.demo.receiver ]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportercadvisor">prometheus.exporter.cadvisor&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.cadvisor&lt;/code> component exposes container metrics using
&lt;a href="https://github.com/google/cadvisor" target="_blank" rel="noopener noreferrer">cAdvisor&lt;/a>.&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">prometheus.exporter.cadvisor &amp;#34;LABEL&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>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></description></item><item><title>prometheus.exporter.cloudwatch</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.cloudwatch/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.cloudwatch/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportercloudwatch&#34;&gt;prometheus.exporter.cloudwatch&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt; component
embeds &lt;a href=&#34;https://github.com/nerdswords/yet-another-cloudwatch-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;yet-another-cloudwatch-exporter&lt;/code&gt;&lt;/a&gt;, letting you
collect &lt;a href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;CloudWatch metrics&lt;/a&gt;,
translate them to a prometheus-compatible format and remote write them.&lt;/p&gt;
&lt;p&gt;This component lets you scrape CloudWatch metrics in a set of configurations we call &lt;em&gt;jobs&lt;/em&gt;. There are
two kinds of jobs: &lt;a href=&#34;#discovery-block&#34;&gt;discovery&lt;/a&gt; and &lt;a href=&#34;#static-block&#34;&gt;static&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;authentication&#34;&gt;Authentication&lt;/h2&gt;
&lt;p&gt;Grafana Agent Flow must be running in an environment with access to AWS. The exporter uses
the &lt;a href=&#34;https://aws.github.io/aws-sdk-go-v2/docs/getting-started/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS SDK for Go&lt;/a&gt; and
provides authentication
via &lt;a href=&#34;https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS&amp;rsquo;s default credential chain&lt;/a&gt;.
Regardless of the method used to acquire the credentials,
some permissions are needed for the exporter to work.&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;tag:GetResources&amp;#34;,
&amp;#34;cloudwatch:GetMetricData&amp;#34;,
&amp;#34;cloudwatch:GetMetricStatistics&amp;#34;,
&amp;#34;cloudwatch:ListMetrics&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following IAM permissions are required for the &lt;a href=&#34;https://aws.amazon.com/transit-gateway/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Transit Gateway&lt;/a&gt;
attachment (tgwa) metrics to work.&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;ec2:DescribeTags&amp;#34;,
&amp;#34;ec2:DescribeInstances&amp;#34;,
&amp;#34;ec2:DescribeRegions&amp;#34;,
&amp;#34;ec2:DescribeTransitGateway*&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following IAM permission is required to discover tagged &lt;a href=&#34;https://aws.amazon.com/es/api-gateway/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API Gateway&lt;/a&gt; REST
APIs:&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;apigateway:GET&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following IAM permissions are required to discover
tagged &lt;a href=&#34;https://aws.amazon.com/dms/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Database Migration Service&lt;/a&gt; (DMS) replication instances and tasks:&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;dms:DescribeReplicationInstances&amp;#34;,
&amp;#34;dms:DescribeReplicationTasks&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To use all of the integration features, use the following AWS IAM Policy:&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;JSON&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-json&#34;&gt;{
  &amp;#34;Version&amp;#34;: &amp;#34;2012-10-17&amp;#34;,
  &amp;#34;Statement&amp;#34;: [
    {
      &amp;#34;Sid&amp;#34;: &amp;#34;Stmt1674249227793&amp;#34;,
      &amp;#34;Action&amp;#34;: [
        &amp;#34;tag:GetResources&amp;#34;,
        &amp;#34;cloudwatch:GetMetricData&amp;#34;,
        &amp;#34;cloudwatch:GetMetricStatistics&amp;#34;,
        &amp;#34;cloudwatch:ListMetrics&amp;#34;,
        &amp;#34;ec2:DescribeTags&amp;#34;,
        &amp;#34;ec2:DescribeInstances&amp;#34;,
        &amp;#34;ec2:DescribeRegions&amp;#34;,
        &amp;#34;ec2:DescribeTransitGateway*&amp;#34;,
        &amp;#34;apigateway:GET&amp;#34;,
        &amp;#34;dms:DescribeReplicationInstances&amp;#34;,
        &amp;#34;dms:DescribeReplicationTasks&amp;#34;
      ],
      &amp;#34;Effect&amp;#34;: &amp;#34;Allow&amp;#34;,
      &amp;#34;Resource&amp;#34;: &amp;#34;*&amp;#34;
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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.exporter.cloudwatch &amp;#34;queues&amp;#34; {
	sts_region = &amp;#34;us-east-2&amp;#34;

	discovery {
		type        = &amp;#34;sqs&amp;#34;
		regions     = [&amp;#34;us-east-2&amp;#34;]
		search_tags = {
			&amp;#34;scrape&amp;#34; = &amp;#34;true&amp;#34;,
		}

		metric {
			name       = &amp;#34;NumberOfMessagesSent&amp;#34;
			statistics = [&amp;#34;Sum&amp;#34;, &amp;#34;Average&amp;#34;]
			period     = &amp;#34;1m&amp;#34;
		}

		metric {
			name       = &amp;#34;NumberOfMessagesReceived&amp;#34;
			statistics = [&amp;#34;Sum&amp;#34;, &amp;#34;Average&amp;#34;]
			period     = &amp;#34;1m&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;You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
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;sts_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 to use when calling &lt;a href=&#34;https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;STS&lt;/a&gt; for retrieving account information.&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;fips_disabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable use of FIPS endpoints. Set &amp;rsquo;true&amp;rsquo; when running outside of USA regions.&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;debug&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable debug logging on CloudWatch exporter internals.&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;discovery_exported_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of tags (value) per service (key) to export in all metrics. For example, defining the &lt;code&gt;[&amp;quot;name&amp;quot;, &amp;quot;type&amp;quot;]&lt;/code&gt; under &lt;code&gt;&amp;quot;AWS/EC2&amp;quot;&lt;/code&gt; will export the name and type tags and its values as labels in all metrics. Affects all discovery jobs.&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;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks in&lt;code&gt;prometheus.exporter.cloudwatch&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;discovery&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#discovery-block&#34;&gt;discovery&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a discovery job. Multiple jobs can be configured.&lt;/td&gt;
              &lt;td&gt;no*&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;discovery &amp;gt; role&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#role-block&#34;&gt;role&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the IAM roles the job should assume to scrape metrics. Defaults to the role configured in the environment Grafana Agent Flow runs on.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;discovery &amp;gt; metric&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the list of metrics the job should scrape. Multiple metrics can be defined inside one job.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;static&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#static-block&#34;&gt;static&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a static job. Multiple jobs can be configured.&lt;/td&gt;
              &lt;td&gt;no*&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;static &amp;gt; role&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#role-block&#34;&gt;role&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the IAM roles the job should assume to scrape metrics. Defaults to the role configured in the environment Grafana Agent Flow runs on.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;static &amp;gt; metric&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the list of metrics the job should scrape. Multiple metrics can be defined inside one job.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;decoupled_scraping&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#decoupled_scraping-block&#34;&gt;decoupled_scraping&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the decoupled scraping feature to retrieve metrics on a schedule and return the cached 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;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;static&lt;/code&gt; and &lt;code&gt;discovery&lt;/code&gt; blocks are marked as not required, but you must configure at least one static or discovery job.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;discovery-block&#34;&gt;discovery block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;discovery&lt;/code&gt; block allows the component to scrape CloudWatch metrics with only the AWS service and a list of metrics
under that service/namespace.
Grafana Agent Flow will find AWS resources in the specified service for which to scrape these metrics, label them appropriately,
and export them to Prometheus. For example, if we wanted to scrape CPU utilization and network traffic metrics from all AWS EC2 instances:&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.exporter.cloudwatch &amp;#34;discover_instances&amp;#34; {
	sts_region = &amp;#34;us-east-2&amp;#34;

	discovery {
		type    = &amp;#34;AWS/EC2&amp;#34;
		regions = [&amp;#34;us-east-2&amp;#34;]

		metric {
			name       = &amp;#34;CPUUtilization&amp;#34;
			statistics = [&amp;#34;Average&amp;#34;]
			period     = &amp;#34;5m&amp;#34;
		}

		metric {
			name       = &amp;#34;NetworkPacketsIn&amp;#34;
			statistics = [&amp;#34;Average&amp;#34;]
			period     = &amp;#34;5m&amp;#34;
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can configure the &lt;code&gt;discovery&lt;/code&gt; block one or multiple times to scrape metrics from different services or with
different &lt;code&gt;search_tags&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;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;regions&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 AWS regions.&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;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Cloudwatch service alias (&lt;code&gt;&amp;quot;alb&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;ec2&amp;quot;&lt;/code&gt;, etc) or namespace name (&lt;code&gt;&amp;quot;AWS/EC2&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;AWS/S3&amp;quot;&lt;/code&gt;, etc). See &lt;a href=&#34;#supported-services-in-discovery-jobs&#34;&gt;supported-services&lt;/a&gt; for a complete list.&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;custom_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom tags to be added as a list of key / value pairs. When exported to Prometheus format, the label name follows the following format: &lt;code&gt;custom_tag_{key}&lt;/code&gt;.&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;search_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of key / value pairs to use for tag filtering (all must match). Value can be a regex.&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;dimension_name_requirements&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 metric dimensions to query. Before querying metric values, the total list of metrics will be filtered to only those that contain exactly this list of dimensions. An empty or undefined list results in all dimension combinations being included.&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;nil_to_zero&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt; metric values are converted to 0. Individual metrics can override this value in the &lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt; block.&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;h3 id=&#34;static-block&#34;&gt;static block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;static&lt;/code&gt; block configures the component to scrape a specific set of CloudWatch metrics. The metrics need to be fully
qualified with the following specifications:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;namespace&lt;/code&gt;: For example, &lt;code&gt;AWS/EC2&lt;/code&gt;, &lt;code&gt;AWS/EBS&lt;/code&gt;, &lt;code&gt;CoolApp&lt;/code&gt; if it were a custom metric, etc.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dimensions&lt;/code&gt;: CloudWatch identifies a metric by a set of dimensions, which are essentially label / value pairs. For
example, all &lt;code&gt;AWS/EC2&lt;/code&gt; metrics are identified by the &lt;code&gt;InstanceId&lt;/code&gt; dimension and the identifier itself.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;metric&lt;/code&gt;: Metric name and statistics.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For example, if you want to scrape the same metrics in the discovery example, but for a specific AWS EC2 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;prometheus.exporter.cloudwatch &amp;#34;static_instances&amp;#34; {
	sts_region = &amp;#34;us-east-2&amp;#34;

	static &amp;#34;instances&amp;#34; {
		regions    = [&amp;#34;us-east-2&amp;#34;]
		namespace  = &amp;#34;AWS/EC2&amp;#34;
		dimensions = {
			&amp;#34;InstanceId&amp;#34; = &amp;#34;i01u29u12ue1u2c&amp;#34;,
		}

		metric {
			name       = &amp;#34;CPUUsage&amp;#34;
			statistics = [&amp;#34;Sum&amp;#34;, &amp;#34;Average&amp;#34;]
			period     = &amp;#34;1m&amp;#34;
		}
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As shown above, &lt;code&gt;static&lt;/code&gt; blocks must be specified with a label, which will translate to the &lt;code&gt;name&lt;/code&gt; label in the exported
metric.&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;static &amp;#34;LABEL&amp;#34; {
    regions    = [&amp;#34;us-east-2&amp;#34;]
    namespace  = &amp;#34;AWS/EC2&amp;#34;
    // ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can configure the &lt;code&gt;static&lt;/code&gt; block one or multiple times to scrape metrics with different sets of &lt;code&gt;dimensions&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;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;regions&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 AWS regions.&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;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CloudWatch metric namespace.&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;dimensions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CloudWatch metric dimensions as a list of name / value pairs. Must uniquely define all metrics in this job.&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;custom_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom tags to be added as a list of key / value pairs. When exported to Prometheus format, the label name follows the following format: &lt;code&gt;custom_tag_{key}&lt;/code&gt;.&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;nil_to_zero&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt; metric values are converted to 0. Individual metrics can override this value in the &lt;a href=&#34;#metric-block&#34;&gt;metric&lt;/a&gt; block.&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;All dimensions must be specified when scraping single metrics like the example above. For example, &lt;code&gt;AWS/Logs&lt;/code&gt; metrics
require &lt;code&gt;Resource&lt;/code&gt;, &lt;code&gt;Service&lt;/code&gt;, &lt;code&gt;Class&lt;/code&gt;, and &lt;code&gt;Type&lt;/code&gt; dimensions to be specified. The same applies to CloudWatch custom
metrics,
all dimensions attached to a metric when saved in CloudWatch are required.&lt;/p&gt;
&lt;h3 id=&#34;metric-block&#34;&gt;metric block&lt;/h3&gt;
&lt;p&gt;Represents an AWS Metrics to scrape. To see available metrics, AWS does not keep a documentation page with all available
metrics.
Follow &lt;a href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/viewing_metrics_with_cloudwatch.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;this guide&lt;/a&gt;
on how to explore metrics, to easily pick the ones you need.&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;Metric name.&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;statistics&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 statistics to scrape. For example, &lt;code&gt;&amp;quot;Minimum&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;Maximum&amp;quot;&lt;/code&gt;, etc.&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;period&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;See &lt;a href=&#34;#period-and-length&#34;&gt;period&lt;/a&gt; section below.&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;length&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;See &lt;a href=&#34;#period-and-length&#34;&gt;period&lt;/a&gt; section below.&lt;/td&gt;
              &lt;td&gt;Calculated based on &lt;code&gt;period&lt;/code&gt;. See &lt;a href=&#34;#period-and-length&#34;&gt;period&lt;/a&gt; for details.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nil_to_zero&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt; metric values are converted to 0.&lt;/td&gt;
              &lt;td&gt;The value of &lt;code&gt;nil_to_zero&lt;/code&gt; in the parent &lt;a href=&#34;#static-block&#34;&gt;static&lt;/a&gt; or &lt;a href=&#34;#discovery-block&#34;&gt;discovery&lt;/a&gt; block (&lt;code&gt;true&lt;/code&gt; if not set in the parent block).&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;h4 id=&#34;period-and-length&#34;&gt;period and length&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;period&lt;/code&gt; controls primarily the width of the time bucket used for aggregating metrics collected from CloudWatch. &lt;code&gt;length&lt;/code&gt;
controls how far back in time CloudWatch metrics are considered during each Grafana Agent scrape.
If both settings are configured, the time parameters when calling CloudWatch APIs works as follows:&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload&#34;
  data-src=&#34;https://grafana.com/media/docs/agent/cloudwatch-period-and-length-time-model-2.png&#34;
  alt=&#34;&#34; width=&#34;1259&#34;
     height=&#34;728&#34;/&gt;&lt;/p&gt;
&lt;p&gt;As noted above, if across multiple metrics under the same static or discovery job, there&amp;rsquo;s different &lt;code&gt;period&lt;/code&gt;
and/or &lt;code&gt;length&lt;/code&gt;
the minimum of all periods, and maximum of all lengths is configured.&lt;/p&gt;
&lt;p&gt;On the other hand, if &lt;code&gt;length&lt;/code&gt; is not configured, both period and length settings will be calculated based on the
required
&lt;code&gt;period&lt;/code&gt; configuration attribute.&lt;/p&gt;
&lt;p&gt;If all metrics within a job (discovery or static) have the same &lt;code&gt;period&lt;/code&gt; value configured, CloudWatch APIs will be
requested
for metrics from the scrape time, to &lt;code&gt;period&lt;/code&gt;s seconds in the past. The values of these are exported to Prometheus.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload&#34;
  data-src=&#34;https://grafana.com/media/docs/agent/cloudwatch-single-period-time-model.png&#34;
  alt=&#34;&#34; width=&#34;776&#34;
     height=&#34;402&#34;/&gt;&lt;/p&gt;
&lt;p&gt;On the other hand, if metrics with different &lt;code&gt;period&lt;/code&gt;s are configured under an individual job, this works differently.
First, two variables are calculated aggregating all periods: &lt;code&gt;length&lt;/code&gt;, taking the maximum value of all periods, and
the new &lt;code&gt;period&lt;/code&gt; value, taking the minimum of all periods. Then, CloudWatch APIs will be requested for metrics from
&lt;code&gt;now - length&lt;/code&gt; to &lt;code&gt;now&lt;/code&gt;, aggregating each in samples for &lt;code&gt;period&lt;/code&gt; seconds. For each metric, the most recent sample
is exported to CloudWatch.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload&#34;
  data-src=&#34;https://grafana.com/media/docs/agent/cloudwatch-multiple-period-time-model.png&#34;
  alt=&#34;&#34; width=&#34;822&#34;
     height=&#34;482&#34;/&gt;&lt;/p&gt;
&lt;h3 id=&#34;role-block&#34;&gt;role block&lt;/h3&gt;
&lt;p&gt;Represents an &lt;a href=&#34;https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS IAM Role&lt;/a&gt;. If omitted, the AWS role
that corresponds to the credentials configured in the environment will be used.&lt;/p&gt;
&lt;p&gt;Multiple roles can be useful when scraping metrics from different AWS accounts with a single pair of credentials. In
this case, a different role
is configured for Grafana Agent to assume before calling AWS APIs. Therefore, the credentials configured in the system need
permission to assume the target role.
See &lt;a href=&#34;https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_permissions-to-switch.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Granting a user permissions to switch roles&lt;/a&gt;
in the AWS IAM documentation for more information about how to configure this.&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_arn&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS IAM Role ARN the exporter should assume to perform AWS API calls.&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;external_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;External ID used when calling STS AssumeRole API. See &lt;a href=&#34;https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;details&lt;/a&gt;.&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;decoupled_scraping-block&#34;&gt;decoupled_scraping block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;decoupled_scraping&lt;/code&gt; block configures an optional feature that scrapes CloudWatch metrics in the background on a
scheduled interval. When this feature is enabled, CloudWatch metrics are gathered asynchronously at the scheduled interval instead
of synchronously when the CloudWatch component is scraped.&lt;/p&gt;
&lt;p&gt;The decoupled scraping feature reduces the number of API requests sent to AWS.
This feature also prevents component scrape timeouts when you gather high volumes of CloudWatch metrics.&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;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls whether the decoupled scraping featured is enabled&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;scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls how frequently to asynchronously gather new CloudWatch metrics&lt;/td&gt;
              &lt;td&gt;5m&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;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cloudwatch&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.exporter.cloudwatch&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.exporter.cloudwatch&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;See the examples described under each &lt;a href=&#34;#discovery-block&#34;&gt;discovery&lt;/a&gt; and &lt;a href=&#34;#static-block&#34;&gt;static&lt;/a&gt; sections.&lt;/p&gt;
&lt;h2 id=&#34;supported-services-in-discovery-jobs&#34;&gt;Supported services in discovery jobs&lt;/h2&gt;
&lt;p&gt;The following is a list of AWS services that are supported in &lt;code&gt;cloudwatch_exporter&lt;/code&gt; discovery jobs. When configuring a
discovery job, the &lt;code&gt;type&lt;/code&gt; field of each &lt;code&gt;discovery_job&lt;/code&gt; must match either the desired job namespace or alias.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Namespace: &lt;code&gt;CWAgent&lt;/code&gt; or Alias: &lt;code&gt;cwagent&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Usage&lt;/code&gt; or Alias: &lt;code&gt;usage&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/CertificateManager&lt;/code&gt; or Alias: &lt;code&gt;acm&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ACMPrivateCA&lt;/code&gt; or Alias: &lt;code&gt;acm-pca&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AmazonMWAA&lt;/code&gt; or Alias: &lt;code&gt;airflow&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MWAA&lt;/code&gt; or Alias: &lt;code&gt;mwaa&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ApplicationELB&lt;/code&gt; or Alias: &lt;code&gt;alb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AppStream&lt;/code&gt; or Alias: &lt;code&gt;appstream&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Backup&lt;/code&gt; or Alias: &lt;code&gt;backup&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ApiGateway&lt;/code&gt; or Alias: &lt;code&gt;apigateway&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AmazonMQ&lt;/code&gt; or Alias: &lt;code&gt;mq&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AppSync&lt;/code&gt; or Alias: &lt;code&gt;appsync&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Athena&lt;/code&gt; or Alias: &lt;code&gt;athena&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AutoScaling&lt;/code&gt; or Alias: &lt;code&gt;asg&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ElasticBeanstalk&lt;/code&gt; or Alias: &lt;code&gt;beanstalk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Billing&lt;/code&gt; or Alias: &lt;code&gt;billing&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Cassandra&lt;/code&gt; or Alias: &lt;code&gt;cassandra&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/CloudFront&lt;/code&gt; or Alias: &lt;code&gt;cloudfront&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Cognito&lt;/code&gt; or Alias: &lt;code&gt;cognito-idp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DMS&lt;/code&gt; or Alias: &lt;code&gt;dms&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DDoSProtection&lt;/code&gt; or Alias: &lt;code&gt;shield&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DocDB&lt;/code&gt; or Alias: &lt;code&gt;docdb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DX&lt;/code&gt; or Alias: &lt;code&gt;dx&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DynamoDB&lt;/code&gt; or Alias: &lt;code&gt;dynamodb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EBS&lt;/code&gt; or Alias: &lt;code&gt;ebs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ElastiCache&lt;/code&gt; or Alias: &lt;code&gt;ec&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MemoryDB&lt;/code&gt; or Alias: &lt;code&gt;memorydb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EC2&lt;/code&gt; or Alias: &lt;code&gt;ec2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EC2Spot&lt;/code&gt; or Alias: &lt;code&gt;ec2Spot&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ECS&lt;/code&gt; or Alias: &lt;code&gt;ecs-svc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;ECS/ContainerInsights&lt;/code&gt; or Alias: &lt;code&gt;ecs-containerinsights&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EFS&lt;/code&gt; or Alias: &lt;code&gt;efs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ELB&lt;/code&gt; or Alias: &lt;code&gt;elb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ElasticMapReduce&lt;/code&gt; or Alias: &lt;code&gt;emr&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EMRServerless&lt;/code&gt; or Alias: &lt;code&gt;emr-serverless&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ES&lt;/code&gt; or Alias: &lt;code&gt;es&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Firehose&lt;/code&gt; or Alias: &lt;code&gt;firehose&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/FSx&lt;/code&gt; or Alias: &lt;code&gt;fsx&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/GameLift&lt;/code&gt; or Alias: &lt;code&gt;gamelift&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/GlobalAccelerator&lt;/code&gt; or Alias: &lt;code&gt;ga&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;Glue&lt;/code&gt; or Alias: &lt;code&gt;glue&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/IoT&lt;/code&gt; or Alias: &lt;code&gt;iot&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Kafka&lt;/code&gt; or Alias: &lt;code&gt;kafka&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/KafkaConnect&lt;/code&gt; or Alias: &lt;code&gt;kafkaconnect&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Kinesis&lt;/code&gt; or Alias: &lt;code&gt;kinesis&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/KinesisAnalytics&lt;/code&gt; or Alias: &lt;code&gt;kinesis-analytics&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Lambda&lt;/code&gt; or Alias: &lt;code&gt;lambda&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MediaConnect&lt;/code&gt; or Alias: &lt;code&gt;mediaconnect&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MediaConvert&lt;/code&gt; or Alias: &lt;code&gt;mediaconvert&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MediaLive&lt;/code&gt; or Alias: &lt;code&gt;medialive&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MediaTailor&lt;/code&gt; or Alias: &lt;code&gt;mediatailor&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Neptune&lt;/code&gt; or Alias: &lt;code&gt;neptune&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/NetworkFirewall&lt;/code&gt; or Alias: &lt;code&gt;nfw&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/NATGateway&lt;/code&gt; or Alias: &lt;code&gt;ngw&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/NetworkELB&lt;/code&gt; or Alias: &lt;code&gt;nlb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/PrivateLinkEndpoints&lt;/code&gt; or Alias: &lt;code&gt;vpc-endpoint&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/PrivateLinkServices&lt;/code&gt; or Alias: &lt;code&gt;vpc-endpoint-service&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Prometheus&lt;/code&gt; or Alias: &lt;code&gt;amp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/QLDB&lt;/code&gt; or Alias: &lt;code&gt;qldb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/RDS&lt;/code&gt; or Alias: &lt;code&gt;rds&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Redshift&lt;/code&gt; or Alias: &lt;code&gt;redshift&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Route53Resolver&lt;/code&gt; or Alias: &lt;code&gt;route53-resolver&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Route53&lt;/code&gt; or Alias: &lt;code&gt;route53&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/S3&lt;/code&gt; or Alias: &lt;code&gt;s3&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/SES&lt;/code&gt; or Alias: &lt;code&gt;ses&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/States&lt;/code&gt; or Alias: &lt;code&gt;sfn&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/SNS&lt;/code&gt; or Alias: &lt;code&gt;sns&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/SQS&lt;/code&gt; or Alias: &lt;code&gt;sqs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/StorageGateway&lt;/code&gt; or Alias: &lt;code&gt;storagegateway&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/TransitGateway&lt;/code&gt; or Alias: &lt;code&gt;tgw&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/TrustedAdvisor&lt;/code&gt; or Alias: &lt;code&gt;trustedadvisor&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/VPN&lt;/code&gt; or Alias: &lt;code&gt;vpn&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ClientVPN&lt;/code&gt; or Alias: &lt;code&gt;clientvpn&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/WAFV2&lt;/code&gt; or Alias: &lt;code&gt;wafv2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/WorkSpaces&lt;/code&gt; or Alias: &lt;code&gt;workspaces&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AOSS&lt;/code&gt; or Alias: &lt;code&gt;aoss&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/SageMaker&lt;/code&gt; or Alias: &lt;code&gt;sagemaker&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/Endpoints&lt;/code&gt; or Alias: &lt;code&gt;sagemaker-endpoints&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/TrainingJobs&lt;/code&gt; or Alias: &lt;code&gt;sagemaker-training&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/ProcessingJobs&lt;/code&gt; or Alias: &lt;code&gt;sagemaker-processing&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/TransformJobs&lt;/code&gt; or Alias: &lt;code&gt;sagemaker-transform&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/InferenceRecommendationsJobs&lt;/code&gt; or Alias: &lt;code&gt;sagemaker-inf-rec&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Sagemaker/ModelBuildingPipeline&lt;/code&gt; or Alias: &lt;code&gt;sagemaker-model-building-pipeline&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportercloudwatch">prometheus.exporter.cloudwatch&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.cloudwatch&lt;/code> component
embeds &lt;a href="https://github.com/nerdswords/yet-another-cloudwatch-exporter" target="_blank" rel="noopener noreferrer">&lt;code>yet-another-cloudwatch-exporter&lt;/code>&lt;/a>, letting you
collect &lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html" target="_blank" rel="noopener noreferrer">CloudWatch metrics&lt;/a>,
translate them to a prometheus-compatible format and remote write them.&lt;/p>
&lt;p>This component lets you scrape CloudWatch metrics in a set of configurations we call &lt;em>jobs&lt;/em>. There are
two kinds of jobs: &lt;a href="#discovery-block">discovery&lt;/a> and &lt;a href="#static-block">static&lt;/a>.&lt;/p></description></item><item><title>prometheus.exporter.consul</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.consul/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.consul/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterconsul&#34;&gt;prometheus.exporter.consul&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.consul&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus/consul_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;consul_exporter&lt;/a&gt; for collecting metrics from a consul install.&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.exporter.consul &amp;#34;LABEL&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 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;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address (host and port) of the Consul instance we should connect to. This could be a local Grafana Agent (localhost:8500, for instance), or the address of a Consul server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http://localhost:8500&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;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File path to a PEM-encoded certificate authority used to validate the authenticity of a 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;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File path to a PEM-encoded certificate used with the private key to verify the exporter&amp;rsquo;s authenticity.&lt;/td&gt;
              &lt;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;File path to a PEM-encoded private key used with the certificate to verify the exporter&amp;rsquo;s authenticity.&lt;/td&gt;
              &lt;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;When provided, this overrides the hostname for the TLS certificate. It can be used to ensure that the certificate name matches the hostname we declare.&lt;/td&gt;
              &lt;td&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;Timeout on HTTP requests to consul.&lt;/td&gt;
              &lt;td&gt;500ms&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;Disable TLS host verification.&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;concurrent_request_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit the maximum number of concurrent requests to consul, 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;allow_stale&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allows any Consul server (non-leader) to service a read.&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;require_consistent&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Forces the read to be fully consistent.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kv_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Prefix under which to look for KV pairs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kv_filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Only store keys that match this regex pattern.&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;generate_health_summary&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collects information about each registered service and exports &lt;code&gt;consul_catalog_service_node_healthy&lt;/code&gt;.&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;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.consul&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.exporter.consul&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.exporter.consul&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 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.exporter.consul&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.exporter.consul &amp;#34;example&amp;#34; {
  server = &amp;#34;https://consul.example.com:8500&amp;#34;
}

// Configure a prometheus.scrape component to collect consul metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.consul.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.consul&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterconsul">prometheus.exporter.consul&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.consul&lt;/code> component embeds
&lt;a href="https://github.com/prometheus/consul_exporter" target="_blank" rel="noopener noreferrer">consul_exporter&lt;/a> for collecting metrics from a consul install.&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">prometheus.exporter.consul &amp;#34;LABEL&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>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></description></item><item><title>prometheus.exporter.dnsmasq</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.dnsmasq/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.dnsmasq/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterdnsmasq&#34;&gt;prometheus.exporter.dnsmasq&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/google/dnsmasq_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;dnsmasq_exporter&lt;/a&gt; for collecting statistics from a dnsmasq server.&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.exporter.dnsmasq &amp;#34;LABEL&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 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;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 of the dnsmasq server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;localhost:53&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;leases_file&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 dnsmasq leases file.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/var/lib/misc/dnsmasq.leases&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;expose_leases&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Expose dnsmasq leases as metrics (high cardinality).&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;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.dnsmasq&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.exporter.dnsmasq&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.exporter.dnsmasq&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 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.exporter.dnsmasq&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.exporter.dnsmasq &amp;#34;example&amp;#34; {
  address = &amp;#34;localhost:53&amp;#34;
}

// Configure a prometheus.scrape component to collect github metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.dnsmasq.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterdnsmasq">prometheus.exporter.dnsmasq&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.dnsmasq&lt;/code> component embeds
&lt;a href="https://github.com/google/dnsmasq_exporter" target="_blank" rel="noopener noreferrer">dnsmasq_exporter&lt;/a> for collecting statistics from a dnsmasq server.&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">prometheus.exporter.dnsmasq &amp;#34;LABEL&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>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></description></item><item><title>prometheus.exporter.elasticsearch</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.elasticsearch/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.elasticsearch/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterelasticsearch&#34;&gt;prometheus.exporter.elasticsearch&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus-community/elasticsearch_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;elasticsearch_exporter&lt;/a&gt; for
the collection of metrics from ElasticSearch servers.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Currently, an Agent can only collect metrics from a single ElasticSearch server.
However, the exporter can collect the metrics from all nodes through that server configured.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;We strongly recommend that you configure a separate user for the Agent, and give it only the strictly mandatory
security privileges necessary for monitoring your node, as per the &lt;a href=&#34;https://github.com/prometheus-community/elasticsearch_exporter#elasticsearch-7x-security-privileges&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;official documentation&lt;/a&gt;.&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.exporter.elasticsearch &amp;#34;LABEL&amp;#34; {
    address = &amp;#34;ELASTICSEARCH_ADDRESS&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;You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
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;HTTP API address of an Elasticsearch node.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;http://localhost:9200&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;Timeout for trying to get stats from Elasticsearch.&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;all&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for all nodes in the cluster. If used, this flag will override the flag &lt;code&gt;node&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;node&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Node&amp;rsquo;s name of which metrics should be exposed&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;indices&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;bool&lt;/td&gt;
              &lt;td&gt;Export stats for indices in the cluster.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;indices_settings&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;bool&lt;/td&gt;
              &lt;td&gt;Export stats for settings of all indices of the cluster.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cluster_settings&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;bool&lt;/td&gt;
              &lt;td&gt;Export stats for cluster settings.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;shards&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;bool&lt;/td&gt;
              &lt;td&gt;Export stats for shards in the cluster (implies indices).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;snapshots&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;bool&lt;/td&gt;
              &lt;td&gt;Export stats for the cluster snapshots.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;clusterinfo_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Cluster info update interval for the cluster label.&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;ca&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to PEM file that contains trusted Certificate Authorities for the Elasticsearch connection.&lt;/td&gt;
              &lt;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_private_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to PEM file that contains the private key for client auth when connecting to Elasticsearch.&lt;/td&gt;
              &lt;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_cert&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to PEM file that contains the corresponding cert for the private key to connect to Elasticsearch.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ssl_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Skip SSL verification when connecting to Elasticsearch.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;aliases&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Include informational aliases 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;data_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for Data Streams.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;slm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for SLM (Snapshot Lifecycle Management).&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.exporter.elasticsearch&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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;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;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;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;/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 mutually exclusive, and only one can be provided inside a &lt;code&gt;basic_auth&lt;/code&gt; block.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.elasticsearch&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.exporter.elasticsearch&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.exporter.elasticsearch&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 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.exporter.elasticsearch&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.exporter.elasticsearch &amp;#34;example&amp;#34; {
  address = &amp;#34;http://localhost:9200&amp;#34;
  basic_auth {
    username = USERNAME
    password = PASSWORD
  }
}

// Configure a prometheus.scrape component to collect Elasticsearch metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.elasticsearch.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterelasticsearch">prometheus.exporter.elasticsearch&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.elasticsearch&lt;/code> component embeds
&lt;a href="https://github.com/prometheus-community/elasticsearch_exporter" target="_blank" rel="noopener noreferrer">elasticsearch_exporter&lt;/a> for
the collection of metrics from ElasticSearch servers.&lt;/p>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>Currently, an Agent can only collect metrics from a single ElasticSearch server.
However, the exporter can collect the metrics from all nodes through that server configured.&lt;/p></description></item><item><title>prometheus.exporter.gcp</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.gcp/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.gcp/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportergcp&#34;&gt;prometheus.exporter.gcp&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.gcp&lt;/code&gt; component embeds &lt;a href=&#34;https://github.com/prometheus-community/stackdriver_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;stackdriver_exporter&lt;/code&gt;&lt;/a&gt;.
It lets you collect &lt;a href=&#34;https://cloud.google.com/monitoring/docs&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP Cloud Monitoring (formerly stackdriver)&lt;/a&gt;, translate them to prometheus-compatible format and remote write.
The component supports all metrics available via &lt;a href=&#34;https://cloud.google.com/monitoring/api/metrics_gcp&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP&amp;rsquo;s monitoring API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Metric names follow the template &lt;code&gt;stackdriver_&amp;lt;monitored_resource&amp;gt;_&amp;lt;metric_type_prefix&amp;gt;_&amp;lt;metric_type&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following example shows a load balancing metric:&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/media/docs/agent/gcp-exporter-config-metric-example.png&#34;
  alt=&#34;gcp-exporter-config-metric-example&#34; width=&#34;884&#34;
     height=&#34;376&#34;/&gt;&lt;/p&gt;
&lt;p&gt;The following list shows its attributes: &lt;br /&gt;
monitored_resource = &lt;code&gt;https_lb_rule&lt;/code&gt;&lt;br /&gt;
metric_type_prefix = &lt;code&gt;loadbalancing.googleapis.com/&lt;/code&gt;&lt;br /&gt;
metric_type = &lt;code&gt;https/backend_latencies&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;These attributes result in a final metric name of:
&lt;code&gt;stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_backend_latencies&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;authentication&#34;&gt;Authentication&lt;/h2&gt;
&lt;p&gt;Grafana Agent must be running in an environment with access to the GCP project it is scraping. The exporter
uses the Google Golang Client Library, which offers a variety of ways to &lt;a href=&#34;https://developers.google.com/identity/protocols/application-default-credentials&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;provide credentials&lt;/a&gt;. Choose the option that works best for you.&lt;/p&gt;
&lt;p&gt;After deciding how Grafana Agent will obtain credentials, ensure the account is set up with the IAM role &lt;code&gt;roles/monitoring.viewer&lt;/code&gt;.
Since the exporter gathers all of its data from &lt;a href=&#34;https://cloud.google.com/monitoring/api/v3&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP monitoring APIs&lt;/a&gt;, this is the only permission needed.&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.exporter.gcp &amp;#34;pubsub&amp;#34; {
        project_ids = [
                &amp;#34;foo&amp;#34;,
                &amp;#34;bar&amp;#34;,
        ]

        metrics_prefixes = [
                &amp;#34;pubsub.googleapis.com/snapshot&amp;#34;,
                &amp;#34;pubsub.googleapis.com/subscription/num_undelivered_messages&amp;#34;,
                &amp;#34;pubsub.googleapis.com/subscription/oldest_unacked_message_age&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;You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
Omitted fields take their default values.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Please note that if you are supplying a list of strings for the &lt;code&gt;extra_filters&lt;/code&gt; argument, any string values within a particular filter string must be enclosed in escaped double quotes. For example, &lt;code&gt;loadbalancing.googleapis.com:resource.labels.backend_target_name=&amp;quot;sample-value&amp;quot;&lt;/code&gt; must be encoded as &lt;code&gt;&amp;quot;loadbalancing.googleapis.com:resource.labels.backend_target_name=\&amp;quot;sample-value\&amp;quot;&amp;quot;&lt;/code&gt; in the River config.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &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_ids&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configure the GCP Project(s) to scrape for metrics.&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;metrics_prefixes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;One or more values from the supported &lt;a href=&#34;https://cloud.google.com/monitoring/api/metrics_gcp&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP Metrics&lt;/a&gt;. These can be as targeted or loose as needed.&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;extra_filters&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to further refine the resources you would like to collect metrics from. Please note that any string value within a particular filter string must be enclosed in escaped double-quotes. The structure for these filters is &lt;code&gt;&amp;lt;targeted_metric_prefix&amp;gt;:&amp;lt;filter_query&amp;gt;&lt;/code&gt;.&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;request_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time range used when querying for metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5m&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;ingest_delay&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When enabled, this automatically adjusts the time range used when querying for metrics backwards based on the metadata GCP has published for how long the data can take to be ingested.&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;request_offset&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When enabled this offsets the time range used when querying for metrics by a set amount.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0s&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_delegated_projects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When enabled drops metrics from attached projects and only fetches metrics from the explicitly configured &lt;code&gt;project_ids&lt;/code&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;tr&gt;
              &lt;td&gt;&lt;code&gt;gcp_client_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 timeout on the client used to make API calls to GCP. A single scrape can initiate numerous calls to GCP, so be mindful if you choose to override this value.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;15s&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;For &lt;code&gt;extra_filters&lt;/code&gt;, the &lt;code&gt;targeted_metric_prefix&lt;/code&gt; is used to ensure the filter is only applied to the metric_prefix(es) where it makes sense. It does not explicitly have to match a value from &lt;code&gt;metric_prefixes&lt;/code&gt;, but the &lt;code&gt;targeted_metric_prefix&lt;/code&gt; must be at least a prefix to one or more &lt;code&gt;metric_prefixes&lt;/code&gt;. The &lt;code&gt;filter_query&lt;/code&gt; is applied to a final metrics API query when querying for metric data. The final query sent to the metrics API already includes filters for project and metric type. Each applicable &lt;code&gt;filter_query&lt;/code&gt; is appended to the query with an AND. You can read more about the metric API filter options in &lt;a href=&#34;https://cloud.google.com/monitoring/api/v3/filters&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCPs documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For &lt;code&gt;request_interval&lt;/code&gt;, most of the time the default works perfectly fine. Most documented metrics include a comments of the form &lt;code&gt;Sampled every X seconds. After sampling, data is not visible for up to Y seconds.&lt;/code&gt; As long as your &lt;code&gt;request_interval&lt;/code&gt; is &amp;gt;= &lt;code&gt;Y&lt;/code&gt; you should have no issues. Consider using &lt;code&gt;ingest_delay&lt;/code&gt; if you would like this to be done programmatically or are gathering slower moving metrics.&lt;/p&gt;
&lt;p&gt;For &lt;code&gt;ingest_delay&lt;/code&gt;, you can see the values for this in documented metrics as &lt;code&gt;After sampling, data is not visible for up to Y seconds.&lt;/code&gt; Since GCPs ingestion delay is an &amp;ldquo;at worst&amp;rdquo;, this is off by default to ensure data is gathered as soon as it&amp;rsquo;s available.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.gcp&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.exporter.gcp&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.exporter.gcp&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;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.exporter.gcp &amp;#34;pubsub_full_config&amp;#34; {
        project_ids = [
                &amp;#34;foo&amp;#34;,
                &amp;#34;bar&amp;#34;,
        ]

        // Using pubsub metrics (https://cloud.google.com/monitoring/api/metrics_gcp/gcp-pubsub) as an example
        // all metrics.
        //   [
        //     &amp;#34;pubsub.googleapis.com/&amp;#34;
        //   ]
        // all snapshot specific metrics
        //   [
        //     &amp;#34;pubsub.googleapis.com/snapshot&amp;#34;
        //   ]
        // all snapshot specific metrics and a few subscription metrics
        metrics_prefixes = [
                &amp;#34;pubsub.googleapis.com/snapshot&amp;#34;,
                &amp;#34;pubsub.googleapis.com/subscription/num_undelivered_messages&amp;#34;,
                &amp;#34;pubsub.googleapis.com/subscription/oldest_unacked_message_age&amp;#34;,
        ]

        // Given the above metrics_prefixes list, some examples of
        // targeted_metric_prefix option behavior with respect to the filter string
        // format &amp;lt;targeted_metric_prefix&amp;gt;:&amp;lt;filter_query&amp;gt; would be:
        //   pubsub.googleapis.com (apply to all defined prefixes)
        //   pubsub.googleapis.com/snapshot (apply to only snapshot metrics)
        //   pubsub.googleapis.com/subscription (apply to only subscription metrics)
        //   pubsub.googleapis.com/subscription/num_undelivered_messages (apply to only the specific subscription metric)
        extra_filters = [
                &amp;#34;pubsub.googleapis.com/subscription:resource.labels.subscription_id=monitoring.regex.full_match(\&amp;#34;my-subs-prefix.*\&amp;#34;)&amp;#34;,
        ]

        request_interval        = &amp;#34;5m&amp;#34;
        request_offset          = &amp;#34;0s&amp;#34;
        ingest_delay            = false
        drop_delegated_projects = false
        gcp_client_timeout      = &amp;#34;15s&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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.exporter.gcp &amp;#34;lb_with_filter&amp;#34; {
        project_ids = [
                &amp;#34;foo&amp;#34;,
                &amp;#34;bar&amp;#34;,
        ]
        metrics_prefixes = [
                &amp;#34;loadbalancing.googleapis.com&amp;#34;,
        ]
        extra_filters = [
                &amp;#34;loadbalancing.googleapis.com:resource.labels.backend_target_name=\&amp;#34;sample-value\&amp;#34;&amp;#34;,
        ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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.exporter.gcp &amp;#34;lb_subset_with_filter&amp;#34; {
        project_ids = [
                &amp;#34;foo&amp;#34;,
                &amp;#34;bar&amp;#34;,
        ]
        metrics_prefixes = [
                &amp;#34;loadbalancing.googleapis.com/https/request_bytes_count&amp;#34;,
                &amp;#34;loadbalancing.googleapis.com/https/total_latencies&amp;#34;,
        ]
        extra_filters = [
                &amp;#34;loadbalancing.googleapis.com:resource.labels.backend_target_name=\&amp;#34;sample-value\&amp;#34;&amp;#34;,
        ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.gcp&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportergcp">prometheus.exporter.gcp&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.gcp&lt;/code> component embeds &lt;a href="https://github.com/prometheus-community/stackdriver_exporter" target="_blank" rel="noopener noreferrer">&lt;code>stackdriver_exporter&lt;/code>&lt;/a>.
It lets you collect &lt;a href="https://cloud.google.com/monitoring/docs" target="_blank" rel="noopener noreferrer">GCP Cloud Monitoring (formerly stackdriver)&lt;/a>, translate them to prometheus-compatible format and remote write.
The component supports all metrics available via &lt;a href="https://cloud.google.com/monitoring/api/metrics_gcp" target="_blank" rel="noopener noreferrer">GCP&amp;rsquo;s monitoring API&lt;/a>.&lt;/p></description></item><item><title>prometheus.exporter.github</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.github/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.github/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportergithub&#34;&gt;prometheus.exporter.github&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.github&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/githubexporter/github-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github_exporter&lt;/a&gt; for collecting statistics from GitHub.&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.exporter.github &amp;#34;LABEL&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 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;api_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The full URI of the GitHub API.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;https://api.github.com&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;repositories&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;GitHub repositories for which to collect 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;organizations&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;GitHub organizations for which to collect 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;users&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 GitHub users for which to collect 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;api_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;API token to use to authenticate against GitHub.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_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 API token to use to authenticate against GitHub.&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;GitHub uses an aggressive rate limit for unauthenticated requests based on IP address. To allow more API requests, it is recommended to configure either &lt;code&gt;api_token&lt;/code&gt; or &lt;code&gt;api_token_file&lt;/code&gt; to authenticate against GitHub.&lt;/p&gt;
&lt;p&gt;When provided, &lt;code&gt;api_token_file&lt;/code&gt; takes precedence over &lt;code&gt;api_token&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.github&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.exporter.github&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.exporter.github&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 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.exporter.github&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.exporter.github &amp;#34;example&amp;#34; {
  api_token_file = &amp;#34;/etc/github-api-token&amp;#34;
  repositories   = [&amp;#34;grafana/agent&amp;#34;]
}

// Configure a prometheus.scrape component to collect github metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.github.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.github&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportergithub">prometheus.exporter.github&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.github&lt;/code> component embeds
&lt;a href="https://github.com/githubexporter/github-exporter" target="_blank" rel="noopener noreferrer">github_exporter&lt;/a> for collecting statistics from GitHub.&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">prometheus.exporter.github &amp;#34;LABEL&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>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></description></item><item><title>prometheus.exporter.kafka</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.kafka/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.kafka/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterkafka&#34;&gt;prometheus.exporter.kafka&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.kafka&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/grafana/kafka_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;kafka_exporter&lt;/a&gt; for collecting metrics from a kafka server.&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.exporter.kafka &amp;#34;LABEL&amp;#34; {
    kafka_uris = KAFKA_URI_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;You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
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;kafka_uris&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;array(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address array (host:port) of Kafka server.&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;instance&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;instance&lt;/code&gt;label for metrics, default is the hostname:port of the first kafka_uris. You must manually provide the instance value if there is more than one string in kafka_uris.&lt;/td&gt;
              &lt;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_sasl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Connect using SASL/PLAIN.&lt;/td&gt;
              &lt;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_sasl_handshake&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Only set this to false if using a non-Kafka SASL proxy.&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;sasl_username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SASL user 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;sasl_password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SASL user 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;sasl_mechanism&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The SASL SCRAM SHA algorithm sha256 or sha512 as mechanism.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sasl_disable_pafx_fast&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configure the Kerberos client to not use PA_FX_FAST.&lt;/td&gt;
              &lt;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_tls&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Connect using TLS.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tls_server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to verify the hostname on the returned certificates unless tls.insecure-skip-tls-verify is given. If you don&amp;rsquo;t provide the Kafka server name, the hostname is taken from the 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;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The optional certificate authority file for TLS 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;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The optional certificate file for TLS 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;The optional key file for TLS 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;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;If set to true, the server&amp;rsquo;s certificate will not be checked for validity. This makes your HTTPS connections insecure.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kafka_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kafka broker version.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2.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;use_zookeeper_lag&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set to true, use a group from zookeeper.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;zookeeper_uris&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;array(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address array (hosts) of zookeeper 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;kafka_cluster_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kafka cluster 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;metadata_refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Metadata refresh interval.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1m&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;gssapi_service_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Service name when using Kerberos Authorization&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gssapi_kerberos_config_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos config path.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gssapi_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;gssapi_key_tab_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos keytab file path.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gssapi_kerberos_auth_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos auth type. Either &amp;lsquo;keytabAuth&amp;rsquo; or &amp;lsquo;userAuth&amp;rsquo;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;offset_show_all&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If true, the broker may auto-create topics that we requested which do not already exist.&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;topic_workers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum number of topics to monitor.&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;allow_concurrency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set to true, all scrapes trigger Kafka operations. Otherwise, they will share results. WARNING: Disable this on large clusters.&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;allow_auto_topic_creation&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If true, the broker may auto-create topics that we requested which do not already exist.&lt;/td&gt;
              &lt;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_offsets&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 offsets to store in the interpolation table for a partition.&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;prune_interval_seconds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated (no-op), use &lt;code&gt;metadata_refresh_interval&lt;/code&gt; instead.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;30&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;topics_filter_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regex filter for topics to be monitored.&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;topics_exclude_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regex that determines which topics to exclude.&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;groups_filter_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regex filter for consumer groups to be monitored.&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;groups_exclude_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regex that determines which consumer groups to exclude.&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;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.kafka&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.exporter.kafka&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.exporter.kafka&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 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.exporter.kafka&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.exporter.kafka &amp;#34;example&amp;#34; {
  kafka_uris = [&amp;#34;localhost:9200&amp;#34;]
}

// Configure a prometheus.scrape component to send metrics to.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.kafka.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.kafka&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterkafka">prometheus.exporter.kafka&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.kafka&lt;/code> component embeds
&lt;a href="https://github.com/grafana/kafka_exporter" target="_blank" rel="noopener noreferrer">kafka_exporter&lt;/a> for collecting metrics from a kafka server.&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">prometheus.exporter.kafka &amp;#34;LABEL&amp;#34; {
kafka_uris = KAFKA_URI_LIST
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
Omitted fields take their default values.&lt;/p></description></item><item><title>prometheus.exporter.memcached</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.memcached/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.memcached/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportermemcached&#34;&gt;prometheus.exporter.memcached&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.memcached&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus/memcached_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;memcached_exporter&lt;/a&gt; for collecting metrics from a Memcached server.&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.exporter.memcached &amp;#34;LABEL&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;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Memcached server address.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;localhost:11211&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;The timeout for connecting to the Memcached server.&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;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.exporter.memcached&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;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;TLS configuration for requests to the Memcached server.&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_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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.memcached&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.exporter.memcached&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.exporter.memcached&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 uses a &lt;code&gt;prometheus.exporter.memcached&lt;/code&gt; component to collect metrics from a Memcached
server running locally, and scrapes the metrics using a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;prometheus.scrape&lt;/a&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;prometheus.exporter.memcached &amp;#34;example&amp;#34; {
  address = &amp;#34;localhost:13321&amp;#34;
  timeout = &amp;#34;5s&amp;#34;
}

prometheus.scrape &amp;#34;example&amp;#34; {
  targets    = [prometheus.exporter.memcached.example.targets]
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.memcached&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportermemcached">prometheus.exporter.memcached&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.memcached&lt;/code> component embeds
&lt;a href="https://github.com/prometheus/memcached_exporter" target="_blank" rel="noopener noreferrer">memcached_exporter&lt;/a> for collecting metrics from a Memcached server.&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">prometheus.exporter.memcached &amp;#34;LABEL&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>prometheus.exporter.mongodb</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.mongodb/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.mongodb/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportermongodb&#34;&gt;prometheus.exporter.mongodb&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt; component embeds percona&amp;rsquo;s &lt;a href=&#34;https://github.com/percona/mongodb_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;mongodb_exporter&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;This exporter doesn&amp;rsquo;t collect metrics from multiple nodes. For this integration to work properly, you must have connect each node of your MongoDB cluster to a Grafana Agent Flow instance.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;We strongly recommend configuring a separate user for Grafana Agent Flow, giving it only the strictly mandatory security privileges necessary for monitoring your node.
Refer to the &lt;a href=&#34;https://github.com/percona/mongodb_exporter#permissions&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Percona documentation&lt;/a&gt; for more information.&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.exporter.mongodb &amp;#34;LABEL&amp;#34; {
    mongodb_uri = &amp;#34;MONGODB_URI&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;You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
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;mongodb_uri&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;MongoDB node connection URI.&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;direct_connect&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether or not a direct connect should be made. Direct connections are not valid if multiple hosts are specified or an SRV URI is used.&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;discovering_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Wheter or not to enable autodiscover collections.&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;tls_basic_auth_config_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 the file having Prometheus TLS config for basic auth. Only enable if you want to use TLS based authentication.&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;MongoDB node connection URI must be in the &lt;a href=&#34;https://docs.mongodb.com/manual/reference/connection-string/#std-label-connections-standard-connection-string-format&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;Standard Connection String Format&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For &lt;code&gt;tls_basic_auth_config_path&lt;/code&gt;, check &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#tls_config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt; for reference on the file format to be used.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mongodb&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.exporter.mongodb&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.exporter.mongodb&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 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.exporter.mongodb&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.exporter.mongodb &amp;#34;example&amp;#34; {
  mongodb_uri = &amp;#34;mongodb://127.0.0.1:27017&amp;#34;
}

// Configure a prometheus.scrape component to collect MongoDB metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.mongodb.example.targets
  forward_to = [ prometheus.remote_write.default.receiver ]
}

prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = &amp;#34;REMOTE_WRITE_URL&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportermongodb">prometheus.exporter.mongodb&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.mongodb&lt;/code> component embeds percona&amp;rsquo;s &lt;a href="https://github.com/percona/mongodb_exporter" target="_blank" rel="noopener noreferrer">&lt;code>mongodb_exporter&lt;/code>&lt;/a>.&lt;/p>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>This exporter doesn&amp;rsquo;t collect metrics from multiple nodes. For this integration to work properly, you must have connect each node of your MongoDB cluster to a Grafana Agent Flow instance.&lt;/p></description></item><item><title>prometheus.exporter.mssql</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.mssql/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.mssql/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportermssql&#34;&gt;prometheus.exporter.mssql&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.mssql&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/burningalchemist/sql_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;sql_exporter&lt;/a&gt; for collecting stats from a Microsoft SQL Server and exposing them as
Prometheus metrics.&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.exporter.mssql &amp;#34;LABEL&amp;#34; {
    connection_string = CONNECTION_STRING
}&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.
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;connection_string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The connection string used to connect to an Microsoft SQL Server.&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_idle_connections&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 idle connections to any one target.&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;max_open_connections&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 open connections to any one target.&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;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The query timeout in seconds.&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;query_config&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;MSSQL query to Prometheus metric configuration as an inline 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;&lt;a href=&#34;https://github.com/burningalchemist/sql_exporter/blob/master/examples/azure-sql-mi/sql_exporter.yml#L21&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;The sql_exporter examples&lt;/a&gt; show the format of the &lt;code&gt;connection_string&lt;/code&gt; argument:&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;conn&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-conn&#34;&gt;sqlserver://USERNAME_HERE:PASSWORD_HERE@SQLMI_HERE_ENDPOINT.database.windows.net:1433?encrypt=true&amp;amp;hostNameInCertificate=%2A.SQL_MI_DOMAIN_HERE.database.windows.net&amp;amp;trustservercertificate=true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If specified, the &lt;code&gt;query_config&lt;/code&gt; argument must be a YAML document as string defining which MSSQL queries map to custom Prometheus metrics.
&lt;code&gt;query_config&lt;/code&gt; is typically loaded by using the exports of another component. For example,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;local.file.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.http.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.s3.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See &lt;a href=&#34;https://github.com/burningalchemist/sql_exporter#collectors&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;sql_exporter&lt;/a&gt; for details on how to create a configuration.&lt;/p&gt;
&lt;h3 id=&#34;authentication&#34;&gt;Authentication&lt;/h3&gt;
&lt;p&gt;By default, the &lt;code&gt;USERNAME&lt;/code&gt; and &lt;code&gt;PASSWORD&lt;/code&gt; used within the &lt;code&gt;connection_string&lt;/code&gt; argument corresponds to a SQL Server username and password.&lt;/p&gt;
&lt;p&gt;If Grafana Agent is running in the same Windows domain as the SQL Server, then you can use the parameter &lt;code&gt;authenticator=winsspi&lt;/code&gt; within the &lt;code&gt;connection_string&lt;/code&gt; to authenticate without any additional credentials.&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;conn&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-conn&#34;&gt;sqlserver://@&amp;lt;HOST&amp;gt;:&amp;lt;PORT&amp;gt;?authenticator=winsspi&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you want to use Windows credentials to authenticate, instead of SQL Server credentials, you can use the parameter &lt;code&gt;authenticator=ntlm&lt;/code&gt; within the &lt;code&gt;connection_string&lt;/code&gt;.
The &lt;code&gt;USERNAME&lt;/code&gt; and &lt;code&gt;PASSWORD&lt;/code&gt; then corresponds to a Windows username and password.
The Windows domain may need to be prefixed to the username with a trailing &lt;code&gt;\&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;conn&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-conn&#34;&gt;sqlserver://&amp;lt;DOMAIN\USERNAME&amp;gt;:&amp;lt;PASSWORD&amp;gt;@&amp;lt;HOST&amp;gt;:&amp;lt;PORT&amp;gt;?authenticator=ntlm&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.mssql&lt;/code&gt; component does not support any blocks, and is configured
fully through arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mssql&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.exporter.mssql&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.exporter.mssql&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 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.exporter.mssql&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.exporter.mssql &amp;#34;example&amp;#34; {
  connection_string = &amp;#34;sqlserver://user:pass@localhost:1433&amp;#34;
}

// Configure a prometheus.scrape component to collect mssql metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.mssql.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;custom-metrics&#34;&gt;Custom metrics&lt;/h2&gt;
&lt;p&gt;You can use the optional &lt;code&gt;query_config&lt;/code&gt; parameter to retrieve custom Prometheus metrics for a MSSQL instance.&lt;/p&gt;
&lt;p&gt;If this is defined, the new configuration will be used to query your MSSQL instance and create whatever Prometheus metrics are defined.
If you want additional metrics on top of the default metrics, the default configuration must be used as a base.&lt;/p&gt;
&lt;p&gt;The default configuration used by this integration is as follows:&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;collector_name: mssql_standard

metrics:
  - metric_name: mssql_local_time_seconds
    type: gauge
    help: &amp;#39;Local time in seconds since epoch (Unix time).&amp;#39;
    values: [unix_time]
    query: |
      SELECT DATEDIFF(second, &amp;#39;19700101&amp;#39;, GETUTCDATE()) AS unix_time
  - metric_name: mssql_connections
    type: gauge
    help: &amp;#39;Number of active connections.&amp;#39;
    key_labels:
      - db
    values: [count]
    query: |
      SELECT DB_NAME(sp.dbid) AS db, COUNT(sp.spid) AS count
      FROM sys.sysprocesses sp
      GROUP BY DB_NAME(sp.dbid)
  #
  # Collected from sys.dm_os_performance_counters
  #
  - metric_name: mssql_deadlocks_total
    type: counter
    help: &amp;#39;Number of lock requests that resulted in a deadlock.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Number of Deadlocks/sec&amp;#39; AND instance_name = &amp;#39;_Total&amp;#39;
  - metric_name: mssql_user_errors_total
    type: counter
    help: &amp;#39;Number of user errors.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Errors/sec&amp;#39; AND instance_name = &amp;#39;User Errors&amp;#39;
  - metric_name: mssql_kill_connection_errors_total
    type: counter
    help: &amp;#39;Number of severe errors that caused SQL Server to kill the connection.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Errors/sec&amp;#39; AND instance_name = &amp;#39;Kill Connection Errors&amp;#39;
  - metric_name: mssql_page_life_expectancy_seconds
    type: gauge
    help: &amp;#39;The minimum number of seconds a page will stay in the buffer pool on this node without references.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT top(1) cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Page life expectancy&amp;#39;
  - metric_name: mssql_batch_requests_total
    type: counter
    help: &amp;#39;Number of command batches received.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Batch Requests/sec&amp;#39;
  - metric_name: mssql_log_growths_total
    type: counter
    help: &amp;#39;Number of times the transaction log has been expanded, per database.&amp;#39;
    key_labels:
      - db
    values: [cntr_value]
    query: |
      SELECT rtrim(instance_name) AS db, cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Log Growths&amp;#39; AND instance_name &amp;lt;&amp;gt; &amp;#39;_Total&amp;#39;
  - metric_name: mssql_buffer_cache_hit_ratio
    type: gauge
    help: &amp;#39;Ratio of requests that hit the buffer cache&amp;#39;
    values: [BufferCacheHitRatio]
    query: |
      SELECT (a.cntr_value * 1.0 / b.cntr_value) * 100.0 as BufferCacheHitRatio
      FROM sys.dm_os_performance_counters  a
      JOIN  (SELECT cntr_value, OBJECT_NAME 
          FROM sys.dm_os_performance_counters  
          WHERE counter_name = &amp;#39;Buffer cache hit ratio base&amp;#39;
              AND OBJECT_NAME = &amp;#39;SQLServer:Buffer Manager&amp;#39;) b ON  a.OBJECT_NAME = b.OBJECT_NAME
      WHERE a.counter_name = &amp;#39;Buffer cache hit ratio&amp;#39;
      AND a.OBJECT_NAME = &amp;#39;SQLServer:Buffer Manager&amp;#39;

  - metric_name: mssql_checkpoint_pages_sec
    type: gauge
    help: &amp;#39;Checkpoint Pages Per Second&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters
      WHERE [counter_name] = &amp;#39;Checkpoint pages/sec&amp;#39;
  #
  # Collected from sys.dm_io_virtual_file_stats
  #
  - metric_name: mssql_io_stall_seconds_total
    type: counter
    help: &amp;#39;Stall time in seconds per database and I/O operation.&amp;#39;
    key_labels:
      - db
    value_label: operation
    values:
      - read
      - write
    query_ref: mssql_io_stall

  #
  # Collected from sys.dm_os_process_memory
  #
  - metric_name: mssql_resident_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server resident memory size (AKA working set).&amp;#39;
    values: [resident_memory_bytes]
    query_ref: mssql_process_memory

  - metric_name: mssql_virtual_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server committed virtual memory size.&amp;#39;
    values: [virtual_memory_bytes]
    query_ref: mssql_process_memory

  - metric_name: mssql_available_commit_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server available to be committed memory size.&amp;#39;
    values: [available_commit_limit_bytes]
    query_ref: mssql_process_memory

  - metric_name: mssql_memory_utilization_percentage
    type: gauge
    help: &amp;#39;The percentage of committed memory that is in the working set.&amp;#39;
    values: [memory_utilization_percentage]
    query_ref: mssql_process_memory

  - metric_name: mssql_page_fault_count_total
    type: counter
    help: &amp;#39;The number of page faults that were incurred by the SQL Server process.&amp;#39;
    values: [page_fault_count]
    query_ref: mssql_process_memory

  #
  # Collected from sys.dm_os_sys_info
  #
  - metric_name: mssql_server_total_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server committed memory in the memory manager.&amp;#39;
    values: [committed_memory_bytes]
    query_ref: mssql_os_sys_info

  - metric_name: mssql_server_target_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server target committed memory set for the memory manager.&amp;#39;
    values: [committed_memory_target_bytes]
    query_ref: mssql_os_sys_info

  #
  # Collected from sys.dm_os_sys_memory
  #
  - metric_name: mssql_os_memory
    type: gauge
    help: &amp;#39;OS physical memory, used and available.&amp;#39;
    value_label: &amp;#39;state&amp;#39;
    values: [used, available]
    query: |
      SELECT
        (total_physical_memory_kb - available_physical_memory_kb) * 1024 AS used,
        available_physical_memory_kb * 1024 AS available
      FROM sys.dm_os_sys_memory
  - metric_name: mssql_os_page_file
    type: gauge
    help: &amp;#39;OS page file, used and available.&amp;#39;
    value_label: &amp;#39;state&amp;#39;
    values: [used, available]
    query: |
      SELECT
        (total_page_file_kb - available_page_file_kb) * 1024 AS used,
        available_page_file_kb * 1024 AS available
      FROM sys.dm_os_sys_memory
queries:
  # Populates `mssql_io_stall` and `mssql_io_stall_total`
  - query_name: mssql_io_stall
    query: |
      SELECT
        cast(DB_Name(a.database_id) as varchar) AS [db],
        sum(io_stall_read_ms) / 1000.0 AS [read],
        sum(io_stall_write_ms) / 1000.0 AS [write]
      FROM
        sys.dm_io_virtual_file_stats(null, null) a
      INNER JOIN sys.master_files b ON a.database_id = b.database_id AND a.file_id = b.file_id
      GROUP BY a.database_id
  # Populates `mssql_resident_memory_bytes`, `mssql_virtual_memory_bytes`, mssql_available_commit_memory_bytes,
  # and `mssql_memory_utilization_percentage`, and `mssql_page_fault_count_total`
  - query_name: mssql_process_memory
    query: |
      SELECT
        physical_memory_in_use_kb * 1024 AS resident_memory_bytes,
        virtual_address_space_committed_kb * 1024 AS virtual_memory_bytes,
        available_commit_limit_kb * 1024 AS available_commit_limit_bytes,
        memory_utilization_percentage,
        page_fault_count
      FROM sys.dm_os_process_memory
  # Populates `mssql_server_total_memory_bytes` and `mssql_server_target_memory_bytes`.
  - query_name: mssql_os_sys_info
    query: |
      SELECT
        committed_kb * 1024 AS committed_memory_bytes,
        committed_target_kb * 1024 AS committed_memory_target_bytes
      FROM sys.dm_os_sys_info&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mssql&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportermssql">prometheus.exporter.mssql&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.mssql&lt;/code> component embeds
&lt;a href="https://github.com/burningalchemist/sql_exporter" target="_blank" rel="noopener noreferrer">sql_exporter&lt;/a> for collecting stats from a Microsoft SQL Server and exposing them as
Prometheus metrics.&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">prometheus.exporter.mssql &amp;#34;LABEL&amp;#34; {
connection_string = CONNECTION_STRING
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>The following arguments can be used to configure the exporter&amp;rsquo;s behavior.
Omitted fields take their default values.&lt;/p></description></item><item><title>prometheus.exporter.mysql</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.mysql/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.mysql/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportermysql&#34;&gt;prometheus.exporter.mysql&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.mysql&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus/mysqld_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mysqld_exporter&lt;/a&gt; for collecting stats from a MySQL server.&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.exporter.mysql &amp;#34;LABEL&amp;#34; {
    data_source_name = DATA_SOURCE_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 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;data_source_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/go-sql-driver/mysql#dsn-data-source-name&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Data Source Name&lt;/a&gt; for the MySQL server 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;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;A list of &lt;a href=&#34;#supported-collectors&#34;&gt;collectors&lt;/a&gt; to enable on top of the default set.&lt;/td&gt;
              &lt;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;A list of &lt;a href=&#34;#supported-collectors&#34;&gt;collectors&lt;/a&gt; to disable from the default set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&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;A list of &lt;a href=&#34;#supported-collectors&#34;&gt;collectors&lt;/a&gt; to run. Fully overrides the default set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;lock_wait_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout, in seconds, to acquire a metadata lock.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2&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;log_slow_filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to avoid queries from scrapes being logged in the slow query log.&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;Set a &lt;code&gt;lock_wait_timeout&lt;/code&gt; on the connection to avoid potentially long wait times for metadata locks. View more detailed documentation on &lt;code&gt;lock_wait_timeout&lt;/code&gt; &lt;a href=&#34;https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_lock_wait_timeout&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;in the MySQL documentation&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;log_slow_filter&lt;/code&gt; is not supported by Oracle MySQL.&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;prometheus.exporter.mysql&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;info_schema.processlist&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#info_schemaprocesslist-block&#34;&gt;info_schema.processlist&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;info_schema.processlist&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.tables&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#info_schematables-block&#34;&gt;info_schema.tables&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;info_schema.tables&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.eventsstatements&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#perf_schemaeventsstatements-block&#34;&gt;perf_schema.eventsstatements&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;perf_schema.eventsstatements&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.file_instances&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#perf_schemafile_instances-block&#34;&gt;perf_schema.file_instances&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;perf_schema.file_instances&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.memory_events&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#perf_schemamemory_events-block&#34;&gt;perf_schema.memory_events&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;perf_schema.memory_events&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;heartbeat&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#heartbeat-block&#34;&gt;heartbeat&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;heartbeat&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;mysql.user&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#mysqluser-block&#34;&gt;mysql.user&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;mysql.user&lt;/code&gt; 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;info_schemaprocesslist-block&#34;&gt;info_schema.processlist 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;min_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum time a thread must be in each state to be counted.&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;processes_by_user&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable collecting the number of processes by user.&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;processes_by_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable collecting the number of processes by host.&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;h3 id=&#34;info_schematables-block&#34;&gt;info_schema.tables 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;info_schema_tables_databases&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression to match databases to collect table stats for.&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;perf_schemaeventsstatements-block&#34;&gt;perf_schema.eventsstatements 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;limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit the number of events statements digests, in descending order by &lt;code&gt;last_seen&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;250&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_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit how old, in seconds, the &lt;code&gt;last_seen&lt;/code&gt; events statements can be.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;86400&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;text_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum length of the normalized statement text.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;120&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;perf_schemafile_instances-block&#34;&gt;perf_schema.file_instances 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;filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression to select rows in &lt;code&gt;performance_schema.file_summary_by_instance&lt;/code&gt;.&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;remove_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Prefix to trim away from &lt;code&gt;file_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/var/lib/mysql&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;View more detailed documentation on the tables used in &lt;code&gt;perf_schema_file_instances_filter&lt;/code&gt; and &lt;code&gt;perf_schema_file_instances_remove_prefix&lt;/code&gt; &lt;a href=&#34;https://dev.mysql.com/doc/mysql-perfschema-excerpt/8.0/en/performance-schema-file-summary-tables.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;in the MySQL documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;perf_schemamemory_events-block&#34;&gt;perf_schema.memory_events 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;remove_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Prefix to trim away from &lt;code&gt;performance_schema.memory_summary_global_by_event_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;memory/&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;heartbeat-block&#34;&gt;heartbeat 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;database&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Database to collect heartbeat data from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;heartbeat&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;table&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Table to collect heartbeat data from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;heartbeat&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;utc&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use UTC for timestamps of the current server (&lt;code&gt;pt-heartbeat&lt;/code&gt; is called with &lt;code&gt;--utc&lt;/code&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;mysqluser-block&#34;&gt;mysql.user 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;privileges&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable collecting user privileges from &lt;code&gt;mysql.user&lt;/code&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;supported-collectors&#34;&gt;Supported Collectors&lt;/h3&gt;
&lt;p&gt;The full list of supported collectors is:&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;Enabled by default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;auto_increment.columns&lt;/td&gt;
              &lt;td&gt;Collect &lt;code&gt;auto_increment&lt;/code&gt; columns and max values from &lt;code&gt;information_schema&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;binlog_size&lt;/td&gt;
              &lt;td&gt;Collect the current size of all registered &lt;code&gt;binlog&lt;/code&gt; files.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;engine_innodb_status&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;SHOW ENGINE INNODB STATUS&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;engine_tokudb_status&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;SHOW ENGINE TOKUDB STATUS&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;global_status&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;SHOW GLOBAL STATUS&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;global_variables&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;SHOW GLOBAL VARIABLES&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;heartbeat&lt;/td&gt;
              &lt;td&gt;Collect metrics from heartbeat database and tables.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.clientstats&lt;/td&gt;
              &lt;td&gt;If running with userstat=1, enable to collect client statistics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.innodb_cmpmem&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.innodb_cmpmem&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.innodb_metrics&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.innodb_metrics&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.innodb_tablespaces&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.innodb_sys_tablespaces&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.processlist&lt;/td&gt;
              &lt;td&gt;Collect current thread state counts from the &lt;code&gt;information_schema.processlist&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.query_response_time&lt;/td&gt;
              &lt;td&gt;Collect query response time distribution if &lt;code&gt;query_response_time_stats&lt;/code&gt; is ON.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.replica_host&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.replica_host_status&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.schemastats&lt;/td&gt;
              &lt;td&gt;If running with userstat=1, enable to collect schema statistics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.tables&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.tables&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.tablestats&lt;/td&gt;
              &lt;td&gt;If running with userstat=1, enable to collect table statistics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;info_schema.userstats&lt;/td&gt;
              &lt;td&gt;If running with userstat=1, enable to collect user statistics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;mysql.user&lt;/td&gt;
              &lt;td&gt;Collect data from &lt;code&gt;mysql.user&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.eventsstatements&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.events_statements_summary_by_digest&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.eventsstatementssum&lt;/td&gt;
              &lt;td&gt;Collect metrics of grand sums from &lt;code&gt;performance_schema.events_statements_summary_by_digest&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.eventswaits&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.events_waits_summary_global_by_event_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.file_events&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.file_summary_by_event_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.file_instances&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.file_summary_by_instance&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.indexiowaits&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.table_io_waits_summary_by_index_usage&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.memory_events&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.memory_summary_global_by_event_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.replication_applier_status_by_worker&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.replication_applier_status_by_worker&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.replication_group_member_stats&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.replication_group_member_stats&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.replication_group_members&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.replication_group_members&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.tableiowaits&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.table_io_waits_summary_by_table&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;perf_schema.tablelocks&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.table_lock_waits_summary_by_table&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;slave_hosts&lt;/td&gt;
              &lt;td&gt;Scrape information from &lt;code&gt;SHOW SLAVE HOSTS&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;slave_status&lt;/td&gt;
              &lt;td&gt;Scrape information from &lt;code&gt;SHOW SLAVE STATUS&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;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mysql&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.exporter.mysql&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.exporter.mysql&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 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.exporter.mysql&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.exporter.mysql &amp;#34;example&amp;#34; {
  data_source_name  = &amp;#34;root@(server-a:3306)/&amp;#34;
  enable_collectors = [&amp;#34;heartbeat&amp;#34;, &amp;#34;mysql.user&amp;#34;]
}

// Configure a prometheus.scrape component to collect mysql metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.mysql.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mysql&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportermysql">prometheus.exporter.mysql&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.mysql&lt;/code> component embeds
&lt;a href="https://github.com/prometheus/mysqld_exporter" target="_blank" rel="noopener noreferrer">mysqld_exporter&lt;/a> for collecting stats from a MySQL server.&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">prometheus.exporter.mysql &amp;#34;LABEL&amp;#34; {
data_source_name = DATA_SOURCE_NAME
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>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></description></item><item><title>prometheus.exporter.oracledb</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.oracledb/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.oracledb/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporteroracledb&#34;&gt;prometheus.exporter.oracledb&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/iamseth/oracledb_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;oracledb_exporter&lt;/a&gt; for collecting statistics from a OracleDB server.&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.exporter.oracledb &amp;#34;LABEL&amp;#34; {
    connection_string = CONNECTION_STRING
}&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.
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;connection_string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The connection string used to connect to an Oracle Database.&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_idle_conns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of maximum idle connections in the connection pool.&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_open_conns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of maximum open connections in the connection pool.&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;query_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The query timeout in seconds.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5&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;a href=&#34;https://github.com/iamseth/oracledb_exporter/tree/master#running&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;The oracledb_exporter running documentation&lt;/a&gt; shows the format and provides examples of the &lt;code&gt;connection_string&lt;/code&gt; argument:&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;conn&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-conn&#34;&gt;oracle://user:pass@server/service_name[?OPTION1=VALUE1[&amp;amp;OPTIONn=VALUEn]...]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt; component does not support any blocks, and is configured
fully through arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.oracledb&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.exporter.oracledb&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.exporter.oracledb&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 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.exporter.oracledb&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.exporter.oracledb &amp;#34;example&amp;#34; {
  connection_string = &amp;#34;oracle://user:password@localhost:1521/orcl.localnet&amp;#34;
}

// Configure a prometheus.scrape component to collect oracledb metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.oracledb.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporteroracledb">prometheus.exporter.oracledb&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.oracledb&lt;/code> component embeds
&lt;a href="https://github.com/iamseth/oracledb_exporter" target="_blank" rel="noopener noreferrer">oracledb_exporter&lt;/a> for collecting statistics from a OracleDB server.&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">prometheus.exporter.oracledb &amp;#34;LABEL&amp;#34; {
connection_string = CONNECTION_STRING
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>The following arguments can be used to configure the exporter&amp;rsquo;s behavior.
Omitted fields take their default values.&lt;/p></description></item><item><title>prometheus.exporter.postgres</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.postgres/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.postgres/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterpostgres&#34;&gt;prometheus.exporter.postgres&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus-community/postgres_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;postgres_exporter&lt;/a&gt; for collecting metrics from a postgres database.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;prometheus.exporter.postgres&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.exporter.postgres &amp;#34;LABEL&amp;#34; {
    data_source_names = DATA_SOURCE_NAMES_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 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;data_source_names&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(secret)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies the Postgres server(s) 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;disable_settings_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables collection of metrics from pg_settings.&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;disable_default_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, only exposes metrics supplied from &lt;code&gt;custom_queries_config_path&lt;/code&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;tr&gt;
              &lt;td&gt;&lt;code&gt;custom_queries_config_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 YAML file containing custom queries to expose as metrics.&lt;/td&gt;
              &lt;td&gt;&amp;quot;&amp;quot;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_collectors&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 collectors to enable. See below for more detail.&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 format for connection strings in &lt;code&gt;data_source_names&lt;/code&gt; can be found in the &lt;a href=&#34;https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;official postgresql documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;See examples for the &lt;code&gt;custom_queries_config_path&lt;/code&gt; file in the &lt;a href=&#34;https://github.com/prometheus-community/postgres_exporter/blob/master/queries.yaml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;postgres_exporter repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: There are a number of environment variables that are not recommended for use, as they will affect &lt;em&gt;all&lt;/em&gt; &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; components. A full list can be found in the &lt;a href=&#34;https://github.com/prometheus-community/postgres_exporter#environment-variables&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;postgres_exporter repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By default, the same set of metrics is enabled as in the upstream &lt;a href=&#34;https://github.com/prometheus-community/postgres_exporter/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;postgres_exporter&lt;/a&gt;. If &lt;code&gt;custom_queries_config_path&lt;/code&gt; is set, additional metrics defined in the given config file will be exposed.
If &lt;code&gt;disable_default_metrics&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;, only the metrics defined in the &lt;code&gt;custom_queries_config_path&lt;/code&gt; file will be exposed.&lt;/p&gt;
&lt;p&gt;A subset of metrics collectors can be controlled by setting the &lt;code&gt;enabled_collectors&lt;/code&gt; argument. The following collectors are available for selection:
&lt;code&gt;database&lt;/code&gt;, &lt;code&gt;database_wraparound&lt;/code&gt;, &lt;code&gt;locks&lt;/code&gt;, &lt;code&gt;long_running_transactions&lt;/code&gt;, &lt;code&gt;postmaster&lt;/code&gt;, &lt;code&gt;process_idle&lt;/code&gt;,
&lt;code&gt;replication&lt;/code&gt;, &lt;code&gt;replication_slot&lt;/code&gt;, &lt;code&gt;stat_activity_autovacuum&lt;/code&gt;, &lt;code&gt;stat_bgwriter&lt;/code&gt;, &lt;code&gt;stat_database&lt;/code&gt;,
&lt;code&gt;stat_statements&lt;/code&gt;, &lt;code&gt;stat_user_tables&lt;/code&gt;, &lt;code&gt;stat_wal_receiver&lt;/code&gt;, &lt;code&gt;statio_user_indexes&lt;/code&gt;, &lt;code&gt;statio_user_tables&lt;/code&gt;,
&lt;code&gt;wal&lt;/code&gt;, &lt;code&gt;xlog_location&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;By default, the following collectors are enabled: &lt;code&gt;database&lt;/code&gt;, &lt;code&gt;locks&lt;/code&gt;, &lt;code&gt;replication&lt;/code&gt;, &lt;code&gt;replication_slot&lt;/code&gt;, &lt;code&gt;stat_bgwriter&lt;/code&gt;, &lt;code&gt;stat_database&lt;/code&gt;,
&lt;code&gt;stat_user_tables&lt;/code&gt;, &lt;code&gt;statio_user_tables&lt;/code&gt;, &lt;code&gt;wal&lt;/code&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Due to a limitation of the upstream exporter, when multiple &lt;code&gt;data_source_names&lt;/code&gt; are used, the collectors that are controlled via the &lt;code&gt;enabled_collectors&lt;/code&gt; argument will only be applied to the first data source in the list.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The following blocks 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;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;autodiscovery&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#autodiscovery-block&#34;&gt;autodiscovery&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Database discovery settings.&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;autodiscovery-block&#34;&gt;autodiscovery block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;autodiscovery&lt;/code&gt; block configures discovery of databases, outside of any specified in &lt;code&gt;data_source_names&lt;/code&gt;.&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to autodiscover other databases&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;database_allowlist&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 databases to filter for, meaning only these databases will be 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;database_denylist&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 databases to filter out, meaning all other databases will be scraped.&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 &lt;code&gt;enabled&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt; and no allowlist or denylist is specified, the exporter will scrape from all databases.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;autodiscovery&lt;/code&gt; is disabled, neither &lt;code&gt;database_allowlist&lt;/code&gt; nor &lt;code&gt;database_denylist&lt;/code&gt; will have any effect.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.postgres&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.exporter.postgres&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.exporter.postgres&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;collect-metrics-from-a-postgresql-server&#34;&gt;Collect metrics from a PostgreSQL server&lt;/h3&gt;
&lt;p&gt;This example uses a &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; component to collect metrics from a Postgres
server running locally with all default settings:&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;// Because no autodiscovery is defined, this will only scrape the &amp;#39;database_name&amp;#39; database, as defined
// in the DSN below.
prometheus.exporter.postgres &amp;#34;example&amp;#34; {
  data_source_names = [&amp;#34;postgresql://username:password@localhost:5432/database_name?sslmode=disable&amp;#34;]
}

prometheus.scrape &amp;#34;default&amp;#34; {
  targets    = prometheus.exporter.postgres.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;collect-custom-metrics-from-an-allowlisted-set-of-databases&#34;&gt;Collect custom metrics from an allowlisted set of databases&lt;/h3&gt;
&lt;p&gt;This example uses a &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; component to collect custom metrics from a set of
specific databases, replacing default metrics with custom metrics derived from queries in &lt;code&gt;/etc/agent/custom-postgres-metrics.yaml&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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.exporter.postgres &amp;#34;example&amp;#34; {
  data_source_names = [&amp;#34;postgresql://username:password@localhost:5432/database_name?sslmode=disable&amp;#34;]

  // This block configures autodiscovery to check for databases outside of the &amp;#39;database_name&amp;#39; db
  // specified in the DSN above. The database_allowlist field means that only the &amp;#39;frontend_app&amp;#39; and &amp;#39;backend_app&amp;#39;
  // databases will be scraped.
  autodiscovery {
    enabled            = true
    database_allowlist = [&amp;#34;frontend_app&amp;#34;, &amp;#34;backend_app&amp;#34;]
  }

  disable_default_metrics    = true
  custom_queries_config_path = &amp;#34;/etc/agent/custom-postgres-metrics.yaml&amp;#34;
}

prometheus.scrape &amp;#34;default&amp;#34; {
  targets    = prometheus.exporter.postgres.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;collect-metrics-from-all-databases-except-for-a-denylisted-database&#34;&gt;Collect metrics from all databases except for a denylisted database&lt;/h3&gt;
&lt;p&gt;This example uses a &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; component to collect custom metrics from all databases except
for the &lt;code&gt;secrets&lt;/code&gt; database.&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.exporter.postgres &amp;#34;example&amp;#34; {
  data_source_names = [&amp;#34;postgresql://username:password@localhost:5432/database_name?sslmode=disable&amp;#34;]

  // The database_denylist field will filter out those databases from the list of databases to scrape,
  // meaning that all databases *except* these will be scraped.
  //
  // In this example it will scrape all databases except for the one named &amp;#39;secrets&amp;#39;.
  autodiscovery {
    enabled           = true
    database_denylist = [&amp;#34;secrets&amp;#34;]
  }
}

prometheus.scrape &amp;#34;default&amp;#34; {
  targets    = prometheus.exporter.postgres.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterpostgres">prometheus.exporter.postgres&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.postgres&lt;/code> component embeds
&lt;a href="https://github.com/prometheus-community/postgres_exporter" target="_blank" rel="noopener noreferrer">postgres_exporter&lt;/a> for collecting metrics from a postgres database.&lt;/p>
&lt;p>Multiple &lt;code>prometheus.exporter.postgres&lt;/code> components can be specified by giving them different
labels.&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">prometheus.exporter.postgres &amp;#34;LABEL&amp;#34; {
data_source_names = DATA_SOURCE_NAMES_LIST
}&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>prometheus.exporter.process</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.process/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.process/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterprocess&#34;&gt;prometheus.exporter.process&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.process&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/ncabatoff/process-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;process_exporter&lt;/a&gt; for collecting process stats from &lt;code&gt;/proc&lt;/code&gt;.&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.exporter.process &amp;#34;LABEL&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 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;procfs_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;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;track_children&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to track a process&amp;rsquo; children.&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;track_threads&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Report metrics for a process&amp;rsquo; individual threads.&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;gather_smaps&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Gather metrics from the smaps file for a process.&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;recheck_on_scrape&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Recheck process names on each scrape.&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;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.exporter.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;matcher&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#matcher-block&#34;&gt;matcher&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A collection of matching rules to use for deciding which processes to monitor.&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;matcher-block&#34;&gt;matcher block&lt;/h3&gt;
&lt;p&gt;Each &lt;code&gt;matcher&lt;/code&gt; block config can match multiple processes, which will be tracked as a single process &amp;ldquo;group.&amp;rdquo;&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;The name to use for identifying the process group name in the metric.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;{{.ExeBase}}&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;comm&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 strings that match the base executable name for a process, truncated to 15 characters.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exe&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 strings that match &lt;code&gt;argv[0]&lt;/code&gt; for a process.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cmdline&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 regular expressions applied to the &lt;code&gt;argv&lt;/code&gt; of the process.&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;name&lt;/code&gt; argument can use the following template variables. By default it uses the base path of the executable:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;{{.Comm}}&lt;/code&gt;: Basename of the original executable from /proc/&amp;lt;pid&amp;gt;/stat.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.ExeBase}}&lt;/code&gt;: Basename of the executable from argv[0].&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.ExeFull}}&lt;/code&gt;: Fully qualified path of the executable.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.Username}}&lt;/code&gt;: Username of the effective user.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.Matches}}&lt;/code&gt;: Map containing all regex capture groups resulting from matching a process with the cmdline rule group.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.PID}}&lt;/code&gt;: PID of the process. Note that the PID is copied from the first executable found.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.StartTime}}&lt;/code&gt;: The start time of the process. This is useful when combined with PID as PIDS get reused over time.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.Cgroups}}&lt;/code&gt;: The cgroups, if supported, of the process (&lt;code&gt;/proc/self/cgroup&lt;/code&gt;). This is particularly useful for identifying to which container a process belongs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Using &lt;code&gt;PID&lt;/code&gt; or &lt;code&gt;StartTime&lt;/code&gt; is discouraged, as it is almost never what you want, and is likely to result in high cardinality metrics.&lt;/p&gt;
&lt;p&gt;The value that is used for matching &lt;code&gt;comm&lt;/code&gt; list elements is derived from reading the second field of &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/stat&lt;/code&gt;, stripped of parens.&lt;/p&gt;
&lt;p&gt;For values in &lt;code&gt;exe&lt;/code&gt;, if there are no slashes, only the basename of &lt;code&gt;argv[0]&lt;/code&gt; needs to match. Otherwise, the name must be an exact match. For example, &amp;ldquo;postgres&amp;rdquo; may match any postgres binary, but &lt;code&gt;/usr/local/bin/postgres&lt;/code&gt; will only match a postgres process with that exact path. If any of the strings match, the process will be tracked.&lt;/p&gt;
&lt;p&gt;Each regex in &lt;code&gt;cmdline&lt;/code&gt; must match the corresponding argv for the process to be tracked. The first element that is matched is &lt;code&gt;argv[1]&lt;/code&gt;. Regex captures are added to the .Matches map for use in the name.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.process&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.exporter.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;p&gt;&lt;code&gt;prometheus.exporter.process&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 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.exporter.process&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.exporter.process &amp;#34;example&amp;#34; {
  track_children = false

  matcher {
    comm = [&amp;#34;grafana-agent&amp;#34;]
  }
}

// Configure a prometheus.scrape component to collect process_exporter metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.process.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.process&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterprocess">prometheus.exporter.process&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.process&lt;/code> component embeds
&lt;a href="https://github.com/ncabatoff/process-exporter" target="_blank" rel="noopener noreferrer">process_exporter&lt;/a> for collecting process stats from &lt;code>/proc&lt;/code>.&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">prometheus.exporter.process &amp;#34;LABEL&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>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></description></item><item><title>prometheus.exporter.redis</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.redis/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.redis/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterredis&#34;&gt;prometheus.exporter.redis&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.redis&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/oliver006/redis_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;redis_exporter&lt;/a&gt; for collecting metrics from a Redis database.&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.exporter.redis &amp;#34;LABEL&amp;#34; {
    redis_addr = REDIS_ADDRESS
}&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.
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;redis_addr&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address (host and port) of the Redis instance 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;redis_user&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;User name to use for authentication (Redis ACL for Redis 6.0 and newer).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;redis_password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Password of the Redis instance.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;redis_password_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 a file containing a 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;redis_password_map_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 a JSON file containing a map of Redis URIs to passwords.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Namespace for the metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;redis&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;config_command&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;What to use for the CONFIG command.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;CONFIG&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;check_keys&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 key-patterns to export value and length/size, searched for with SCAN.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_key_groups&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 Lua regular expressions (regex) for grouping keys.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_key_groups_batch_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Check key or key groups batch size hint for the underlying SCAN.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10000&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_distinct_key_groups&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 distinct key groups with the most memory utilization to present as distinct metrics per database.&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;check_single_keys&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 single keys to export value and length/size.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_streams&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 stream-patterns to export info about streams, groups, and consumers to search for with SCAN.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_single_streams&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 single streams to export info about streams, groups, and consumers.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;export_key_values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to export key values as labels when using &lt;code&gt;check_keys&lt;/code&gt; or &lt;code&gt;check_single_keys&lt;/code&gt;.&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;count_keys&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 individual keys to export counts for.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;script_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 Lua Redis script for collecting extra 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;script_paths&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 paths to Lua Redis scripts for collecting extra 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;connection_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 connection to Redis instance (in Golang duration format).&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;tls_client_key_file&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 client key file (including full path) if the server requires TLS 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;tls_client_cert_file&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 client certificate file (including full path) if the server requires TLS 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;tls_ca_cert_file&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 CA certificate file (including full path) if the server requires TLS 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;set_client_name&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 client name to &lt;code&gt;redis_exporter&lt;/code&gt;.&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;is_tile38&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape Tile38-specific 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;is_cluster&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether the connection is to a Redis cluster.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;export_client_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape Client List specific 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;export_client_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to include the client&amp;rsquo;s port when exporting the client list.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;redis_metrics_only&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to just export metrics or to also export go runtime 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;ping_on_connect&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to ping the Redis instance after connecting.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;incl_system_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to include system metrics (e.g. &lt;code&gt;redis_total_system_memory_bytes&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;skip_tls_verification&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to to skip TLS verification.&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 &lt;code&gt;redis_password_file&lt;/code&gt; is defined, it will take precedence over &lt;code&gt;redis_password&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;check_key_groups&lt;/code&gt; is not set, no key groups are made.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;check_key_groups_batch_size&lt;/code&gt; argument name reflects key groups for backwards compatibility, but applies to both key and key groups.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;script_path&lt;/code&gt; argument may also be specified as a comma-separated string of paths, though it is encouraged to use &lt;code&gt;script_paths&lt;/code&gt; when using
multiple Lua scripts.&lt;/p&gt;
&lt;p&gt;Any leftover key groups beyond &lt;code&gt;max_distinct_key_groups&lt;/code&gt; are aggregated in the &amp;lsquo;overflow&amp;rsquo; bucket.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;is_cluster&lt;/code&gt; argument must be set to &lt;code&gt;true&lt;/code&gt; when connecting to a Redis cluster and using either of the &lt;code&gt;check_keys&lt;/code&gt; and &lt;code&gt;check_single_keys&lt;/code&gt; arguments.&lt;/p&gt;
&lt;p&gt;Note that setting &lt;code&gt;export_client_port&lt;/code&gt; increases the cardinality of all Redis metrics.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.redis&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.exporter.redis&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.exporter.redis&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 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.exporter.redis&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.exporter.redis &amp;#34;example&amp;#34; {
  redis_addr = &amp;#34;localhost:6379&amp;#34;
}

// Configure a prometheus.scrape component to collect Redis metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.redis.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.redis&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterredis">prometheus.exporter.redis&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.redis&lt;/code> component embeds
&lt;a href="https://github.com/oliver006/redis_exporter" target="_blank" rel="noopener noreferrer">redis_exporter&lt;/a> for collecting metrics from a Redis database.&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">prometheus.exporter.redis &amp;#34;LABEL&amp;#34; {
redis_addr = REDIS_ADDRESS
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>The following arguments can be used to configure the exporter&amp;rsquo;s behavior.
Omitted fields take their default values.&lt;/p></description></item><item><title>prometheus.exporter.self</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.self/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.self/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterself&#34;&gt;prometheus.exporter.self&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.self&lt;/code&gt; component collects and exposes metrics about Grafana Agent Flow itself.&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.exporter.self &amp;#34;agent&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;prometheus.exporter.self&lt;/code&gt; accepts no arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.self&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.exporter.self&lt;/code&gt; doesn&amp;rsquo;t 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.exporter.self&lt;/code&gt; doesn&amp;rsquo;t 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 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.exporter.self&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.exporter.self &amp;#34;example&amp;#34; {}

// Configure a prometheus.scrape component to collect agent metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.self.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.self&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterself">prometheus.exporter.self&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.self&lt;/code> component collects and exposes metrics about Grafana Agent Flow itself.&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">prometheus.exporter.self &amp;#34;agent&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>&lt;code>prometheus.exporter.self&lt;/code> accepts no arguments.&lt;/p></description></item><item><title>prometheus.exporter.snmp</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.snmp/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.snmp/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportersnmp&#34;&gt;prometheus.exporter.snmp&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus/snmp_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;snmp_exporter&lt;/code&gt;&lt;/a&gt;. &lt;code&gt;snmp_exporter&lt;/code&gt; lets you collect SNMP data and expose them as Prometheus metrics.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; uses the latest configuration introduced in version 0.26 of the Prometheus &lt;code&gt;snmp_exporter&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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.exporter.snmp &amp;#34;LABEL&amp;#34; {
  config_file = SNMP_CONFIG_FILE_PATH

  target &amp;#34;TARGET_NAME&amp;#34; {
    address = TARGET_ADDRESS
  }
}&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.
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;config_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SNMP configuration file defining custom modules.&lt;/td&gt;
              &lt;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&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;SNMP configuration as inline 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;The &lt;code&gt;config_file&lt;/code&gt; argument points to a YAML file defining which snmp_exporter modules to use.
Refer to &lt;a href=&#34;https://github.com/prometheus/snmp_exporter#generating-configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;snmp_exporter&lt;/a&gt; for details on how to generate a configuration file.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;config&lt;/code&gt; argument must be a YAML document as string defining which SNMP modules and auths to use.
&lt;code&gt;config&lt;/code&gt; is typically loaded by using the exports of another component. For example,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;local.file.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.http.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.s3.LABEL.content&lt;/code&gt;&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;prometheus.exporter.snmp&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;target&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#target-block&#34;&gt;target&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures an SNMP target.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;walk_param&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#walk_param-block&#34;&gt;walk_param&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;SNMP connection profiles to override default SNMP settings.&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;target-block&#34;&gt;target block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;target&lt;/code&gt; block defines an individual SNMP target.
The &lt;code&gt;target&lt;/code&gt; block may be specified multiple times to define multiple targets. The label of the block is required and will be used in the target&amp;rsquo;s &lt;code&gt;job&lt;/code&gt; label.&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 address of SNMP device.&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;module&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SNMP module to use for polling.&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;auth&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SNMP authentication profile to use.&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;walk_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Config to use for this target.&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;snmp_context&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Override the &lt;code&gt;context_name&lt;/code&gt; parameter in the SNMP configuration file.&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;walk_param-block&#34;&gt;walk_param block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;walk_param&lt;/code&gt; block defines an individual SNMP connection profile that can be used to override default SNMP settings.
The &lt;code&gt;walk_param&lt;/code&gt; block may be specified multiple times to define multiple SNMP connection profiles.&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;Name of the module to override.&lt;/td&gt;
              &lt;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_repetitions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How many objects to request with GET/GETBULK.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;25&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;retries&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How many times to retry a failed request.&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;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 each individual SNMP 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;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snmp&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.exporter.snmp&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.exporter.snmp&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 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.exporter.snmp&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.exporter.snmp &amp;#34;example&amp;#34; {
    config_file = &amp;#34;snmp_modules.yml&amp;#34;

    target &amp;#34;network_switch_1&amp;#34; {
        address     = &amp;#34;192.168.1.2&amp;#34;
        module      = &amp;#34;if_mib&amp;#34;
        walk_params = &amp;#34;public&amp;#34;
    }

    target &amp;#34;network_router_2&amp;#34; {
        address     = &amp;#34;192.168.1.3&amp;#34;
        module      = &amp;#34;mikrotik&amp;#34;
        walk_params = &amp;#34;private&amp;#34;
    }

    walk_param &amp;#34;private&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }

    walk_param &amp;#34;public&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }
}
// Configure a prometheus.scrape component to collect SNMP metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
    targets    = prometheus.exporter.snmp.example.targets
    forward_to = [ /* ... */ ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example is the same above with using an embedded configuration (with secrets):&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;local.file &amp;#34;snmp_config&amp;#34; {
    path      = &amp;#34;snmp_modules.yml&amp;#34;
    is_secret = true
}

prometheus.exporter.snmp &amp;#34;example&amp;#34; {
    config = local.file.snmp_config.content

    target &amp;#34;network_switch_1&amp;#34; {
        address     = &amp;#34;192.168.1.2&amp;#34;
        module      = &amp;#34;if_mib&amp;#34;
        walk_params = &amp;#34;public&amp;#34;
    }

    target &amp;#34;network_router_2&amp;#34; {
        address     = &amp;#34;192.168.1.3&amp;#34;
        module      = &amp;#34;mikrotik&amp;#34;
        walk_params = &amp;#34;private&amp;#34;
    }

    walk_param &amp;#34;private&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }

    walk_param &amp;#34;public&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }
}
// Configure a prometheus.scrape component to collect SNMP metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
    targets    = prometheus.exporter.snmp.example.targets
    forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
    endpoint {
        url = PROMETHEUS_REMOTE_WRITE_URL

        basic_auth {
            username = USERNAME
            password = PASSWORD
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportersnmp">prometheus.exporter.snmp&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.snmp&lt;/code> component embeds
&lt;a href="https://github.com/prometheus/snmp_exporter" target="_blank" rel="noopener noreferrer">&lt;code>snmp_exporter&lt;/code>&lt;/a>. &lt;code>snmp_exporter&lt;/code> lets you collect SNMP data and expose them as Prometheus metrics.&lt;/p>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>&lt;code>prometheus.exporter.snmp&lt;/code> uses the latest configuration introduced in version 0.26 of the Prometheus &lt;code>snmp_exporter&lt;/code>.&lt;/p></description></item><item><title>prometheus.exporter.snowflake</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.snowflake/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.snowflake/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportersnowflake&#34;&gt;prometheus.exporter.snowflake&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/grafana/snowflake-prometheus-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;snowflake_exporter&lt;/a&gt; for collecting warehouse, database, table, and replication statistics from a Snowflake account via HTTP for Prometheus consumption.&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.exporter.snowflake &amp;#34;LABEL&amp;#34; {
    account_name = ACCOUNT_NAME
    username =     USERNAME
    password =     PASSWORD
    warehouse =    WAREHOUSE
}&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.
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;account_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The account to collect metrics for.&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;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The username for the user used when querying metrics.&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;The password for the user used when querying metrics.&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;role&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The role to use when querying metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;ACCOUNTADMIN&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;warehouse&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The warehouse to use when querying 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;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt; component does not support any blocks, and is configured
fully through arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snowflake&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.exporter.snowflake&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.exporter.snowflake&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 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.exporter.snowflake&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.exporter.snowflake &amp;#34;example&amp;#34; {
  account_name = &amp;#34;XXXXXXX-YYYYYYY&amp;#34;
  username     = &amp;#34;grafana&amp;#34;
  password     = &amp;#34;snowflake&amp;#34;
  warehouse    = &amp;#34;examples&amp;#34;
}

// Configure a prometheus.scrape component to collect snowflake metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.snowflake.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportersnowflake">prometheus.exporter.snowflake&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.snowflake&lt;/code> component embeds
&lt;a href="https://github.com/grafana/snowflake-prometheus-exporter" target="_blank" rel="noopener noreferrer">snowflake_exporter&lt;/a> for collecting warehouse, database, table, and replication statistics from a Snowflake account via HTTP for Prometheus consumption.&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">prometheus.exporter.snowflake &amp;#34;LABEL&amp;#34; {
account_name = ACCOUNT_NAME
username = USERNAME
password = PASSWORD
warehouse = WAREHOUSE
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>The following arguments can be used to configure the exporter&amp;rsquo;s behavior.
Omitted fields take their default values.&lt;/p></description></item><item><title>prometheus.exporter.squid</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.squid/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.squid/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportersquid&#34;&gt;prometheus.exporter.squid&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.squid&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/boynux/squid-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;squid_exporter&lt;/a&gt; for collecting metrics from a squid instance.&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.exporter.squid &amp;#34;LABEL&amp;#34; {
    address = SQUID_ADDRESS
}&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;You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
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 squid address to collect metrics 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;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The username for the user used when querying 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;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The password for the user used when querying metrics.&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 &lt;code&gt;prometheus.exporter.squid&lt;/code&gt; component does not support any blocks, and is configured
fully through arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.squid&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.exporter.squid&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.exporter.squid&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 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.exporter.squid&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.exporter.squid &amp;#34;example&amp;#34; {
  address = &amp;#34;localhost:3128&amp;#34;
}

// Configure a prometheus.scrape component to collect squid metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.squid.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.squid&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportersquid">prometheus.exporter.squid&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.squid&lt;/code> component embeds
&lt;a href="https://github.com/boynux/squid-exporter" target="_blank" rel="noopener noreferrer">squid_exporter&lt;/a> for collecting metrics from a squid instance.&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">prometheus.exporter.squid &amp;#34;LABEL&amp;#34; {
address = SQUID_ADDRESS
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
Omitted fields take their default values.&lt;/p></description></item><item><title>prometheus.exporter.statsd</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.statsd/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.statsd/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterstatsd&#34;&gt;prometheus.exporter.statsd&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.statsd&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus/statsd_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;statsd_exporter&lt;/a&gt; for collecting StatsD-style metrics and exporting them as Prometheus metrics.&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.exporter.statsd &amp;#34;LABEL&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 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;listen_udp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The UDP address on which to receive statsd metric lines. Use &amp;quot;&amp;quot; to disable it.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;:9125&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;listen_tcp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The TCP address on which to receive statsd metric lines. Use &amp;quot;&amp;quot; to disable it.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;:9125&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;listen_unixgram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Unixgram socket path to receive statsd metric lines in datagram. Use &amp;quot;&amp;quot; to disable it.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;unix_socket_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The permission mode of the unix socket.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;755&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;mapping_config_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 a YAML mapping file used to translate specific dot-separated StatsD metrics into labeled Prometheus 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;read_buffer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size (in bytes) of the operating system&amp;rsquo;s transmit read buffer associated with the UDP or Unixgram connection.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum size of your metric mapping cache. Relies on least recently used replacement policy if max size is reached.&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;cache_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Metric mapping cache type. Valid options are &amp;ldquo;lru&amp;rdquo; and &amp;ldquo;random&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;lru&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;event_queue_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of internal queue for processing events.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10000&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;event_flush_threshold&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of events to hold in queue before flushing.&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;event_flush_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time between event queue flushes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;200ms&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;parse_dogstatsd_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Parse DogStatsd style tags.&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;parse_influxdb_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Parse InfluxDB style tags.&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;parse_librato_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Parse Librato style tags.&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;parse_signalfx_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Parse SignalFX style tags.&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;relay_addr&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Relay address configuration (UDP endpoint in the format &amp;lsquo;host:port&amp;rsquo;).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relay_packet_length&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum relay output packet length to avoid fragmentation.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1400&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;At least one of &lt;code&gt;listen_udp&lt;/code&gt;, &lt;code&gt;listen_tcp&lt;/code&gt;, or &lt;code&gt;listen_unixgram&lt;/code&gt; should be enabled.
For details on how to use the mapping config file, please check the official
&lt;a href=&#34;https://github.com/prometheus/statsd_exporter#metric-mapping-and-configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;statsd_exporter docs&lt;/a&gt;.
Please make sure the kernel parameter &lt;code&gt;net.core.rmem_max&lt;/code&gt; is set to a value greater
than the value specified in &lt;code&gt;read_buffer&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;blocks&#34;&gt;Blocks&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.statsd&lt;/code&gt; component does not support any blocks, and is configured
fully through arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.statsd&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.exporter.statsd&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.exporter.statsd&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 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.exporter.statsd&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.exporter.statsd &amp;#34;example&amp;#34; {
  listen_udp            = &amp;#34;&amp;#34;
  listen_tcp            = &amp;#34;:9125&amp;#34;
  listen_unixgram       = &amp;#34;&amp;#34;
  unix_socket_mode      = &amp;#34;755&amp;#34;
  mapping_config_path   = &amp;#34;mapTest.yaml&amp;#34;
  read_buffer           = 1
  cache_size            = 1000
  cache_type            = &amp;#34;lru&amp;#34;
  event_queue_size      = 10000
  event_flush_threshold = 1000
  event_flush_interval  = &amp;#34;200ms&amp;#34;
  parse_dogstatsd_tags  = true
  parse_influxdb_tags   = true
  parse_librato_tags    = true
  parse_signalfx_tags   = true
}

// Configure a prometheus.scrape component to collect statsd metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.statsd.example.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.statsd&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterstatsd">prometheus.exporter.statsd&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.statsd&lt;/code> component embeds
&lt;a href="https://github.com/prometheus/statsd_exporter" target="_blank" rel="noopener noreferrer">statsd_exporter&lt;/a> for collecting StatsD-style metrics and exporting them as Prometheus metrics.&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">prometheus.exporter.statsd &amp;#34;LABEL&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>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></description></item><item><title>prometheus.exporter.unix</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.unix/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.unix/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterunix&#34;&gt;prometheus.exporter.unix&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.unix&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;Multiple &lt;code&gt;prometheus.exporter.unix&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.exporter.unix &amp;#34;LABEL&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 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;tr&gt;
              &lt;td&gt;&lt;code&gt;udev_data_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The udev data path.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/run/udev/data&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 definition of
&lt;code&gt;prometheus.exporter.unix&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;sysctl&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#sysctl-block&#34;&gt;sysctl&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the sysctl 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;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 devices to exclude 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;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 devices to include for diskstats. If set, &lt;code&gt;device_exclude&lt;/code&gt; is ignored.&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;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;p&gt;The default values can vary by the operating system the agent runs on - refer to the &lt;a href=&#34;https://github.com/grafana/agent/blob/main/static/integrations/node_exporter/config.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;integration source&lt;/a&gt; for up-to-date values on each OS.&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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_hardware_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable perf hardware profilers.&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;hardware_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Perf hardware profilers that 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;disable_software_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable perf software profilers.&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;software_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Perf software profilers that 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;disable_cache_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable perf cache profilers.&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;cache_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Perf cache profilers 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;sysctl-block&#34;&gt;sysctl 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;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Numeric sysctl values to expose.&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;include_info&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;String sysctl values to expose.&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;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;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;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.unix&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.exporter.unix&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.exporter.unix&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.exporter.unix&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, NetBSD&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, NetBSD&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;netisr&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes netisr statistics.&lt;/td&gt;
              &lt;td&gt;FreeBSD&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;softirqs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes detailed softirq statistics from &lt;code&gt;/proc/softirqs&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;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;sysctl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Expose sysctl values from &lt;code&gt;/proc/sys&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;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, NetBSD&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.exporter.unix&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.exporter.unix &amp;#34;demo&amp;#34; { }

// Configure a prometheus.scrape component to collect unix metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.unix.demo.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.unix&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterunix">prometheus.exporter.unix&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.unix&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.exporter.vsphere</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.vsphere/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.vsphere/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportervsphere-deprecated&#34;&gt;prometheus.exporter.vsphere (deprecated)&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Starting with release v0.40, &lt;code&gt;prometheus.exporter.vsphere&lt;/code&gt; is deprecated. Consider using &lt;code&gt;otelcol.receiver.vcenter&lt;/code&gt; instead.
&lt;code&gt;prometheus.exporter.vsphere&lt;/code&gt; will be removed in a future release.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;prometheus.exporter.vsphere&lt;/code&gt; component embeds &lt;a href=&#34;https://github.com/grafana/vmware_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;vmware_exporter&lt;/code&gt;&lt;/a&gt; to collect vSphere metrics.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: We recommend to use &lt;a href=&#34;../otelcol.receiver.vcenter/&#34;&gt;otelcol.receiver.vcenter&lt;/a&gt; instead.&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;prometheus.exporter.vsphere &amp;#34;LABEL&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;You can use the following arguments to configure the exporter&amp;rsquo;s behavior.
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;vsphere_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The url of the vCenter endpoint SDK&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;vsphere_user&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;vCenter 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;vsphere_password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;vCenter 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;request_chunk_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of managed objects to include in each request to vsphere when fetching performance counters.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;256&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;collect_concurrency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of concurrent requests to vSphere when fetching performance counters.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;8&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;discovery_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Interval on which to run vSphere managed object discovery.&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;enable_exporter_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable the exporter 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;ul&gt;
&lt;li&gt;Setting &lt;code&gt;discovery_interval&lt;/code&gt; to a non-zero value will result in object discovery running in the background. Each scrape will use object data gathered during the last discovery. When this value is 0, object discovery occurs per scrape.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.vsphere&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.exporter.vsphere&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.exporter.vsphere&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 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.exporter.vsphere&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.exporter.vsphere &amp;#34;example&amp;#34; {
    vsphere_url      = &amp;#34;https://127.0.0.1:8989/sdk&amp;#34;
    vsphere_user     = &amp;#34;user&amp;#34;
    vsphere_password = &amp;#34;pass&amp;#34;
}

// Configure a prometheus.scrape component to collect vsphere metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets    = prometheus.exporter.vsphere.example.targets
  forward_to = [ prometheus.remote_write.default.receiver ]
}

prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = &amp;#34;REMOTE_WRITE_URL&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.vsphere&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportervsphere-deprecated">prometheus.exporter.vsphere (deprecated)&lt;/h1>
&lt;div class="admonition admonition-caution">&lt;blockquote>&lt;p class="title text-uppercase">Caution&lt;/p>&lt;p>Starting with release v0.40, &lt;code>prometheus.exporter.vsphere&lt;/code> is deprecated. Consider using &lt;code>otelcol.receiver.vcenter&lt;/code> instead.
&lt;code>prometheus.exporter.vsphere&lt;/code> will be removed in a future release.&lt;/p>&lt;/blockquote>&lt;/div>
&lt;p>The &lt;code>prometheus.exporter.vsphere&lt;/code> component embeds &lt;a href="https://github.com/grafana/vmware_exporter" target="_blank" rel="noopener noreferrer">&lt;code>vmware_exporter&lt;/code>&lt;/a> to collect vSphere metrics.&lt;/p></description></item><item><title>prometheus.exporter.windows</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.windows/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.exporter.windows/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterwindows&#34;&gt;prometheus.exporter.windows&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.windows&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;windows_exporter&lt;/a&gt; which exposes a
wide variety of hardware and OS metrics for Windows-based systems.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;windows_exporter&lt;/code&gt; itself comprises various &lt;em&gt;collectors&lt;/em&gt;, which you can enable and disable as needed.
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;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The black and white list configuration options are available for backwards compatibility but are deprecated.
The include and exclude configuration options are preferred going forward.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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.exporter.windows &amp;#34;LABEL&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 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;enabled_collectors&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 collectors to enable.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;cpu&amp;quot;,&amp;quot;cs&amp;quot;,&amp;quot;logical_disk&amp;quot;,&amp;quot;net&amp;quot;,&amp;quot;os&amp;quot;,&amp;quot;service&amp;quot;,&amp;quot;system&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;Configure timeout for collecting metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;4m&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;enabled_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.
Refer to the &lt;a href=&#34;#collectors-list&#34;&gt;Collectors list&lt;/a&gt; for the default set.&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;prometheus.exporter.windows&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;dfsr&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#dfsr-block&#34;&gt;dfsr&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the dfsr collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exchange&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#exchange-block&#34;&gt;exchange&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the exchange collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;iis&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#iis-block&#34;&gt;iis&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the iis collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;logical_disk&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#logicaldisk-block&#34;&gt;logical_disk&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the logical_disk collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;msmq&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#msmq-block&#34;&gt;msmq&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the msmq collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;mssql&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#mssql-block&#34;&gt;mssql&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the mssql collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;network&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#network-block&#34;&gt;network&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the network collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;process&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#process-block&#34;&gt;process&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the process collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;scheduled_task&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#scheduledtask-block&#34;&gt;scheduled_task&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the scheduled_task collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;service&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#service-block&#34;&gt;service&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the service collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;smtp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#smtp-block&#34;&gt;smtp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the smtp collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;text_file&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#textfile-block&#34;&gt;text_file&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the text_file 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;dfsr-block&#34;&gt;dfsr 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;source_enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of DFSR Perflib sources to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;connection&amp;quot;,&amp;quot;folder&amp;quot;,&amp;quot;volume&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;exchange-block&#34;&gt;exchange 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;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of collectors to use.&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 collectors specified by &lt;code&gt;enabled_list&lt;/code&gt; can include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ADAccessProcesses&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TransportQueues&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;HttpProxy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ActiveSync&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AvailabilityService&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;OutlookWebAccess&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Autodiscover&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;WorkloadManagement&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RpcClientAccess&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, &lt;code&gt;enabled_list&lt;/code&gt; may be set to &lt;code&gt;&amp;quot;AvailabilityService,OutlookWebAccess&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;iis-block&#34;&gt;iis 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;app_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of applications 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;tr&gt;
              &lt;td&gt;&lt;code&gt;app_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of applications to report on.&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;site_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of sites 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;tr&gt;
              &lt;td&gt;&lt;code&gt;site_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of sites to report on.&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;logical_disk-block&#34;&gt;logical_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;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of volumes to exclude.&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;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of volumes to include.&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;p&gt;Volume names must match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and must &lt;em&gt;not&lt;/em&gt; match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt; to be included.&lt;/p&gt;
&lt;h3 id=&#34;msmq-block&#34;&gt;msmq 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;where_clause&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;WQL &amp;lsquo;where&amp;rsquo; clause to use in WMI metrics query.&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;Specifying &lt;code&gt;enabled_classes&lt;/code&gt; is useful to limit the response to the MSMQs you specify, reducing the size of the response.&lt;/p&gt;
&lt;h3 id=&#34;mssql-block&#34;&gt;mssql 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;enabled_classes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of MSSQL WMI classes to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;accessmethods&amp;quot;, &amp;quot;availreplica&amp;quot;, &amp;quot;bufman&amp;quot;, &amp;quot;databases&amp;quot;, &amp;quot;dbreplica&amp;quot;, &amp;quot;genstats&amp;quot;, &amp;quot;locks&amp;quot;, &amp;quot;memmgr&amp;quot;, &amp;quot;sqlstats&amp;quot;, &amp;quot;sqlerrorstransactions&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;network-block&#34;&gt;network 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;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of NIC:s to exclude.&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;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of NIC:s to include.&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;NIC names must match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and must &lt;em&gt;not&lt;/em&gt; match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt; to be included.&lt;/p&gt;
&lt;h3 id=&#34;process-block&#34;&gt;process 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;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of processes to exclude.&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;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of processes to include.&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;Processes must match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and must &lt;em&gt;not&lt;/em&gt; match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt; to be included.&lt;/p&gt;
&lt;h3 id=&#34;scheduled_task-block&#34;&gt;scheduled_task 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;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 tasks to exclude.&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;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 tasks to include.&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;p&gt;For a server name to be included, it must match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and must &lt;em&gt;not&lt;/em&gt; match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;service-block&#34;&gt;service 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;use_api&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use API calls to collect service data instead of WMI.&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;where_clause&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;WQL &amp;lsquo;where&amp;rsquo; clause to use in WMI metrics query.&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;where_clause&lt;/code&gt; argument can be used to limit the response to the services you specify, reducing the size of the response.
If &lt;code&gt;use_api&lt;/code&gt; is enabled, &amp;lsquo;where_clause&amp;rsquo; won&amp;rsquo;t be effective.&lt;/p&gt;
&lt;h3 id=&#34;smtp-block&#34;&gt;smtp 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;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 virtual servers to ignore.&lt;/td&gt;
              &lt;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&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regexp of virtual servers to include.&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;p&gt;For a server name to be included, it must match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and must &lt;em&gt;not&lt;/em&gt; match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;text_file-block&#34;&gt;text_file 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;text_file_directory&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The directory containing the files to be ingested.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;C:\Program Files\Grafana Agent Flow\textfile_inputs&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;text_file_directory&lt;/code&gt; is set, only files with the extension &lt;code&gt;.prom&lt;/code&gt; inside the specified directory are read. Each &lt;code&gt;.prom&lt;/code&gt; file found must end with an empty line feed to work properly.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;flow/reference/components/exporter-component-exports.md&#34;&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 exporter 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; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured 
    &lt;a href=&#34;/docs/agent/v0.42/flow/concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.windows&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.exporter.windows&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.exporter.windows&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;windows_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.exporter.windows&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;Enabled by default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.ad.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ad&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Active Directory Domain Services&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.adcs.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;adcs&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Active Directory Certificate Services&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.adfs.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;adfs&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Active Directory Federation Services&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.cache.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;cache&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Cache metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.cpu.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;cpu&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;CPU usage&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.cpu_info.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;cpu_info&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;CPU Information&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.cs.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;cs&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;Computer System&amp;rdquo; metrics (system properties, num cpus/total memory)&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.container.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;container&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Container metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.dfsr.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;dfsr&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;DFSR metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.dhcp.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;dhcp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;DHCP Server&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.dns.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;dns&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;DNS Server&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.exchange.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;exchange&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Exchange metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.fsrmquota.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;fsrmquota&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Microsoft File Server Resource Manager (FSRM) Quotas collector&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.hyperv.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;hyperv&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Hyper-V hosts&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.iis.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;iis&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;IIS sites and applications&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.logical_disk.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;logical_disk&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Logical disks, disk I/O&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.logon.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;logon&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;User logon sessions&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.memory.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;memory&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Memory usage metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.mscluster_cluster.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mscluster_cluster&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;MSCluster cluster metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.mscluster_network.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mscluster_network&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;MSCluster network metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.mscluster_node.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mscluster_node&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;MSCluster Node metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.mscluster_resource.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mscluster_resource&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;MSCluster Resource metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.mscluster_resourcegroup.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mscluster_resourcegroup&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;MSCluster ResourceGroup metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.msmq.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;msmq&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;MSMQ queues&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.mssql.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mssql&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/use-sql-server-objects#SQLServerPOs&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;SQL Server Performance Objects&lt;/a&gt; metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.netframework_clrexceptions.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;netframework_clrexceptions&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;.NET Framework CLR Exceptions&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.netframework_clrinterop.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;netframework_clrinterop&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;.NET Framework Interop Metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.netframework_clrjit.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;netframework_clrjit&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;.NET Framework JIT metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.netframework_clrloading.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;netframework_clrloading&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;.NET Framework CLR Loading metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.netframework_clrlocksandthreads.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;netframework_clrlocksandthreads&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;.NET Framework locks and metrics threads&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.netframework_clrmemory.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;netframework_clrmemory&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;.NET Framework Memory metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.netframework_clrremoting.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;netframework_clrremoting&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;.NET Framework Remoting metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.netframework_clrsecurity.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;netframework_clrsecurity&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;.NET Framework Security Check metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.net.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;net&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Network interface I/O&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.os.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;os&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;OS metrics (memory, processes, users)&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.physical_disk.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;physical_disk&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Physical disks&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.process.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;process&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Per-process metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.remote_fx.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;remote_fx&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;RemoteFX protocol (RDP) metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.scheduled_task.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;scheduled_task&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Scheduled Tasks metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.service.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;service&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Service state metrics&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.smtp.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;smtp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;IIS SMTP Server&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.system.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;system&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;System calls&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.tcp.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;tcp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;TCP connections&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.teradici_pcoip.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;teradici_pcoip&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://www.teradici.com/web-help/pcoip_wmi_specs/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Teradici PCoIP&lt;/a&gt; session metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.time.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;time&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Windows Time Service&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.thermalzone.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;thermalzone&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Thermal information&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.terminal_services.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;terminal_services&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Terminal services (RDS)&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.textfile.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;textfile&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Read prometheus metrics from a text file&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.vmware_blast.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;vmware_blast&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;VMware Blast session metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.vmware.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;vmware&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Performance counters installed by the Vmware Guest agent&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Refer to the linked documentation on each collector for more information on reported metrics, configuration settings and usage examples.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Certain collectors will cause Grafana Agent to crash if those collectors are used and the required infrastructure isn&amp;rsquo;t installed.
These include but aren&amp;rsquo;t limited to mscluster_*, vmware, nps, dns, msmq, teradici_pcoip, ad, hyperv, and scheduled_task.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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.exporter.windows&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.exporter.windows &amp;#34;default&amp;#34; { }

// Configure a prometheus.scrape component to collect windows metrics.
prometheus.scrape &amp;#34;example&amp;#34; {
  targets    = prometheus.exporter.windows.default.targets
  forward_to = [prometheus.remote_write.demo.receiver]
}

prometheus.remote_write &amp;#34;demo&amp;#34; {
  endpoint {
    url = PROMETHEUS_REMOTE_WRITE_URL

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PROMETHEUS_REMOTE_WRITE_URL&lt;/code&gt;: The URL of the Prometheus remote_write-compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USERNAME&lt;/code&gt;: The username to use for authentication to the remote_write API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PASSWORD&lt;/code&gt;: The password to use for authentication to the remote_write API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.windows&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterwindows">prometheus.exporter.windows&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.windows&lt;/code> component embeds
&lt;a href="https://github.com/prometheus-community/windows_exporter" target="_blank" rel="noopener noreferrer">windows_exporter&lt;/a> which exposes a
wide variety of hardware and OS metrics for Windows-based systems.&lt;/p>
&lt;p>The &lt;code>windows_exporter&lt;/code> itself comprises various &lt;em>collectors&lt;/em>, which you can enable and disable as needed.
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.operator.podmonitors</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.operator.podmonitors/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.operator.podmonitors/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusoperatorpodmonitors&#34;&gt;prometheus.operator.podmonitors&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; discovers &lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;PodMonitor&lt;/a&gt; resources in your kubernetes cluster and scrapes the targets they reference. This component performs three main functions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Discover PodMonitor resources from your Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;Discover Pods in your cluster that match those PodMonitors.&lt;/li&gt;
&lt;li&gt;Scrape metrics from those Pods, and forward them to a receiver.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The default configuration assumes Grafana Agent Flow is running inside a Kubernetes cluster, and uses the in-cluster configuration to access the Kubernetes API. It can be run from outside the cluster by supplying connection info in the &lt;code&gt;client&lt;/code&gt; block, but network level access to pods is required to scrape metrics from them.&lt;/p&gt;
&lt;p&gt;PodMonitors may reference secrets for authenticating to targets to scrape them. In these cases, the secrets are loaded and refreshed only when the PodMonitor is updated or when this component refreshes its&amp;rsquo; internal state, which happens on a 5-minute refresh cycle.&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.operator.podmonitors &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 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(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;namespaces&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 namespaces to search for PodMonitor resources. If not specified, all namespaces will be searched.&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.operator.podmonitors&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 find PodMonitors.&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 authentication to the Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&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 discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;scrape&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#scrape-block&#34;&gt;scrape&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Default scrape configuration to apply to discovered targets.&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 PodMonitors 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 PodMonitors to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;clustering&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering-beta&#34;&gt;clustering&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Grafana Agent is running in clustered mode.&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 a &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 the Kubernetes client used to discover PodMonitors. 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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;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;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;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;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;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 regular expression replace is performed, if the regular expression matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;$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;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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can use the following actions:&lt;/p&gt;
&lt;ul&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;dropequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do match &lt;code&gt;target_label&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;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;keepequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do not match &lt;code&gt;target_label&lt;/code&gt;.&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;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;lowercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the lowercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&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;uppercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the uppercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression 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;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/prom-operator-scrape.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;default_scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default interval between scraping targets. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape interval.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1m&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;default_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 default timeout for scrape requests. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape timeout.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10s&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&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 PodMonitors.&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 PodMonitor 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 matcher expression for
PodMonitors 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;If there are multiple &lt;code&gt;match_expressions&lt;/code&gt; blocks inside of a &lt;code&gt;selector&lt;/code&gt; block, they are combined together with AND clauses.&lt;/p&gt;
&lt;h3 id=&#34;clustering-beta&#34;&gt;clustering (beta)&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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 Grafana Agent is &lt;a href=&#34;../../../concepts/clustering/&#34;&gt;using clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true,
then this component instance opts-in to participating in
the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering assumes that all cluster nodes are running with the same
configuration file, and that all
&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; components that have opted-in to using clustering, over
the course of a scrape interval have the same configuration.&lt;/p&gt;
&lt;p&gt;All &lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; components instances opting in to clustering use target
labels and a consistent hashing algorithm to determine ownership for each of
the targets between the cluster peers. Then, each peer only scrapes the subset
of targets that it is responsible for, so that the scrape load is distributed.
When a node joins or leaves the cluster, every peer recalculates ownership and
continues scraping with the new target set. This performs better than hashmod
sharding where &lt;em&gt;all&lt;/em&gt; nodes have to be re-distributed, as only 1/N of the
target&amp;rsquo;s ownership is transferred, but is eventually consistent (rather than
fully consistent like hashmod sharding is).&lt;/p&gt;
&lt;p&gt;If Grafana Agent is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op, and
&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; scrapes every target it receives in its arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; does not export any fields. It forwards all metrics it scrapes to the receiver configures with the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; is reported as unhealthy when given an invalid configuration, Prometheus components fail to initialize, or the connection to the Kubernetes API could not be established properly.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; reports the status of the last scrape for each configured
scrape job on the component&amp;rsquo;s debug endpoint, including discovered labels, and the last scrape time.&lt;/p&gt;
&lt;p&gt;It also exposes some debug information for each PodMonitor it has discovered, including any errors found while reconciling the scrape configuration from the PodMonitor.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&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 PodMonitors in your cluster, and forwards collected metrics to a &lt;code&gt;prometheus.remote_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;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;

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

prometheus.operator.podmonitors &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example will limit discovered PodMonitors to ones with the label &lt;code&gt;team=ops&lt;/code&gt; in a specific namespace: &lt;code&gt;my-app&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.operator.podmonitors &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    namespaces = [&amp;#34;my-app&amp;#34;]
    selector {
        match_expression {
            key = &amp;#34;team&amp;#34;
            operator = &amp;#34;In&amp;#34;
            values = [&amp;#34;ops&amp;#34;]
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example will apply additional relabel rules to discovered targets to filter by hostname. This may be useful if running Grafana Agent as a DaemonSet.&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.operator.podmonitors &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    rule {
      action = &amp;#34;keep&amp;#34;
      regex = env(&amp;#34;HOSTNAME&amp;#34;)
      source_labels = [&amp;#34;__meta_kubernetes_pod_node_name&amp;#34;]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="prometheusoperatorpodmonitors">prometheus.operator.podmonitors&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>prometheus.operator.probes</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.operator.probes/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.operator.probes/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusoperatorprobes&#34;&gt;prometheus.operator.probes&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; discovers &lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.Probe&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Probe&lt;/a&gt; resources in your Kubernetes cluster and scrapes the targets they reference.
This component performs three main functions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Discover Probe resources from your Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;Discover targets or ingresses that match those Probes.&lt;/li&gt;
&lt;li&gt;Scrape metrics from those endpoints, and forward them to a receiver.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The default configuration assumes Grafana Agent Flow is running inside a Kubernetes cluster, and uses the in-cluster config to access the Kubernetes API.
It can be run from outside the cluster by supplying connection info in the &lt;code&gt;client&lt;/code&gt; block, but network level access to pods is required to scrape metrics from them.&lt;/p&gt;
&lt;p&gt;Probes may reference secrets for authenticating to targets to scrape them.
In these cases, the secrets are loaded and refreshed only when the Probe is updated or when this component refreshes its&amp;rsquo; internal state, which happens on a 5-minute refresh cycle.&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.operator.probes &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 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(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;namespaces&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 namespaces to search for Probe resources. If not specified, all namespaces will be searched.&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.operator.probes&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 find Probes.&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 authentication to the Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&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 discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;scrape&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#scrape-block&#34;&gt;scrape&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Default scrape configuration to apply to discovered targets.&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 Probes 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 Probes to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;clustering&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering-experimental&#34;&gt;clustering&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when the Agent is running in clustered mode.&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 a &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 the Kubernetes client used to discover Probes. 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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;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;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;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;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;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 regular expression replace is performed, if the regular expression matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;$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;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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can use the following actions:&lt;/p&gt;
&lt;ul&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;dropequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do match &lt;code&gt;target_label&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;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;keepequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do not match &lt;code&gt;target_label&lt;/code&gt;.&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;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;lowercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the lowercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&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;uppercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the uppercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression 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;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/prom-operator-scrape.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;default_scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default interval between scraping targets. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape interval.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1m&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;default_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 default timeout for scrape requests. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape timeout.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10s&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&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 Probes.&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 Probe 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 matcher expression for
Probes 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;If there are multiple &lt;code&gt;match_expressions&lt;/code&gt; blocks inside of a &lt;code&gt;selector&lt;/code&gt; block, they are combined together with AND clauses.&lt;/p&gt;
&lt;h3 id=&#34;clustering-experimental&#34;&gt;clustering (experimental)&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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 Grafana Agent Flow is running in &lt;a href=&#34;../../cli/run/#clustering&#34;&gt;clustered mode&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true,
then this component instance opts-in to participating in
the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering assumes that all cluster nodes are running with the same
configuration file, and that all
&lt;code&gt;prometheus.operator.probes&lt;/code&gt; components that have opted-in to using clustering, over
the course of a scrape interval have the same configuration.&lt;/p&gt;
&lt;p&gt;All &lt;code&gt;prometheus.operator.probes&lt;/code&gt; components instances opting in to clustering use target
labels and a consistent hashing algorithm to determine ownership for each of
the targets between the cluster peers. Then, each peer only scrapes the subset
of targets that it is responsible for, so that the scrape load is distributed.
When a node joins or leaves the cluster, every peer recalculates ownership and
continues scraping with the new target set. This performs better than hashmod
sharding where &lt;em&gt;all&lt;/em&gt; nodes have to be re-distributed, as only 1/N of the
target&amp;rsquo;s ownership is transferred, but is eventually consistent (rather than
fully consistent like hashmod sharding is).&lt;/p&gt;
&lt;p&gt;If Grafana Agent Flow is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op, and
&lt;code&gt;prometheus.operator.probes&lt;/code&gt; scrapes every target it receives in its arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; does not export any fields. It forwards all metrics it scrapes to the receivers configured with the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; is reported as unhealthy when given an invalid configuration, Prometheus components fail to initialize, or the connection to the Kubernetes API could not be established properly.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; reports the status of the last scrape for each configured
scrape job on the component&amp;rsquo;s debug endpoint, including discovered labels, and the last scrape time.&lt;/p&gt;
&lt;p&gt;It also exposes some debug information for each Probe it has discovered, including any errors found while reconciling the scrape configuration from the Probe.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&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 Probes in your cluster, and forwards collected metrics to a &lt;code&gt;prometheus.remote_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;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;

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

prometheus.operator.probes &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example will limit discovered Probes to ones with the label &lt;code&gt;team=ops&lt;/code&gt; in a specific namespace: &lt;code&gt;my-app&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.operator.probes &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    namespaces = [&amp;#34;my-app&amp;#34;]
    selector {
        match_expression {
            key = &amp;#34;team&amp;#34;
            operator = &amp;#34;In&amp;#34;
            values = [&amp;#34;ops&amp;#34;]
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example will apply additional relabel rules to discovered targets to filter by hostname. This may be useful if running Grafana Agent Flow as a DaemonSet.&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.operator.probes &amp;#34;probes&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    rule {
      action = &amp;#34;keep&amp;#34;
      regex = env(&amp;#34;HOSTNAME&amp;#34;)
      source_labels = [&amp;#34;__meta_kubernetes_pod_node_name&amp;#34;]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusoperatorprobes">prometheus.operator.probes&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>prometheus.operator.servicemonitors</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.operator.servicemonitors/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.operator.servicemonitors/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusoperatorservicemonitors&#34;&gt;prometheus.operator.servicemonitors&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; discovers &lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.ServiceMonitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ServiceMonitor&lt;/a&gt; resources in your kubernetes cluster and scrapes the targets they reference. This component performs three main functions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Discover ServiceMonitor resources from your Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;Discover Services and Endpoints in your cluster that match those ServiceMonitors.&lt;/li&gt;
&lt;li&gt;Scrape metrics from those Endpoints, and forward them to a receiver.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The default configuration assumes Grafana Agent Flow is running inside a Kubernetes cluster, and uses the in-cluster configuration to access the Kubernetes API.
It can be run from outside the cluster by supplying connection info in the &lt;code&gt;client&lt;/code&gt; block, but network level access to discovered endpoints is required to scrape metrics from them.&lt;/p&gt;
&lt;p&gt;ServiceMonitors may reference secrets for authenticating to targets to scrape them.
In these cases, the secrets are loaded and refreshed only when the ServiceMonitor is updated or when this component refreshes its&amp;rsquo; internal state, which happens on a 5-minute refresh cycle.&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.operator.servicemonitors &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 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(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;namespaces&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 namespaces to search for ServiceMonitor resources. If not specified, all namespaces will be searched.&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.operator.servicemonitors&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 find ServiceMonitors.&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 authentication to the Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&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 discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;scrape&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#scrape-block&#34;&gt;scrape&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Default scrape configuration to apply to discovered targets.&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 ServiceMonitors 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 ServiceMonitors to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;clustering&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering-block&#34;&gt;clustering&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Grafana Agent Flow is running in clustered mode.&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 a &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 the Kubernetes client used to discover ServiceMonitors.
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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;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;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;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;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;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 regular expression replace is performed, if the regular expression matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;$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;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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can use the following actions:&lt;/p&gt;
&lt;ul&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;dropequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do match &lt;code&gt;target_label&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;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;keepequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do not match &lt;code&gt;target_label&lt;/code&gt;.&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;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;lowercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the lowercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&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;uppercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the uppercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression 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;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/prom-operator-scrape.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;default_scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default interval between scraping targets. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape interval.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1m&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;default_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 default timeout for scrape requests. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape timeout.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10s&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&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 ServiceMonitors.&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 ServiceMonitor 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 matcher expression for
ServiceMonitors 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;If there are multiple &lt;code&gt;match_expressions&lt;/code&gt; blocks inside of a &lt;code&gt;selector&lt;/code&gt; block, they are combined together with AND clauses.&lt;/p&gt;
&lt;h3 id=&#34;clustering-block&#34;&gt;clustering 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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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 Grafana Agent Flow is using &lt;a href=&#34;../../../concepts/clustering/&#34;&gt;using clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true,
then this component instance opts-in to participating in
the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering assumes that all cluster nodes are running with the same
configuration file, and that all
&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; components that have opted-in to using clustering, over
the course of a scrape interval have the same configuration.&lt;/p&gt;
&lt;p&gt;All &lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; components instances opting in to clustering use target
labels and a consistent hashing algorithm to determine ownership for each of
the targets between the cluster peers. Then, each peer only scrapes the subset
of targets that it is responsible for, so that the scrape load is distributed.
When a node joins or leaves the cluster, every peer recalculates ownership and
continues scraping with the new target set. This performs better than hashmod
sharding where &lt;em&gt;all&lt;/em&gt; nodes have to be re-distributed, as only 1/N of the
target&amp;rsquo;s ownership is transferred, but is eventually consistent (rather than
fully consistent like hashmod sharding is).&lt;/p&gt;
&lt;p&gt;If Grafana Agent Flow is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op, and
&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; scrapes every target it receives in its arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; does not export any fields. It forwards all metrics it scrapes to the receiver configures with the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; is reported as unhealthy when given an invalid configuration, Prometheus components fail to initialize, or the connection to the Kubernetes API could not be established properly.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; reports the status of the last scrape for each configured
scrape job on the component&amp;rsquo;s debug endpoint, including discovered labels, and the last scrape time.&lt;/p&gt;
&lt;p&gt;It also exposes some debug information for each ServiceMonitor it has discovered, including any errors found while reconciling the scrape configuration from the ServiceMonitor.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&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 ServiceMonitors in your cluster, and forwards collected metrics to a
&lt;code&gt;prometheus.remote_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;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;

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

prometheus.operator.servicemonitors &amp;#34;services&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example will limit discovered ServiceMonitors to ones with the label &lt;code&gt;team=ops&lt;/code&gt; in a specific namespace: &lt;code&gt;my-app&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.operator.servicemonitors &amp;#34;services&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    namespaces = [&amp;#34;my-app&amp;#34;]
    selector {
        match_expression {
            key = &amp;#34;team&amp;#34;
            operator = &amp;#34;In&amp;#34;
            values = [&amp;#34;ops&amp;#34;]
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example will apply additional relabel rules to discovered targets to filter by hostname. This may be useful if running Grafana Agent Flow as a DaemonSet.&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.operator.servicemonitors &amp;#34;services&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    rule {
      action = &amp;#34;keep&amp;#34;
      regex = env(&amp;#34;HOSTNAME&amp;#34;)
      source_labels = [&amp;#34;__meta_kubernetes_pod_node_name&amp;#34;]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="prometheusoperatorservicemonitors">prometheus.operator.servicemonitors&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>prometheus.receive_http</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.receive_http/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.receive_http/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusreceive_http&#34;&gt;prometheus.receive_http&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt; listens for HTTP requests containing Prometheus metric samples and forwards them to other components capable of receiving metrics.&lt;/p&gt;
&lt;p&gt;The HTTP API exposed is compatible with &lt;a href=&#34;https://prometheus.io/docs/prometheus/2.45/querying/api/#remote-write-receiver&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus &lt;code&gt;remote_write&lt;/code&gt; API&lt;/a&gt;. This means that other &lt;a href=&#34;../prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; components can be used as a client and send requests to &lt;code&gt;prometheus.receive_http&lt;/code&gt; which enables using Grafana Agent as a proxy for prometheus metrics.&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.receive_http &amp;#34;LABEL&amp;#34; {
  http {
    listen_address = &amp;#34;LISTEN_ADDRESS&amp;#34;
    listen_port = PORT
  }
  forward_to = RECEIVER_LIST
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The component will start an HTTP server supporting the following endpoint:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;POST /api/v1/metrics/write&lt;/code&gt; - send metrics to the component, which in turn will be forwarded to the receivers as configured in &lt;code&gt;forward_to&lt;/code&gt; argument. The request format must match that of &lt;a href=&#34;https://prometheus.io/docs/prometheus/2.45/querying/api/#remote-write-receiver&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus &lt;code&gt;remote_write&lt;/code&gt; API&lt;/a&gt;. One way to send valid requests to this component is to use another Grafana Agent with a &lt;a href=&#34;../prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&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(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send metrics 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 following blocks are supported inside the definition of &lt;code&gt;prometheus.receive_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;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;&lt;code&gt;http&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#http&#34;&gt;http&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server that receives 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;http&#34;&gt;http&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/loki-server-http.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block configures the HTTP server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;http&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;conn_limit&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 simultaneous HTTP connections. Defaults to no limit.&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;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. Defaults to accepting all incoming connections.&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;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections.&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;server_idle_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Idle timeout for HTTP server.&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;server_read_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read timeout for HTTP server.&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;server_write_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write timeout for HTTP server.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&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;prometheus.receive_http&lt;/code&gt; is reported as unhealthy if it is given an invalid configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;The following are some of the metrics that are exposed when this component is used. Note that the metrics include labels such as &lt;code&gt;status_code&lt;/code&gt; where relevant, which can be used to measure request success rates.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_receive_http_request_duration_seconds&lt;/code&gt; (histogram): Time (in seconds) spent serving HTTP requests.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_receive_http_request_message_bytes&lt;/code&gt; (histogram): Size (in bytes) of messages received in the request.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_receive_http_response_message_bytes&lt;/code&gt; (histogram): Size (in bytes) of messages sent in response.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_receive_http_tcp_connections&lt;/code&gt; (gauge): Current number of accepted TCP connections.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_fanout_latency&lt;/code&gt; (histogram): Write latency for sending metrics to other components.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_forwarded_samples_total&lt;/code&gt; (counter): Total number of samples sent to downstream components.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;h3 id=&#34;receiving-metrics-over-http&#34;&gt;Receiving metrics over HTTP&lt;/h3&gt;
&lt;p&gt;This example creates a &lt;code&gt;prometheus.receive_http&lt;/code&gt; component which starts an HTTP server listening on &lt;code&gt;0.0.0.0&lt;/code&gt; and port &lt;code&gt;9999&lt;/code&gt;. The server receives metrics and forwards them to a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component which writes these metrics to the specified HTTP 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;// Receives metrics over HTTP
prometheus.receive_http &amp;#34;api&amp;#34; {
  http {
    listen_address = &amp;#34;0.0.0.0&amp;#34;
    listen_port = 9999 
  }
  forward_to = [prometheus.remote_write.local.receiver]
}

// Send metrics to a locally running Mimir.
prometheus.remote_write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;
    
    basic_auth {
      username = &amp;#34;example-user&amp;#34;
      password = &amp;#34;example-password&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;proxying-metrics&#34;&gt;Proxying metrics&lt;/h3&gt;
&lt;p&gt;In order to send metrics to the &lt;code&gt;prometheus.receive_http&lt;/code&gt; component defined in the previous example, another Grafana Agent can run with the following configuration:&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;// Collects metrics of localhost:12345
prometheus.scrape &amp;#34;agent_self&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;job&amp;#34; = &amp;#34;agent&amp;#34;},
  ]
  forward_to = [prometheus.remote_write.local.receiver]
}

// Writes metrics to localhost:9999/api/v1/metrics/write - e.g. served by
// the prometheus.receive_http component from the example above.
prometheus.remote_write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://localhost:9999/api/v1/metrics/write&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;technical-details&#34;&gt;Technical details&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt; uses &lt;a href=&#34;https://en.wikipedia.org/wiki/Snappy_%28compression%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;snappy&lt;/a&gt; for compression.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="prometheusreceive_http">prometheus.receive_http&lt;/h1>
&lt;p>&lt;code>prometheus.receive_http&lt;/code> listens for HTTP requests containing Prometheus metric samples and forwards them to other components capable of receiving metrics.&lt;/p>
&lt;p>The HTTP API exposed is compatible with &lt;a href="https://prometheus.io/docs/prometheus/2.45/querying/api/#remote-write-receiver" target="_blank" rel="noopener noreferrer">Prometheus &lt;code>remote_write&lt;/code> API&lt;/a>. This means that other &lt;a href="../prometheus.remote_write/">&lt;code>prometheus.remote_write&lt;/code>&lt;/a> components can be used as a client and send requests to &lt;code>prometheus.receive_http&lt;/code> which enables using Grafana Agent as a proxy for prometheus metrics.&lt;/p></description></item><item><title>prometheus.relabel</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/prometheus.relabel/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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(MetricsReceiver)&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;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;100,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;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;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;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;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;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 regular expression replace is performed, if the regular expression matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;$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;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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can use the following actions:&lt;/p&gt;
&lt;ul&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;dropequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do match &lt;code&gt;target_label&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;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;keepequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do not match &lt;code&gt;target_label&lt;/code&gt;.&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;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;lowercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the lowercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&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;uppercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the uppercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression 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;/blockquote&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;MetricsReceiver&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;li&gt;&lt;code&gt;agent_prometheus_forwarded_samples_total&lt;/code&gt; (counter): Total number of samples sent to downstream 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 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;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-consumers&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/prometheus.remote_write/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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; 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; 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; 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; 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; sigv4&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#sigv4-block&#34;&gt;sigv4&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure AWS Signature Verification 4 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; azuread&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#azuread-block&#34;&gt;azuread&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure AzureAD 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; azuread &amp;gt; managed_identity&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#managed_identity-block&#34;&gt;managed_identity&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure Azure user-assigned managed identity.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &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;endpoint &amp;gt; write_relabel_config&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#write_relabel_config-block&#34;&gt;write_relabel_config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for write_relabel_config.&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; basic_auth&lt;/code&gt; refers to a &lt;code&gt;basic_auth&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sigv4-block&#34;&gt;&lt;code&gt;sigv4&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#azuread-block&#34;&gt;&lt;code&gt;azuread&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&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;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&gt;

        
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/sigv4-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;access_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS API 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;profile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Named AWS profile used to authenticate.&lt;/td&gt;
              &lt;td&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;AWS region.&lt;/td&gt;
              &lt;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_arn&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS Role ARN, an alternative to using AWS API keys.&lt;/td&gt;
              &lt;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_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS API secret key.&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 &lt;code&gt;region&lt;/code&gt; is left blank, the region from the default credentials chain is used.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;access_key&lt;/code&gt; is left blank, the environment variable &lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt; is used.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;secret_key&lt;/code&gt; is left blank, the environment variable &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt; is used.&lt;/p&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/azuread-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;cloud&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Azure Cloud.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;AzurePublic&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 supported values for &lt;code&gt;cloud&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;AzurePublic&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;AzureChina&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;AzureGovernment&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

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


&lt;div data-shared=&#34;flow/reference/components/managed_identity-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;Client ID of the managed identity used to authenticate.&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;client_id&lt;/code&gt; should be a valid &lt;a href=&#34;https://en.wikipedia.org/wiki/Universally_unique_identifier&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;UUID&lt;/a&gt; in one of the supported formats:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Microsoft encoding: &lt;code&gt;{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Raw hex encoding: &lt;code&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;10000&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;50&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;2000&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;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;sample_age_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum age of samples to send.&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;/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 capacity.&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;p&gt;The &lt;code&gt;sample_age_limit&lt;/code&gt; argument specifies the maximum age of samples to send. Any
samples older than the limit are dropped and won&amp;rsquo;t be sent to the remote storage.
The default value is &lt;code&gt;0s&lt;/code&gt;, which means that all samples are sent (feature is disabled).&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;2000&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;write_relabel_config-block&#34;&gt;write_relabel_config block&lt;/h3&gt;


&lt;div data-shared=&#34;flow/reference/components/write_relabel_config.md&#34;&gt;
            &lt;!-- NOTE(@tpaschalis) This needs to be kept in sync with rule.md on the same
directory since these pages don&#39;t support some type of templating. --&gt;
&lt;p&gt;The &lt;code&gt;write_relabel_config&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;write_relabel_config&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;write_relabel_config&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;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;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;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;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 regular expression replace is performed, if the regular expression matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;$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;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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can use the following actions:&lt;/p&gt;
&lt;ul&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;dropequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do match &lt;code&gt;target_label&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;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;keepequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do not match &lt;code&gt;target_label&lt;/code&gt;.&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;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;lowercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the lowercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&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;uppercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the uppercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression 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;/blockquote&gt;&lt;/div&gt;

&lt;/div&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 Flow 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;MetricsReceiver&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;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&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_out_of_order_samples_total&lt;/code&gt; (counter): Total number of out of
order samples ingestion failed attempts.&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;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show you how to create &lt;code&gt;prometheus.remote_write&lt;/code&gt; components that send metrics to different destinations.&lt;/p&gt;
&lt;h3 id=&#34;send-metrics-to-a-local-mimir-instance&#34;&gt;Send metrics to a local Mimir instance&lt;/h3&gt;
&lt;p&gt;You can create a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component that sends your metrics to a local Mimir instance:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;

    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 the 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;
&lt;h3 id=&#34;send-metrics-to-a-mimir-instance-with-a-tenant-specified&#34;&gt;Send metrics to a Mimir instance with a tenant specified&lt;/h3&gt;
&lt;p&gt;You can create a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component that sends your metrics to a specific tenant within the Mimir instance. This is useful when your Mimir instance is using more than one tenant:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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 Mimir instance
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

    headers = {
      &amp;#34;X-Scope-OrgID&amp;#34; = &amp;#34;staging&amp;#34;,
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;send-metrics-to-a-managed-service&#34;&gt;Send metrics to a managed service&lt;/h3&gt;
&lt;p&gt;You can create a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component that sends your metrics to a managed service, for example, Grafana Cloud. The Prometheus username and the Grafana Cloud API Key are injected in this example through environment variables.&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.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = &amp;#34;https://prometheus-xxx.grafana.net/api/prom/push&amp;#34;
      basic_auth {
        username = env(&amp;#34;PROMETHEUS_USERNAME&amp;#34;)
        password = env(&amp;#34;GRAFANA_CLOUD_API_KEY&amp;#34;)
      }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;technical-details&#34;&gt;Technical details&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; uses &lt;a href=&#34;https://en.wikipedia.org/wiki/Snappy_%28compression%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;snappy&lt;/a&gt; for compression.&lt;/p&gt;
&lt;p&gt;Any labels that start with &lt;code&gt;__&lt;/code&gt; will be removed before sending to the endpoint.&lt;/p&gt;
&lt;h2 id=&#34;data-retention&#34;&gt;Data retention&lt;/h2&gt;


&lt;div data-shared=&#34;/wal-data-retention.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;prometheus.remote_write&lt;/code&gt; component uses a Write Ahead Log (WAL) to prevent
data loss during network outages. The component buffers the received metrics in
a WAL for each configured endpoint. The queue shards can use the WAL after the
network outage is resolved and flush the buffered metrics to the endpoints.&lt;/p&gt;
&lt;p&gt;The WAL records metrics in 128 MB files called segments. To avoid having a WAL
that grows on-disk indefinitely, the component &lt;em&gt;truncates&lt;/em&gt; its segments on a
set interval.&lt;/p&gt;
&lt;p&gt;On each truncation, the WAL deletes references to series that are no longer
present and also &lt;em&gt;checkpoints&lt;/em&gt; roughly the oldest two thirds of the segments
(rounded down to the nearest integer) written to it since the last truncation
period. A checkpoint means that the WAL only keeps track of the unique
identifier for each existing metrics series, and can no longer use the samples
for remote writing. If that data has not yet been pushed to the remote
endpoint, it is lost.&lt;/p&gt;
&lt;p&gt;This behavior dictates the data retention for the &lt;code&gt;prometheus.remote_write&lt;/code&gt;
component. It also means that it&amp;rsquo;s impossible to directly correlate data
retention directly to the data age itself, as the truncation logic works on
&lt;em&gt;segments&lt;/em&gt;, not the samples themselves. This makes data retention less
predictable when the component receives a non-consistent rate of data.&lt;/p&gt;
&lt;p&gt;The 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/components/prometheus.remote_write#wal-block&#34;&gt;WAL block&lt;/a&gt; in Flow mode, or the 
    &lt;a href=&#34;/docs/agent/v0.42/static/configuration/metrics-config/&#34;&gt;metrics config&lt;/a&gt; in Static mode
contain some configurable parameters that can be used to control the tradeoff
between memory usage, disk usage, and data retention.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;truncate_frequency&lt;/code&gt; or &lt;code&gt;wal_truncate_frequency&lt;/code&gt; parameter configures the
interval at which truncations happen. A lower value leads to reduced memory
usage, but also provides less resiliency to long outages.&lt;/p&gt;
&lt;p&gt;When a WAL clean-up starts, the most recently 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; or &lt;code&gt;min_wal_time&lt;/code&gt; controls the minimum age of samples
considered for removal. No samples more recent than &lt;code&gt;min_keepalive_time&lt;/code&gt; are
removed. The &lt;code&gt;max_keepalive_time&lt;/code&gt; or &lt;code&gt;max_wal_time&lt;/code&gt; controls the maximum age of
samples that can be kept in the WAL. Samples older than
&lt;code&gt;max_keepalive_time&lt;/code&gt; are forcibly removed.&lt;/p&gt;
&lt;h3 id=&#34;extended-remote_write-outages&#34;&gt;Extended &lt;code&gt;remote_write&lt;/code&gt; outages&lt;/h3&gt;
&lt;p&gt;When the remote write endpoint is unreachable over a period of time, the most
recent successfully sent timestamp is not updated. The
&lt;code&gt;min_keepalive_time&lt;/code&gt; and &lt;code&gt;max_keepalive_time&lt;/code&gt; arguments control the age range
of data kept in the WAL.&lt;/p&gt;
&lt;p&gt;If the remote write outage is longer than the &lt;code&gt;max_keepalive_time&lt;/code&gt; parameter,
then the WAL is truncated, and the oldest data is lost.&lt;/p&gt;
&lt;h3 id=&#34;intermittent-remote_write-outages&#34;&gt;Intermittent &lt;code&gt;remote_write&lt;/code&gt; outages&lt;/h3&gt;
&lt;p&gt;If the remote write endpoint is intermittently reachable, the most recent
successfully sent timestamp is updated whenever the connection is successful.
A successful connection updates the series&amp;rsquo; comparison with
&lt;code&gt;min_keepalive_time&lt;/code&gt; and triggers a truncation on the next &lt;code&gt;truncate_frequency&lt;/code&gt;
interval which checkpoints two thirds of the segments (rounded down to the
nearest integer) written since the previous truncation.&lt;/p&gt;
&lt;h3 id=&#34;falling-behind&#34;&gt;Falling behind&lt;/h3&gt;
&lt;p&gt;If the queue shards cannot flush data quickly enough to keep
up-to-date with the most recent data buffered in the WAL, we say that the
component is &amp;lsquo;falling behind&amp;rsquo;.
It&amp;rsquo;s not unusual for the component to temporarily fall behind 2 or 3 scrape intervals.
If the component falls behind more than one third of the data written since the
last truncate interval, it is possible for the truncate loop to checkpoint data
before being pushed to the remote_write endpoint.&lt;/p&gt;
&lt;h3 id=&#34;wal-corruption&#34;&gt;WAL corruption&lt;/h3&gt;
&lt;p&gt;WAL corruption can occur when Grafana Agent unexpectedly stops while the latest WAL segments
are still being written to disk. For example, the host computer has a general disk failure
and crashes before you can stop Grafana Agent and other running services. When you restart Grafana
Agent, it verifies the WAL, removing any corrupt segments it finds. Sometimes, this repair
is unsuccessful, and you must manually delete the corrupted WAL to continue.&lt;/p&gt;
&lt;p&gt;If the WAL becomes corrupted, Grafana Agent writes error messages such as
&lt;code&gt;err=&amp;quot;failed to find segment for index&amp;quot;&lt;/code&gt; to the log file.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Deleting a WAL segment or a WAL file permanently deletes the stored WAL data.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;To delete the corrupted WAL:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Stop Grafana Agent.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Find and delete the contents of the &lt;code&gt;wal&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;By default the &lt;code&gt;wal&lt;/code&gt; directory is a subdirectory
of the &lt;code&gt;data-agent&lt;/code&gt; directory located in the Grafana Agent working directory. The WAL data directory
may be different than the default depending on the 
    &lt;a href=&#34;/docs/agent/v0.42/static/configuration/metrics-config/&#34;&gt;wal_directory&lt;/a&gt; setting in your Static configuration
file or the path specified by the Flow 
    &lt;a href=&#34;/docs/agent/v0.42/flow/reference/cli/run/&#34;&gt;command line flag&lt;/a&gt; &lt;code&gt;--storage-path&lt;/code&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;There is one &lt;code&gt;wal&lt;/code&gt; directory per:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Metrics instance running in Static mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; component running in Flow mode&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start Grafana Agent and verify that the WAL is working correctly.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

        
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-consumers&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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.42/flow/reference/components/prometheus.scrape/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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 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 (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(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 value to use for the job label if not already set.&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;enable_protobuf_negotiation&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to enable protobuf negotiation with the client.&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;track_timestamps_staleness&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Indicator whether to track the staleness of the scraped timestamps.&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;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_classic_histograms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape a classic histogram that is also exposed as a native histogram.&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;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 configuration.&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 configuration.&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;track_timestamps_staleness&lt;/code&gt; controls whether Prometheus tracks &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/querying/basics/#staleness&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;staleness&lt;/a&gt; of metrics which with an explicit timestamp present in scraped data.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An &amp;ldquo;explicit timestamp&amp;rdquo; is an optional timestamp in the &lt;a href=&#34;https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus metrics exposition format&lt;/a&gt;. For example, this sample has a timestamp of &lt;code&gt;1395066363000&lt;/code&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_requests_total{method=&amp;#34;post&amp;#34;,code=&amp;#34;200&amp;#34;} 1027 1395066363000&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;track_timestamps_staleness&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;, a staleness marker will be inserted when a metric is no longer present or the target is down.&lt;/li&gt;
&lt;li&gt;A &amp;ldquo;staleness marker&amp;rdquo; is just a &lt;span class=&#34;term&#34; x-data=&#34;app_term(&#39;sample&#39;, `&amp;lt;p&amp;gt;A sample is a single timestamped value in a time series.
Given the series &amp;lt;code&amp;gt;node_cpu_seconds_total{instance=&amp;amp;quot;10.0.0.1&amp;amp;quot;,mode=&amp;amp;quot;system&amp;amp;quot;}&amp;lt;/code&amp;gt; its stream of samples may look like:&amp;lt;/p&amp;gt;

&amp;lt;div class=&amp;#34;code-snippet code-snippet__mini&amp;#34;&amp;gt;&amp;lt;div class=&amp;#34;lang-toolbar__mini&amp;#34;&amp;gt;
    &amp;lt;span class=&amp;#34;code-clipboard&amp;#34;&amp;gt;
      &amp;lt;button x-data=&amp;#34;app_code_snippet()&amp;#34; x-init=&amp;#34;init()&amp;#34; @click=&amp;#34;copy()&amp;#34;&amp;gt;
        &amp;lt;img class=&amp;#34;code-clipboard__icon&amp;#34; src=&amp;#34;/media/images/icons/icon-copy-small-2.svg&amp;#34; alt=&amp;#34;Copy code to clipboard&amp;#34; width=&amp;#34;14&amp;#34; height=&amp;#34;13&amp;#34;&amp;gt;
        &amp;lt;span&amp;gt;Copy&amp;lt;/span&amp;gt;
      &amp;lt;/button&amp;gt;
    &amp;lt;/span&amp;gt;
  &amp;lt;/div&amp;gt;&amp;lt;div class=&amp;#34;code-snippet code-snippet__border&amp;#34;&amp;gt;
    &amp;lt;pre data-expanded=&amp;#34;false&amp;#34;&amp;gt;&amp;lt;code class=&amp;#34;language-none&amp;#34;&amp;gt;# Display format: &amp;amp;lt;value&amp;amp;gt; @&amp;amp;lt;timestamp&amp;amp;gt;
11775 @1603812134
11790 @1603812149
11805 @1603812164
11819 @1603812179
11834 @1603812194&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;`)&#34; x-init=&#34;init()&#34; :class=&#34;{ &#39;term-hover&#39; : open }&#34;&gt;&lt;span x-ref=&#34;tooltip&#34;&gt;sample&lt;/span&gt;&lt;/span&gt; with a specific NaN value which is reserved for internal use by Prometheus.&lt;/li&gt;
&lt;li&gt;It is recommended to set &lt;code&gt;track_timestamps_staleness&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; if the database where metrics are written to has enabled &lt;a href=&#34;/docs/mimir/latest/configure/configure-out-of-order-samples-ingestion/&#34;&gt;out of order ingestion&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;track_timestamps_staleness&lt;/code&gt; is set to &lt;code&gt;false&lt;/code&gt;, samples with explicit timestamps will only be labeled as stale after a certain time period, which in Prometheus is 5 minutes by default.&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;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;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;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;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;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;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;clustering&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering-block&#34;&gt;clustering&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when the Agent is running in clustered mode.&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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;clustering-block&#34;&gt;clustering 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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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 Grafana Agent Flow is &lt;a href=&#34;../../../concepts/clustering/&#34;&gt;using clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true,
then this &lt;code&gt;prometheus.scrape&lt;/code&gt; component instance opts-in to participating in
the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering assumes that all cluster nodes are running with the same
configuration file, have access to the same service discovery APIs and that all
&lt;code&gt;prometheus.scrape&lt;/code&gt; components that have opted-in to using clustering, over
the course of a scrape interval, are converging on the same target set from
upstream components in their &lt;code&gt;targets&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;All &lt;code&gt;prometheus.scrape&lt;/code&gt; components instances opting in to clustering use target
labels and a consistent hashing algorithm to determine ownership for each of
the targets between the cluster peers. Then, each peer only scrapes the subset
of targets that it is responsible for, so that the scrape load is distributed.
When a node joins or leaves the cluster, every peer recalculates ownership and
continues scraping with the new target set. This performs better than hashmod
sharding where &lt;em&gt;all&lt;/em&gt; nodes have to be re-distributed, as only 1/N of the
targets ownership is transferred, but is eventually consistent (rather than
fully consistent like hashmod sharding is).&lt;/p&gt;
&lt;p&gt;If Grafana Agent Flow is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op and
&lt;code&gt;prometheus.scrape&lt;/code&gt; scrapes every target it receives in its arguments.&lt;/p&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;li&gt;&lt;code&gt;agent_prometheus_scrape_targets_gauge&lt;/code&gt; (gauge): Number of targets this component is configured to scrape.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent_prometheus_forwarded_samples_total&lt;/code&gt; (counter): Total number of samples sent to downstream 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;If a target is hosted at the &lt;a href=&#34;../../../concepts/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the
&lt;a href=&#34;../../cli/run/&#34;&gt;run command&lt;/a&gt;, &lt;code&gt;prometheus.scrape&lt;/code&gt; will scrape the metrics in-memory,
bypassing the network.&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;p&gt;To enable scraping of Prometheus&amp;rsquo; native histograms over gRPC, the
&lt;code&gt;enable_protobuf_negotiation&lt;/code&gt; must be set to true. The
&lt;code&gt;scrape_classic_histograms&lt;/code&gt; argument controls whether the component should also
scrape the &amp;lsquo;classic&amp;rsquo; histogram equivalent of a native histogram, if it is
present.&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 are 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;
&lt;h3 id=&#34;technical-details&#34;&gt;Technical details&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; supports &lt;a href=&#34;https://en.wikipedia.org/wiki/Gzip&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;gzip&lt;/a&gt; compression.&lt;/p&gt;
&lt;p&gt;The following special labels can change the behavior of prometheus.scrape:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__address__&lt;/code&gt; is the name of the label that holds the &lt;code&gt;&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt; address of a scrape target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__metrics_path__&lt;/code&gt;   is the name of the label that holds the path on which to scrape a target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__scheme__&lt;/code&gt; is the name of the label that holds the scheme (http,https) on which to  scrape a target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__scrape_interval__&lt;/code&gt; is the name of the label that holds the scrape interval used to scrape a target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__scrape_timeout__&lt;/code&gt; is the name of the label that holds the scrape timeout used to scrape a target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__param_&amp;lt;name&amp;gt;&lt;/code&gt; is a prefix for labels that provide URL parameters &lt;code&gt;&amp;lt;name&amp;gt;&lt;/code&gt; used to scrape a target.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Special labels added after a scrape&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__name__&lt;/code&gt; is the label name indicating the metric name of a timeseries.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;job&lt;/code&gt; is the label name indicating the job from which a timeseries was scraped.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;instance&lt;/code&gt; is the label name used for the instance label.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&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>pyroscope.ebpf</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/pyroscope.ebpf/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/pyroscope.ebpf/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopeebpf&#34;&gt;pyroscope.ebpf&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt; configures an ebpf profiling job for the current host. The collected performance profiles are forwarded
to the list of receivers passed in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;To use the  &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component you must run Grafana Agent Flow as root and inside host pid namespace.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can specify multiple &lt;code&gt;pyroscope.ebpf&lt;/code&gt; components by giving them different labels, however it is not recommended as
it can lead to additional memory and CPU usage.&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;pyroscope.ebpf &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 ebpf profiling job to collect performance profiles from the current host.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure a &lt;code&gt;pyroscope.ebpf&lt;/code&gt;. Only the
&lt;code&gt;forward_to&lt;/code&gt; and &lt;code&gt;targets&lt;/code&gt; fields are required. 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;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 group profiles by container id&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 collected 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;collect_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 collect profiles&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;15s&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;sample_rate&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How many times per second to collect profile samples&lt;/td&gt;
              &lt;td&gt;97&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pid_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 size of the pid -&amp;gt; proc symbols table LRU cache&lt;/td&gt;
              &lt;td&gt;32&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;build_id_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 size of the elf file build id -&amp;gt; symbols table LRU cache&lt;/td&gt;
              &lt;td&gt;64&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;same_file_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 size of the elf file -&amp;gt; symbols table LRU cache&lt;/td&gt;
              &lt;td&gt;8&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;container_id_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 size of the pid -&amp;gt; container ID table LRU cache&lt;/td&gt;
              &lt;td&gt;1024&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;collect_user_profile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable/disable collection of userspace profiles&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;collect_kernel_profile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable/disable collection of kernelspace profiles&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;demangle&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;C&#43;&#43; demangle mode. Available options are: &lt;code&gt;none&lt;/code&gt;, &lt;code&gt;simplified&lt;/code&gt;, &lt;code&gt;templates&lt;/code&gt;, &lt;code&gt;full&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;none&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;python_enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable/disable python profiling&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;symbols_map_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The size of eBPF symbols map&lt;/td&gt;
              &lt;td&gt;16384&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pid_map_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The size of eBPF PID map&lt;/td&gt;
              &lt;td&gt;2048&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;&lt;code&gt;pyroscope.ebpf&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;pyroscope.ebpf&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;ul&gt;
&lt;li&gt;&lt;code&gt;targets&lt;/code&gt; currently tracked active targets.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pid_cache&lt;/code&gt; per process elf symbol tables and their sizes in symbols count.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;elf_cache&lt;/code&gt; per build id and per same file symbol tables and their sizes in symbols count.&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;pyroscope_fanout_latency&lt;/code&gt; (histogram): Write latency for sending to direct and indirect components.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_active_targets&lt;/code&gt; (gauge): Number of active targets the component tracks.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_profiling_sessions_total&lt;/code&gt; (counter): Number of profiling sessions completed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_profiling_sessions_failing_total&lt;/code&gt; (counter): Number of profiling sessions failed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_pprofs_total&lt;/code&gt; (counter): Number of pprof profiles collected by the ebpf component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;profile-collecting-behavior&#34;&gt;Profile collecting behavior&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component collects stack traces associated with a process running on the current host.
You can use the &lt;code&gt;sample_rate&lt;/code&gt; argument to define the number of stack traces collected per second. The default is 97.&lt;/p&gt;
&lt;p&gt;The following labels are automatically injected into the collected profiles if you have not defined them. These labels
can help you pin down a profiling 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;&lt;code&gt;service_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Pyroscope service name. It&amp;rsquo;s automatically selected from discovery meta labels if possible. Otherwise defaults to &lt;code&gt;unspecified&lt;/code&gt;.&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;pyroscope metric name. Defaults to &lt;code&gt;process_cpu&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__container_id__&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The container ID derived from target.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;targets&#34;&gt;Targets&lt;/h3&gt;
&lt;p&gt;One of the following special labels &lt;em&gt;must&lt;/em&gt; be included in each target of &lt;code&gt;targets&lt;/code&gt; and the label must correspond to the container or process that is profiled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__container_id__&lt;/code&gt;: The container ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_id&lt;/code&gt;: The ID of the Docker container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_id&lt;/code&gt;: The ID of the Kubernetes pod container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__process_pid__&lt;/code&gt; : The process ID.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each process is then associated with a specified target from the targets list, determined by a container ID or process PID.&lt;/p&gt;
&lt;p&gt;If a process&amp;rsquo;s container ID matches a target&amp;rsquo;s container ID label, the stack traces are aggregated per target based on the container ID.
If a process&amp;rsquo;s PID matches a target&amp;rsquo;s process PID label, the stack traces are aggregated per target based on the process PID.
Otherwise the process is not profiled.&lt;/p&gt;
&lt;h3 id=&#34;service-name&#34;&gt;Service name&lt;/h3&gt;
&lt;p&gt;The special label &lt;code&gt;service_name&lt;/code&gt; is required and must always be present. If it&amp;rsquo;s not specified, it is
attempted to be inferred from multiple sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_annotation_pyroscope_io_service_name&lt;/code&gt; which is a &lt;code&gt;pyroscope.io/service_name&lt;/code&gt; pod annotation.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt; and &lt;code&gt;__meta_kubernetes_pod_container_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_name&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;service_name&lt;/code&gt; is not specified and could not be inferred, it is set to &lt;code&gt;unspecified&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;troubleshooting-unknown-symbols&#34;&gt;Troubleshooting unknown symbols&lt;/h2&gt;
&lt;p&gt;Symbols are extracted from various sources, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;.symtab&lt;/code&gt; and &lt;code&gt;.dynsym&lt;/code&gt; sections in the ELF file.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;.symtab&lt;/code&gt; and &lt;code&gt;.dynsym&lt;/code&gt; sections in the debug ELF file.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;.gopclntab&lt;/code&gt; section in Go language ELF files.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The search for debug files follows &lt;a href=&#34;https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;gdb algorithm&lt;/a&gt;.
For example, if the profiler wants to find the debug file
for &lt;code&gt;/lib/x86_64-linux-gnu/libc.so.6&lt;/code&gt;
with a &lt;code&gt;.gnu_debuglink&lt;/code&gt; set to &lt;code&gt;libc.so.6.debug&lt;/code&gt; and a build ID &lt;code&gt;0123456789abcdef&lt;/code&gt;. The following paths are examined:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/usr/lib/debug/.build-id/01/0123456789abcdef.debug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/lib/x86_64-linux-gnu/libc.so.6.debug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/lib/x86_64-linux-gnu/.debug/libc.so.6.debug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/usr/lib/debug/lib/x86_64-linux-gnu/libc.so.6.debug&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;dealing-with-unknown-symbols&#34;&gt;Dealing with unknown symbols&lt;/h3&gt;
&lt;p&gt;Unknown symbols in the profiles you’ve collected indicate that the profiler couldn&amp;rsquo;t access an ELF file ￼associated with
a given address in the trace.&lt;/p&gt;
&lt;p&gt;This can occur for several reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The process has terminated, making the ELF file inaccessible.&lt;/li&gt;
&lt;li&gt;The ELF file is either corrupted or not recognized as an ELF file.&lt;/li&gt;
&lt;li&gt;There is no corresponding ELF file entry in &lt;code&gt;/proc/pid/maps&lt;/code&gt; for the address in the stack trace.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;addressing-unresolved-symbols&#34;&gt;Addressing unresolved symbols&lt;/h3&gt;
&lt;p&gt;If you only see module names (e.g., &lt;code&gt;/lib/x86_64-linux-gnu/libc.so.6&lt;/code&gt;) without corresponding function names, this
indicates that the symbols couldn&amp;rsquo;t be mapped to their respective function names.&lt;/p&gt;
&lt;p&gt;This can occur for several reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The binary has been stripped, leaving no .symtab, .dynsym, or .gopclntab sections in the ELF file.&lt;/li&gt;
&lt;li&gt;The debug file is missing or could not be located.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To fix this for your binaries, ensure that they are either not stripped or that you have separate
debug files available. You can achieve this by running:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;objcopy --only-keep-debug elf elf.debug
strip elf -o elf.stripped
objcopy --add-gnu-debuglink=elf.debug elf.stripped elf.debuglink&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For system libraries, ensure that debug symbols are installed. On Ubuntu, for example, you can install debug symbols
for &lt;code&gt;libc&lt;/code&gt; by executing:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;apt install libc6-dbg&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;understanding-flat-stack-traces&#34;&gt;Understanding flat stack traces&lt;/h3&gt;
&lt;p&gt;If your profiles show many shallow stack traces, typically 1-2 frames deep, your binary might have been compiled without
frame pointers.&lt;/p&gt;
&lt;p&gt;To compile your code with frame pointers, include the &lt;code&gt;-fno-omit-frame-pointer&lt;/code&gt; flag in your compiler options.&lt;/p&gt;
&lt;h3 id=&#34;profiling-interpreted-languages&#34;&gt;Profiling interpreted languages&lt;/h3&gt;
&lt;p&gt;Profiling interpreted languages like Python, Ruby, JavaScript, etc., is not ideal using this implementation.
The JIT-compiled methods in these languages are typically not in ELF file format, demanding additional steps for
profiling. For instance, using perf-map-agent and enabling frame pointers for Java.&lt;/p&gt;
&lt;p&gt;Interpreted methods will display the interpreter function’s name rather than the actual function.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;h3 id=&#34;kubernetes-discovery&#34;&gt;Kubernetes discovery&lt;/h3&gt;
&lt;p&gt;In the following example, performance profiles are collected from pods on the same node, discovered using
&lt;code&gt;discovery.kubernetes&lt;/code&gt;. Pod selection relies on the &lt;code&gt;HOSTNAME&lt;/code&gt; environment variable, which is a pod name if Grafana Agent is
used as a Grafana Agent Helm chart. The &lt;code&gt;service_name&lt;/code&gt; label is set
to &lt;code&gt;{__meta_kubernetes_namespace}/{__meta_kubernetes_pod_container_name}&lt;/code&gt; from Kubernetes meta labels.&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;all_pods&amp;#34; {
  role = &amp;#34;pod&amp;#34;
  selectors {
    field = &amp;#34;spec.nodeName=&amp;#34; &amp;#43; env(&amp;#34;HOSTNAME&amp;#34;)
    role = &amp;#34;pod&amp;#34;
  }
}

discovery.relabel &amp;#34;local_pods&amp;#34; {
  targets = discovery.kubernetes.all_pods.targets
  rule {
    action = &amp;#34;drop&amp;#34;
    regex = &amp;#34;Succeeded|Failed&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_pod_phase&amp;#34;]
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    regex = &amp;#34;(.*)@(.*)&amp;#34;
    replacement = &amp;#34;ebpf/${1}/${2}&amp;#34;
    separator = &amp;#34;@&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_namespace&amp;#34;, &amp;#34;__meta_kubernetes_pod_container_name&amp;#34;]
    target_label = &amp;#34;service_name&amp;#34;
  }
  rule {
    action = &amp;#34;labelmap&amp;#34;
    regex = &amp;#34;__meta_kubernetes_pod_label_(.&amp;#43;)&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_namespace&amp;#34;]
    target_label = &amp;#34;namespace&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_pod_name&amp;#34;]
    target_label = &amp;#34;pod&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_node_name&amp;#34;]
    target_label = &amp;#34;node&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_pod_container_name&amp;#34;]
    target_label = &amp;#34;container&amp;#34;
  }
}
pyroscope.ebpf &amp;#34;local_pods&amp;#34; {
  forward_to = [ pyroscope.write.endpoint.receiver ]
  targets = discovery.relabel.local_pods.output
}

pyroscope.write &amp;#34;endpoint&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4100&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;docker-discovery&#34;&gt;Docker discovery&lt;/h3&gt;
&lt;p&gt;The following example collects performance profiles from containers discovered by &lt;code&gt;discovery.docker&lt;/code&gt; and ignores all
other profiles collected from outside any docker container. The &lt;code&gt;service_name&lt;/code&gt; label is set to the
&lt;code&gt;__meta_docker_container_name&lt;/code&gt; 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;discovery.docker &amp;#34;linux&amp;#34; {
  host = &amp;#34;unix:///var/run/docker.sock&amp;#34;
}

discovery.relabel &amp;#34;local_containers&amp;#34; {
  targets = discovery.docker.linux.targets
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_docker_container_name&amp;#34;]
    target_label = &amp;#34;service_name&amp;#34;
  }
}

pyroscope.write &amp;#34;staging&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4100&amp;#34;
  }
}

pyroscope.ebpf &amp;#34;default&amp;#34; {
  forward_to   = [ pyroscope.write.staging.receiver ]
  targets      = discovery.relabel.local_containers.output
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#pyroscope-profilesreceiver-exporters&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="pyroscopeebpf">pyroscope.ebpf&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>pyroscope.java</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/pyroscope.java/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/pyroscope.java/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopejava&#34;&gt;pyroscope.java&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;pyroscope.java&lt;/code&gt; continuously profiles Java processes running on the local Linux OS
using &lt;a href=&#34;https://github.com/async-profiler/async-profiler&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;async-profiler&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;To use the  &lt;code&gt;pyroscope.java&lt;/code&gt; component you must run Grafana Agent Flow as root and inside host PID namespace.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;pyroscope.java &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 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 java process targets to profile.&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 collected 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;tmp_dir&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Temporary directory to store async-profiler.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/tmp&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;profiling-behavior&#34;&gt;Profiling behavior&lt;/h2&gt;
&lt;p&gt;The special label &lt;code&gt;__process_pid__&lt;/code&gt; &lt;em&gt;must always&lt;/em&gt; be present in each target of &lt;code&gt;targets&lt;/code&gt; and corresponds to the &lt;code&gt;PID&lt;/code&gt; of
the process to profile.&lt;/p&gt;
&lt;p&gt;After component startup, &lt;code&gt;pyroscope.java&lt;/code&gt; creates a temporary directory under &lt;code&gt;tmp_dir&lt;/code&gt; and extracts the
async-profiler binaries for both glibc and musl into the directory with the following layout.&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;/tmp/grafana-agent-asprof-glibc-{SHA1}/bin/asprof
/tmp/grafana-agent-asprof-glibc-{SHA1}/lib/libasyncProfiler.so
/tmp/grafana-agent-asprof-musl-{SHA1}/bin/asprof
/tmp/grafana-agent-asprof-musl-{SHA1}/lib/libasyncProfiler.so&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After process profiling startup, the component detects libc type and copies according &lt;code&gt;libAsyncProfiler.so&lt;/code&gt; into the
target process file system at the exact same path.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;asprof&lt;/code&gt; binary runs with root permissions.
If you change the &lt;code&gt;tmp_dir&lt;/code&gt; configuration to something other than &lt;code&gt;/tmp&lt;/code&gt;, then you must ensure that the
directory is only writable by root.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h4 id=&#34;targets-argument&#34;&gt;&lt;code&gt;targets&lt;/code&gt; argument&lt;/h4&gt;
&lt;p&gt;The special &lt;code&gt;__process_pid__&lt;/code&gt; label &lt;em&gt;must always&lt;/em&gt; be present and corresponds to the
process PID that is used for profiling.&lt;/p&gt;
&lt;p&gt;Labels starting 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 special label &lt;code&gt;service_name&lt;/code&gt; is required and must always be present.
If it is not specified, &lt;code&gt;pyroscope.scrape&lt;/code&gt; will attempt to infer it from
either of the following sources, in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_annotation_pyroscope_io_service_name&lt;/code&gt; which is a &lt;code&gt;pyroscope.io/service_name&lt;/code&gt; pod annotation.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt; and &lt;code&gt;__meta_kubernetes_pod_container_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_container_label_service_name&lt;/code&gt; or &lt;code&gt;__meta_dockerswarm_service_name&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If &lt;code&gt;service_name&lt;/code&gt; is not specified and could not be inferred, then it is set to &lt;code&gt;unspecified&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;pyroscope.java&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;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;Describes java profiling configuration.&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;profiling_config-block&#34;&gt;profiling_config block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profiling_config&lt;/code&gt; block describes how async-profiler is invoked.&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;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 collect profiles from the targets.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;60s&amp;rdquo;&lt;/td&gt;
              &lt;td&gt;no&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;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable cpu profiling, using &lt;code&gt;itimer&lt;/code&gt; async-profiler event.&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;sample_rate&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CPU profiling sample rate. It is converted from Hz to interval and passed as &lt;code&gt;-i&lt;/code&gt; arg to async-profiler.&lt;/td&gt;
              &lt;td&gt;100&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;alloc&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allocation profiling sampling configuration  It is passed as &lt;code&gt;--alloc&lt;/code&gt; arg to async-profiler.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;512k&amp;rdquo;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;lock&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Lock profiling sampling configuration. It is passed as &lt;code&gt;--lock&lt;/code&gt; arg to async-profiler.&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;10ms&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;For more information on async-profiler configuration, see &lt;a href=&#34;https://github.com/async-profiler/async-profiler?tab=readme-ov-file#profiler-options&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;profiler-options&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.java&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;pyroscope.java&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;pyroscope.java&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;pyroscope.java&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;profile-every-java-process-on-the-current-host&#34;&gt;Profile every java process on the current host&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;pyroscope.write &amp;#34;staging&amp;#34; {
  endpoint {
    url = &amp;#34;http://localhost:4040&amp;#34;
  }
}

discovery.process &amp;#34;all&amp;#34; {
  refresh_interval = &amp;#34;60s&amp;#34;
  discover_config {
    cwd = true
    exe = true
    commandline = true
    username = true
    uid = true
    container_id = true
  }
}

discovery.relabel &amp;#34;java&amp;#34; {
  targets = discovery.process.all.targets
  rule {
    action = &amp;#34;keep&amp;#34;
    regex = &amp;#34;.*/java$&amp;#34;
    source_labels = [&amp;#34;__meta_process_exe&amp;#34;]
  }
}

pyroscope.java &amp;#34;java&amp;#34; {
  targets = discovery.relabel.java.output
  forward_to = [pyroscope.write.staging.receiver]
  profiling_config {
    interval = &amp;#34;60s&amp;#34;
    alloc = &amp;#34;512k&amp;#34;
    cpu = true
    sample_rate = 100
    lock = &amp;#34;1ms&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.java&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#pyroscope-profilesreceiver-exporters&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="pyroscopejava">pyroscope.java&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>pyroscope.scrape</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/pyroscope.scrape/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/pyroscope.scrape/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopescrape&#34;&gt;pyroscope.scrape&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; collects &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; performance profiles for a given set of HTTP &lt;code&gt;targets&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; mimcks the scraping behavior of &lt;code&gt;prometheus.scrape&lt;/code&gt;.
Similarly to how Prometheus scrapes metrics via HTTP, &lt;code&gt;pyroscope.scrape&lt;/code&gt; collects profiles via HTTP requests.&lt;/p&gt;
&lt;p&gt;Unlike Prometheus, which usually only scrapes one &lt;code&gt;/metrics&lt;/code&gt; endpoint per target,
&lt;code&gt;pyroscope.scrape&lt;/code&gt; may need to scrape multiple endpoints for the same target.
This is because different types of profiles are scraped on different endpoints.
For example, &amp;ldquo;mutex&amp;rdquo; profiles may be scraped on a &lt;code&gt;/debug/pprof/delta_mutex&lt;/code&gt; HTTP endpoint, whereas
memory consumption may be scraped on a &lt;code&gt;/debug/pprof/allocs&lt;/code&gt; HTTP endpoint.&lt;/p&gt;
&lt;p&gt;The profile paths, protocol scheme, scrape interval, scrape timeout,
query parameters, as well as any other settings can be configured within &lt;code&gt;pyroscope.scrape&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.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 the body of a 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 a scrape request fails, the &lt;a href=&#34;../../../tasks/debug/&#34;&gt;debug UI&lt;/a&gt; for &lt;code&gt;pyroscope.scrape&lt;/code&gt; will show:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Detailed information about the failure.&lt;/li&gt;
&lt;li&gt;The time of the last successful scrape.&lt;/li&gt;
&lt;li&gt;The labels last used for scraping.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The scraped performance profiles can be forwarded to components such as
&lt;code&gt;pyroscope.write&lt;/code&gt; via the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;pyroscope.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 &#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;pyroscope.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;&lt;code&gt;pyroscope.scrape&lt;/code&gt; starts a new scrape job to scrape all of the input targets.
Multiple scrape jobs can be started 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;Any omitted arguments take on their default values. If conflicting
arguments are being passed (for example, configuring both &lt;code&gt;bearer_token&lt;/code&gt;
and &lt;code&gt;bearer_token_file&lt;/code&gt;), then &lt;code&gt;pyroscope.scrape&lt;/code&gt; will fail to start and will report 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 configuration.&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 configuration. Must be larger than &lt;code&gt;scrape_interval&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;18s&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;code&gt;&amp;quot;http&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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h4 id=&#34;job_name-argument&#34;&gt;&lt;code&gt;job_name&lt;/code&gt; argument&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;job_name&lt;/code&gt; defaults to the component&amp;rsquo;s unique identifier.&lt;/p&gt;
&lt;p&gt;For example, the &lt;code&gt;job_name&lt;/code&gt; of &lt;code&gt;pyroscope.scrape &amp;quot;local&amp;quot; { ... }&lt;/code&gt; will be &lt;code&gt;&amp;quot;pyroscope.scrape.local&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&#34;targets-argument&#34;&gt;&lt;code&gt;targets&lt;/code&gt; argument&lt;/h4&gt;
&lt;p&gt;The list of &lt;code&gt;targets&lt;/code&gt; can be provided &lt;a href=&#34;#default-endpoints-of-static-targets&#34;&gt;statically&lt;/a&gt;, &lt;a href=&#34;#default-endpoints-of-dynamic-targets&#34;&gt;dynamically&lt;/a&gt;,
or a &lt;a href=&#34;#default-endpoints-of-static-and-dynamic-targets&#34;&gt;combination of both&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The special &lt;code&gt;__address__&lt;/code&gt; label &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;Labels starting 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 special label &lt;code&gt;service_name&lt;/code&gt; is required and must always be present.
If it is not specified, &lt;code&gt;pyroscope.scrape&lt;/code&gt; will attempt to infer it from
either of the following sources, in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_annotation_pyroscope_io_service_name&lt;/code&gt; which is a &lt;code&gt;pyroscope.io/service_name&lt;/code&gt; pod annotation.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt; and &lt;code&gt;__meta_kubernetes_pod_container_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_container_label_service_name&lt;/code&gt; or &lt;code&gt;__meta_dockerswarm_service_name&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If &lt;code&gt;service_name&lt;/code&gt; is not specified and could not be inferred, then it is set to &lt;code&gt;unspecified&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following labels are automatically injected to the scraped profiles
so that they can be linked to 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;&lt;code&gt;&amp;quot;job&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The &lt;code&gt;job_name&lt;/code&gt; that the target belongs to.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;instance&amp;quot;&lt;/code&gt;&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;tr&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;service_name&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The inferred Pyroscope service name.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h4 id=&#34;scrape_interval-argument&#34;&gt;&lt;code&gt;scrape_interval&lt;/code&gt; argument&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;scrape_interval&lt;/code&gt; typically refers to the frequency with which Grafana Agent Flow collects performance profiles from the monitored targets.
It represents the time interval between consecutive scrapes or data collection events.
This parameter is important for controlling the trade-off between resource usage and the freshness of the collected data.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;scrape_interval&lt;/code&gt; is short:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Advantages:
&lt;ul&gt;
&lt;li&gt;Fewer profiles may be lost if the application being scraped crashes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Disadvantages:
&lt;ul&gt;
&lt;li&gt;Greater consumption of CPU, memory, and network resources during scrapes and remote writes.&lt;/li&gt;
&lt;li&gt;The backend database (Pyroscope) will consume more storage space.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;scrape_interval&lt;/code&gt; is long:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Advantages:
&lt;ul&gt;
&lt;li&gt;Lower resource consumption.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Disadvantages:
&lt;ul&gt;
&lt;li&gt;More profiles may be lost if the application being scraped crashes.&lt;/li&gt;
&lt;li&gt;If the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; is set to &lt;code&gt;true&lt;/code&gt;, the batch size of
each remote write to Pyroscope may be bigger.
The Pyroscope database may need to be tuned with higher limits.&lt;/li&gt;
&lt;li&gt;If the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; is set to &lt;code&gt;true&lt;/code&gt;, there is a larger risk of
reaching the HTTP server timeouts of the application being scraped.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, consider this situation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; is configured with a &lt;code&gt;scrape_interval&lt;/code&gt; of &lt;code&gt;&amp;quot;60s&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The application being scraped is running an HTTP server with a timeout of 30 seconds.&lt;/li&gt;
&lt;li&gt;Any scrape HTTP requests where the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; is set to &lt;code&gt;true&lt;/code&gt; will fail,
because they will attempt to run for 59 seconds.&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;pyroscope.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;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;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;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;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;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;#profilememory-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;#profileblock-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;#profilegoroutine-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;#profilemutex-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;#profileprocess_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;#profilefgprof-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.godeltaprof_memory&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profilegodeltaprof_memory-block&#34;&gt;profile.godeltaprof_memory&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;godeltaprof&lt;/a&gt; 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.godeltaprof_mutex&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profilegodeltaprof_mutex-block&#34;&gt;profile.godeltaprof_mutex&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;godeltaprof&lt;/a&gt; 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.godeltaprof_block&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#profilegodeltaprof_block-block&#34;&gt;profile.godeltaprof_block&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;godeltaprof&lt;/a&gt; block 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;#profilecustom-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;tr&gt;
              &lt;td&gt;clustering&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering-block&#34;&gt;clustering&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Grafana Agent Flow is running in clustered mode.&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;oauth2 &amp;gt; tls_config&lt;/code&gt; refers to a &lt;code&gt;tls_config&lt;/code&gt; block defined inside
an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;Any omitted blocks take on their default values. For example,
if &lt;code&gt;profile.mutex&lt;/code&gt; is not specified in the config,
the defaults documented in &lt;a href=&#34;#profilemutex-block&#34;&gt;profile.mutex&lt;/a&gt; will be used.&lt;/p&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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 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_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;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;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/allocs&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;For more information about the &lt;code&gt;delta&lt;/code&gt; argument, see the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; section.&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;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;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;For more information about the &lt;code&gt;delta&lt;/code&gt; argument, see the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; section.&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;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;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;For more information about the &lt;code&gt;delta&lt;/code&gt; argument, see the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; section.&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;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;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;For more information about the &lt;code&gt;delta&lt;/code&gt; argument, see the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; section.&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;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;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;For more information about the &lt;code&gt;delta&lt;/code&gt; argument, see the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; section.&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;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;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;For more information about the &lt;code&gt;delta&lt;/code&gt; argument, see the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; section.&lt;/p&gt;
&lt;h3 id=&#34;profilegodeltaprof_memory-block&#34;&gt;profile.godeltaprof_memory block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.godeltaprof_memory&lt;/code&gt; block collects profiles from &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;godeltaprof&lt;/a&gt; memory endpoint. The delta is computed on the target.&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;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/pprof/delta_heap&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;profilegodeltaprof_mutex-block&#34;&gt;profile.godeltaprof_mutex block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.godeltaprof_mutex&lt;/code&gt; block collects profiles from &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;godeltaprof&lt;/a&gt; mutex endpoint. The delta is computed on the target.&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;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/pprof/delta_mutex&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;profilegodeltaprof_block-block&#34;&gt;profile.godeltaprof_block block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.godeltaprof_block&lt;/code&gt; block collects profiles from &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;godeltaprof&lt;/a&gt; block endpoint. The delta is computed on the target.&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;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/pprof/delta_block&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;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 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;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. The &lt;code&gt;seconds&lt;/code&gt; used will be equal to &lt;code&gt;scrape_interval - 1&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;clustering-block&#34;&gt;clustering 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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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 Grafana Agent Flow is &lt;a href=&#34;../../../concepts/clustering/&#34;&gt;using clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true,
then this &lt;code&gt;pyroscope.scrape&lt;/code&gt; component instance opts-in to participating in the
cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering causes the set of targets to be locally filtered down to a unique
subset per node, where each node is roughly assigned the same number of
targets. If the state of the cluster changes, such as a new node joins, then
the subset of targets to scrape per node will be recalculated.&lt;/p&gt;
&lt;p&gt;When clustering mode is enabled, all Grafana Agents participating in the cluster must
use the same configuration file and have access to the same service discovery
APIs.&lt;/p&gt;
&lt;p&gt;If Grafana Agent Flow is &lt;em&gt;not&lt;/em&gt; running in clustered mode, this block is a no-op.&lt;/p&gt;
&lt;h2 id=&#34;common-configuration&#34;&gt;Common configuration&lt;/h2&gt;
&lt;h3 id=&#34;delta-argument&#34;&gt;&lt;code&gt;delta&lt;/code&gt; argument&lt;/h3&gt;
&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;false&lt;/code&gt;, 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; HTTP query will be instantaneous.&lt;/p&gt;
&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;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; HTTP query will run for a certain amount of time.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;seconds&lt;/code&gt; parameter is automatically added to the HTTP request.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;seconds&lt;/code&gt; used will be equal to &lt;code&gt;scrape_interval - 1&lt;/code&gt;.
For example, if &lt;code&gt;scrape_interval&lt;/code&gt; is &lt;code&gt;&amp;quot;15s&amp;quot;&lt;/code&gt;, &lt;code&gt;seconds&lt;/code&gt; will be 14 seconds.
If the HTTP endpoint is &lt;code&gt;/debug/pprof/profile&lt;/code&gt;, then the HTTP query will become &lt;code&gt;/debug/pprof/profile?seconds=14&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.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;pyroscope.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;pyroscope.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;pyroscope_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;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;default-endpoints-of-static-targets&#34;&gt;Default endpoints of static targets&lt;/h3&gt;
&lt;p&gt;The following example sets up a scrape job of a statically configured
list of targets - Grafana Agent itself and Pyroscope.
The scraped profiles are sent to &lt;code&gt;pyroscope.write&lt;/code&gt; which remote writes them to a Pyroscope database.&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;pyroscope.scrape &amp;#34;local&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:4100&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;pyroscope&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;agent&amp;#34;},
  ]

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

pyroscope.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4100&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These endpoints will be 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/block
http://localhost:4100/debug/pprof/goroutine
http://localhost:4100/debug/pprof/mutex
http://localhost:4100/debug/pprof/profile?seconds=14

http://localhost:12345/debug/pprof/allocs
http://localhost:12345/debug/pprof/block
http://localhost:12345/debug/pprof/goroutine
http://localhost:12345/debug/pprof/mutex
http://localhost:12345/debug/pprof/profile?seconds=14&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that &lt;code&gt;seconds=14&lt;/code&gt; is added to the &lt;code&gt;/debug/pprof/profile&lt;/code&gt; endpoint, because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;delta&lt;/code&gt; argument of the &lt;code&gt;profile.process_cpu&lt;/code&gt; block is &lt;code&gt;true&lt;/code&gt; by default.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;scrape_interval&lt;/code&gt; is &lt;code&gt;&amp;quot;15s&amp;quot;&lt;/code&gt; by default.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also note that the &lt;code&gt;/debug/fgprof&lt;/code&gt; endpoint will not be scraped, because
the &lt;code&gt;enabled&lt;/code&gt; argument of the &lt;code&gt;profile.fgprof&lt;/code&gt; block is &lt;code&gt;false&lt;/code&gt; by default.&lt;/p&gt;
&lt;h3 id=&#34;default-endpoints-of-dynamic-targets&#34;&gt;Default endpoints of dynamic targets&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;discovery.http &amp;#34;dynamic_targets&amp;#34; {
  url = &amp;#34;https://example.com/scrape_targets&amp;#34;
  refresh_interval = &amp;#34;15s&amp;#34;
}

pyroscope.scrape &amp;#34;local&amp;#34; {
  targets = [discovery.http.dynamic_targets.targets]

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

pyroscope.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4100&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;default-endpoints-of-static-and-dynamic-targets&#34;&gt;Default endpoints of static and dynamic targets&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;discovery.http &amp;#34;dynamic_targets&amp;#34; {
  url = &amp;#34;https://example.com/scrape_targets&amp;#34;
  refresh_interval = &amp;#34;15s&amp;#34;
}

pyroscope.scrape &amp;#34;local&amp;#34; {
  targets = concat([
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:4040&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;pyroscope&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;agent&amp;#34;},
  ], discovery.http.dynamic_targets.targets)

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

pyroscope.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4100&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;enabling-and-disabling-profiles&#34;&gt;Enabling and disabling profiles&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;pyroscope.scrape &amp;#34;local&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;agent&amp;#34;},
  ]

  profiling_config {
    profile.fgprof {
      enabled = true
    }
    profile.block {
      enabled = false
    }
    profile.mutex {
      enabled = false
    }
  }

  forward_to = [pyroscope.write.local.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These endpoints will be 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: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;
&lt;p&gt;These endpoints will &lt;strong&gt;NOT&lt;/strong&gt; be scraped because they are explicitly disabled:&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:12345/debug/pprof/block
http://localhost:12345/debug/pprof/mutex&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../compatibility/#pyroscope-profilesreceiver-exporters&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="pyroscopescrape">pyroscope.scrape&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>pyroscope.write</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/pyroscope.write/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/pyroscope.write/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopewrite&#34;&gt;pyroscope.write&lt;/h1&gt;


&lt;div data-shared=&#34;flow/stability/beta.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: This is a 
    &lt;a href=&#34;/docs/agent/v0.42/stability/#beta&#34;&gt;beta&lt;/a&gt; component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;pyroscope.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/pyroscope/&#34;&gt;Pyroscope&amp;rsquo; Push API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;pyroscope.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;pyroscope.write &amp;#34;LABEL&amp;#34; {
  endpoint {
    url = PYROSCOPE_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;pyroscope.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 profiles to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;endpoint &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; 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; 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; 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; 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; basic_auth&lt;/code&gt; refers to a &lt;code&gt;basic_auth&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;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;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;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. 0 to retry infinitely.&lt;/td&gt;
              &lt;td&gt;10&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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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;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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;pyroscope.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;pyroscope.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;pyroscope.write &amp;#34;staging&amp;#34; {
  // Send metrics to a locally running Pyroscope instance.
  endpoint {
    url = &amp;#34;http://pyroscope:4100&amp;#34;
    headers = {
      &amp;#34;X-Scope-OrgID&amp;#34; = &amp;#34;squad-1&amp;#34;,
    }
  }
  external_labels = {
    &amp;#34;env&amp;#34; = &amp;#34;staging&amp;#34;,
  }
}


pyroscope.scrape &amp;#34;default&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;pyroscope:4100&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;pyroscope&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;agent:12345&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;agent&amp;#34;},
  ]
  forward_to = [pyroscope.write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.write&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../compatibility/#pyroscope-profilesreceiver-consumers&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="pyroscopewrite">pyroscope.write&lt;/h1>
&lt;div data-shared="flow/stability/beta.md">
&lt;blockquote>
&lt;p>&lt;strong>BETA&lt;/strong>: This is a
&lt;a href="/docs/agent/v0.42/stability/#beta">beta&lt;/a> component. Beta components are subject to breaking
changes, and may be replaced with equivalent functionality that cover the
same use case.&lt;/p></description></item><item><title>remote.http</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/remote.http/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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;method&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Define HTTP method for the request&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;GET&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;Custom headers for 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;body&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The request body.&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;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_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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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 data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&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.kubernetes.configmap</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/remote.kubernetes.configmap/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/remote.kubernetes.configmap/</guid><content><![CDATA[&lt;h1 id=&#34;remotekubernetesconfigmap&#34;&gt;remote.kubernetes.configmap&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;remote.kubernetes.configmap&lt;/code&gt; reads a ConfigMap from the Kubernetes API server and exposes its data for other components to consume.&lt;/p&gt;
&lt;p&gt;This can be useful anytime Grafana Agent Flow needs data from a ConfigMap that is not directly mounted to the Grafana Agent pod.&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.kubernetes.configmap &amp;#34;LABEL&amp;#34; {
  namespace = &amp;#34;NAMESPACE_OF_CONFIGMAP&amp;#34;
  name = &amp;#34;NAME_OF_CONFIGMAP&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;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kubernetes namespace containing the desired ConfigMap.&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;Name of the Kubernetes ConfigMap&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 Kubernetes API.&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 Kubernetes API.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When this component performs a poll operation, it requests the ConfigMap data from the Kubernetes API.
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;Any error while polling will mark the component as unhealthy. After
a successful poll, all data is exported with the same field names as the source ConfigMap.&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.kubernetes.configmap&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 find Probes.&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 authentication to the Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 a &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 the Kubernetes client used to discover Probes. 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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;data&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Data from the ConfigMap obtained from Kubernetes.&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;data&lt;/code&gt; field contains a mapping from field names to values.&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.kubernetes.configmap&lt;/code&gt; report as healthy if the most recent attempt to poll the kubernetes API succeeds.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;remote.kubernetes.configmap&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;remote.kubernetes.configmap&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 Secret and a ConfigMap from Kubernetes and uses them to supply remote-write credentials.&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.kubernetes.secret &amp;#34;credentials&amp;#34; {
  namespace = &amp;#34;monitoring&amp;#34;
  name = &amp;#34;metrics-secret&amp;#34;
}

remote.kubernetes.configmap &amp;#34;endpoint&amp;#34; {
  namespace = &amp;#34;monitoring&amp;#34;
  name = &amp;#34;metrics-endpoint&amp;#34;
}

prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = remote.kubernetes.configmap.endpoint.data[&amp;#34;url&amp;#34;]
    basic_auth {
      username = remote.kubernetes.configmap.endpoint.data[&amp;#34;username&amp;#34;]
      password = remote.kubernetes.secret.credentials.data[&amp;#34;password&amp;#34;]
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example assumes that the Secret and ConfigMap have already been created, and that the appropriate field names
exist in their data.&lt;/p&gt;
]]></content><description>&lt;h1 id="remotekubernetesconfigmap">remote.kubernetes.configmap&lt;/h1>
&lt;p>&lt;code>remote.kubernetes.configmap&lt;/code> reads a ConfigMap from the Kubernetes API server and exposes its data for other components to consume.&lt;/p>
&lt;p>This can be useful anytime Grafana Agent Flow needs data from a ConfigMap that is not directly mounted to the Grafana Agent pod.&lt;/p></description></item><item><title>remote.kubernetes.secret</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/remote.kubernetes.secret/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/remote.kubernetes.secret/</guid><content><![CDATA[&lt;h1 id=&#34;remotekubernetessecret&#34;&gt;remote.kubernetes.secret&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;remote.kubernetes.secret&lt;/code&gt; reads a Secret from the Kubernetes API server and exposes its data for other components to consume.&lt;/p&gt;
&lt;p&gt;A common use case for this is loading credentials or other information from secrets that are not already mounted into the Grafana Agent pod at deployment time.&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.kubernetes.secret &amp;#34;LABEL&amp;#34; {
  namespace = &amp;#34;NAMESPACE_OF_SECRET&amp;#34;
  name = &amp;#34;NAME_OF_SECRET&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;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kubernetes namespace containing the desired Secret.&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;Name of the Kubernetes Secret&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 Kubernetes API.&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 Kubernetes API.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When this component performs a poll operation, it requests the Secret data from the Kubernetes API.
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;Any error while polling will mark the component as unhealthy. After
a successful poll, all data is exported with the same field names as the source Secret.&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.kubernetes.secret&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 find Probes.&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 authentication to the Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 Kubernetes API.&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 a &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 the Kubernetes client used to discover Probes. 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;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;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;enable_http2&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;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;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 send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#client-block&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt; argument&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth-block&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#authorization-block&#34;&gt;&lt;code&gt;authorization&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2-block&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt; block&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&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;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;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;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;/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 mutually exclusive, and only one can be provided inside 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;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;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&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;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;/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 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_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;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;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;HTTP proxy to send 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;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;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_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&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;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT 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;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;/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 mutually exclusive, and only one can be provided inside 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 a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;flow/reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain
names can contain port numbers. &lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY
and NO_PROXY (or the lowercase versions thereof). Requests use the proxy from
the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt;
is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text 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;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_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text 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;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;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;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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text 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;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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
must be provided.&lt;/p&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;data&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(secret)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Data from the secret obtained from Kubernetes.&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;data&lt;/code&gt; field contains a mapping from field names to values.&lt;/p&gt;
&lt;p&gt;If an individual key stored in &lt;code&gt;data&lt;/code&gt; does not hold sensitive data, it can be
converted into a string using &lt;a href=&#34;../../stdlib/nonsensitive/&#34;&gt;the &lt;code&gt;nonsensitive&lt;/code&gt; function&lt;/a&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;nonsensitive(remote.kubernetes.secret.LABEL.data.KEY_NAME)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Using &lt;code&gt;nonsensitive&lt;/code&gt; allows for using the exports of &lt;code&gt;remote.kubernetes.secret&lt;/code&gt; for
attributes in components that do not support secrets.&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.kubernetes.secret&lt;/code&gt; report as healthy if the most recent attempt to poll the kubernetes API succeeds.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;remote.kubernetes.secret&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;remote.kubernetes.secret&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 Secret and a ConfigMap from Kubernetes and uses them to supply remote-write credentials.&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.kubernetes.secret &amp;#34;credentials&amp;#34; {
  namespace = &amp;#34;monitoring&amp;#34;
  name = &amp;#34;metrics-secret&amp;#34;
}

remote.kubernetes.configmap &amp;#34;endpoint&amp;#34; {
  namespace = &amp;#34;monitoring&amp;#34;
  name = &amp;#34;metrics-endpoint&amp;#34;
}

prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = remote.kubernetes.configmap.endpoint.data[&amp;#34;url&amp;#34;]
    basic_auth {
      username = nonsensitive(remote.kubernetes.configmap.endpoint.data[&amp;#34;username&amp;#34;])
      password = remote.kubernetes.secret.credentials.data[&amp;#34;password&amp;#34;]
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example assumes that the Secret and ConfigMap have already been created, and that the appropriate field names
exist in their data.&lt;/p&gt;
]]></content><description>&lt;h1 id="remotekubernetessecret">remote.kubernetes.secret&lt;/h1>
&lt;p>&lt;code>remote.kubernetes.secret&lt;/code> reads a Secret from the Kubernetes API server and exposes its data for other components to consume.&lt;/p>
&lt;p>A common use case for this is loading credentials or other information from secrets that are not already mounted into the Grafana Agent pod at deployment time.&lt;/p></description></item><item><title>remote.s3</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/remote.s3/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/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&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;../../../concepts/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&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#client-block&#34;&gt;client&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-block&#34;&gt;client block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&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;tr&gt;
              &lt;td&gt;&lt;code&gt;signing_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 the signing region when using a custom endpoint.&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;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&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><item><title>remote.vault</title><link>https://grafana.com/docs/agent/v0.42/flow/reference/components/remote.vault/</link><pubDate>Fri, 10 Apr 2026 07:58:08 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.42/flow/reference/components/remote.vault/</guid><content><![CDATA[&lt;h1 id=&#34;remotevault&#34;&gt;remote.vault&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;remote.vault&lt;/code&gt; connects to a &lt;a href=&#34;https://www.vaultproject.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HashiCorp Vault&lt;/a&gt; server to retrieve secrets.
It can retrieve a secret using the &lt;a href=&#34;https://www.vaultproject.io/docs/secrets/kv/kv-v2&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;KV v2&lt;/a&gt; secrets engine.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;remote.vault&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.vault &amp;#34;LABEL&amp;#34; {
  server = &amp;#34;VAULT_SERVER&amp;#34;
  path   = &amp;#34;VAULT_PATH&amp;#34;

  // Alternatively, use one of the other auth.* mechanisms.
  auth.token {
    token = &amp;#34;AUTH_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;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;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Vault server 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;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Vault namespace to connect to (Vault Enterprise only).&lt;/td&gt;
              &lt;td&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 retrieve a secret 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;reread_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Rate to re-read keys.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Tokens with a lease will be automatically renewed roughly two-thirds through
their lease duration. If the leased token isn&amp;rsquo;t renewable, or renewing the
lease fails, the token will be re-read.&lt;/p&gt;
&lt;p&gt;All tokens, regardless of whether they have a lease, are automatically reread
at a frequency specified by the &lt;code&gt;reread_frequency&lt;/code&gt; argument. Setting
&lt;code&gt;reread_frequency&lt;/code&gt; to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt; (the default) disables this behavior.&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.vault&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_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;Options for the Vault client.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;auth.token&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authtoken-block&#34;&gt;auth.token&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticate to Vault with a token.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;auth.approle&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authapprole-block&#34;&gt;auth.approle&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticate to Vault using AppRole.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;auth.aws&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authaws-block&#34;&gt;auth.aws&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticate to Vault using AWS.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;auth.azure&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authazure-block&#34;&gt;auth.azure&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticate to Vault using Azure.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;auth.gcp&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authgcp-block&#34;&gt;auth.gcp&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticate to Vault using GCP.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;auth.kubernetes&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authkubernetes-block&#34;&gt;auth.kubernetes&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticate to Vault using Kubernetes.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;auth.ldap&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authldap-block&#34;&gt;auth.ldap&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticate to Vault using LDAP.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;auth.userpass&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authuserpass-block&#34;&gt;auth.userpass&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticate to Vault using a username and password.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;auth.custom&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#authcustom-block&#34;&gt;auth.custom&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Authenticate to Vault with custom authentication.&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 &lt;code&gt;auth.*&lt;/code&gt; block &lt;strong&gt;must&lt;/strong&gt; be provided, otherwise the component will
fail to load.&lt;/p&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 the connection to vault.&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_retry_wait&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 wait before retrying failed requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1000ms&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_retry_wait&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 before retrying failed requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1500ms&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_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 times to retry after a 5xx error.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2&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;Maximum time to wait before a request times out.&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Requests which fail due to server errors (HTTP 5xx error codes) can be retried.
The &lt;code&gt;max_retries&lt;/code&gt; argument specifies how many times to retry failed requests.
The &lt;code&gt;min_retry_wait&lt;/code&gt; and &lt;code&gt;max_retry_wait&lt;/code&gt; arguments specify how long to wait
before retrying. The wait period starts at &lt;code&gt;min_retry_wait&lt;/code&gt; and exponentially
increases up to &lt;code&gt;max_retry_wait&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Other types of failed requests, including HTTP 4xx error codes, are not
retried.&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;max_retries&lt;/code&gt; argument is set to &lt;code&gt;0&lt;/code&gt;, failed requests are not retried.&lt;/p&gt;
&lt;h3 id=&#34;authtoken-block&#34;&gt;auth.token block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;auth.token&lt;/code&gt; block authenticates each request to Vault using a
token.&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;Authentication token to use.&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;authapprole-block&#34;&gt;auth.approle block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;auth.token&lt;/code&gt; block auhenticates to Vault using the &lt;a href=&#34;https://www.vaultproject.io/docs/auth/approle&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AppRole auth
method&lt;/a&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;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_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Role ID 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;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret 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;wrapping_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to &lt;a href=&#34;https://www.vaultproject.io/docs/concepts/response-wrapping&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;unwrap&lt;/a&gt; the token.&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;mount_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mount path for the login.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;approle&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;authaws-block&#34;&gt;auth.aws block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;auth.aws&lt;/code&gt; block authenticates to Vault using the &lt;a href=&#34;https://www.vaultproject.io/docs/auth/aws&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS auth method&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Credentials used to connect to AWS are specified by the environment variables
&lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt;, &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt;, and &lt;code&gt;AWS_SESSION&lt;/code&gt;. The
environment variable &lt;code&gt;AWS_SHARED_CREDENTIALS_FILE&lt;/code&gt; may be specified to use a
credentials file instead.&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;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mechanism to authenticate against AWS 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;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 to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;us-east-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;role&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Overrides the inferred role name inferred.&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;iam_server_id_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configures a &lt;code&gt;X-Vault-AWS-IAM-Server-ID&lt;/code&gt; header.&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;ec2_signature_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Signature to use when authenticating against EC2.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;pkcs7&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_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mount path for the login.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;aws&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;type&lt;/code&gt; argument must be set to one of &lt;code&gt;&amp;quot;ec2&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;iam&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;iam_server_id_header&lt;/code&gt; argument is required used when &lt;code&gt;type&lt;/code&gt; is set to
&lt;code&gt;&amp;quot;iam&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;region&lt;/code&gt; argument is explicitly set to an empty string &lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;, the region
to connect to will be inferred using an API call to the EC2 metadata service.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;ec2_signature_type&lt;/code&gt; argument configures the signature to use when
authenticating against EC2. It only applies when &lt;code&gt;type&lt;/code&gt; is set to &lt;code&gt;&amp;quot;ec2&amp;quot;&lt;/code&gt;.
&lt;code&gt;ec2_signature_type&lt;/code&gt; must be set to either &lt;code&gt;&amp;quot;identity&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;pkcs7&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;authazure-block&#34;&gt;auth.azure block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;auth.azure&lt;/code&gt; block authenticates to Vault using the &lt;a href=&#34;https://www.vaultproject.io/docs/auth/azure&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure auth
method&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Credentials are retrieved for the running Azure VM using Managed Identities for
Azure 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 name 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;resource_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Resource URL to include with authentication 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;mount_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mount path for the login.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;azure&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;authgcp-block&#34;&gt;auth.gcp block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;auth.gcp&lt;/code&gt; block authenticates to Vault using the &lt;a href=&#34;https://www.vaultproject.io/docs/auth/gcp&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP auth method&lt;/a&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;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 name 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;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mechanism to authenticate against GCP 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;iam_service_account&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;IAM service account name to use.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mount_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mount path for the login.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;gcp&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;type&lt;/code&gt; argument must be set to &lt;code&gt;&amp;quot;gce&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;iam&amp;quot;&lt;/code&gt;. When &lt;code&gt;type&lt;/code&gt; is &lt;code&gt;&amp;quot;gce&amp;quot;&lt;/code&gt;,
credentials are retrieved using the metadata service on GCE VMs. When &lt;code&gt;type&lt;/code&gt; is
&lt;code&gt;&amp;quot;iam&amp;quot;&lt;/code&gt;, credentials are retrieved from the file that the
&lt;code&gt;GOOGLE_APPLICATION_CREDENTIALS&lt;/code&gt; environment variable points to.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;type&lt;/code&gt; is &lt;code&gt;&amp;quot;iam&amp;quot;&lt;/code&gt;, the &lt;code&gt;iam_service_account&lt;/code&gt; argument determines what
service account name to use.&lt;/p&gt;
&lt;h3 id=&#34;authkubernetes-block&#34;&gt;auth.kubernetes block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;auth.kubernetes&lt;/code&gt; block authenticates to Vault using the &lt;a href=&#34;https://www.vaultproject.io/docs/auth/kubernetes&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes auth
method&lt;/a&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;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 name 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;service_account_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Override service account token file to use.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mount_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mount path for the login.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;kubernetes&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;service_account_file&lt;/code&gt; is not specified, the JWT token to authenticate
with is retrieved from &lt;code&gt;/var/run/secrets/kubernetes.io/serviceaccount/token&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;authldap-block&#34;&gt;auth.ldap block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;auth.ldap&lt;/code&gt; block authenticates to Vault using the &lt;a href=&#34;https://www.vaultproject.io/docs/auth/ldap&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;LDAP auth
method&lt;/a&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;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;LDAP 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;LDAP passsword for the user.&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;mount_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mount path for the login.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;ldap&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;authuserpass-block&#34;&gt;auth.userpass block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;auth.userpass&lt;/code&gt; block authenticates to Vault using the &lt;a href=&#34;https://www.vaultproject.io/docs/auth/userpass&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;UserPass auth
method&lt;/a&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;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 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;Passsword for the user.&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;mount_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Mount path for the login.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;userpass&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;authcustom-block&#34;&gt;auth.custom block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;auth.custom&lt;/code&gt; blocks allows authenticating against Vault using an arbitrary
authentication path like &lt;code&gt;auth/customservice/login&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Using &lt;code&gt;auth.custom&lt;/code&gt; is equivalent to calling &lt;code&gt;vault write PATH DATA&lt;/code&gt; on the
command line.&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 to write to for creating an authentication token.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;data&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(secret)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authentication data.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;All values in the &lt;code&gt;data&lt;/code&gt; attribute are considered secret, even if they contain
nonsensitive information like usernames.&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;data&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(secret)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Data from the secret obtained from Vault.&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;data&lt;/code&gt; field contains a mapping from data field names to values. There will
be one mapping for each string-like field stored in the Vault secret.&lt;/p&gt;
&lt;p&gt;Note that Vault permits secret engines to store arbitrary data within the
key-value pairs for a secret. The &lt;code&gt;remote.vault&lt;/code&gt; component is only able to use
values which are strings or can be converted to strings. Keys with non-string
values will be ignored and omitted from the &lt;code&gt;data&lt;/code&gt; field.&lt;/p&gt;
&lt;p&gt;If an individual key stored in &lt;code&gt;data&lt;/code&gt; does not hold sensitive data, it can be
converted into a string using &lt;a href=&#34;../../stdlib/nonsensitive/&#34;&gt;the &lt;code&gt;nonsensitive&lt;/code&gt; function&lt;/a&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;nonsensitive(remote.vault.LABEL.data.KEY_NAME)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Using &lt;code&gt;nonsensitive&lt;/code&gt; allows for using the exports of &lt;code&gt;remote.vault&lt;/code&gt; for
attributes in components that do not support secrets.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;remote.vault&lt;/code&gt; will be reported as unhealthy if the latest reread or renewal of
secrets was unsuccessful.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;remote.vault&lt;/code&gt; exposes debug information for the authentication token and
secret around:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The latest request ID used for retrieving or renewing the token.&lt;/li&gt;
&lt;li&gt;The most recent time when the token was retrieved or renewed.&lt;/li&gt;
&lt;li&gt;The expiration time for the token (if applicable).&lt;/li&gt;
&lt;li&gt;Whether the token is renewable.&lt;/li&gt;
&lt;li&gt;Warnings from Vault from when the token was retrieved.&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;remote.vault&lt;/code&gt; exposes the following metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;remote_vault_auth_total&lt;/code&gt; (counter): Total number of times the component
authenticated to Vault.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote_vault_secret_reads_total&lt;/code&gt; (counter): Total number of times the secret
was read from Vault.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote_vault_auth_lease_renewal_total&lt;/code&gt; (counter): Total number of times the
component renewed its authentication token lease.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote_vault_secret_lease_renewal_total&lt;/code&gt; (counter): Total number of times
the component renewed its secret token lease.&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;vault_token&amp;#34; {
  filename  = &amp;#34;/var/data/vault_token&amp;#34;
  is_secret = true
}

remote.vault &amp;#34;remote_write&amp;#34; {
  server = &amp;#34;https://prod-vault.corporate.internal&amp;#34;
  path   = &amp;#34;secret/prometheus/remote_write&amp;#34;

  auth.token {
    token = local.file.vault_token.content
  }
}

metrics.remote_write &amp;#34;prod&amp;#34; {
  remote_write {
    url = &amp;#34;https://onprem-mimir:9009/api/v1/push&amp;#34;
    basic_auth {
      username = remote.vault.remote_write.data.username
      password = remote.vault.remote_write.data.password
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="remotevault">remote.vault&lt;/h1>
&lt;p>&lt;code>remote.vault&lt;/code> connects to a &lt;a href="https://www.vaultproject.io/" target="_blank" rel="noopener noreferrer">HashiCorp Vault&lt;/a> server to retrieve secrets.
It can retrieve a secret using the &lt;a href="https://www.vaultproject.io/docs/secrets/kv/kv-v2" target="_blank" rel="noopener noreferrer">KV v2&lt;/a> secrets engine.&lt;/p>
&lt;p>Multiple &lt;code>remote.vault&lt;/code> components can be specified by giving them different
labels.&lt;/p></description></item></channel></rss>