<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Configuration blocks on Grafana Labs</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/</link><description>Recent content in Configuration blocks on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/agent/v0.44/flow/reference/config-blocks/index.xml" rel="self" type="application/rss+xml"/><item><title>argument block</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/argument/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/argument/</guid><content><![CDATA[&lt;h1 id=&#34;argument-block&#34;&gt;argument block&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;argument&lt;/code&gt; is an optional configuration block used to specify parameterized input to a 
    &lt;a href=&#34;/docs/agent/v0.44/flow/concepts/custom_components/&#34;&gt;custom component&lt;/a&gt;.
&lt;code&gt;argument&lt;/code&gt; blocks must be given a label which determines the name of the argument.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;argument&lt;/code&gt; block may only be specified inside the definition of 
    &lt;a href=&#34;/docs/agent/v0.44/flow/reference/config-blocks/declare/&#34;&gt;a &lt;code&gt;declare&lt;/code&gt; block&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;In 
    &lt;a href=&#34;/docs/agent/v0.44/flow/concepts/modules/#classic-modules-deprecated&#34;&gt;classic modules&lt;/a&gt;, the &lt;code&gt;argument&lt;/code&gt; block is valid as a top-level block in a classic module.
Classic modules are deprecated and scheduled to be removed in the release after v0.40.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;argument &amp;#34;ARGUMENT_NAME&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;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;For clarity, &amp;ldquo;argument&amp;rdquo; in this section refers to arguments which can be given to the argument block.
&amp;ldquo;Module argument&amp;rdquo; refers to the argument being defined for a module, determined by the label of the argument block.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;comment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Description for the argument.&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;default&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;any&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Default value for the argument.&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;tr&gt;
              &lt;td&gt;&lt;code&gt;optional&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether the argument may be omitted.&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, all module arguments are required.
The &lt;code&gt;optional&lt;/code&gt; argument can be used to mark the module argument as optional.
When &lt;code&gt;optional&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, the initial value for the module argument is specified by &lt;code&gt;default&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;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;any&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The current value of the argument.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If you use a custom component, you are responsible for determining the values for arguments.
Other expressions within a custom component may use &lt;code&gt;argument.ARGUMENT_NAME.value&lt;/code&gt; to retrieve the value you provide.&lt;/p&gt;
&lt;h2 id=&#34;example-1&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates a custom component that self-collects process metrics and forwards them to an argument specified by the user of the custom 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;declare &amp;#34;self_collect&amp;#34; {
  argument &amp;#34;metrics_output&amp;#34; {
    optional = false
    comment  = &amp;#34;Where to send collected metrics.&amp;#34;
  }

  prometheus.scrape &amp;#34;selfmonitor&amp;#34; {
    targets = [{
      __address__ = &amp;#34;127.0.0.1:12345&amp;#34;,
    }]

    forward_to = [argument.metrics_output.value]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="argument-block">argument block&lt;/h1>
&lt;p>&lt;code>argument&lt;/code> is an optional configuration block used to specify parameterized input to a
&lt;a href="/docs/agent/v0.44/flow/concepts/custom_components/">custom component&lt;/a>.
&lt;code>argument&lt;/code> blocks must be given a label which determines the name of the argument.&lt;/p></description></item><item><title>declare block</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/declare/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/declare/</guid><content><![CDATA[&lt;h1 id=&#34;declare-block&#34;&gt;declare block&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;declare&lt;/code&gt; is an optional configuration block used to define a new [custom component][].
&lt;code&gt;declare&lt;/code&gt; blocks must be given a label that determines the name of the custom component.&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;declare &amp;#34;COMPONENT_NAME&amp;#34; {
    COMPONENT_DEFINITION
}&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 &lt;code&gt;declare&lt;/code&gt; block has no predefined schema for its arguments.
The body of the &lt;code&gt;declare&lt;/code&gt; block is used as the component definition.
The body can contain the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.44/flow/reference/config-blocks/argument/&#34;&gt;argument&lt;/a&gt; blocks&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.44/flow/reference/config-blocks/export/&#34;&gt;export&lt;/a&gt; blocks&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.44/flow/reference/config-blocks/declare/&#34;&gt;declare&lt;/a&gt; blocks&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.44/flow/concepts/modules/#importing-modules&#34;&gt;import&lt;/a&gt; blocks&lt;/li&gt;
&lt;li&gt;Component definitions (either built-in or custom components)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;declare&lt;/code&gt; block may not contain any configuration blocks that aren&amp;rsquo;t listed above.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;declare&lt;/code&gt; block has no predefined schema for its exports.
The fields exported by the &lt;code&gt;declare&lt;/code&gt; block are determined by the 
    &lt;a href=&#34;/docs/agent/v0.44/flow/reference/config-blocks/export/&#34;&gt;export blocks&lt;/a&gt; found in its definition.&lt;/p&gt;
&lt;h2 id=&#34;example-1&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates and uses a custom component that self-collects process metrics and forwards them to an argument specified by the user of the custom 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;declare &amp;#34;self_collect&amp;#34; {
  argument &amp;#34;metrics_output&amp;#34; {
    optional = false
    comment  = &amp;#34;Where to send collected metrics.&amp;#34;
  }

  prometheus.scrape &amp;#34;selfmonitor&amp;#34; {
    targets = [{
      __address__ = &amp;#34;127.0.0.1:12345&amp;#34;,
    }]

    forward_to = [argument.metrics_output.value]
  }
}

self_collect &amp;#34;example&amp;#34; {
  metrics_output = prometheus.remote_write.example.receiver
}

prometheus.remote_write &amp;#34;example&amp;#34; {
  endpoint {
    url = REMOTE_WRITE_URL
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="declare-block">declare block&lt;/h1>
&lt;p>&lt;code>declare&lt;/code> is an optional configuration block used to define a new [custom component][].
&lt;code>declare&lt;/code> blocks must be given a label that determines the name of the custom component.&lt;/p></description></item><item><title>export block</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/export/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/export/</guid><content><![CDATA[&lt;h1 id=&#34;export-block&#34;&gt;export block&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;export&lt;/code&gt; is an optional configuration block used to specify an emitted value of a 
    &lt;a href=&#34;/docs/agent/v0.44/flow/concepts/custom_components/&#34;&gt;custom component&lt;/a&gt;.
&lt;code&gt;export&lt;/code&gt; blocks must be given a label which determine the name of the export.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;export&lt;/code&gt; block may only be specified inside the definition of 
    &lt;a href=&#34;/docs/agent/v0.44/flow/reference/config-blocks/declare/&#34;&gt;a &lt;code&gt;declare&lt;/code&gt; block&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;In 
    &lt;a href=&#34;/docs/agent/v0.44/flow/concepts/modules/#classic-modules-deprecated&#34;&gt;classic modules&lt;/a&gt;, the &lt;code&gt;export&lt;/code&gt; block is valid as a top-level block in a classic module. Classic modules are deprecated and scheduled to be removed in the release after v0.40.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;export &amp;#34;ARGUMENT_NAME&amp;#34; {
  value = ARGUMENT_VALUE
}&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;value&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;any&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Value to export.&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;value&lt;/code&gt; argument determines what the value of the export is.
To expose an exported field of another component, set &lt;code&gt;value&lt;/code&gt; to an expression that references that exported value.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;export&lt;/code&gt; block doesn&amp;rsquo;t export any fields.&lt;/p&gt;
&lt;h2 id=&#34;example-1&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates a custom component where the output of discovering Kubernetes pods and nodes are exposed to the user:&lt;/p&gt;

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

  discovery.kubernetes &amp;#34;nodes&amp;#34; {
    role = &amp;#34;nodes&amp;#34;
  }

  export &amp;#34;kubernetes_resources&amp;#34; {
    value = concat(
      discovery.kubernetes.pods.targets,
      discovery.kubernetes.nodes.targets,
    )
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="export-block">export block&lt;/h1>
&lt;p>&lt;code>export&lt;/code> is an optional configuration block used to specify an emitted value of a
&lt;a href="/docs/agent/v0.44/flow/concepts/custom_components/">custom component&lt;/a>.
&lt;code>export&lt;/code> blocks must be given a label which determine the name of the export.&lt;/p></description></item><item><title>http block</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/http/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/http/</guid><content><![CDATA[&lt;h1 id=&#34;http-block&#34;&gt;http block&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;http&lt;/code&gt; is an optional configuration block used to customize how the Grafana Agent Flow HTTP server functions.
&lt;code&gt;http&lt;/code&gt; is specified without a label and can only be provided once per configuration file.&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;http {
  tls {
    cert_file = env(&amp;#34;TLS_CERT_FILE_PATH&amp;#34;)
    key_file  = env(&amp;#34;TLS_KEY_FILE_PATH&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block supports no arguments and is configured completely 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;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;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;Define TLS settings for the HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;tls &amp;gt; windows_certificate_filter&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#windows-certificate-filter-block&#34;&gt;windows_certificate_filter&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure Windows certificate store for all certificates.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;tls &amp;gt; windows_certificate_filter &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;Configure client certificates for Windows certificate filter.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;tls &amp;gt; windows_certificate_filter &amp;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;Configure server certificates for Windows certificate filter.&lt;/td&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 for the HTTP server.&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;If you add the &lt;code&gt;tls&lt;/code&gt; block and reload the configuration when Grafana Agent Flow is running, existing connections will continue communicating over plaintext.
Similarly, if you remove the &lt;code&gt;tls&lt;/code&gt; block and reload the configuration when Grafana Agent Flow is running, existing connections will continue communicating over TLS.&lt;/p&gt;
&lt;p&gt;To ensure all connections use TLS, configure the &lt;code&gt;tls&lt;/code&gt; block before you start Grafana Agent Flow.&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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;PEM data of the server TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;conditionally&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 server TLS certificate on disk.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;conditionally&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;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;PEM data of the server TLS key.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;conditionally&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 server TLS key on disk.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;conditionally&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;PEM data of the client CA to validate requests against.&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;client_ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the client CA file on disk to validate requests against.&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;client_auth_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Client authentication to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;NoClientCert&amp;quot;&lt;/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;Set of cipher suites to 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;curve_preferences&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 elliptic curves to use in a handshake.&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;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Oldest TLS version to accept from clients.&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_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Newest TLS version to accept from clients.&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 the &lt;code&gt;tls&lt;/code&gt; block is specified, arguments for the TLS certificate (using
&lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and for the TLS key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;)
are required.&lt;/p&gt;
&lt;p&gt;The following pairs of arguments are mutually exclusive, and only one may be configured at a time:&lt;/p&gt;
&lt;ul&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;li&gt;&lt;code&gt;client_ca_pem&lt;/code&gt; and &lt;code&gt;client_ca_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;client_auth_type&lt;/code&gt; argument determines whether to validate client certificates.
The default value, &lt;code&gt;NoClientCert&lt;/code&gt;, indicates that the client certificate is not validated.
The &lt;code&gt;client_ca_pem&lt;/code&gt; and &lt;code&gt;client_ca_file&lt;/code&gt; arguments may only be configured when &lt;code&gt;client_auth_type&lt;/code&gt; is not &lt;code&gt;NoClientCert&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following values are accepted for &lt;code&gt;client_auth_type&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;NoClientCert&lt;/code&gt;: client certificates are neither requested nor validated.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RequestClientCert&lt;/code&gt;: requests clients to send an optional certificate. Certificates provided by clients are not validated.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RequireAnyClientCert&lt;/code&gt;: requires at least one certificate from clients. Certificates provided by clients are not validated.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;VerifyClientCertIfGiven&lt;/code&gt;: requests clients to send an optional certificate. If a certificate is sent, it must be valid.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RequireAndVerifyClientCert&lt;/code&gt;: requires clients to send a valid certificate.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;client_ca_pem&lt;/code&gt; or &lt;code&gt;client_ca_file&lt;/code&gt; arguments may be used to perform client certificate validation.
These arguments may only be provided when &lt;code&gt;client_auth_type&lt;/code&gt; is not set to &lt;code&gt;NoClientCert&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;cipher_suites&lt;/code&gt; argument determines what cipher suites to use.
If you don&amp;rsquo;t provide cipher suite, a default list is used.
The set of cipher suites specified may be from the following:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Cipher&lt;/th&gt;
              &lt;th&gt;Allowed in &lt;code&gt;boringcrypto&lt;/code&gt; builds&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/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_RSA_WITH_AES_256_CBC_SHA&lt;/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_RSA_WITH_AES_128_GCM_SHA256&lt;/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_RSA_WITH_AES_256_GCM_SHA384&lt;/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_AES_128_GCM_SHA256&lt;/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_AES_256_GCM_SHA384&lt;/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_CHACHA20_POLY1305_SHA256&lt;/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_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&lt;/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_ECDHE_ECDSA_WITH_AES_256_CBC_SHA&lt;/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_ECDHE_RSA_WITH_AES_128_CBC_SHA&lt;/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_ECDHE_RSA_WITH_AES_256_CBC_SHA&lt;/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_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256&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;TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384&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;TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256&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;TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384&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;TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256&lt;/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_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256&lt;/code&gt;&lt;/td&gt;
              &lt;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;curve_preferences&lt;/code&gt; argument determines the set of elliptic curves to
prefer during a handshake in preference order. If not provided, a default list
is used. The set of elliptic curves specified may be from the following:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Curve&lt;/th&gt;
              &lt;th&gt;Allowed in &lt;code&gt;boringcrypto&lt;/code&gt; builds&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;CurveP256&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;CurveP384&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;CurveP521&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;X25519&lt;/code&gt;&lt;/td&gt;
              &lt;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;min_version&lt;/code&gt; and &lt;code&gt;max_version&lt;/code&gt; arguments determine the oldest and newest TLS version that&amp;rsquo;s acceptable from clients.
If you don&amp;rsquo;t provide the min and max TLS version, a default value is used.&lt;/p&gt;
&lt;p&gt;The following versions are recognized:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;TLS13&lt;/code&gt; for TLS 1.3&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS12&lt;/code&gt; for TLS 1.2&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS11&lt;/code&gt; for TLS 1.1&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS10&lt;/code&gt; for TLS 1.0&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;windows-certificate-filter-block&#34;&gt;windows certificate filter block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;windows_certificate_filter&lt;/code&gt; block is used to configure retrieving certificates from the built-in Windows certificate store.
When you use the &lt;code&gt;windows_certificate_filter&lt;/code&gt; block the following TLS settings are overridden and cause an error if defined.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;client_ca&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;client_ca_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&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;This feature is only available on Windows.&lt;/p&gt;
&lt;p&gt;TLS min and max may not be compatible with the certificate stored in the Windows certificate store.
The &lt;code&gt;windows_certificate_filter&lt;/code&gt; serves the certificate even if it isn&amp;rsquo;t compatible with the specified TLS version.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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 is used to find the certificate to check the signer.
If multiple certificates are found, the &lt;code&gt;windows_certificate_filter&lt;/code&gt; chooses the certificate with the expiration farthest in the future.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;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&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 system store to look for the server Certificate, for example, LocalMachine, CurrentUser.&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;system_store&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 store to look for the server Certificate, for example, My, CA.&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;issuer_common_names&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Issuer common names to check against.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;template_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Server Template ID to match in ASN1 format, for example, &amp;ldquo;1.2.3&amp;rdquo;.&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;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to check for a new server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;client-block&#34;&gt;client block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block is used to check the certificate presented to the 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;issuer_common_names&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Issuer common names to check against.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;subject_regex&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 Subject 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;template_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Client Template ID to match in ASN1 format, for example, &amp;ldquo;1.2.3&amp;rdquo;.&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;]]></content><description>&lt;h1 id="http-block">http block&lt;/h1>
&lt;p>&lt;code>http&lt;/code> is an optional configuration block used to customize how the Grafana Agent Flow HTTP server functions.
&lt;code>http&lt;/code> is specified without a label and can only be provided once per configuration file.&lt;/p></description></item><item><title>import.file</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/import.file/</link><pubDate>Wed, 18 Jun 2025 15:04:54 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/import.file/</guid><content><![CDATA[&lt;h1 id=&#34;importfile&#34;&gt;import.file&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.44/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;The &lt;code&gt;import.file&lt;/code&gt; block imports custom components from a file or a directory and exposes them to the importer.
&lt;code&gt;import.file&lt;/code&gt; blocks must be given a label that determines the namespace where custom components are exposed.&lt;/p&gt;
&lt;p&gt;Imported directories are treated as single modules to support composability.
That means that you can define a custom component in one file and use it in another custom component in another file
in the same directory.&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;import.file &amp;#34;NAMESPACE&amp;#34; {
  filename = PATH_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 or directory 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;/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;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example imports a module from a file and instantiates a custom component from the import that adds two numbers:&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;module.river&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;declare &amp;#34;add&amp;#34; {
  argument &amp;#34;a&amp;#34; {}
  argument &amp;#34;b&amp;#34; {}

  export &amp;#34;sum&amp;#34; {
    value = argument.a.value &amp;#43; argument.b.value
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&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;importer.river&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;import.file &amp;#34;math&amp;#34; {
  filename = &amp;#34;module.river&amp;#34;
}

math.add &amp;#34;default&amp;#34; {
  a = 15
  b = 45
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

]]></content><description>&lt;h1 id="importfile">import.file&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.44/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>import.git</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/import.git/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/import.git/</guid><content><![CDATA[&lt;h1 id=&#34;importgit&#34;&gt;import.git&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;import.git&lt;/code&gt; block imports custom components from a Git repository and exposes them to the importer.
&lt;code&gt;import.git&lt;/code&gt; blocks must be given a label that determines the namespace where custom components are exposed.&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;import.git &amp;#34;NAMESPACE&amp;#34; {
  repository = &amp;#34;GIT_REPOSTORY&amp;#34;
  path       = &amp;#34;PATH_TO_MODULE&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;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;https://github.com/grafana/agent.git&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You must set the &lt;code&gt;repository&lt;/code&gt; attribute to a repository address that Git would recognize
with a &lt;code&gt;git clone REPOSITORY_ADDRESS&lt;/code&gt; command, such as &lt;code&gt;https://github.com/grafana/agent.git&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When provided, the &lt;code&gt;revision&lt;/code&gt; attribute must be set to a valid branch, tag, or
commit SHA within the repository.&lt;/p&gt;
&lt;p&gt;You must set the &lt;code&gt;path&lt;/code&gt; attribute to a path accessible from the repository&amp;rsquo;s root.
It can either be a River file such as &lt;code&gt;FILE_NAME.river&lt;/code&gt; or &lt;code&gt;DIR_NAME/FILE_NAME.river&lt;/code&gt; or
a directory containing River files such as &lt;code&gt;DIR_NAME&lt;/code&gt; or &lt;code&gt;.&lt;/code&gt; if the River files are stored at the root
of the repository.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;pull_frequency&lt;/code&gt; isn&amp;rsquo;t &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the Git repository is pulled for updates at the frequency specified.
If it&amp;rsquo;s set to &lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;, the Git repository is pulled once on init.&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;Pulling hosted Git repositories too often can result in throttling.&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;import.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 repository.&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 an SSH Key for authenticating to the repository.&lt;/td&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;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;This example imports custom components from a Git repository and uses a custom component to add 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;import.git &amp;#34;math&amp;#34; {
  repository = &amp;#34;https://github.com/wildum/module.git&amp;#34;
  revision   = &amp;#34;master&amp;#34;
  path       = &amp;#34;math.river&amp;#34;
}

math.add &amp;#34;default&amp;#34; {
  a = 15
  b = 45
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example imports custom components from a directory in a Git repository and uses a custom component to add 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;import.git &amp;#34;math&amp;#34; {
  repository = &amp;#34;https://github.com/wildum/module.git&amp;#34;
  revision   = &amp;#34;master&amp;#34;
  path       = &amp;#34;modules&amp;#34;
}

math.add &amp;#34;default&amp;#34; {
  a = 15
  b = 45
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="importgit">import.git&lt;/h1>
&lt;p>The &lt;code>import.git&lt;/code> block imports custom components from a Git repository and exposes them to the importer.
&lt;code>import.git&lt;/code> blocks must be given a label that determines the namespace where custom components are exposed.&lt;/p></description></item><item><title>import.http</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/import.http/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/import.http/</guid><content><![CDATA[&lt;h1 id=&#34;importhttp&#34;&gt;import.http&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;import.http&lt;/code&gt; retrieves a module from an HTTP 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;import.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 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 the 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;/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 imports custom components from an HTTP response and instantiates a custom component for adding two numbers:&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;HTTP response&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;declare &amp;#34;add&amp;#34; {
  argument &amp;#34;a&amp;#34; {}
  argument &amp;#34;b&amp;#34; {}

  export &amp;#34;sum&amp;#34; {
    value = argument.a.value &amp;#43; argument.b.value
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&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;importer.river&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;import.http &amp;#34;math&amp;#34; {
  url = SERVER_URL
}

math.add &amp;#34;default&amp;#34; {
  a = 15
  b = 45
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

]]></content><description>&lt;h1 id="importhttp">import.http&lt;/h1>
&lt;p>&lt;code>import.http&lt;/code> retrieves a module from an HTTP 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">import.http &amp;#34;LABEL&amp;#34; {
url = URL
}&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>import.string</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/import.string/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/import.string/</guid><content><![CDATA[&lt;h1 id=&#34;importstring&#34;&gt;import.string&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;import.string&lt;/code&gt; block imports custom components from a string and exposes them to the importer.
&lt;code&gt;import.string&lt;/code&gt; blocks must be given a label that determines the namespace where custom components are exposed.&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;import.string &amp;#34;NAMESPACE&amp;#34; {
  content = CONTENT
}&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 import 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 import.
&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;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example imports a module from the content of a file stored in an S3 bucket and instantiates a custom component from the import that 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;remote.s3 &amp;#34;module&amp;#34; {
  path = &amp;#34;s3://test-bucket/module.river&amp;#34;
}

import.string &amp;#34;math&amp;#34; {
  content = remote.s3.module.content
}

math.add &amp;#34;default&amp;#34; {
  a = 15
  b = 45
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="importstring">import.string&lt;/h1>
&lt;p>The &lt;code>import.string&lt;/code> block imports custom components from a string and exposes them to the importer.
&lt;code>import.string&lt;/code> blocks must be given a label that determines the namespace where custom components are exposed.&lt;/p></description></item><item><title>logging block</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/logging/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/logging/</guid><content><![CDATA[&lt;h1 id=&#34;logging-block&#34;&gt;logging block&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;logging&lt;/code&gt; is an optional configuration block used to customize how Grafana Agent Flow produces log messages.
&lt;code&gt;logging&lt;/code&gt; is specified without a label and can only be provided once per configuration file.&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;logging {
  level  = &amp;#34;info&amp;#34;
  format = &amp;#34;logfmt&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;level&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Level at which log lines should be written&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;info&amp;quot;&lt;/code&gt;&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;Format to use for writing log lines&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;write_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;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;log-level&#34;&gt;Log level&lt;/h3&gt;
&lt;p&gt;The following strings are recognized as valid log levels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;error&amp;quot;&lt;/code&gt;: Only write logs at the &lt;em&gt;error&lt;/em&gt; level.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;warn&amp;quot;&lt;/code&gt;: Only write logs at the &lt;em&gt;warn&lt;/em&gt; level or above.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;info&amp;quot;&lt;/code&gt;: Only write logs at &lt;em&gt;info&lt;/em&gt; level or above.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;debug&amp;quot;&lt;/code&gt;: Write all logs, including &lt;em&gt;debug&lt;/em&gt; level logs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;log-format&#34;&gt;Log format&lt;/h3&gt;
&lt;p&gt;The following strings are recognized as valid log line formats:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;logfmt&amp;quot;&lt;/code&gt;: Write logs as &lt;a href=&#34;https://brandur.org/logfmt&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;logfmt&lt;/a&gt; lines.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;json&amp;quot;&lt;/code&gt;: Write logs as JSON objects.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;log-receivers&#34;&gt;Log receivers&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;write_to&lt;/code&gt; argument allows Grafana Agent Flow to tee its log entries to one or more &lt;code&gt;loki.*&lt;/code&gt; component log receivers in addition to the default &lt;a href=&#34;#log-location&#34;&gt;location&lt;/a&gt;.
This, for example can be the export of a &lt;code&gt;loki.write&lt;/code&gt; component to ship log entries directly to Loki, or a &lt;code&gt;loki.relabel&lt;/code&gt; component to add a certain label first.&lt;/p&gt;
&lt;h2 id=&#34;log-location&#34;&gt;Log location&lt;/h2&gt;
&lt;p&gt;Grafana Agent Flow writes all logs to &lt;code&gt;stderr&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When running Grafana Agent Flow as a systemd service, view logs written to &lt;code&gt;stderr&lt;/code&gt; through &lt;code&gt;journald&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When running Grafana Agent Flow as a container, view logs written to &lt;code&gt;stderr&lt;/code&gt; through &lt;code&gt;docker logs&lt;/code&gt; or &lt;code&gt;kubectl logs&lt;/code&gt;, depending on whether Docker or Kubernetes was used for deploying Grafana Agent Flow.&lt;/p&gt;
&lt;p&gt;When running Grafana Agent Flow as a Windows service, logs are instead written as event logs. You can view the logs through Event Viewer.&lt;/p&gt;
&lt;p&gt;In other cases, redirect &lt;code&gt;stderr&lt;/code&gt; of the Grafana Agent Flow process to a file for logs to persist on disk.&lt;/p&gt;
]]></content><description>&lt;h1 id="logging-block">logging block&lt;/h1>
&lt;p>&lt;code>logging&lt;/code> is an optional configuration block used to customize how Grafana Agent Flow produces log messages.
&lt;code>logging&lt;/code> is specified without a label and can only be provided once per configuration file.&lt;/p></description></item><item><title>remotecfg block</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/remotecfg/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/remotecfg/</guid><content><![CDATA[&lt;h1 id=&#34;remotecfg-block-beta&#34;&gt;remotecfg block (beta)&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;remotecfg&lt;/code&gt; is an optional configuration block that enables Grafana Agent Flow to fetch and load the configuration from a remote endpoint.
&lt;code&gt;remotecfg&lt;/code&gt; is specified without a label and can only be provided once per configuration file.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://github.com/grafana/agent-remote-config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API definition&lt;/a&gt; for managing and fetching configuration that the &lt;code&gt;remotecfg&lt;/code&gt; block uses is available under the Apache 2.0 license.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BETA&lt;/strong&gt;: The &lt;code&gt;remotecfg&lt;/code&gt; enables 
    &lt;a href=&#34;/docs/agent/v0.44/stability/#beta&#34;&gt;beta&lt;/a&gt; functionality.
Beta features 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;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;remotecfg {
	url = &amp;#34;SERVICE_URL&amp;#34;
	basic_auth {
		username      = &amp;#34;USERNAME&amp;#34;
		password_file = &amp;#34;PASSWORD_FILE&amp;#34;
	}

	id             = constants.hostname
	metadata       = {&amp;#34;cluster&amp;#34; = &amp;#34;dev&amp;#34;, &amp;#34;namespace&amp;#34; = &amp;#34;otlp-dev&amp;#34;}
	poll_frequency = &amp;#34;5m&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;The address of the API to poll for configuration.&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;id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A self-reported ID.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;see below&lt;/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&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A set of self-reported 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;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 API for new configuration.&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;p&gt;If the &lt;code&gt;url&lt;/code&gt; is not set, then the service block is a no-op.&lt;/p&gt;
&lt;p&gt;If not set, the self-reported &lt;code&gt;id&lt;/code&gt; that the Agent uses is a randomly generated,
anonymous unique ID (UUID) that is stored as an &lt;code&gt;agent_seed.json&lt;/code&gt; file in the
Agent&amp;rsquo;s storage path so that it can persist across restarts.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;metadata&lt;/code&gt; fields are used in the periodic request sent to the
remote endpoint so that the API can decide what configuration to serve.&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;remotecfg&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;

        
]]></content><description>&lt;h1 id="remotecfg-block-beta">remotecfg block (beta)&lt;/h1>
&lt;p>&lt;code>remotecfg&lt;/code> is an optional configuration block that enables Grafana Agent Flow to fetch and load the configuration from a remote endpoint.
&lt;code>remotecfg&lt;/code> is specified without a label and can only be provided once per configuration file.&lt;/p></description></item><item><title>tracing block</title><link>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/tracing/</link><pubDate>Wed, 29 Jan 2025 11:00:55 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.44/flow/reference/config-blocks/tracing/</guid><content><![CDATA[&lt;h1 id=&#34;tracing-block&#34;&gt;tracing block&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;tracing&lt;/code&gt; is an optional configuration block used to customize how Grafana Agent Flow produces traces.
&lt;code&gt;tracing&lt;/code&gt; is specified without a label and can only be provided once per configuration file.&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;tracing {
  sampling_fraction = 0.1

  write_to = [otelcol.exporter.otlp.tempo.input]
}

otelcol.exporter.otlp &amp;#34;tempo&amp;#34; {
  // Send traces to a locally running Tempo without TLS enabled.
  client {
    endpoint = env(&amp;#34;TEMPO_OTLP_ENDPOINT&amp;#34;)

    tls {
      insecure = true
    }
  }
}&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;sampling_fraction&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Fraction of traces to keep.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;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;write_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(otelcol.Consumer)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Inputs from &lt;code&gt;otelcol&lt;/code&gt; components to send traces to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;write_to&lt;/code&gt; argument controls which components to send traces to for
processing. The elements in the array can be any &lt;code&gt;otelcol&lt;/code&gt; component that
accept traces, including processors and exporters. When &lt;code&gt;write_to&lt;/code&gt; is set
to an empty array &lt;code&gt;[]&lt;/code&gt;, all traces are dropped.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Any traces generated before the &lt;code&gt;tracing&lt;/code&gt; block has been evaluated,
such as at the early start of the process&amp;rsquo; lifetime, are dropped.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The &lt;code&gt;sampling_fraction&lt;/code&gt; argument controls what percentage of generated traces
should be sent to the consumers specified by &lt;code&gt;write_to&lt;/code&gt;. When set to &lt;code&gt;1&lt;/code&gt; or
greater, 100% of traces are kept. When set to &lt;code&gt;0&lt;/code&gt; or lower, 0% of traces are
kept.&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;tracing&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;sampler&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#sampler-block&#34;&gt;sampler&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Define custom sampling on top of the base sampling fraction.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;sampler &amp;gt; jaeger_remote&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#jaeger_remote-block&#34;&gt;jaeger_remote&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Retrieve sampling information via a Jaeger remote sampler.&lt;/td&gt;
              &lt;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;sampler &amp;gt; jaeger_remote&lt;/code&gt; refers to a &lt;code&gt;jaeger_remote&lt;/code&gt; block defined inside an &lt;code&gt;sampler&lt;/code&gt;
block.&lt;/p&gt;
&lt;h3 id=&#34;sampler-block&#34;&gt;sampler block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;sampler&lt;/code&gt; block contains a definition of a custom sampler to use. The
&lt;code&gt;sampler&lt;/code&gt; block supports no arguments and is controlled fully through inner
blocks.&lt;/p&gt;
&lt;p&gt;It is invalid to define more than one sampler to use in the &lt;code&gt;sampler&lt;/code&gt; block.&lt;/p&gt;
&lt;h3 id=&#34;jaeger_remote-block&#34;&gt;jaeger_remote block&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;jaeger_remote&lt;/code&gt; block configures the retrieval of sampling information
through a remote server that exposes Jaeger sampling strategies.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;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 retrieve sampling strategies from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;http://127.0.0.1:5778/sampling&amp;quot;&lt;/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_operations&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit number of operations which can have custom sampling.&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;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 poll the URL for new sampling strategies.&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;p&gt;The remote sampling strategies are retrieved from the URL specified by the
&lt;code&gt;url&lt;/code&gt; argument, and polled for updates on a timer. The frequency for how often
polling occurs is controlled by the &lt;code&gt;refresh_interval&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;Requests to the remote sampling strategies server are made through an HTTP
&lt;code&gt;GET&lt;/code&gt; request to the configured &lt;code&gt;url&lt;/code&gt; argument. A &lt;code&gt;service=grafana-agent&lt;/code&gt; query
parameter is always added to the URL to allow the server to respond with
service-specific strategies. The HTTP response body is read as JSON matching
the schema specified by Jaeger&amp;rsquo;s &lt;a href=&#34;https://www.jaegertracing.io/docs/1.22/sampling/#collector-sampling-configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;strategies.json&lt;/code&gt; file&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;max_operations&lt;/code&gt; limits the amount of custom span names that can have
custom sampling rules. If the remote sampling strategy exceeds the limit,
sampling decisions fall back to the default sampler.&lt;/p&gt;
]]></content><description>&lt;h1 id="tracing-block">tracing block&lt;/h1>
&lt;p>&lt;code>tracing&lt;/code> is an optional configuration block used to customize how Grafana Agent Flow produces traces.
&lt;code>tracing&lt;/code> is specified without a label and can only be provided once per configuration file.&lt;/p></description></item></channel></rss>