<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>prometheus on Grafana Labs</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/</link><description>Recent content in prometheus on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/alloy/v1.15/reference/components/prometheus/index.xml" rel="self" type="application/rss+xml"/><item><title>prometheus.echo</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.echo/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.echo/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusecho&#34;&gt;&lt;code&gt;prometheus.echo&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.echo&lt;/code&gt; component receives Prometheus metrics and writes them to stdout in Prometheus exposition format.
This component is useful for debugging and testing the flow of metrics through a pipeline, allowing you to see exactly what metrics are being received at a particular point in your configuration.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.echo &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.echo&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;format&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The output format for metrics. Must be &lt;code&gt;text&lt;/code&gt; or &lt;code&gt;openmetrics&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;text&lt;/code&gt;&lt;/td&gt;
              &lt;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;format&lt;/code&gt; argument controls how metrics are encoded when written to stdout:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;text&lt;/code&gt; - Uses the Prometheus text exposition format (default).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openmetrics&lt;/code&gt; - Uses the OpenMetrics text format.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.echo&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send metrics to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.echo&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.echo&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.echo&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates a metrics generation and inspection pipeline:&lt;/p&gt;

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

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

prometheus.echo &amp;#34;debug&amp;#34; {
  format = &amp;#34;text&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;prometheus.exporter.unix&lt;/code&gt; component exposes system metrics.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;prometheus.scrape&lt;/code&gt; component scrapes those metrics.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;prometheus.echo&lt;/code&gt; component receives the scraped metrics and writes them to stdout in Prometheus text format.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When you run this configuration, you&amp;rsquo;ll see the metrics being written to stdout, which is useful to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Debug metric collection issues&lt;/li&gt;
&lt;li&gt;Verify metric labels and values&lt;/li&gt;
&lt;li&gt;Test metric transformations&lt;/li&gt;
&lt;li&gt;Understand the structure of metrics in your pipeline&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;example-with-openmetrics-format&#34;&gt;Example with OpenMetrics format&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.scrape &amp;#34;demo&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:9090&amp;#34;},
  ]
  forward_to = [prometheus.echo.debug.receiver]
}

prometheus.echo &amp;#34;debug&amp;#34; {
  format = &amp;#34;openmetrics&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example outputs metrics using the OpenMetrics format instead of the traditional Prometheus text format.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.echo&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-consumers&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusecho">&lt;code>prometheus.echo&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.echo&lt;/code> component receives Prometheus metrics and writes them to stdout in Prometheus exposition format.
This component is useful for debugging and testing the flow of metrics through a pipeline, allowing you to see exactly what metrics are being received at a particular point in your configuration.&lt;/p></description></item><item><title>prometheus.enrich</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.enrich/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.enrich/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusenrich&#34;&gt;&lt;code&gt;prometheus.enrich&lt;/code&gt;&lt;/h1&gt;


&lt;div data-shared=&#34;stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;The &lt;code&gt;prometheus.enrich&lt;/code&gt; component enriches metrics with additional labels from service discovery targets.
It matches a label from incoming metrics against a label from discovered targets, and copies specified labels from the
matched target to the metric sample. If match doesn&amp;rsquo;t happen, the metrics will be passed through.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.enrich &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  targets = &amp;lt;DISCOVERY_COMPONENT&amp;gt;.targets
  
  target_match_label = &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34;
  
  forward_to = [&amp;lt;RECEIVER_LIST&amp;gt;]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.enrich&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Where the metrics should be forwarded to, after enrichment.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;target_match_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label from discovered targets to match against, for example, &lt;code&gt;&amp;quot;__inventory_consul_service&amp;quot;&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of targets from a discovery component.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels_to_copy&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 labels to copy from discovered targets to metrics. If empty, all labels are copied.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics_match_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label from incoming metrics to match against discovered targets, for example &lt;code&gt;&amp;quot;service_name&amp;quot;&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If not provided, the &lt;code&gt;metrics_match_label&lt;/code&gt; attribute defaults to the value of &lt;code&gt;target_match_label&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.enrich&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exports&#34;&gt;Exports&lt;/h2&gt;
&lt;p&gt;The following values are exported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The input receiver where samples are sent to be enriched.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.enrich&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_fanout_latency&lt;/code&gt; (histogram): Write latency for sending to direct and indirect components.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_forwarded_samples_total&lt;/code&gt; (counter): Total number of samples sent to downstream components.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_target_cache_size&lt;/code&gt; (gauge): The number of targets in the &lt;code&gt;targets&lt;/code&gt; list.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;h3 id=&#34;enrich-metrics-from-prometheusscrape&#34;&gt;Enrich metrics from &lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The following example shows how the &lt;code&gt;prometheus.enrich&lt;/code&gt; enriches incoming metrics from
&lt;code&gt;prometheus.scrape.default&lt;/code&gt;, using HTTP discovery, and forwards the results to
&lt;code&gt;prometheus.remote_write.default&lt;/code&gt; component:&lt;/p&gt;

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

prometheus.scrape &amp;#34;default&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;example-app:9001&amp;#34;},
  ]

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

prometheus.enrich &amp;#34;default&amp;#34; {
	targets = discovery.http.default.targets

	target_match_label = &amp;#34;hostname&amp;#34;

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

prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;enrich-metrics-from-prometheusreceive_http&#34;&gt;Enrich metrics from &lt;code&gt;prometheus.receive_http&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The following example shows how the &lt;code&gt;prometheus.enrich&lt;/code&gt; enriches incoming metrics from
&lt;code&gt;prometheus.receive_http.default&lt;/code&gt;, using HTTP discovery, and forwards the results to
&lt;code&gt;prometheus.remote_write.default&lt;/code&gt; component:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;discovery.file &amp;#34;network_devices&amp;#34; {  
   files = [&amp;#34;/etc/alloy/devices.json&amp;#34;]  
}  
  
prometheus.receive_http &amp;#34;default&amp;#34; {
  http {
    listen_address = &amp;#34;0.0.0.0&amp;#34;
    listen_port = 9999
  }
  
  forward_to = [prometheus.enrich.default.receiver]
}

prometheus.enrich &amp;#34;default&amp;#34; {  
    targets = discovery.file.network_devices.targets  
  
    target_match_label = &amp;#34;hostname&amp;#34;  
    
    forward_to = [prometheus.remote_write.default.receiver]  
}

prometheus.remote_write &amp;#34;default&amp;#34; {  
  endpoint {  
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;    
  }    
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.enrich&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;prometheus.enrich&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-consumers&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;]]></content><description>&lt;h1 id="prometheusenrich">&lt;code>prometheus.enrich&lt;/code>&lt;/h1>
&lt;div data-shared="stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an &lt;a href="/docs/release-life-cycle/">experimental&lt;/a> component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code>stability.level&lt;/code>
&lt;a href="/docs/alloy/v1.15/reference/cli/run/">flag&lt;/a> to &lt;code>experimental&lt;/code>.&lt;/p></description></item><item><title>prometheus.exporter.apache</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.apache/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.apache/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterapache&#34;&gt;&lt;code&gt;prometheus.exporter.apache&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.apache&lt;/code&gt; component embeds &lt;a href=&#34;https://github.com/Lusitaniae/apache_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;apache_exporter&lt;/code&gt;&lt;/a&gt; for collecting &lt;code&gt;mod_status&lt;/code&gt; statistics from an Apache server.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.apache &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.apache&lt;/code&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;host_override&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Override for HTTP Host header.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Ignore server certificate if using HTTPS.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_uri&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URI to Apache stub status page.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;http://localhost/server-status?auto&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.apache&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.apache&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.apache&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.apache&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.apache&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.apache &amp;#34;example&amp;#34; {
  scrape_uri = &amp;#34;http://web.example.com/server-status?auto&amp;#34;
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterapache">&lt;code>prometheus.exporter.apache&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.apache&lt;/code> component embeds &lt;a href="https://github.com/Lusitaniae/apache_exporter" target="_blank" rel="noopener noreferrer">&lt;code>apache_exporter&lt;/code>&lt;/a> for collecting &lt;code>mod_status&lt;/code> statistics from an Apache server.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.apache &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.apache&lt;/code>.&lt;/p></description></item><item><title>prometheus.exporter.azure</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.azure/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.azure/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterazure&#34;&gt;&lt;code&gt;prometheus.exporter.azure&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.azure&lt;/code&gt; component embeds &lt;a href=&#34;https://github.com/webdevops/azure-metrics-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;azure-metrics-exporter&lt;/code&gt;&lt;/a&gt; to collect metrics from &lt;a href=&#34;https://azure.microsoft.com/en-us/products/monitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Monitor&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The exporter supports all metrics defined by Azure Monitor.
You can find the complete list of available metrics in the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Monitor documentation&lt;/a&gt;.
Metrics for this integration are exposed with the template &lt;code&gt;azure_{type}_{metric}_{aggregation}_{unit}&lt;/code&gt; by default. As an example,
the Egress metric for BlobService would be exported as &lt;code&gt;azure_microsoft_storage_storageaccounts_blobservices_egress_total_bytes&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The exporter offers the following two options for gathering metrics.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;(Default) Use an &lt;a href=&#34;https://azure.microsoft.com/en-us/get-started/azure-portal/resource-graph/#overview&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Resource Graph&lt;/a&gt; query to identify resources for gathering metrics.
&lt;ol&gt;
&lt;li&gt;This query makes one API call per resource identified.&lt;/li&gt;
&lt;li&gt;Subscriptions with a reasonable amount of resources can hit the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/request-limits-and-throttling#subscription-and-tenant-limits&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;12000 requests per hour rate limit&lt;/a&gt; Azure enforces.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Set the regions to gather metrics from and get metrics for all resources across those regions.
&lt;ol&gt;
&lt;li&gt;This option makes one API call per subscription, dramatically reducing the number of API calls.&lt;/li&gt;
&lt;li&gt;This approach doesn&amp;rsquo;t work with all resource types, and Azure doesn&amp;rsquo;t document which resource types do or don&amp;rsquo;t work.&lt;/li&gt;
&lt;li&gt;A resource type that&amp;rsquo;s not supported produces errors that look like &lt;code&gt;Resource type: microsoft.containerservice/managedclusters not enabled for Cross Resource metrics&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you encounter one of these errors you must use the default Azure Resource Graph based option to gather metrics.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;authentication&#34;&gt;Authentication&lt;/h2&gt;
&lt;p&gt;Alloy must be running in an environment with access to Azure.
The exporter uses the Azure SDK for go and supports &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#2-authenticate-with-azure&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;authentication&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The account used by Alloy needs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When using an Azure Resource Graph query, &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/governance/resource-graph/overview#permissions-in-azure-resource-graph&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;read access to the resources that will be queried by Resource Graph&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- vale Grafana.GoogleSpacing = NO --&gt;
&lt;ul&gt;
&lt;li&gt;Permissions to call the &lt;a href=&#34;https://learn.microsoft.com/en-us/rest/api/monitor/metrics/list&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft.Insights Metrics API&lt;/a&gt; which should be the &lt;code&gt;Microsoft.Insights/Metrics/Read&lt;/code&gt; permission.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- vale Grafana.GoogleSpacing = YES --&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.azure &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
        subscriptions = [
                &amp;lt;SUB_ID_1&amp;gt;,
                &amp;lt;SUB_ID_2&amp;gt;,
                ...
        ]

        resource_type = &amp;#34;&amp;lt;RESOURCE_TYPE&amp;gt;&amp;#34;

        metrics = [
                &amp;#34;&amp;lt;METRIC_1&amp;gt;&amp;#34;,
                &amp;#34;&amp;lt;METRIC_2&amp;gt;&amp;#34;,
                ...
        ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.azure&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The metrics to scrape from resources.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;resource_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Azure Resource Type to scrape metrics for.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;subscriptions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of subscriptions to scrape metrics from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;azure_cloud_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name of the cloud environment to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;azurecloud&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;included_dimensions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of dimensions to include on the final metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;included_resource_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of resource tags to include on the final metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;owner&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metric_aggregations&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Aggregations to apply for the metrics produced.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metric_help_template&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Description of the metric.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;Azure metric {metric} for {type} with aggregation {aggregation} as {unit}&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metric_name_template&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Metric template used to expose the metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;azure_{type}_{metric}_{aggregation}_{unit}&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metric_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Namespace for &lt;code&gt;resource_type&lt;/code&gt; which have multiple levels of metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of regions for gathering metrics. Gathers metrics for all resources in the subscription. Can&amp;rsquo;t be used if &lt;code&gt;resource_graph_query_filter&lt;/code&gt; is set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;resource_graph_query_filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kusto query&lt;/a&gt; filter to apply when searching for resources. Can&amp;rsquo;t be used if &lt;code&gt;regions&lt;/code&gt; is set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timespan&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/ISO_8601#Durations&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ISO8601 Duration&lt;/a&gt; over which the metrics are being queried.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;PT5M&amp;quot;&lt;/code&gt; (5 minutes)&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/ISO_8601#Durations&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ISO8601 Duration&lt;/a&gt; used when to generate individual datapoints in Azure Monitor. Must be smaller than &lt;code&gt;timespan&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;PT1M&amp;quot;&lt;/code&gt; (1 minute)&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;validate_dimensions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable dimension validation in the azure SDK.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The list of available &lt;code&gt;resource_type&lt;/code&gt; values and their corresponding &lt;code&gt;metrics&lt;/code&gt; can be found in &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Monitor essentials&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The list of available &lt;code&gt;regions&lt;/code&gt; to your subscription can be found by running the Azure CLI command &lt;code&gt;az account list-locations --query &#39;[].name&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;resource_graph_query_filter&lt;/code&gt; can be embedded into a template query of the form &lt;code&gt;Resources | where type =~ &amp;quot;&amp;lt;resource_type&amp;gt;&amp;quot; | &amp;lt;resource_graph_query_filter&amp;gt; | project id, tags&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Valid values for &lt;code&gt;metric_aggregations&lt;/code&gt; are &lt;code&gt;minimum&lt;/code&gt;, &lt;code&gt;maximum&lt;/code&gt;, &lt;code&gt;average&lt;/code&gt;, &lt;code&gt;total&lt;/code&gt;, and &lt;code&gt;count&lt;/code&gt;.
If no aggregation is specified, the value is retrieved from the metric.&lt;/p&gt;
&lt;!-- vale Grafana.GoogleSpacing = NO --&gt;
&lt;p&gt;For example, the aggregation value of the metric &lt;code&gt;Availability&lt;/code&gt; in &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-classicstorage-storageaccounts-metrics&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft.ClassicStorage/storageAccounts&lt;/a&gt; is &lt;code&gt;average&lt;/code&gt;.&lt;/p&gt;
&lt;!-- vale Grafana.GoogleSpacing = YES --&gt;
&lt;p&gt;Every metric has its own set of dimensions.&lt;/p&gt;
&lt;!-- vale Grafana.GoogleSpacing = NO --&gt;
&lt;p&gt;For example, the dimensions for the metric &lt;code&gt;Availability&lt;/code&gt; in &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-classicstorage-storageaccounts-metrics&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft.ClassicStorage/storageAccounts&lt;/a&gt; are &lt;code&gt;GeoType&lt;/code&gt;, &lt;code&gt;ApiName&lt;/code&gt;, and &lt;code&gt;Authentication&lt;/code&gt;.&lt;/p&gt;
&lt;!-- vale Grafana.GoogleSpacing = YES --&gt;
&lt;p&gt;If a single dimension is requested, it will have the name &lt;code&gt;dimension&lt;/code&gt;.
If multiple dimensions are requested, they will have the name &lt;code&gt;dimension&amp;lt;dimension_name&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Tags in &lt;code&gt;included_resource_tags&lt;/code&gt; will be added as labels with the name &lt;code&gt;tag_&amp;lt;tag_name&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Valid values for &lt;code&gt;azure_cloud_environment&lt;/code&gt; are &lt;code&gt;azurecloud&lt;/code&gt;, &lt;code&gt;azurechinacloud&lt;/code&gt;, &lt;code&gt;azuregovernmentcloud&lt;/code&gt; and &lt;code&gt;azurepprivatecloud&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;validate_dimensions&lt;/code&gt; is disabled by default to reduce the number of Azure exporter instances required when a &lt;code&gt;resource_type&lt;/code&gt; has metrics with varying dimensions.
When &lt;code&gt;validate_dimensions&lt;/code&gt; is enabled you will need one exporter instance per metric &#43; dimension combination which is more tedious to maintain.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;timespan&lt;/code&gt; and &lt;code&gt;interval&lt;/code&gt; are used to control how metrics are queried from Azure Monitor.
The exporter queries metrics over the &lt;code&gt;timespan&lt;/code&gt; and returns the most recent datapoint at the specified &lt;code&gt;interval&lt;/code&gt;.
If you are having issues with missing metrics, try increasing the &lt;code&gt;timespan&lt;/code&gt; to a larger value, such as &lt;code&gt;PT10M&lt;/code&gt; for 10 minutes, or &lt;code&gt;PT15M&lt;/code&gt; for 15 minutes.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.azure&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.azure&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.azure&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.azure&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.azure &amp;#34;example&amp;#34; {
    subscriptions    = &amp;#34;&amp;lt;SUBSCRIPTIONS&amp;gt;&amp;#34;
    resource_type    = &amp;#34;Microsoft.Storage/storageAccounts&amp;#34;
    regions          = [
        &amp;#34;westeurope&amp;#34;,
    ]
    metric_namespace = &amp;#34;Microsoft.Storage/storageAccounts/blobServices&amp;#34;
    metrics          = [
        &amp;#34;Availability&amp;#34;,
        &amp;#34;BlobCapacity&amp;#34;,
        &amp;#34;BlobCount&amp;#34;,
        &amp;#34;ContainerCount&amp;#34;,
        &amp;#34;Egress&amp;#34;,
        &amp;#34;IndexCapacity&amp;#34;,
        &amp;#34;Ingress&amp;#34;,
        &amp;#34;SuccessE2ELatency&amp;#34;,
        &amp;#34;SuccessServerLatency&amp;#34;,
        &amp;#34;Transactions&amp;#34;,
    ]
    included_dimensions = [
        &amp;#34;ApiName&amp;#34;,
        &amp;#34;TransactionType&amp;#34;,
    ]
    timespan         = &amp;#34;PT1H&amp;#34;
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterazure">&lt;code>prometheus.exporter.azure&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.azure&lt;/code> component embeds &lt;a href="https://github.com/webdevops/azure-metrics-exporter" target="_blank" rel="noopener noreferrer">&lt;code>azure-metrics-exporter&lt;/code>&lt;/a> to collect metrics from &lt;a href="https://azure.microsoft.com/en-us/products/monitor" target="_blank" rel="noopener noreferrer">Azure Monitor&lt;/a>.&lt;/p>
&lt;p>The exporter supports all metrics defined by Azure Monitor.
You can find the complete list of available metrics in the &lt;a href="https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported" target="_blank" rel="noopener noreferrer">Azure Monitor documentation&lt;/a>.
Metrics for this integration are exposed with the template &lt;code>azure_{type}_{metric}_{aggregation}_{unit}&lt;/code> by default. As an example,
the Egress metric for BlobService would be exported as &lt;code>azure_microsoft_storage_storageaccounts_blobservices_egress_total_bytes&lt;/code>.&lt;/p></description></item><item><title>prometheus.exporter.blackbox</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.blackbox/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.blackbox/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterblackbox&#34;&gt;&lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus/blackbox_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;blackbox_exporter&lt;/code&gt;&lt;/a&gt;.
The &lt;code&gt;blackbox_exporter&lt;/code&gt; lets you collect blackbox metrics (probes) and expose them as Prometheus metrics.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.blackbox &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  target {
    name    = &amp;#34;&amp;lt;NAME&amp;gt;&amp;#34;
    address = &amp;#34;&amp;lt;EXAMPLE_ADDRESS&amp;gt;&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.blackbox &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  targets = &amp;lt;TARGET_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;config_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;blackbox_exporter&lt;/code&gt; configuration file path.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;config&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt; or &lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;blackbox_exporter&lt;/code&gt; configuration as inline string.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;probe_timeout_offset&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Offset in seconds to subtract from timeout when probing targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0.5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Blackbox targets.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Either &lt;code&gt;config_file&lt;/code&gt; or &lt;code&gt;config&lt;/code&gt; must be specified.
The &lt;code&gt;config_file&lt;/code&gt; argument points to a YAML file defining which &lt;code&gt;blackbox_exporter&lt;/code&gt; modules to use.
The &lt;code&gt;config&lt;/code&gt; argument must be a YAML document as string defining which &lt;code&gt;blackbox_exporter&lt;/code&gt; modules to use.
&lt;code&gt;config&lt;/code&gt; is typically loaded by using the exports of another component. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;local.file.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.http.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.s3.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;timeout&lt;/code&gt; attribute in &lt;code&gt;config&lt;/code&gt; or &lt;code&gt;config_file&lt;/code&gt; has an effective upper limit of 10 seconds. Refer to the Prometheus blackbox exporter &lt;a href=&#34;https://github.com/prometheus/blackbox_exporter/issues/751&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;issue 751&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;You can&amp;rsquo;t use both the &lt;code&gt;targets&lt;/code&gt; argument and the [target][] block in the same configuration file.
The &lt;code&gt;targets&lt;/code&gt; argument must be used when blackbox targets can&amp;rsquo;t be passed as a target block because another component supplies them.&lt;/p&gt;
&lt;p&gt;You can set the following labels to a target:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;name&lt;/code&gt;: The name of the target to probe (required).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;address&lt;/code&gt;: The address of the target to probe (required).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;module&lt;/code&gt;: The blackbox module to use to probe.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component passes any additional labels to the exported target.&lt;/p&gt;
&lt;p&gt;Refer to &lt;a href=&#34;https://github.com/prometheus/blackbox_exporter/blob/master/example.yml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;blackbox_exporter&lt;/code&gt;&lt;/a&gt; for more information about generating a configuration file.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following block with &lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 2;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#target\&amp;#34;\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures a blackbox target.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#target&#34;&gt;&lt;code&gt;target&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a blackbox target.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;target&#34;&gt;&lt;code&gt;target&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The address of the target to probe.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of the target to probe.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Labels to add to the target.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;module&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Blackbox module to use to probe.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;target&lt;/code&gt; block defines an individual blackbox target.
The &lt;code&gt;target&lt;/code&gt; block may be specified multiple times to define multiple targets.
The &lt;code&gt;name&lt;/code&gt; attribute is required and is used in the target&amp;rsquo;s &lt;code&gt;job&lt;/code&gt; label.&lt;/p&gt;
&lt;p&gt;Labels specified in the &lt;code&gt;labels&lt;/code&gt; argument won&amp;rsquo;t override labels set by &lt;code&gt;blackbox_exporter&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;collect-metrics-using-a-blackbox-exporter-configuration-file&#34;&gt;Collect metrics using a blackbox exporter configuration file&lt;/h3&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt;.
It adds an extra label, &lt;code&gt;env=&amp;quot;dev&amp;quot;&lt;/code&gt;, to the metrics emitted by the &lt;code&gt;grafana&lt;/code&gt; target.
The &lt;code&gt;example&lt;/code&gt; target doesn&amp;rsquo;t have any added labels.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;config_file&lt;/code&gt; argument defines which &lt;code&gt;blackbox_exporter&lt;/code&gt; modules to use.
You can use the &lt;a href=&#34;https://github.com/prometheus/blackbox_exporter/blob/master/example.yml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;blackbox example configuration file&lt;/a&gt;.&lt;/p&gt;

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

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

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

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

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

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;collect-metrics-using-an-embedded-configuration&#34;&gt;Collect metrics using an embedded configuration&lt;/h3&gt;
&lt;p&gt;This example uses an embedded configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.blackbox &amp;#34;example&amp;#34; {
  config = &amp;#34;{ modules: { http_2xx: { prober: http, timeout: 5s } } }&amp;#34;

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

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

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

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

    basic_auth {
      username = USERNAME
      password = PASSWORD
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;collect-metrics-from-a-dynamic-set-of-targets&#34;&gt;Collect metrics from a dynamic set of targets&lt;/h3&gt;
&lt;p&gt;This example is the same as above but the blackbox targets are discovered via a &lt;a href=&#34;../../discovery/discovery.file/&#34;&gt;&lt;code&gt;discovery.file&lt;/code&gt; component&lt;/a&gt; and sent to the &lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt;:&lt;/p&gt;

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

prometheus.exporter.blackbox &amp;#34;example&amp;#34; {
  config = &amp;#34;{ modules: { http_2xx: { prober: http, timeout: 5s } } }&amp;#34;
  targets = discovery.file.example.targets
}

prometheus.scrape &amp;#34;example&amp;#34; {
  targets    = prometheus.exporter.blackbox.example.targets
  forward_to = [prometheus.remote_write.example.receiver]
}

prometheus.remote_write &amp;#34;example&amp;#34; {
  endpoint {
    url = &amp;#34;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&amp;#34;

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The YAML file in this example looks like this:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;- targets:
  - localhost:9009
  labels:
    name: t1
    module: http_2xx
    other_label: example
- targets:
  - localhost:9009
  labels:
    name: t2
    module: http_2xx&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;set-instance-label-to-target-url&#34;&gt;Set instance label to target URL&lt;/h3&gt;
&lt;p&gt;Some dashboards may expect the &lt;code&gt;instance&lt;/code&gt; label on the Blackbox metrics to contain the value of the target URL.
The following example demonstrates how to achieve that with Prometheus &lt;a href=&#34;../../discovery/discovery.relabel/&#34;&gt;relabeling&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.blackbox &amp;#34;example&amp;#34; {
  config = &amp;#34;{ modules: { http_2xx: { prober: http, timeout: 5s } } }&amp;#34;

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

discovery.relabel &amp;#34;example&amp;#34; {
  targets = prometheus.exporter.blackbox.example.targets

  rule {
    source_labels = [&amp;#34;__param_target&amp;#34;]
    target_label = &amp;#34;instance&amp;#34;
  }
}

prometheus.scrape &amp;#34;example&amp;#34; {
  targets = discovery.relabel.example.output
  forward_to = [prometheus.remote_write.metrics_service.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.blackbox&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterblackbox">&lt;code>prometheus.exporter.blackbox&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.blackbox&lt;/code> component embeds the &lt;a href="https://github.com/prometheus/blackbox_exporter" target="_blank" rel="noopener noreferrer">&lt;code>blackbox_exporter&lt;/code>&lt;/a>.
The &lt;code>blackbox_exporter&lt;/code> lets you collect blackbox metrics (probes) and expose them as Prometheus metrics.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.blackbox &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
target {
name = &amp;#34;&amp;lt;NAME&amp;gt;&amp;#34;
address = &amp;#34;&amp;lt;EXAMPLE_ADDRESS&amp;gt;&amp;#34;
}
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;p>or&lt;/p></description></item><item><title>prometheus.exporter.cadvisor</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.cadvisor/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.cadvisor/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportercadvisor&#34;&gt;&lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; component collects container metrics with &lt;a href=&#34;https://github.com/google/cadvisor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;cAdvisor&lt;/a&gt;.&lt;/p&gt;


&lt;div data-shared=&#34;reference/components/exporter-clustering-warning.md&#34;&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;We do not recommend using this exporter with &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;clustering&lt;/a&gt; enabled.&lt;/p&gt;
&lt;p&gt;The default &lt;code&gt;instance&lt;/code&gt; label set by this exporter is the hostname of the machine running Alloy.
Alloy clustering uses consistent hashing to distribute targets across the instances.
This requires the discovered targets to be the same and have the same labels across all cluster instances.&lt;/p&gt;
&lt;p&gt;If you do need to use this component in a cluster, use a dedicated &lt;code&gt;prometheus.scrape&lt;/code&gt; component that&amp;rsquo;s used to scrape
this exporter and doesn&amp;rsquo;t have clustering enabled. Alternatively, use &lt;code&gt;discovery.relabel&lt;/code&gt; to set the &lt;code&gt;instance&lt;/code&gt; label to a
value that is the same across all cluster instances.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; component only works on Linux systems.
On other operating systems, Alloy writes a warning to the logs and the component doesn&amp;rsquo;t collect container metrics.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The component requires specific permissions and configuration depending on your deployment environment.&lt;/p&gt;




  &lt;div class=&#34;br-4 base-border border-color-gray-3 docs_tabs&#34;&gt;
    &lt;div x-data=&#34;app_content_tabs([&amp;#34;Linux binary&amp;#34;,&amp;#34;Kubernetes&amp;#34;,&amp;#34;Docker container&amp;#34;], &#39;36a4358d4176b1f21f91c09c6692fac7&#39;)&#34; x-init=&#34;init()&#34;&gt;
      &lt;div class=&#34;d-flex w-100p flex-direction-row align-items-center justify-content-flex-start d-md-none&#34;&gt;
        &lt;select class=&#34;docs_tabs--select w-100p base-border-bottom border-color-gray-3&#34; @change=&#34;toggle($event.target.value)&#34;&gt;
          
          
            &lt;option value=&#34;Linux binary&#34; :selected=&#34;active === &#39;Linux binary&#39;&#34;&gt;Linux binary&lt;/option&gt;
          
          
            &lt;option value=&#34;Kubernetes&#34; :selected=&#34;active === &#39;Kubernetes&#39;&#34;&gt;Kubernetes&lt;/option&gt;
          
          
            &lt;option value=&#34;Docker container&#34; :selected=&#34;active === &#39;Docker container&#39;&#34;&gt;Docker container&lt;/option&gt;
          
        &lt;/select&gt; 
      &lt;/div&gt;
      &lt;nav class=&#34;docs_tabs--navigation base-border-bottom border-color-gray-3 d-none d-md-block&#34; role=&#34;tablist&#34; data-codetoggle=&#34;true&#34;&gt;
        
        
          &lt;button
            class=&#34;docs_tabs--label f-14 bg-transparent color-gray-11 py-8 px-1&#34;
            data-toggle=&#34;tab&#34;
            role=&#34;tab&#34;
            @click=&#34;toggle(&#39;Linux binary&#39;)&#34;
            :class=&#34;{ &#39;docs_tabs--label-active&#39;: active === &#39;Linux binary&#39; }&#34;
          &gt;
            Linux binary
          &lt;/button&gt;
        
        
          &lt;button
            class=&#34;docs_tabs--label f-14 bg-transparent color-gray-11 py-8 px-1&#34;
            data-toggle=&#34;tab&#34;
            role=&#34;tab&#34;
            @click=&#34;toggle(&#39;Kubernetes&#39;)&#34;
            :class=&#34;{ &#39;docs_tabs--label-active&#39;: active === &#39;Kubernetes&#39; }&#34;
          &gt;
            Kubernetes
          &lt;/button&gt;
        
        
          &lt;button
            class=&#34;docs_tabs--label f-14 bg-transparent color-gray-11 py-8 px-1&#34;
            data-toggle=&#34;tab&#34;
            role=&#34;tab&#34;
            @click=&#34;toggle(&#39;Docker container&#39;)&#34;
            :class=&#34;{ &#39;docs_tabs--label-active&#39;: active === &#39;Docker container&#39; }&#34;
          &gt;
            Docker container
          &lt;/button&gt;
        
      &lt;/nav&gt;
      &lt;div class=&#34;docs_tabs--content-container&#34;&gt;
        



&lt;div
  class=&#34;docs_tabs--content py-1 px-2&#34;
  :class=&#34;active === &#39;Linux binary&#39; ? &#39;d-block&#39; : &#39;d-none&#39;&#34;
  id=&#34;&#34;
  role=&#34;tabpanel&#34;
  aria-labelledby=&#34;&#34;
&gt;
  &lt;p&gt;When you run Alloy as a Linux binary, systemd service, or with the &lt;a href=&#34;../../../configure/nonroot/&#34;&gt;non-root&lt;/a&gt; &lt;code&gt;alloy&lt;/code&gt; user, you must grant the &lt;code&gt;alloy&lt;/code&gt; user permissions to access the container runtime socket and related directories to collect metrics from containers on the host.&lt;/p&gt;
&lt;p&gt;The component works with Docker, &lt;code&gt;containerd&lt;/code&gt;, Container Runtime Interface for OpenShift (CRI-O), and systemd container runtimes.&lt;/p&gt;
&lt;p&gt;For Docker, grant permissions using one of these approaches:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Add to docker group (recommended)&lt;/strong&gt;: Add the &lt;code&gt;alloy&lt;/code&gt; user to the &lt;code&gt;docker&lt;/code&gt; group:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo usermod -aG docker alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then restart the Alloy service:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo systemctl restart alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;docker&lt;/code&gt; group grants privileges equivalent to the &lt;code&gt;root&lt;/code&gt; user.
For more information about the security implications, refer to &lt;a href=&#34;https://docs.docker.com/engine/security/#docker-daemon-attack-surface&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Docker security&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Using ACLs&lt;/strong&gt;: Grant the &lt;code&gt;alloy&lt;/code&gt; user read and execute permissions to &lt;code&gt;/var/lib/docker/&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo setfacl -R -m d:u:alloy:rx /var/lib/docker/
sudo setfacl -R -m u:alloy:rx /var/lib/docker/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;You must rerun these commands when adding containers, as they don&amp;rsquo;t automatically apply to newly created directories.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Running as root&lt;/strong&gt;: Modify the systemd service to run Alloy as root:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo systemctl edit alloy.service&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Add the following override:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;ini&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-ini&#34;&gt;[Service]
User=root&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Running Alloy as root has security implications.
Only use this approach if necessary for your environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;p&gt;For more information about running Alloy without root privileges, refer to &lt;a href=&#34;../../../configure/nonroot/&#34;&gt;Configure Alloy to run as a nonroot user&lt;/a&gt;.&lt;/p&gt;

&lt;/div&gt;




&lt;div
  class=&#34;docs_tabs--content py-1 px-2&#34;
  :class=&#34;active === &#39;Kubernetes&#39; ? &#39;d-block&#39; : &#39;d-none&#39;&#34;
  id=&#34;&#34;
  role=&#34;tabpanel&#34;
  aria-labelledby=&#34;&#34;
&gt;
  &lt;p&gt;When you run Alloy in Kubernetes to collect container metrics, deploy Alloy as a DaemonSet to collect metrics from each node.&lt;/p&gt;
&lt;p&gt;The DaemonSet requires:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Host network access&lt;/strong&gt;: To access the container runtime&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Volume mounts&lt;/strong&gt;: Access to the container runtime socket and system directories&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security context&lt;/strong&gt;: Privileged access or specific capabilities&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For detailed Kubernetes Deployment guidance, refer to the &lt;a href=&#34;#kubernetes-deployment-example&#34;&gt;Kubernetes Deployment example&lt;/a&gt; section.&lt;/p&gt;

&lt;/div&gt;




&lt;div
  class=&#34;docs_tabs--content py-1 px-2&#34;
  :class=&#34;active === &#39;Docker container&#39; ? &#39;d-block&#39; : &#39;d-none&#39;&#34;
  id=&#34;&#34;
  role=&#34;tabpanel&#34;
  aria-labelledby=&#34;&#34;
&gt;
  &lt;p&gt;When you run Alloy itself as a Docker container to monitor other containers on the host, the Alloy container requires:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Privileged mode&lt;/strong&gt;: Access to host resources&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Volume mounts&lt;/strong&gt;: Access to the container runtime socket and system directories&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a complete Docker container deployment example, refer to the &lt;a href=&#34;#docker-deployment-example&#34;&gt;Docker deployment example&lt;/a&gt; section.&lt;/p&gt;

&lt;/div&gt;


      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;


&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.cadvisor &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allowlisted_container_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allowlist of container labels to convert to Prometheus labels.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;containerd_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The containerd endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/run/containerd/containerd.sock&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;containerd_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The containerd namespace.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;k8s.io&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_root_cgroup_stats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable collecting root Cgroup stats.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disabled_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of metrics to be disabled which, if set, overrides the default disabled metrics.&lt;/td&gt;
              &lt;td&gt;(see below)&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;docker_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Docker endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;unix:///var/run/docker.sock&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;docker_only&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Only report docker containers in addition to root stats.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;docker_tls_ca&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to a trusted CA for TLS connection to docker.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;ca.pem&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;docker_tls_cert&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to client certificate for TLS connection to docker.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;cert.pem&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;docker_tls_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to private key for TLS connection to docker.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;key.pem&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of metrics to be enabled which, if set, overrides &lt;code&gt;disabled_metrics&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;env_metadata_allowlist&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allowlist of environment variable keys matched with a specified prefix that needs to be collected for containers.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_events_config&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to a JSON file containing the configuration of perf events to measure.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;raw_cgroup_prefix_allowlist&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of cgroup path prefixes that need to be collected, even when &lt;code&gt;docker_only&lt;/code&gt; is specified.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;resctrl_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Interval to update resctrl mon groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;storage_duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Length of time to keep data stored in memory.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;store_container_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to convert container labels and environment variables into labels on Prometheus metrics for each container.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_docker_tls&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use TLS to connect to docker.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For &lt;code&gt;allowlisted_container_labels&lt;/code&gt; to take effect, &lt;code&gt;store_container_labels&lt;/code&gt; must be set to &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If a container is using the &lt;code&gt;overlayfs&lt;/code&gt; storage driver, ensure the &lt;code&gt;containerd_host&lt;/code&gt; attribute is set correctly to be able to retrieve its metrics.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;env_metadata_allowlist&lt;/code&gt; is only supported for containerd and Docker runtimes.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;perf_events_config&lt;/code&gt; isn&amp;rsquo;t set, measurement of &lt;code&gt;perf&lt;/code&gt; events is disabled.&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;resctrl_interval&lt;/code&gt; of &lt;code&gt;0&lt;/code&gt; disables updating mon groups.&lt;/p&gt;
&lt;p&gt;The values for &lt;code&gt;enabled_metrics&lt;/code&gt; and &lt;code&gt;disabled_metrics&lt;/code&gt; don&amp;rsquo;t correspond to Prometheus metrics, but to kinds of metrics that should or shouldn&amp;rsquo;t be exposed.
The values that you can use are:&lt;/p&gt;
&lt;div class=&#34;column-list&#34;&gt;
  &lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;advtcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;app&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;cpu_topology&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;cpu&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;cpuLoad&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;cpuset&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;disk&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;diskIO&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;hugetlb&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;memory_numa&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;memory&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;network&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;oom_event&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;percpu&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;perf_event&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;process&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;referenced_memory&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;resctrl&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;sched&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;tcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;udp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;p&gt;By default the following metric kinds are disabled:&lt;/p&gt;
&lt;div class=&#34;column-list&#34;&gt;
  &lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;advtcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;cpu_topology&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;cpuset&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;hugetlb&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;memory_numa&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;process&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;referenced_memory&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;resctrl&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;tcp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;udp&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;component-configuration&#34;&gt;Component configuration&lt;/h3&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.cadvisor &amp;#34;example&amp;#34; {
  docker_host = &amp;#34;unix:///var/run/docker.sock&amp;#34;

  storage_duration = &amp;#34;5m&amp;#34;
}

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

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

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;docker-deployment-example&#34;&gt;Docker deployment example&lt;/h3&gt;
&lt;p&gt;To collect container metrics with Alloy in Docker, you must mount the necessary host directories and run the container in privileged mode.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; component only works when the Alloy container runs on a Linux Docker host.
Docker Desktop for Mac and Docker Desktop for Windows run containers in a Linux VM, which prevents direct host monitoring.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The following Docker Compose example shows the required configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;services:
  alloy:
    image: grafana/alloy:latest
    privileged: true
    ports:
      - &amp;#34;12345:12345&amp;#34;
    volumes:
      - ./config.alloy:/etc/alloy/config.alloy
      - /var/run/docker.sock:/var/run/docker.sock
      - /:/rootfs:ro
      - /var/run:/var/run:rw
      - /sys:/sys:ro
      - /var/lib/docker/:/var/lib/docker:ro
      - /dev/disk/:/dev/disk:ro
    command: run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The required volume mounts are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/var/run/docker.sock&lt;/code&gt;: Docker socket for container discovery and API access&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/&lt;/code&gt;: Host root filesystem (read-only) for system metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/var/run&lt;/code&gt;: Host runtime data (read-write) for accessing container state&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/sys&lt;/code&gt;: Host system information (read-only) for cgroup and device metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/var/lib/docker/&lt;/code&gt;: Docker storage directory (read-only) for container metadata and layer information&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/dev/disk/&lt;/code&gt;: Disk device information (read-only) for disk I/O metrics&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Running in privileged mode grants the container access to all host devices.
Only use privileged mode when necessary and ensure proper network isolation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;For a complete working example with Grafana and Prometheus, refer to the &lt;a href=&#34;https://github.com/grafana/alloy-scenarios/tree/main/docker-monitoring&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;alloy-scenarios repository&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;kubernetes-deployment-example&#34;&gt;Kubernetes Deployment example&lt;/h3&gt;
&lt;p&gt;When you run Alloy in Kubernetes, deploy it as a DaemonSet to collect container metrics from each node.&lt;/p&gt;
&lt;p&gt;The following example shows the required configuration for a DaemonSet:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: alloy
  namespace: monitoring
spec:
  selector:
    matchLabels:
      app: alloy
  template:
    metadata:
      labels:
        app: alloy
    spec:
      serviceAccountName: alloy
      hostNetwork: true
      hostPID: true
      containers:
        - name: alloy
          image: grafana/alloy:latest
          args:
            - run
            - /etc/alloy/config.alloy
            - --server.http.listen-addr=0.0.0.0:12345
            - --storage.path=/var/lib/alloy/data
          ports:
            - containerPort: 12345
              name: http-metrics
          securityContext:
            privileged: true
          volumeMounts:
            - name: config
              mountPath: /etc/alloy
            - name: rootfs
              mountPath: /rootfs
              readOnly: true
            - name: var-run
              mountPath: /var/run
            - name: sys
              mountPath: /sys
              readOnly: true
            - name: docker
              mountPath: /var/lib/docker
              readOnly: true
            - name: dev-disk
              mountPath: /dev/disk
              readOnly: true
      volumes:
        - name: config
          configMap:
            name: alloy-config
        - name: rootfs
          hostPath:
            path: /
        - name: var-run
          hostPath:
            path: /var/run
        - name: sys
          hostPath:
            path: /sys
        - name: docker
          hostPath:
            path: /var/lib/docker
        - name: dev-disk
          hostPath:
            path: /dev/disk&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Key configuration requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;hostNetwork: true&lt;/strong&gt;: Allows access to the host network stack&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;hostPID: true&lt;/strong&gt;: Enables process-level metrics collection&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;privileged: true&lt;/strong&gt;: Grants access to host resources&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Volume mounts&lt;/strong&gt;: Provide access to container runtime and system directories&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;For container runtimes other than Docker, such as &lt;code&gt;containerd&lt;/code&gt; or CRI-O, adjust the volume mounts and &lt;code&gt;docker_host&lt;/code&gt; or &lt;code&gt;containerd_host&lt;/code&gt; arguments accordingly.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Running containers with privileged access in Kubernetes has security implications.
Consider using Pod Security Standards and RBAC to limit exposure, and only deploy to dedicated monitoring namespaces.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;For more information about deploying Alloy on Kubernetes, refer to &lt;a href=&#34;../../../set-up/deploy/&#34;&gt;Deploy Grafana Alloy&lt;/a&gt;.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cadvisor&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportercadvisor">&lt;code>prometheus.exporter.cadvisor&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.cadvisor&lt;/code> component collects container metrics with &lt;a href="https://github.com/google/cadvisor" target="_blank" rel="noopener noreferrer">cAdvisor&lt;/a>.&lt;/p>
&lt;div data-shared="reference/components/exporter-clustering-warning.md">
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>We do not recommend using this exporter with &lt;a href="../../../../get-started/clustering/">clustering&lt;/a> enabled.&lt;/p>
&lt;p>The default &lt;code>instance&lt;/code> label set by this exporter is the hostname of the machine running Alloy.
Alloy clustering uses consistent hashing to distribute targets across the instances.
This requires the discovered targets to be the same and have the same labels across all cluster instances.&lt;/p></description></item><item><title>prometheus.exporter.catchpoint</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.catchpoint/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.catchpoint/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportercatchpoint&#34;&gt;&lt;code&gt;prometheus.exporter.catchpoint&lt;/code&gt;&lt;/h1&gt;


&lt;div data-shared=&#34;stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;The &lt;code&gt;prometheus.exporter.catchpoint&lt;/code&gt; component uses the &lt;a href=&#34;https://github.com/grafana/catchpoint-prometheus-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;catchpoint_exporter&lt;/code&gt;&lt;/a&gt; for collecting statistics from a Catchpoint account.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.catchpoint &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    port              = &amp;#34;&amp;lt;PORT&amp;gt;&amp;#34;
    verbose_logging   = &amp;lt;VERBOSE_LOGGING&amp;gt;
    webhook_path      = &amp;#34;&amp;lt;WEBHOOK_PATH&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.catchpoint&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sets the port on which the exporter runs.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;9090&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;verbose_logging&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables verbose logging to provide more detailed output for debugging purposes.&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;webhook_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Defines the path where the exporter receives webhook data from Catchpoint&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/catchpoint-webhook&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.catchpoint&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.catchpoint&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.catchpoint&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.catchpoint&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.catchpoint&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.catchpoint &amp;#34;example&amp;#34; {
  port             = &amp;#34;9090&amp;#34;
  verbose_logging  = false
  webhook_path     = &amp;#34;/catchpoint-webhook&amp;#34;
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportercatchpoint">&lt;code>prometheus.exporter.catchpoint&lt;/code>&lt;/h1>
&lt;div data-shared="stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an &lt;a href="/docs/release-life-cycle/">experimental&lt;/a> component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code>stability.level&lt;/code>
&lt;a href="/docs/alloy/v1.15/reference/cli/run/">flag&lt;/a> to &lt;code>experimental&lt;/code>.&lt;/p></description></item><item><title>prometheus.exporter.cloudwatch</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.cloudwatch/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.cloudwatch/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportercloudwatch&#34;&gt;&lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt; component embeds &lt;a href=&#34;https://github.com/prometheus-community/yet-another-cloudwatch-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;yet-another-cloudwatch-exporter&lt;/code&gt;&lt;/a&gt;, letting you collect &lt;a href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Amazon CloudWatch metrics&lt;/a&gt; in a Prometheus-compatible format.&lt;/p&gt;
&lt;p&gt;This component lets you scrape CloudWatch metrics in a set of configurations called &lt;em&gt;jobs&lt;/em&gt;.
There are two kinds of jobs: [discovery][] and [static][].&lt;/p&gt;
&lt;h2 id=&#34;authentication&#34;&gt;Authentication&lt;/h2&gt;
&lt;p&gt;Alloy must be running in an environment with access to AWS.
The exporter uses the &lt;a href=&#34;https://aws.github.io/aws-sdk-go-v2/docs/getting-started/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS SDK for Go&lt;/a&gt; and provides authentication via the &lt;a href=&#34;https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS default credential chain&lt;/a&gt;.
Regardless of the method used to acquire the credentials, some permissions are required for the exporter to work.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;&amp;#34;tag:GetResources&amp;#34;,
&amp;#34;cloudwatch:GetMetricData&amp;#34;,
&amp;#34;cloudwatch:GetMetricStatistics&amp;#34;,
&amp;#34;cloudwatch:ListMetrics&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following IAM permissions are required for the &lt;a href=&#34;https://aws.amazon.com/transit-gateway/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Transit Gateway&lt;/a&gt; attachment (&lt;code&gt;tgwa&lt;/code&gt;) metrics to work.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;&amp;#34;ec2:DescribeTags&amp;#34;,
&amp;#34;ec2:DescribeInstances&amp;#34;,
&amp;#34;ec2:DescribeRegions&amp;#34;,
&amp;#34;ec2:DescribeTransitGateway*&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following IAM permission is required to discover tagged &lt;a href=&#34;https://aws.amazon.com/es/api-gateway/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;API Gateway&lt;/a&gt; REST APIs:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;&amp;#34;apigateway:GET&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following IAM permissions are required to discover tagged &lt;a href=&#34;https://aws.amazon.com/dms/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Database Migration Service&lt;/a&gt; (DMS) replication instances and tasks:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;&amp;#34;dms:DescribeReplicationInstances&amp;#34;,
&amp;#34;dms:DescribeReplicationTasks&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To use all of the integration features, use the following AWS IAM Policy:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;{
  &amp;#34;Version&amp;#34;: &amp;#34;2012-10-17&amp;#34;,
  &amp;#34;Statement&amp;#34;: [
    {
      &amp;#34;Sid&amp;#34;: &amp;#34;Stmt1674249227793&amp;#34;,
      &amp;#34;Action&amp;#34;: [
        &amp;#34;tag:GetResources&amp;#34;,
        &amp;#34;cloudwatch:GetMetricData&amp;#34;,
        &amp;#34;cloudwatch:GetMetricStatistics&amp;#34;,
        &amp;#34;cloudwatch:ListMetrics&amp;#34;,
        &amp;#34;ec2:DescribeTags&amp;#34;,
        &amp;#34;ec2:DescribeInstances&amp;#34;,
        &amp;#34;ec2:DescribeRegions&amp;#34;,
        &amp;#34;ec2:DescribeTransitGateway*&amp;#34;,
        &amp;#34;apigateway:GET&amp;#34;,
        &amp;#34;dms:DescribeReplicationInstances&amp;#34;,
        &amp;#34;dms:DescribeReplicationTasks&amp;#34;
      ],
      &amp;#34;Effect&amp;#34;: &amp;#34;Allow&amp;#34;,
      &amp;#34;Resource&amp;#34;: &amp;#34;*&amp;#34;
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.cloudwatch &amp;#34;queues&amp;#34; {
    sts_region      = &amp;#34;us-east-2&amp;#34;
    discovery {
        type        = &amp;#34;AWS/SQS&amp;#34;
        regions     = [&amp;#34;us-east-2&amp;#34;]
        search_tags = {
            &amp;#34;scrape&amp;#34; = &amp;#34;true&amp;#34;,
        }

        metric {
            name       = &amp;#34;NumberOfMessagesSent&amp;#34;
            statistics = [&amp;#34;Sum&amp;#34;, &amp;#34;Average&amp;#34;]
            period     = &amp;#34;1m&amp;#34;
        }

        metric {
            name       = &amp;#34;NumberOfMessagesReceived&amp;#34;
            statistics = [&amp;#34;Sum&amp;#34;, &amp;#34;Average&amp;#34;]
            period     = &amp;#34;1m&amp;#34;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sts_region&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS region to use when calling &lt;a href=&#34;https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;STS&lt;/a&gt; for retrieving account information.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;aws_sdk_version_v2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Deprecated) When &lt;code&gt;false&lt;/code&gt;, uses AWS SDK for Go v1 instead of v2.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fips_disabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable use of FIPS endpoints. Set &amp;rsquo;true&amp;rsquo; when running outside of USA regions.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;debug&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable debug logging on CloudWatch exporter internals.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;discovery_exported_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of tags (value) per service (key) to export in all metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels_to_snake_case&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Output labels on metrics in snake case instead of camel case.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If you define the &lt;code&gt;[&amp;quot;name&amp;quot;, &amp;quot;type&amp;quot;]&lt;/code&gt; under &lt;code&gt;&amp;quot;AWS/EC2&amp;quot;&lt;/code&gt; in the &lt;code&gt;discovery_exported_tags&lt;/code&gt; argument, it exports the name and type tags and its values as labels in all metrics.
This affects all discovery jobs.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Starting with Alloy v1.15, the &lt;code&gt;aws_sdk_version_v2&lt;/code&gt; argument is deprecated as AWS SDK for Go v1 is end-of-life since July 31, 2025.
Remove this argument from your configuration to use AWS SDK for Go v2, which is the default.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 11;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#discovery\&amp;#34;\u003e\u003ccode\u003ediscovery\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures a discovery job. You can configure multiple jobs.\u003c/td\u003e\n              \u003ctd\u003eno*\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003ediscovery\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#role\&amp;#34;\u003e\u003ccode\u003erole\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the IAM roles the job should assume to scrape metrics. Defaults to the role configured in the environment Alloy runs on.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003ediscovery\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#metric\&amp;#34;\u003e\u003ccode\u003emetric\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the list of metrics the job should scrape. You can define multiple metrics inside one job.\u003c/td\u003e\n              \u003ctd\u003eyes\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#static\&amp;#34;\u003e\u003ccode\u003estatic\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures a static job. You can configure multiple jobs.\u003c/td\u003e\n              \u003ctd\u003eno*\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003estatic\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#role\&amp;#34;\u003e\u003ccode\u003erole\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the IAM roles the job should assume to scrape metrics. Defaults to the role configured in the environment Alloy runs on.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003estatic\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#metric\&amp;#34;\u003e\u003ccode\u003emetric\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the list of metrics the job should scrape. You can define multiple metrics inside one job.\u003c/td\u003e\n              \u003ctd\u003eyes\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#custom_namespace\&amp;#34;\u003e\u003ccode\u003ecustom_namespace\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures a custom namespace job. You can configure multiple jobs.\u003c/td\u003e\n              \u003ctd\u003eno*\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003ecustom_namespace\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#role\&amp;#34;\u003e\u003ccode\u003erole\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the IAM roles the job should assume to scrape metrics. Defaults to the role configured in the environment Alloy runs on.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003ecustom_namespace\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#metric\&amp;#34;\u003e\u003ccode\u003emetric\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the list of metrics the job should scrape. You can define multiple metrics inside one job.\u003c/td\u003e\n              \u003ctd\u003eyes\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#decoupled_scraping\&amp;#34;\u003e\u003ccode\u003edecoupled_scraping\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the decoupled scraping feature to retrieve metrics on a schedule and return the cached metrics.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#discovery&#34;&gt;&lt;code&gt;discovery&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a discovery job. You can configure multiple jobs.&lt;/td&gt;
              &lt;td&gt;no*&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;discovery&lt;/code&gt; &amp;gt; &lt;a href=&#34;#role&#34;&gt;&lt;code&gt;role&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the IAM roles the job should assume to scrape metrics. Defaults to the role configured in the environment Alloy runs on.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;discovery&lt;/code&gt; &amp;gt; &lt;a href=&#34;#metric&#34;&gt;&lt;code&gt;metric&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the list of metrics the job should scrape. You can define multiple metrics inside one job.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#static&#34;&gt;&lt;code&gt;static&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a static job. You can configure multiple jobs.&lt;/td&gt;
              &lt;td&gt;no*&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;static&lt;/code&gt; &amp;gt; &lt;a href=&#34;#role&#34;&gt;&lt;code&gt;role&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the IAM roles the job should assume to scrape metrics. Defaults to the role configured in the environment Alloy runs on.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;static&lt;/code&gt; &amp;gt; &lt;a href=&#34;#metric&#34;&gt;&lt;code&gt;metric&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the list of metrics the job should scrape. You can define multiple metrics inside one job.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#custom_namespace&#34;&gt;&lt;code&gt;custom_namespace&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures a custom namespace job. You can configure multiple jobs.&lt;/td&gt;
              &lt;td&gt;no*&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;custom_namespace&lt;/code&gt; &amp;gt; &lt;a href=&#34;#role&#34;&gt;&lt;code&gt;role&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the IAM roles the job should assume to scrape metrics. Defaults to the role configured in the environment Alloy runs on.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;custom_namespace&lt;/code&gt; &amp;gt; &lt;a href=&#34;#metric&#34;&gt;&lt;code&gt;metric&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the list of metrics the job should scrape. You can define multiple metrics inside one job.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#decoupled_scraping&#34;&gt;&lt;code&gt;decoupled_scraping&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the decoupled scraping feature to retrieve metrics on a schedule and return the cached metrics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;



&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;static&lt;/code&gt;, &lt;code&gt;discovery&lt;/code&gt;, and &lt;code&gt;custom_namespace&lt;/code&gt; blocks are marked as not required, but you must configure at least one &lt;code&gt;static&lt;/code&gt;, &lt;code&gt;discovery&lt;/code&gt;, or &lt;code&gt;custom_namespace&lt;/code&gt; job.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;discovery&#34;&gt;&lt;code&gt;discovery&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;discovery&lt;/code&gt; block allows the component to scrape CloudWatch metrics with only the AWS service and a list of metrics under that service/namespace.
Alloy finds AWS resources in the specified service, scrapes the metrics, labels them appropriately, and exports them to Prometheus.
The following example configuration, shows you how to scrape CPU utilization and network traffic metrics from all AWS EC2 instances:&lt;/p&gt;

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

    discovery {
        type    = &amp;#34;AWS/EC2&amp;#34;
        regions = [&amp;#34;us-east-2&amp;#34;]

        metric {
            name       = &amp;#34;CPUUtilization&amp;#34;
            statistics = [&amp;#34;Average&amp;#34;]
            period     = &amp;#34;5m&amp;#34;
        }

        metric {
            name       = &amp;#34;NetworkPacketsIn&amp;#34;
            statistics = [&amp;#34;Average&amp;#34;]
            period     = &amp;#34;5m&amp;#34;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can configure the &lt;code&gt;discovery&lt;/code&gt; block one or multiple times to scrape metrics from different services or with different &lt;code&gt;search_tags&lt;/code&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of AWS regions.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CloudWatch service alias (&lt;code&gt;&amp;quot;alb&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;ec2&amp;quot;&lt;/code&gt;, etc) or namespace name (&lt;code&gt;&amp;quot;AWS/EC2&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;AWS/S3&amp;quot;&lt;/code&gt;, etc). Refer to &lt;a href=&#34;#supported-services-in-discovery-jobs&#34;&gt;supported-services&lt;/a&gt; for a complete list.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;custom_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom tags to be added as a list of key / value pairs. When exported to Prometheus format, the label name follows the following format: &lt;code&gt;custom_tag_{key}&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;dimension_name_requirements&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of metric dimensions to query. Before querying metric values, the total list of metrics are filtered to only those that contain exactly this list of dimensions. If the list is empty or undefined, all dimension combinations are included.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delay&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Delay the start time of the CloudWatch metrics query by this duration.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;period&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Default period for metrics in this job.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5m&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;length&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Default length for metrics in this job.&lt;/td&gt;
              &lt;td&gt;Calculated based on &lt;code&gt;period&lt;/code&gt;. Refer to &lt;a href=&#34;#period-and-length&#34;&gt;period&lt;/a&gt; for details.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nil_to_zero&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt; metric values are converted to 0. Individual metrics can override this value in the [metric][] block.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;recently_active_only&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Only return metrics that have been active in the last 3 hours.&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;search_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of key/value pairs to use for tag filtering. All must match. The value can be a regular expression.&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;add_cloudwatch_timestamp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, use the timestamp from CloudWatch instead of the scrape time.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;static&#34;&gt;&lt;code&gt;static&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;static&lt;/code&gt; block configures the component to scrape a specific set of CloudWatch metrics.
The metrics need to be fully qualified with the following specifications:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;namespace&lt;/code&gt;: For example, &lt;code&gt;AWS/EC2&lt;/code&gt;, &lt;code&gt;AWS/EBS&lt;/code&gt;, &lt;code&gt;CoolApp&lt;/code&gt; if it were a custom metric, etc.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dimensions&lt;/code&gt;: CloudWatch identifies a metric by a set of dimensions, which are essentially label / value pairs.
For example, all &lt;code&gt;AWS/EC2&lt;/code&gt; metrics are identified by the &lt;code&gt;InstanceId&lt;/code&gt; dimension and the identifier itself.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;metric&lt;/code&gt;: Metric name and statistics.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The following example configuration shows you how to scrape the same metrics in the discovery example, but for a specific AWS EC2 instance:&lt;/p&gt;

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

    static &amp;#34;instances&amp;#34; {
        regions    = [&amp;#34;us-east-2&amp;#34;]
        namespace  = &amp;#34;AWS/EC2&amp;#34;
        dimensions = {
            &amp;#34;InstanceId&amp;#34; = &amp;#34;i01u29u12ue1u2c&amp;#34;,
        }

        metric {
            name       = &amp;#34;CPUUsage&amp;#34;
            statistics = [&amp;#34;Sum&amp;#34;, &amp;#34;Average&amp;#34;]
            period     = &amp;#34;1m&amp;#34;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As shown above, &lt;code&gt;static&lt;/code&gt; blocks must be specified with a label, which translates to the &lt;code&gt;name&lt;/code&gt; label in the exported metric.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;static &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    regions    = [&amp;#34;us-east-2&amp;#34;]
    namespace  = &amp;#34;AWS/EC2&amp;#34;
    // ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can configure the &lt;code&gt;static&lt;/code&gt; block one or multiple times to scrape metrics with different sets of &lt;code&gt;dimensions&lt;/code&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;dimensions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CloudWatch metric dimensions as a list of name / value pairs. Must uniquely define all metrics in this job.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CloudWatch metric namespace.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of AWS regions.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;custom_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom tags to be added as a list of key / value pairs. When exported to Prometheus format, the label name follows the following format: &lt;code&gt;custom_tag_{key}&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nil_to_zero&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt; metric values are converted to 0. Individual metrics can override this value in the [metric][] block.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;All dimensions must be specified when scraping single metrics like the example above.
For example, &lt;code&gt;AWS/Logs&lt;/code&gt; metrics require &lt;code&gt;Resource&lt;/code&gt;, &lt;code&gt;Service&lt;/code&gt;, &lt;code&gt;Class&lt;/code&gt;, and &lt;code&gt;Type&lt;/code&gt; dimensions to be specified.
The same applies to CloudWatch custom metrics, all dimensions attached to a metric when saved in CloudWatch are required.&lt;/p&gt;
&lt;h3 id=&#34;custom_namespace&#34;&gt;&lt;code&gt;custom_namespace&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;custom_namespace&lt;/code&gt; block allows the component to scrape CloudWatch metrics from custom namespaces using only the namespace name and a list of metrics under that namespace.
For example:&lt;/p&gt;

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

    custom_namespace &amp;#34;customEC2Metrics&amp;#34; {
        namespace = &amp;#34;CustomEC2Metrics&amp;#34;
        regions   = [&amp;#34;us-east-1&amp;#34;]

        metric {
            name       = &amp;#34;cpu_usage_idle&amp;#34;
            statistics = [&amp;#34;Average&amp;#34;]
            period     = &amp;#34;5m&amp;#34;
        }

        metric {
            name       = &amp;#34;disk_free&amp;#34;
            statistics = [&amp;#34;Average&amp;#34;]
            period     = &amp;#34;5m&amp;#34;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can configure the &lt;code&gt;custom_namespace&lt;/code&gt; block multiple times to scrape metrics from different namespaces.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CloudWatch metric namespace.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of AWS regions.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;custom_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom tags to be added as a list of key/value pairs. When exported to Prometheus format, the label name follows the following format: &lt;code&gt;custom_tag_{key}&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delay&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Delay the start time of the CloudWatch metrics query by this duration.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;period&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Default period for metrics in this job.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5m&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;length&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Default length for metrics in this job.&lt;/td&gt;
              &lt;td&gt;Calculated based on &lt;code&gt;period&lt;/code&gt;. Refer to &lt;a href=&#34;#period-and-length&#34;&gt;period&lt;/a&gt; for details.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;dimension_name_requirements&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of metric dimensions to query. Before querying metric values, the total list of metrics are filtered to only those that contain exactly this list of dimensions. If the list is empty or undefined, all dimension combinations are included.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nil_to_zero&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt; metric values are converted to 0. Individual metrics can override this value in the [metric][] block.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;recently_active_only&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Only return metrics that have been active in the last 3 hours.&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;add_cloudwatch_timestamp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, use the timestamp from CloudWatch instead of the scrape time.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;metric&#34;&gt;&lt;code&gt;metric&lt;/code&gt;&lt;/h3&gt;
&lt;span class=&#34;docs-labels__stage docs-labels__small docs-labels__item mr-half&#34;&gt;
  Required
  &lt;/span&gt;

&lt;p&gt;Represents an AWS Metric to scrape.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;metric&lt;/code&gt; block may be specified multiple times to define multiple target metrics.
Refer to the &lt;a href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/viewing_metrics_with_cloudwatch.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;View available metrics&lt;/a&gt; topic in the Amazon CloudWatch documentation for detailed metrics information.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Metric name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;period&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Refer to the &lt;a href=&#34;#period-and-length&#34;&gt;period&lt;/a&gt; section below.&lt;/td&gt;
              &lt;td&gt;The value of &lt;code&gt;period&lt;/code&gt; in the parent job.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;statistics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of statistics to scrape. For example, &lt;code&gt;&amp;quot;Minimum&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;Maximum&amp;quot;&lt;/code&gt;, etc.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;add_cloudwatch_timestamp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, use the timestamp from CloudWatch instead of the scrape time.&lt;/td&gt;
              &lt;td&gt;The value of &lt;code&gt;add_cloudwatch_timestamp&lt;/code&gt; in the parent job.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;length&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Refer to the &lt;a href=&#34;#period-and-length&#34;&gt;period&lt;/a&gt; section below.&lt;/td&gt;
              &lt;td&gt;The value of &lt;code&gt;length&lt;/code&gt; in the parent job.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nil_to_zero&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt; metric values are converted to 0.&lt;/td&gt;
              &lt;td&gt;The value of &lt;code&gt;nil_to_zero&lt;/code&gt; in the parent [static][] or [discovery][] block. &lt;code&gt;true&lt;/code&gt; if not set in the parent block.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h4 id=&#34;period-and-length&#34;&gt;&lt;code&gt;period&lt;/code&gt; and &lt;code&gt;length&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;period&lt;/code&gt; controls primarily the width of the time bucket used for aggregating metrics collected from CloudWatch.
&lt;code&gt;length&lt;/code&gt; controls how far back in time CloudWatch metrics are considered during each Alloy scrape.
If both settings are configured, the time parameters when calling CloudWatch APIs works as follows:&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
    style=&#34;max-width: 1259px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link&#34;
        href=&#34;/media/docs/alloy/cloudwatch-period-and-length-time-model-2.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload &#34;
          data-src=&#34;/media/docs/alloy/cloudwatch-period-and-length-time-model-2.png&#34;data-srcset=&#34;/media/docs/alloy/cloudwatch-period-and-length-time-model-2.png?w=320 320w, /media/docs/alloy/cloudwatch-period-and-length-time-model-2.png?w=550 550w, /media/docs/alloy/cloudwatch-period-and-length-time-model-2.png?w=750 750w, /media/docs/alloy/cloudwatch-period-and-length-time-model-2.png?w=900 900w, /media/docs/alloy/cloudwatch-period-and-length-time-model-2.png?w=1040 1040w, /media/docs/alloy/cloudwatch-period-and-length-time-model-2.png?w=1240 1240w, /media/docs/alloy/cloudwatch-period-and-length-time-model-2.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;An example of a CloudWatch period and length time model&#34;width=&#34;1259&#34;height=&#34;728&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/media/docs/alloy/cloudwatch-period-and-length-time-model-2.png&#34;
            alt=&#34;An example of a CloudWatch period and length time model&#34;width=&#34;1259&#34;height=&#34;728&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;If, across multiple metrics under the same static or discovery job, there&amp;rsquo;s a different &lt;code&gt;period&lt;/code&gt; or &lt;code&gt;length&lt;/code&gt;, the minimum of all periods, and maximum of all lengths is configured.&lt;/p&gt;
&lt;p&gt;On the other hand, if &lt;code&gt;length&lt;/code&gt; isn&amp;rsquo;t configured, both period and length settings are calculated based on the required &lt;code&gt;period&lt;/code&gt; configuration attribute.&lt;/p&gt;
&lt;p&gt;If all metrics within a job (discovery or static) have the same &lt;code&gt;period&lt;/code&gt; value configured, CloudWatch APIs are requested for metrics from the scrape time, to &lt;code&gt;period&lt;/code&gt; seconds in the past.
The values of these are exported to Prometheus.&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
    style=&#34;max-width: 776px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link&#34;
        href=&#34;/media/docs/alloy/cloudwatch-single-period-time-model.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload &#34;
          data-src=&#34;/media/docs/alloy/cloudwatch-single-period-time-model.png&#34;data-srcset=&#34;/media/docs/alloy/cloudwatch-single-period-time-model.png?w=320 320w, /media/docs/alloy/cloudwatch-single-period-time-model.png?w=550 550w, /media/docs/alloy/cloudwatch-single-period-time-model.png?w=750 750w, /media/docs/alloy/cloudwatch-single-period-time-model.png?w=900 900w, /media/docs/alloy/cloudwatch-single-period-time-model.png?w=1040 1040w, /media/docs/alloy/cloudwatch-single-period-time-model.png?w=1240 1240w, /media/docs/alloy/cloudwatch-single-period-time-model.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;An example of a CloudWatch single period and time model&#34;width=&#34;776&#34;height=&#34;402&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/media/docs/alloy/cloudwatch-single-period-time-model.png&#34;
            alt=&#34;An example of a CloudWatch single period and time model&#34;width=&#34;776&#34;height=&#34;402&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;On the other hand, if metrics with different &lt;code&gt;period&lt;/code&gt;s are configured under an individual job, this works differently.
First, two variables are calculated aggregating all periods: &lt;code&gt;length&lt;/code&gt;, taking the maximum value of all periods, and the new &lt;code&gt;period&lt;/code&gt; value, taking the minimum of all periods.
Then, CloudWatch APIs are requested for metrics from &lt;code&gt;now - length&lt;/code&gt; to &lt;code&gt;now&lt;/code&gt;, aggregating each in samples for &lt;code&gt;period&lt;/code&gt; seconds. For each metric, the most recent sample is exported to CloudWatch.&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
    style=&#34;max-width: 822px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link&#34;
        href=&#34;/media/docs/alloy/cloudwatch-multiple-period-time-model.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload &#34;
          data-src=&#34;/media/docs/alloy/cloudwatch-multiple-period-time-model.png&#34;data-srcset=&#34;/media/docs/alloy/cloudwatch-multiple-period-time-model.png?w=320 320w, /media/docs/alloy/cloudwatch-multiple-period-time-model.png?w=550 550w, /media/docs/alloy/cloudwatch-multiple-period-time-model.png?w=750 750w, /media/docs/alloy/cloudwatch-multiple-period-time-model.png?w=900 900w, /media/docs/alloy/cloudwatch-multiple-period-time-model.png?w=1040 1040w, /media/docs/alloy/cloudwatch-multiple-period-time-model.png?w=1240 1240w, /media/docs/alloy/cloudwatch-multiple-period-time-model.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;An example of a CloudWatch multiple period and time model&#34;width=&#34;822&#34;height=&#34;482&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/media/docs/alloy/cloudwatch-multiple-period-time-model.png&#34;
            alt=&#34;An example of a CloudWatch multiple period and time model&#34;width=&#34;822&#34;height=&#34;482&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;h3 id=&#34;role&#34;&gt;&lt;code&gt;role&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Represents an &lt;a href=&#34;https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS IAM Role&lt;/a&gt;.
If omitted, the AWS role that corresponds to the credentials configured in the environment is used.&lt;/p&gt;
&lt;p&gt;Multiple roles can be useful when scraping metrics from different AWS accounts with a single pair of credentials.
In this case, a different role is configured for Alloy to assume before calling AWS APIs.
Therefore, the credentials configured in the system need permission to assume the target role.
Refer to &lt;a href=&#34;https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_permissions-to-switch.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Granting a user permissions to switch roles&lt;/a&gt; in the AWS IAM documentation for more information about how to configure this.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;external_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;External ID used when calling STS AssumeRole API. Refer to the &lt;a href=&#34;https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;IAM User Guide&lt;/a&gt; for more information.&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;role_arn&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS IAM Role ARN the exporter should assume to perform AWS API calls.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;decoupled_scraping&#34;&gt;&lt;code&gt;decoupled_scraping&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;decoupled_scraping&lt;/code&gt; block configures an optional feature that scrapes CloudWatch metrics in the background on a scheduled interval.
When this feature is enabled, CloudWatch metrics are gathered asynchronously at the scheduled interval instead of synchronously when the CloudWatch component is scraped.&lt;/p&gt;
&lt;p&gt;The decoupled scraping feature reduces the number of API requests sent to AWS.
This feature also prevents component scrape timeouts when you gather high volumes of CloudWatch metrics.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls whether the decoupled scraping featured is enabled&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls how frequently to asynchronously gather new CloudWatch metrics&lt;/td&gt;
              &lt;td&gt;5m&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;For detailed examples, refer to the [discovery][] and [static] sections.&lt;/p&gt;
&lt;h2 id=&#34;supported-services-in-discovery-jobs&#34;&gt;Supported services in discovery jobs&lt;/h2&gt;
&lt;p&gt;The following AWS services are supported in &lt;code&gt;cloudwatch_exporter&lt;/code&gt; discovery jobs.
When you configure a discovery job, make sure the &lt;code&gt;type&lt;/code&gt; field of each &lt;code&gt;discovery_job&lt;/code&gt; matches the desired job namespace.&lt;/p&gt;
&lt;div class=&#34;column-list&#34;&gt;
  &lt;ul&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/Endpoints&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/InferenceRecommendationsJobs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/ProcessingJobs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/TrainingJobs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;/aws/sagemaker/TransformJobs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AmazonMWAA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ACMPrivateCA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AmazonMQ&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AOSS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ApiGateway&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ApplicationELB&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AppRunner&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AppStream&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AppSync&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Athena&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/AutoScaling&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Backup&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Bedrock&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Billing&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Cassandra&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/CertificateManager&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ClientVPN&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/CloudFront&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Cognito&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DataSync&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DDoSProtection&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DMS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DocDB&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DX&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/DynamoDB&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EBS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EC2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EC2CapacityReservations&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EC2Spot&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ECR&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ECS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EFS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ElastiCache&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ElasticBeanstalk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ElasticMapReduce&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ELB&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/EMRServerless&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/ES&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Events&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Firehose&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/FSx&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/GameLift&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/GatewayELB&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/GlobalAccelerator&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/IoT&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/IPAM&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Kafka&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/KafkaConnect&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Kinesis&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/KinesisAnalytics&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/KMS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Lambda&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Logs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MediaConnect&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MediaConvert&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MediaLive&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MediaPackage&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MediaTailor&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MemoryDB&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/MWAA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/NATGateway&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Neptune&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Network Manager&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/NetworkELB&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/NetworkFirewall&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/PrivateLinkEndpoints&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/PrivateLinkServices&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Prometheus&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/QLDB&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/QuickSight&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/RDS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Redshift&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Route53&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Route53Resolver&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/RUM&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/S3&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/SageMaker&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Sagemaker/ModelBuildingPipeline&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Scheduler&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/SecretsManager&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/SES&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/SNS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/SQS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/States&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/StorageGateway&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Timestream&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/TransitGateway&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/TrustedAdvisor&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/Usage&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/VpcLattice&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/VPN&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/WAFV2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;AWS/WorkSpaces&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;ContainerInsights&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;CWAgent&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;ECS/ContainerInsights&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Namespace: &lt;code&gt;Glue&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.cloudwatch&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportercloudwatch">&lt;code>prometheus.exporter.cloudwatch&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.cloudwatch&lt;/code> component embeds &lt;a href="https://github.com/prometheus-community/yet-another-cloudwatch-exporter" target="_blank" rel="noopener noreferrer">&lt;code>yet-another-cloudwatch-exporter&lt;/code>&lt;/a>, letting you collect &lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html" target="_blank" rel="noopener noreferrer">Amazon CloudWatch metrics&lt;/a> in a Prometheus-compatible format.&lt;/p>
&lt;p>This component lets you scrape CloudWatch metrics in a set of configurations called &lt;em>jobs&lt;/em>.
There are two kinds of jobs: [discovery][] and [static][].&lt;/p></description></item><item><title>prometheus.exporter.consul</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.consul/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.consul/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterconsul&#34;&gt;&lt;code&gt;prometheus.exporter.consul&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.consul&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus/consul_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;consul_exporter&lt;/code&gt;&lt;/a&gt; for collecting metrics from a Consul installation.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.consul &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.consul&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allow_stale&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allows any Consul server (non-leader) to service a read.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File path to a PEM-encoded certificate authority used to validate the authenticity of a server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File path to a PEM-encoded certificate used with the private key to verify the exporter&amp;rsquo;s authenticity.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;concurrent_request_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit the maximum number of concurrent requests to consul, 0 means no limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;generate_health_summary&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collects information about each registered service and exports &lt;code&gt;consul_catalog_service_node_healthy&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable TLS host verification.&lt;/td&gt;
              &lt;td&gt;&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;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File path to a PEM-encoded private key used with the certificate to verify the exporter&amp;rsquo;s authenticity.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kv_filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Only store keys that match this regular expression pattern.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;.*&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kv_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Prefix under which to look for KV pairs.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;require_consistent&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Forces the read to be fully consistent.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When provided, this overrides the hostname for the TLS certificate. It can be used to ensure that the certificate name matches the hostname you declare.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address (host and port) of the Consul instance to connect to. This could be a local Alloy (localhost:8500), or the address of a Consul server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;http://localhost:8500&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout on HTTP requests to consul.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;500ms&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.consul&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.consul&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.consul&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific
debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.consul&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific
debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt; component to collect metrics from &lt;code&gt;prometheus.exporter.consul&lt;/code&gt;:&lt;/p&gt;

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

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterconsul">&lt;code>prometheus.exporter.consul&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.consul&lt;/code> component embeds the &lt;a href="https://github.com/prometheus/consul_exporter" target="_blank" rel="noopener noreferrer">&lt;code>consul_exporter&lt;/code>&lt;/a> for collecting metrics from a Consul installation.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.consul &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.consul&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.databricks</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.databricks/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.databricks/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterdatabricks&#34;&gt;&lt;code&gt;prometheus.exporter.databricks&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.databricks&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/grafana/databricks-prometheus-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;databricks_exporter&lt;/code&gt;&lt;/a&gt; for collecting billing, jobs, pipelines, and SQL warehouse metrics from Databricks System Tables via HTTP for Prometheus consumption.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.databricks &amp;#34;LABEL&amp;#34; {
    server_hostname     = &amp;#34;&amp;lt;DATABRICKS_SERVER_HOSTNAME&amp;gt;&amp;#34;
    warehouse_http_path = &amp;#34;&amp;lt;DATABRICKS_WAREHOUSE_HTTP_PATH&amp;gt;&amp;#34;
    client_id           = &amp;#34;&amp;lt;DATABRICKS_CLIENT_ID&amp;gt;&amp;#34;
    client_secret       = &amp;#34;&amp;lt;DATABRICKS_CLIENT_SECRET&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.databricks&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The OAuth2 Application ID or Client ID of your Service Principal.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The OAuth2 Client Secret of your Service Principal.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_hostname&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Databricks workspace hostname, for example, &lt;code&gt;dbc-xxx.cloud.databricks.com&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;warehouse_http_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The HTTP path of the SQL Warehouse for example, &lt;code&gt;/sql/1.0/warehouses/abc123&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;billing_lookback&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How far back to look for billing data.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;24h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;collect_task_retries&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect task retry metrics. Can cause high cardinality due to the &lt;code&gt;task_key&lt;/code&gt; label.&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;jobs_lookback&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How far back to look for job runs.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;3h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pipelines_lookback&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How far back to look for pipeline runs.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;3h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;queries_lookback&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How far back to look for SQL warehouse queries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;query_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for individual SQL queries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sla_threshold_seconds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Duration threshold in seconds for job SLA miss detection.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;3600&lt;/code&gt;&lt;/td&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;lookback-windows&#34;&gt;Lookback windows&lt;/h3&gt;
&lt;p&gt;The exporter queries Databricks System Tables using SQL with sliding time windows. Each scrape collects data from &lt;code&gt;now - lookback&lt;/code&gt; to &lt;code&gt;now&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;billing_lookback&lt;/code&gt;&lt;/strong&gt;: Queries &lt;code&gt;system.billing.usage&lt;/code&gt; for DBU consumption and cost estimates. Databricks billing data typically has 24-48 hour lag.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;jobs_lookback&lt;/code&gt;&lt;/strong&gt;: Queries &lt;code&gt;system.lakeflow.job_run_timeline&lt;/code&gt; for job run counts, durations, and status.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;pipelines_lookback&lt;/code&gt;&lt;/strong&gt;: Queries &lt;code&gt;system.lakeflow.pipeline_event_log&lt;/code&gt; for DLT pipeline metrics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;queries_lookback&lt;/code&gt;&lt;/strong&gt;: Queries &lt;code&gt;system.query.history&lt;/code&gt; for SQL warehouse query metrics.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The lookback window should be at least 2x the &lt;code&gt;scrape_interval&lt;/code&gt; to ensure data continuity between scrapes. For example, with a 10-minute scrape interval, use at least 20 minutes of lookback.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.databricks&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.databricks&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.databricks&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.databricks&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before using this component, you need:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Databricks Workspace&lt;/strong&gt; with Unity Catalog and System Tables enabled&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Service Principal&lt;/strong&gt; with OAuth2 M2M authentication configured&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SQL Warehouse&lt;/strong&gt; for querying System Tables and serverless is recommended for cost efficiency&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Refer to the &lt;a href=&#34;https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Databricks documentation&lt;/a&gt; for detailed OAuth2 M2M setup instructions.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt; component to collect metrics from &lt;code&gt;prometheus.exporter.databricks&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.databricks &amp;#34;example&amp;#34; {
  server_hostname     = &amp;#34;dbc-abc123-def456.cloud.databricks.com&amp;#34;
  warehouse_http_path = &amp;#34;/sql/1.0/warehouses/xyz789&amp;#34;
  client_id           = &amp;#34;my-service-principal-id&amp;#34;
  client_secret       = &amp;#34;my-service-principal-secret&amp;#34;
}

// Configure a prometheus.scrape component to collect databricks metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets         = prometheus.exporter.databricks.example.targets
  forward_to      = [prometheus.remote_write.demo.receiver]
  scrape_interval = &amp;#34;10m&amp;#34;
  scrape_timeout  = &amp;#34;9m&amp;#34;
}

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

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;tuning-recommendations&#34;&gt;Tuning recommendations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;scrape_interval&lt;/code&gt;&lt;/strong&gt;: Use 10-30 minutes. The exporter queries Databricks System Tables which can be slow. Increase the &lt;code&gt;scrape_interval&lt;/code&gt; to reduce your SQL Warehouse costs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;scrape_timeout&lt;/code&gt;&lt;/strong&gt;: Must be less than &lt;code&gt;scrape_interval&lt;/code&gt;. The exporter typically takes 90-120 seconds per scrape depending on data volume.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lookback vs interval&lt;/strong&gt;: The lookback windows should be at least 2x the scrape interval. The defaults, &lt;code&gt;3h&lt;/code&gt; for jobs and pipelines, and &lt;code&gt;2h&lt;/code&gt; for queries, work well with 10-30 minute scrape intervals.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;high-cardinality-warning&#34;&gt;High cardinality warning&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;collect_task_retries&lt;/code&gt; flag adds task-level retry metrics which can significantly increase cardinality for workspaces with many jobs.
Only enable this feature if you really need it.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.databricks&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterdatabricks">&lt;code>prometheus.exporter.databricks&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.databricks&lt;/code> component embeds the &lt;a href="https://github.com/grafana/databricks-prometheus-exporter" target="_blank" rel="noopener noreferrer">&lt;code>databricks_exporter&lt;/code>&lt;/a> for collecting billing, jobs, pipelines, and SQL warehouse metrics from Databricks System Tables via HTTP for Prometheus consumption.&lt;/p></description></item><item><title>prometheus.exporter.dnsmasq</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.dnsmasq/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.dnsmasq/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterdnsmasq&#34;&gt;&lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/google/dnsmasq_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;dnsmasq_exporter&lt;/code&gt;&lt;/a&gt; for collecting statistics from a dnsmasq server.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.dnsmasq &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The address of the dnsmasq server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;localhost:53&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;expose_leases&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Expose dnsmasq leases as metrics (high cardinality).&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;leases_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the dnsmasq leases file.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/var/lib/misc/dnsmasq.leases&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific
debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific
debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.dnsmasq&lt;/code&gt;:&lt;/p&gt;

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

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterdnsmasq">&lt;code>prometheus.exporter.dnsmasq&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.dnsmasq&lt;/code> component embeds the &lt;a href="https://github.com/google/dnsmasq_exporter" target="_blank" rel="noopener noreferrer">&lt;code>dnsmasq_exporter&lt;/code>&lt;/a> for collecting statistics from a dnsmasq server.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.dnsmasq &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.dnsmasq&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.elasticsearch</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.elasticsearch/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.elasticsearch/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterelasticsearch&#34;&gt;&lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus-community/elasticsearch_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;elasticsearch_exporter&lt;/code&gt;&lt;/a&gt; for the collection of metrics from ElasticSearch servers.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Currently, Alloy can only collect metrics from a single ElasticSearch server.
However, the exporter can collect the metrics from all nodes through that server configured.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;We strongly recommend that you configure a separate user for Alloy, and give it only the strictly mandatory security privileges necessary for monitoring your node.
Refer to the &lt;a href=&#34;https://github.com/prometheus-community/elasticsearch_exporter#elasticsearch-7x-security-privileges&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Elasticsearch security privileges&lt;/a&gt; documentation for more information.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.elasticsearch &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    address = &amp;#34;&amp;lt;ELASTICSEARCH_ADDRESS&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP API address of an Elasticsearch node.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;http://localhost:9200&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;aliases&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Include informational aliases metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;all&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for all nodes in the cluster. If used, this flag overrides the flag &lt;code&gt;node&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to PEM file that contains trusted Certificate Authorities for the Elasticsearch connection.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_cert&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to PEM file that contains the corresponding cert for the private key to connect to Elasticsearch.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_private_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to PEM file that contains the private key for client auth when connecting to Elasticsearch.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cluster_settings&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for cluster settings.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;clusterinfo_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Cluster info update interval for the cluster label.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;data_stream&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for Data Streams.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;indices_settings&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for settings of all indices of the cluster.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;indices&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for indices in the cluster.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;node&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Node&amp;rsquo;s name of which metrics should be exposed&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;shards&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for shards in the cluster (implies indices).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;slm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for SLM (Snapshot Lifecycle Management).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;snapshots&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Export stats for the cluster snapshots.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ssl_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Skip SSL verification when connecting to Elasticsearch.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for trying to get stats from Elasticsearch.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following block with &lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 1;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure \u003ccode\u003ebasic_auth\u003c/code\u003e for authenticating to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure &lt;code&gt;basic_auth&lt;/code&gt; for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;password_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;password&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.elasticsearch&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.elasticsearch &amp;#34;example&amp;#34; {
  address = &amp;#34;http://localhost:9200&amp;#34;
  basic_auth {
    username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
    password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
  }
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterelasticsearch">&lt;code>prometheus.exporter.elasticsearch&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.elasticsearch&lt;/code> component embeds the &lt;a href="https://github.com/prometheus-community/elasticsearch_exporter" target="_blank" rel="noopener noreferrer">&lt;code>elasticsearch_exporter&lt;/code>&lt;/a> for the collection of metrics from ElasticSearch servers.&lt;/p>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>Currently, Alloy can only collect metrics from a single ElasticSearch server.
However, the exporter can collect the metrics from all nodes through that server configured.&lt;/p></description></item><item><title>prometheus.exporter.gcp</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.gcp/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.gcp/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportergcp&#34;&gt;&lt;code&gt;prometheus.exporter.gcp&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.gcp&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus-community/stackdriver_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;stackdriver_exporter&lt;/code&gt;&lt;/a&gt;.
You can use this component to collect &lt;a href=&#34;https://cloud.google.com/monitoring/docs&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP Cloud Monitoring (formerly stackdriver)&lt;/a&gt; metrics, translate them to Prometheus-compatible format, and remote write.
The component supports all metrics available through the &lt;a href=&#34;https://cloud.google.com/monitoring/api/metrics_gcp&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP monitoring API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Metric names follow the template &lt;code&gt;stackdriver_&amp;lt;monitored_resource&amp;gt;_&amp;lt;metric_type_prefix&amp;gt;_&amp;lt;metric_type&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following example shows a load balancing metric:&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
    style=&#34;max-width: 884px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link&#34;
        href=&#34;/media/docs/alloy/gcp-exporter-config-metric-example.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload &#34;
          data-src=&#34;/media/docs/alloy/gcp-exporter-config-metric-example.png&#34;data-srcset=&#34;/media/docs/alloy/gcp-exporter-config-metric-example.png?w=320 320w, /media/docs/alloy/gcp-exporter-config-metric-example.png?w=550 550w, /media/docs/alloy/gcp-exporter-config-metric-example.png?w=750 750w, /media/docs/alloy/gcp-exporter-config-metric-example.png?w=900 900w, /media/docs/alloy/gcp-exporter-config-metric-example.png?w=1040 1040w, /media/docs/alloy/gcp-exporter-config-metric-example.png?w=1240 1240w, /media/docs/alloy/gcp-exporter-config-metric-example.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Example GCP exporter configuration metric&#34;width=&#34;884&#34;height=&#34;376&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/media/docs/alloy/gcp-exporter-config-metric-example.png&#34;
            alt=&#34;Example GCP exporter configuration metric&#34;width=&#34;884&#34;height=&#34;376&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;The metric has the following attributes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;monitored_resource&lt;/code&gt; = &lt;code&gt;https_lb_rule&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;metric_type_prefix&lt;/code&gt; = &lt;code&gt;loadbalancing.googleapis.com/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;metric_type&lt;/code&gt; = &lt;code&gt;https/backend_latencies&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These attributes result in a final metric name of &lt;code&gt;stackdriver_https_lb_rule_loadbalancing_googleapis_com_https_backend_latencies&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;authentication&#34;&gt;Authentication&lt;/h2&gt;
&lt;p&gt;Alloy must be running in an environment with access to the GCP project it&amp;rsquo;s scraping.
The exporter uses the Google Golang Client Library, which offers a variety of ways to &lt;a href=&#34;https://developers.google.com/identity/protocols/application-default-credentials&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;provide credentials&lt;/a&gt;.
Choose the option that works best for you.&lt;/p&gt;
&lt;p&gt;After deciding how Alloy obtains credentials, ensure the account is set up with the IAM role &lt;code&gt;roles/monitoring.viewer&lt;/code&gt;.
Since the exporter gathers all of its data from &lt;a href=&#34;https://cloud.google.com/monitoring/api/v3&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP monitoring APIs&lt;/a&gt;, this is the only permission needed.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.gcp &amp;#34;pubsub&amp;#34; {
        project_ids = [
                &amp;#34;&amp;lt;PROJECT_ID_1&amp;gt;&amp;#34;,
                &amp;#34;&amp;lt;PROJECT_ID_2&amp;gt;&amp;#34;,
        ]

        metrics_prefixes = [
                &amp;#34;pubsub.googleapis.com/snapshot&amp;#34;,
                &amp;#34;pubsub.googleapis.com/subscription/num_undelivered_messages&amp;#34;,
                &amp;#34;pubsub.googleapis.com/subscription/oldest_unacked_message_age&amp;#34;,
        ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.gcp&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics_prefixes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;One or more values from the supported &lt;a href=&#34;https://cloud.google.com/monitoring/api/metrics_gcp&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP Metrics&lt;/a&gt;. These can be as targeted or loose as needed.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;project_ids&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configure the GCP Projects to scrape for metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drop_delegated_projects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When enabled drops metrics from attached projects and only fetches metrics from the explicitly configured &lt;code&gt;project_ids&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;extra_filters&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to refine the resources you would like to collect metrics from. Any string value within a filter string must be enclosed in escaped double-quotes. The structure for these filters is &lt;code&gt;&amp;lt;targeted_metric_prefix&amp;gt;:&amp;lt;filter_query&amp;gt;&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gcp_client_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sets a timeout on the client used to make API calls to GCP. A single scrape can initiate numerous calls to GCP, so be mindful if you choose to override this value.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;15s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ingest_delay&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When enabled, this automatically adjusts the time range used when querying for metrics backwards based on the metadata GCP has published for how long the data can take to be ingested.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;request_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time range used when querying for metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;request_offset&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When enabled this offsets the time range used when querying for metrics by a set amount.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;

&lt;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;If you are supplying a list of strings for the &lt;code&gt;extra_filters&lt;/code&gt; argument, any string values within a particular filter string must be enclosed in escaped double quotes.
For example, &lt;code&gt;loadbalancing.googleapis.com:resource.labels.backend_target_name=&amp;quot;sample-value&amp;quot;&lt;/code&gt; must be encoded as &lt;code&gt;&amp;quot;loadbalancing.googleapis.com:resource.labels.backend_target_name=\&amp;quot;sample-value\&amp;quot;&amp;quot;&lt;/code&gt; in the Alloy configuration.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;For &lt;code&gt;extra_filters&lt;/code&gt;, the &lt;code&gt;targeted_metric_prefix&lt;/code&gt; is used to ensure the filter is only applied to the metric_prefix(es) where it makes sense.
It doesn&amp;rsquo;t explicitly have to match a value from &lt;code&gt;metric_prefixes&lt;/code&gt;, but the &lt;code&gt;targeted_metric_prefix&lt;/code&gt; must be at least a prefix to one or more &lt;code&gt;metric_prefixes&lt;/code&gt;.
The &lt;code&gt;filter_query&lt;/code&gt; is applied to a final metrics API query when querying for metric data.
The final query sent to the metrics API already includes filters for project and metric type.
Each applicable &lt;code&gt;filter_query&lt;/code&gt; is appended to the query with an AND.
You can read more about the metric API filter options in the &lt;a href=&#34;https://cloud.google.com/monitoring/api/v3/filters&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GCP documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For &lt;code&gt;request_interval&lt;/code&gt;, most of the time the default works perfectly fine.
Most documented metrics include a comments of the form &lt;code&gt;Sampled every X seconds. After sampling, data is not visible for up to Y seconds.&lt;/code&gt;
As long as your &lt;code&gt;request_interval&lt;/code&gt; is &amp;gt;= &lt;code&gt;Y&lt;/code&gt; you should have no issues.
Consider using &lt;code&gt;ingest_delay&lt;/code&gt; if you would like this to be done programmatically or are gathering slower moving metrics.&lt;/p&gt;
&lt;p&gt;For &lt;code&gt;ingest_delay&lt;/code&gt;, you can find the values for this in documented metrics as &lt;code&gt;After sampling, data is not visible for up to Y seconds.&lt;/code&gt;
Since the GCP ingestion delay is an &amp;ldquo;at worst&amp;rdquo;, this is off by default to ensure data is gathered as soon as it&amp;rsquo;s available.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.gcp&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.gcp&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.gcp&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.gcp&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.gcp &amp;#34;pubsub_full_config&amp;#34; {
        project_ids = [
                &amp;#34;foo&amp;#34;,
                &amp;#34;bar&amp;#34;,
        ]

        // Using pubsub metrics (https://cloud.google.com/monitoring/api/metrics_gcp/gcp-pubsub) as an example
        // all metrics.
        //   [
        //     &amp;#34;pubsub.googleapis.com/&amp;#34;
        //   ]
        // all snapshot specific metrics
        //   [
        //     &amp;#34;pubsub.googleapis.com/snapshot&amp;#34;
        //   ]
        // all snapshot specific metrics and a few subscription metrics
        metrics_prefixes = [
                &amp;#34;pubsub.googleapis.com/snapshot&amp;#34;,
                &amp;#34;pubsub.googleapis.com/subscription/num_undelivered_messages&amp;#34;,
                &amp;#34;pubsub.googleapis.com/subscription/oldest_unacked_message_age&amp;#34;,
        ]

        // Given the above metrics_prefixes list, some examples of
        // targeted_metric_prefix option behavior with respect to the filter string
        // format &amp;lt;targeted_metric_prefix&amp;gt;:&amp;lt;filter_query&amp;gt; would be:
        //   pubsub.googleapis.com (apply to all defined prefixes)
        //   pubsub.googleapis.com/snapshot (apply to only snapshot metrics)
        //   pubsub.googleapis.com/subscription (apply to only subscription metrics)
        //   pubsub.googleapis.com/subscription/num_undelivered_messages (apply to only the specific subscription metric)
        extra_filters = [
                &amp;#34;pubsub.googleapis.com/subscription:resource.labels.subscription_id=monitoring.regex.full_match(\&amp;#34;my-subs-prefix.*\&amp;#34;)&amp;#34;,
        ]

        request_interval        = &amp;#34;5m&amp;#34;
        request_offset          = &amp;#34;0s&amp;#34;
        ingest_delay            = false
        drop_delegated_projects = false
        gcp_client_timeout      = &amp;#34;15s&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.gcp &amp;#34;lb_with_filter&amp;#34; {
        project_ids = [
                &amp;#34;foo&amp;#34;,
                &amp;#34;bar&amp;#34;,
        ]
        metrics_prefixes = [
                &amp;#34;loadbalancing.googleapis.com&amp;#34;,
        ]
        extra_filters = [
                &amp;#34;loadbalancing.googleapis.com:resource.labels.backend_target_name=\&amp;#34;sample-value\&amp;#34;&amp;#34;,
        ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.gcp &amp;#34;lb_subset_with_filter&amp;#34; {
        project_ids = [
                &amp;#34;foo&amp;#34;,
                &amp;#34;bar&amp;#34;,
        ]
        metrics_prefixes = [
                &amp;#34;loadbalancing.googleapis.com/https/request_bytes_count&amp;#34;,
                &amp;#34;loadbalancing.googleapis.com/https/total_latencies&amp;#34;,
        ]
        extra_filters = [
                &amp;#34;loadbalancing.googleapis.com:resource.labels.backend_target_name=\&amp;#34;sample-value\&amp;#34;&amp;#34;,
        ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.gcp&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportergcp">&lt;code>prometheus.exporter.gcp&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.gcp&lt;/code> component embeds the &lt;a href="https://github.com/prometheus-community/stackdriver_exporter" target="_blank" rel="noopener noreferrer">&lt;code>stackdriver_exporter&lt;/code>&lt;/a>.
You can use this component to collect &lt;a href="https://cloud.google.com/monitoring/docs" target="_blank" rel="noopener noreferrer">GCP Cloud Monitoring (formerly stackdriver)&lt;/a> metrics, translate them to Prometheus-compatible format, and remote write.
The component supports all metrics available through the &lt;a href="https://cloud.google.com/monitoring/api/metrics_gcp" target="_blank" rel="noopener noreferrer">GCP monitoring API&lt;/a>.&lt;/p></description></item><item><title>prometheus.exporter.github</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.github/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.github/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportergithub&#34;&gt;&lt;code&gt;prometheus.exporter.github&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.github&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/githubexporter/github-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;github_exporter&lt;/code&gt;&lt;/a&gt; for collecting statistics from GitHub.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.github &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.github&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing API token to use to authenticate against GitHub.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;API token to use to authenticate against GitHub.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The full URI of the GitHub API.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;https://api.github.com&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;github_app_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The GitHub App ID for 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;github_app_installation_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The GitHub App installation ID for 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;github_app_key_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the GitHub App private key file.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;github_rate_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Threshold for GitHub App rate limit to trigger re-authentication.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;15000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;organizations&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;GitHub organizations for which to collect metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;repositories&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;GitHub repositories for which to collect metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;users&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of GitHub users for which to collect metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;authentication&#34;&gt;Authentication&lt;/h3&gt;
&lt;p&gt;GitHub uses an aggressive rate limit for unauthenticated requests based on IP address.
To allow more API requests, we recommend that you configure either token or GitHub App authentication.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Token authentication&lt;/strong&gt;: Set &lt;code&gt;api_token&lt;/code&gt; or &lt;code&gt;api_token_file&lt;/code&gt; with a personal access token or classic token.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub App authentication&lt;/strong&gt;: Set &lt;code&gt;github_app_id&lt;/code&gt;, &lt;code&gt;github_app_installation_id&lt;/code&gt;, and &lt;code&gt;github_app_key_path&lt;/code&gt; to authenticate as a GitHub App.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When provided, &lt;code&gt;api_token_file&lt;/code&gt; takes precedence over &lt;code&gt;api_token&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can&amp;rsquo;t use both token authentication and GitHub App authentication simultaneously.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.github&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.github&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.github&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.github&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples demonstrate token authentication and GitHub App authentication.&lt;/p&gt;
&lt;h3 id=&#34;token-authentication&#34;&gt;Token authentication&lt;/h3&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt; component to collect metrics from &lt;code&gt;prometheus.exporter.github&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.github &amp;#34;example&amp;#34; {
  api_token_file = &amp;#34;/etc/github-api-token&amp;#34;
  repositories   = [&amp;#34;grafana/alloy&amp;#34;]
}

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

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

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;github-app-authentication&#34;&gt;GitHub App authentication&lt;/h3&gt;
&lt;p&gt;The following example uses GitHub App authentication to collect metrics:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.github &amp;#34;example&amp;#34; {
  repositories                 = [&amp;#34;grafana/alloy&amp;#34;]
  github_app_id                = 123456
  github_app_installation_id   = 789012
  github_app_key_path          = &amp;#34;/etc/github-app-key.pem&amp;#34;
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportergithub">&lt;code>prometheus.exporter.github&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.github&lt;/code> component embeds the &lt;a href="https://github.com/githubexporter/github-exporter" target="_blank" rel="noopener noreferrer">&lt;code>github_exporter&lt;/code>&lt;/a> for collecting statistics from GitHub.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.github &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.github&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.kafka</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.kafka/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.kafka/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterkafka&#34;&gt;&lt;code&gt;prometheus.exporter.kafka&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.kafka&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/grafana/kafka_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;kafka_exporter&lt;/code&gt;&lt;/a&gt; for collecting metrics from a Kafka server.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.kafka &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    kafka_uris = &amp;#34;&amp;lt;KAFKA_URI_LIST&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.kafka&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kafka_uris&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;array(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address array (host:port) of Kafka server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allow_auto_topic_creation&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If true, the broker may auto-create topics that you requested which don&amp;rsquo;t already exist.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allow_concurrency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set to true, all scrapes trigger Kafka operations. Otherwise, they share results. WARNING: Disable this on large clusters.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The optional certificate authority file for TLS client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The optional certificate file for TLS client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;groups_exclude_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regex that determines which consumer groups to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&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;groups_filter_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regex filter for consumer groups to be monitored.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&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;gssapi_kerberos_auth_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos auth type. Either &lt;code&gt;keytabAuth&lt;/code&gt; or &lt;code&gt;userAuth&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gssapi_kerberos_config_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos configuration path.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gssapi_key_tab_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos keytab file path.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gssapi_realm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kerberos realm.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gssapi_service_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Service name when using Kerberos Authorization&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set to true, the server&amp;rsquo;s certificate isn&amp;rsquo;t checked for validity. This makes your HTTPS connections insecure.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;instance&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The&lt;code&gt;instance&lt;/code&gt;label for metrics, default is the hostname:port of the first &lt;code&gt;kafka_uris&lt;/code&gt;. You must manually provide the instance value if there is more than one string in &lt;code&gt;kafka_uris&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kafka_cluster_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kafka cluster name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kafka_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Kafka broker version.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2.0.0&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The optional key file for TLS client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_offsets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of offsets to store in the interpolation table for a partition.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metadata_refresh_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Metadata refresh interval.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&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;offset_show_all&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If true, the broker may auto-create topics that you requested which don&amp;rsquo;t already exist.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;prune_interval_seconds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated (no-op), use &lt;code&gt;metadata_refresh_interval&lt;/code&gt; instead.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;30&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sasl_disable_pafx_fast&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Configure the Kerberos client to not use PA_FX_FAST.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sasl_mechanism&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The SASL SCRAM SHA algorithm SHA256 or SHA512 as mechanism.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sasl_password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SASL user password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sasl_username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SASL user name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tls_server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to verify the hostname on the returned certificates unless tls.insecure-skip-tls-verify is given. If you don&amp;rsquo;t provide the Kafka server name, the hostname is taken from the URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;topic_workers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum number of topics to monitor.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;100&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;topics_exclude_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regex that determines which topics to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&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;topics_filter_regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regex filter for topics to be monitored.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;.*&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_sasl_handshake&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Only set this to false if using a non-Kafka SASL proxy.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_sasl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Connect using SASL/PLAIN.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_tls&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Connect using TLS.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;use_zookeeper_lag&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set to true, use a group from zookeeper.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;zookeeper_uris&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;array(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address array (hosts) of zookeeper server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.kafka&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.kafka&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.kafka&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.kafka&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.kafka&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.kafka &amp;#34;example&amp;#34; {
  kafka_uris = [&amp;#34;localhost:9200&amp;#34;]
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterkafka">&lt;code>prometheus.exporter.kafka&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.kafka&lt;/code> component embeds the &lt;a href="https://github.com/grafana/kafka_exporter" target="_blank" rel="noopener noreferrer">&lt;code>kafka_exporter&lt;/code>&lt;/a> for collecting metrics from a Kafka server.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.kafka &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
kafka_uris = &amp;#34;&amp;lt;KAFKA_URI_LIST&amp;gt;&amp;#34;
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.kafka&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.memcached</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.memcached/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.memcached/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportermemcached&#34;&gt;&lt;code&gt;prometheus.exporter.memcached&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.memcached&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus/memcached_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;memcached_exporter&lt;/code&gt;&lt;/a&gt; for collecting metrics from a Memcached server.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.memcached &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.memcached&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Memcached server address.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;localhost:11211&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The timeout for connecting to the Memcached server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following block with &lt;code&gt;prometheus.exporter.memcached&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 1;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eTLS configuration for requests to the Memcached server.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;TLS configuration for requests to the Memcached server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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; isn&amp;rsquo;t provided, the minimum acceptable TLS version is inherited from Go&amp;rsquo;s default minimum version, TLS 1.2.
If &lt;code&gt;min_version&lt;/code&gt; is provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.memcached&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.memcached&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.memcached&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;code&gt;prometheus.exporter.memcached&lt;/code&gt; component to collect metrics from a Memcached server running locally, and scrapes the metrics using a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt; component:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.memcached &amp;#34;example&amp;#34; {
  address = &amp;#34;localhost:13321&amp;#34;
  timeout = &amp;#34;5s&amp;#34;
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportermemcached">&lt;code>prometheus.exporter.memcached&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.memcached&lt;/code> component embeds the &lt;a href="https://github.com/prometheus/memcached_exporter" target="_blank" rel="noopener noreferrer">&lt;code>memcached_exporter&lt;/code>&lt;/a> for collecting metrics from a Memcached server.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.memcached &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.memcached&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.mongodb</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.mongodb/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.mongodb/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportermongodb&#34;&gt;&lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt; component embeds the Percona &lt;a href=&#34;https://github.com/percona/mongodb_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;mongodb_exporter&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;This exporter doesn&amp;rsquo;t collect metrics from multiple nodes.
For this integration to work properly, you must connect each node of your MongoDB cluster to an Alloy instance.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;We strongly recommend configuring a separate user for Alloy, giving it only the strictly mandatory security privileges necessary for monitoring your node.
Refer to the &lt;a href=&#34;https://github.com/percona/mongodb_exporter#permissions&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Percona documentation&lt;/a&gt; for more information.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.mongodb &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    mongodb_uri = &amp;#34;&amp;lt;MONGODB_URI&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mongodb_uri&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;MongoDB node connection URI.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;collect_all&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables all collectors.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;compatible_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables metric names compatible with &lt;code&gt;mongodb_exporter&lt;/code&gt; &amp;lt;v0.20.0.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;direct_connect&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether or not a direct connect should be made. Direct connections aren&amp;rsquo;t valid if multiple hosts are specified or an SRV URI is used.&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;discovering_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether or not to enable autodiscover collections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_coll_stats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting collection statistics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_currentop_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting current operation metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_db_stats_free_storage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting free storage statistics from &lt;code&gt;dbStats&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_db_stats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting database statistics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_diagnostic_data&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting diagnostic data.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_fcv&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting Feature Compatibility Version (FCV) metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_index_stats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting index statistics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_pbm_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting Percona Backup for MongoDB (PBM) metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_profile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting profile metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_replicaset_config&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting replica set configuration.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_replicaset_status&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting replica set status.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_shards&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting sharding information.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_top_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables collecting top metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;MongoDB node connection URI must be in the &lt;a href=&#34;https://docs.mongodb.com/manual/reference/connection-string/#std-label-connections-standard-connection-string-format&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;Standard Connection String Format&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt;:&lt;/p&gt;

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

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

prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = &amp;#34;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mongodb&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportermongodb">&lt;code>prometheus.exporter.mongodb&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.mongodb&lt;/code> component embeds the Percona &lt;a href="https://github.com/percona/mongodb_exporter" target="_blank" rel="noopener noreferrer">&lt;code>mongodb_exporter&lt;/code>&lt;/a>.&lt;/p>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>This exporter doesn&amp;rsquo;t collect metrics from multiple nodes.
For this integration to work properly, you must connect each node of your MongoDB cluster to an Alloy instance.&lt;/p></description></item><item><title>prometheus.exporter.mssql</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.mssql/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.mssql/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportermssql&#34;&gt;&lt;code&gt;prometheus.exporter.mssql&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.mssql&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/burningalchemist/sql_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;sql_exporter&lt;/code&gt;&lt;/a&gt; for collecting stats from a Microsoft SQL Server and exposing them as Prometheus metrics.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.mssql &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    connection_string = &amp;#34;&amp;lt;CONNECTION_STRING&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.mssql&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;connection_string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The connection string used to connect to an Microsoft SQL Server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;connection_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name of the connection, used as a label in uptime metrics.&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_idle_connections&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of idle connections to any one target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;3&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_open_connections&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of open connections to any one target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;3&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The query timeout in seconds.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;query_config&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;MSSQL query to Prometheus metric configuration as an inline string.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;a href=&#34;https://github.com/burningalchemist/sql_exporter/blob/master/examples/azure-sql-mi/sql_exporter.yml#L21&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;sql_exporter&lt;/code&gt; examples&lt;/a&gt; show the format of the &lt;code&gt;connection_string&lt;/code&gt; argument:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;sqlserver://&amp;lt;USERNAME&amp;gt;:&amp;lt;PASSWORD&amp;gt;@&amp;lt;SQLMI_ENDPOINT&amp;gt;.database.windows.net:1433?encrypt=true&amp;amp;hostNameInCertificate=%2A.&amp;lt;SQL_MI_DOMAIN&amp;gt;.database.windows.net&amp;amp;trustservercertificate=true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If your username or password contain special characters, you must URL encode the characters in the &lt;code&gt;connection_string&lt;/code&gt; argument.
For more information, refer to the &lt;a href=&#34;https://github.com/burningalchemist/sql_exporter#data-source-names-dsn&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Data Source Names&lt;/a&gt; section in the &lt;code&gt;sql_exporter&lt;/code&gt; documentation&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;connection_name&lt;/code&gt; parameter allows uptime metrics.
Refer to the &lt;a href=&#34;https://github.com/burningalchemist/sql_exporter#configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;sql_exporter&lt;/code&gt;&lt;/a&gt; &lt;code&gt;target.name&lt;/code&gt; setting.&lt;/p&gt;
&lt;p&gt;If specified, the &lt;code&gt;query_config&lt;/code&gt; argument must be a YAML document as string defining which MSSQL queries map to custom Prometheus metrics.
&lt;code&gt;query_config&lt;/code&gt; is typically loaded by using the exports of another component.
For example,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;local.file.&amp;lt;LABEL&amp;gt;.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.http.&amp;lt;LABEL&amp;gt;.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.s3.&amp;lt;LABEL&amp;gt;.content&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Refer to &lt;a href=&#34;https://github.com/burningalchemist/sql_exporter#collectors&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;sql_exporter&lt;/code&gt;&lt;/a&gt; for details on how to create a configuration.&lt;/p&gt;
&lt;h3 id=&#34;authentication&#34;&gt;Authentication&lt;/h3&gt;
&lt;p&gt;By default, the &lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt; and &lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt; used within the &lt;code&gt;connection_string&lt;/code&gt; argument corresponds to a SQL Server username and password.&lt;/p&gt;
&lt;p&gt;If Alloy is running in the same Windows domain as the SQL Server, then you can use the parameter &lt;code&gt;authenticator=winsspi&lt;/code&gt; within the &lt;code&gt;connection_string&lt;/code&gt; to authenticate without any additional credentials.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;sqlserver://@&amp;lt;HOST&amp;gt;:&amp;lt;PORT&amp;gt;?authenticator=winsspi&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you want to use Windows credentials to authenticate, instead of SQL Server credentials, you can use the parameter &lt;code&gt;authenticator=ntlm&lt;/code&gt; within the &lt;code&gt;connection_string&lt;/code&gt;.
The &lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt; and &lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt; then corresponds to a Windows username and password.
You must use a URL encoded backslash, &lt;code&gt;%5C&lt;/code&gt;, when you prefix the Windows domain to the username.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;sqlserver://&amp;lt;DOMAIN&amp;gt;%5C&amp;lt;USERNAME&amp;gt;:&amp;lt;PASSWORD&amp;gt;@&amp;lt;HOST&amp;gt;:&amp;lt;PORT&amp;gt;?authenticator=ntlm&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.mssql&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mssql&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mssql&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mssql&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.mssql&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.mssql &amp;#34;example&amp;#34; {
  connection_string = &amp;#34;sqlserver://user:pass@localhost:1433&amp;#34;
}

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

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

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;custom-metrics&#34;&gt;Custom metrics&lt;/h2&gt;
&lt;p&gt;You can use the optional &lt;code&gt;query_config&lt;/code&gt; parameter to retrieve custom Prometheus metrics for a MSSQL instance.&lt;/p&gt;
&lt;p&gt;If this is defined, the new configuration is used to query your MSSQL instance and create whatever Prometheus metrics are defined.
If you want additional metrics on top of the default metrics, the default configuration must be used as a base.&lt;/p&gt;
&lt;p&gt;The default configuration used by this integration is as follows:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;collector_name: mssql_standard

metrics:
  - metric_name: mssql_local_time_seconds
    type: gauge
    help: &amp;#39;Local time in seconds since epoch (Unix time).&amp;#39;
    values: [unix_time]
    query: |
      SELECT DATEDIFF(second, &amp;#39;19700101&amp;#39;, GETUTCDATE()) AS unix_time
  - metric_name: mssql_connections
    type: gauge
    help: &amp;#39;Number of active connections.&amp;#39;
    key_labels:
      - db
    values: [count]
    query: |
      SELECT DB_NAME(sp.dbid) AS db, COUNT(sp.spid) AS count
      FROM sys.sysprocesses sp
      GROUP BY DB_NAME(sp.dbid)
  #
  # Collected from sys.dm_os_performance_counters
  #
  - metric_name: mssql_deadlocks_total
    type: counter
    help: &amp;#39;Number of lock requests that resulted in a deadlock.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Number of Deadlocks/sec&amp;#39; AND instance_name = &amp;#39;_Total&amp;#39;
  - metric_name: mssql_user_errors_total
    type: counter
    help: &amp;#39;Number of user errors.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Errors/sec&amp;#39; AND instance_name = &amp;#39;User Errors&amp;#39;
  - metric_name: mssql_kill_connection_errors_total
    type: counter
    help: &amp;#39;Number of severe errors that caused SQL Server to kill the connection.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Errors/sec&amp;#39; AND instance_name = &amp;#39;Kill Connection Errors&amp;#39;
  - metric_name: mssql_page_life_expectancy_seconds
    type: gauge
    help: &amp;#39;The minimum number of seconds a page will stay in the buffer pool on this node without references.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT top(1) cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Page life expectancy&amp;#39;
  - metric_name: mssql_batch_requests_total
    type: counter
    help: &amp;#39;Number of command batches received.&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Batch Requests/sec&amp;#39;
  - metric_name: mssql_log_growths_total
    type: counter
    help: &amp;#39;Number of times the transaction log has been expanded, per database.&amp;#39;
    key_labels:
      - db
    values: [cntr_value]
    query: |
      SELECT rtrim(instance_name) AS db, cntr_value
      FROM sys.dm_os_performance_counters WITH (NOLOCK)
      WHERE counter_name = &amp;#39;Log Growths&amp;#39; AND instance_name &amp;lt;&amp;gt; &amp;#39;_Total&amp;#39;
  - metric_name: mssql_buffer_cache_hit_ratio
    type: gauge
    help: &amp;#39;Ratio of requests that hit the buffer cache&amp;#39;
    values: [BufferCacheHitRatio]
    query: |
      SELECT (a.cntr_value * 1.0 / b.cntr_value) * 100.0 as BufferCacheHitRatio
      FROM sys.dm_os_performance_counters  a
      JOIN  (SELECT cntr_value, OBJECT_NAME
          FROM sys.dm_os_performance_counters
          WHERE counter_name = &amp;#39;Buffer cache hit ratio base&amp;#39;
              AND OBJECT_NAME = &amp;#39;SQLServer:Buffer Manager&amp;#39;) b ON  a.OBJECT_NAME = b.OBJECT_NAME
      WHERE a.counter_name = &amp;#39;Buffer cache hit ratio&amp;#39;
      AND a.OBJECT_NAME = &amp;#39;SQLServer:Buffer Manager&amp;#39;

  - metric_name: mssql_checkpoint_pages_sec
    type: gauge
    help: &amp;#39;Checkpoint Pages Per Second&amp;#39;
    values: [cntr_value]
    query: |
      SELECT cntr_value
      FROM sys.dm_os_performance_counters
      WHERE [counter_name] = &amp;#39;Checkpoint pages/sec&amp;#39;
  #
  # Collected from sys.dm_io_virtual_file_stats
  #
  - metric_name: mssql_io_stall_seconds_total
    type: counter
    help: &amp;#39;Stall time in seconds per database and I/O operation.&amp;#39;
    key_labels:
      - db
    value_label: operation
    values:
      - read
      - write
    query_ref: mssql_io_stall

  #
  # Collected from sys.dm_os_process_memory
  #
  - metric_name: mssql_resident_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server resident memory size (AKA working set).&amp;#39;
    values: [resident_memory_bytes]
    query_ref: mssql_process_memory

  - metric_name: mssql_virtual_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server committed virtual memory size.&amp;#39;
    values: [virtual_memory_bytes]
    query_ref: mssql_process_memory

  - metric_name: mssql_available_commit_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server available to be committed memory size.&amp;#39;
    values: [available_commit_limit_bytes]
    query_ref: mssql_process_memory

  - metric_name: mssql_memory_utilization_percentage
    type: gauge
    help: &amp;#39;The percentage of committed memory that is in the working set.&amp;#39;
    values: [memory_utilization_percentage]
    query_ref: mssql_process_memory

  - metric_name: mssql_page_fault_count_total
    type: counter
    help: &amp;#39;The number of page faults that were incurred by the SQL Server process.&amp;#39;
    values: [page_fault_count]
    query_ref: mssql_process_memory

  #
  # Collected from sys.dm_os_sys_info
  #
  - metric_name: mssql_server_total_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server committed memory in the memory manager.&amp;#39;
    values: [committed_memory_bytes]
    query_ref: mssql_os_sys_info

  - metric_name: mssql_server_target_memory_bytes
    type: gauge
    help: &amp;#39;SQL Server target committed memory set for the memory manager.&amp;#39;
    values: [committed_memory_target_bytes]
    query_ref: mssql_os_sys_info

  #
  # Collected from sys.dm_os_sys_memory
  #
  - metric_name: mssql_os_memory
    type: gauge
    help: &amp;#39;OS physical memory, used and available.&amp;#39;
    value_label: &amp;#39;state&amp;#39;
    values: [used, available]
    query: |
      SELECT
        (total_physical_memory_kb - available_physical_memory_kb) * 1024 AS used,
        available_physical_memory_kb * 1024 AS available
      FROM sys.dm_os_sys_memory
  - metric_name: mssql_os_page_file
    type: gauge
    help: &amp;#39;OS page file, used and available.&amp;#39;
    value_label: &amp;#39;state&amp;#39;
    values: [used, available]
    query: |
      SELECT
        (total_page_file_kb - available_page_file_kb) * 1024 AS used,
        available_page_file_kb * 1024 AS available
      FROM sys.dm_os_sys_memory
queries:
  # Populates `mssql_io_stall` and `mssql_io_stall_total`
  - query_name: mssql_io_stall
    query: |
      SELECT
        cast(DB_Name(a.database_id) as varchar) AS [db],
        sum(io_stall_read_ms) / 1000.0 AS [read],
        sum(io_stall_write_ms) / 1000.0 AS [write]
      FROM
        sys.dm_io_virtual_file_stats(null, null) a
      INNER JOIN sys.master_files b ON a.database_id = b.database_id AND a.file_id = b.file_id
      GROUP BY a.database_id
  # Populates `mssql_resident_memory_bytes`, `mssql_virtual_memory_bytes`, mssql_available_commit_memory_bytes,
  # and `mssql_memory_utilization_percentage`, and `mssql_page_fault_count_total`
  - query_name: mssql_process_memory
    query: |
      SELECT
        physical_memory_in_use_kb * 1024 AS resident_memory_bytes,
        virtual_address_space_committed_kb * 1024 AS virtual_memory_bytes,
        available_commit_limit_kb * 1024 AS available_commit_limit_bytes,
        memory_utilization_percentage,
        page_fault_count
      FROM sys.dm_os_process_memory
  # Populates `mssql_server_total_memory_bytes` and `mssql_server_target_memory_bytes`.
  - query_name: mssql_os_sys_info
    query: |
      SELECT
        committed_kb * 1024 AS committed_memory_bytes,
        committed_target_kb * 1024 AS committed_memory_target_bytes
      FROM sys.dm_os_sys_info&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mssql&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportermssql">&lt;code>prometheus.exporter.mssql&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.mssql&lt;/code> component embeds the &lt;a href="https://github.com/burningalchemist/sql_exporter" target="_blank" rel="noopener noreferrer">&lt;code>sql_exporter&lt;/code>&lt;/a> for collecting stats from a Microsoft SQL Server and exposing them as Prometheus metrics.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.mssql &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
connection_string = &amp;#34;&amp;lt;CONNECTION_STRING&amp;gt;&amp;#34;
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.mssql&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.mysql</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.mysql/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.mysql/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportermysql&#34;&gt;&lt;code&gt;prometheus.exporter.mysql&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.mysql&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus/mysqld_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;mysqld_exporter&lt;/code&gt;&lt;/a&gt; for collecting stats from a MySQL server.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.mysql &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    data_source_name = &amp;#34;&amp;lt;DATA_SOURCE_NAME&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.mysql&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;data_source_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/go-sql-driver/mysql#dsn-data-source-name&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Data Source Name&lt;/a&gt; for the MySQL server to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of &lt;a href=&#34;#supported-collectors&#34;&gt;collectors&lt;/a&gt; to disable from the default set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of &lt;a href=&#34;#supported-collectors&#34;&gt;collectors&lt;/a&gt; to enable on top of the default set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;lock_wait_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout, in seconds, to acquire a metadata lock.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;log_slow_filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Used to avoid queries from scrapes being logged in the slow query log.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;set_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of &lt;a href=&#34;#supported-collectors&#34;&gt;collectors&lt;/a&gt; to run. Fully overrides the default set.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Set a &lt;code&gt;lock_wait_timeout&lt;/code&gt; on the connection to avoid potentially long wait times for metadata locks.
For more information, refer to the &lt;code&gt;lock_wait_timeout&lt;/code&gt; &lt;a href=&#34;https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_lock_wait_timeout&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;in the MySQL documentation&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;log_slow_filter&lt;/code&gt; isn&amp;rsquo;t supported by Oracle MySQL.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.exporter.mysql&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 8;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#heartbeat\&amp;#34;\u003e\u003ccode\u003eheartbeat\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eheartbeat\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#info_schemaprocesslist\&amp;#34;\u003e\u003ccode\u003einfo_schema.processlist\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003einfo_schema.processlist\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#info_schematables\&amp;#34;\u003e\u003ccode\u003einfo_schema.tables\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003einfo_schema.tables\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#mysqluser\&amp;#34;\u003e\u003ccode\u003emysql.user\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003emysql.user\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#perf_schemaeventsstatements\&amp;#34;\u003e\u003ccode\u003eperf_schema.eventsstatements\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eperf_schema.eventsstatements\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#perf_schemafile_instances\&amp;#34;\u003e\u003ccode\u003eperf_schema.file_instances\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eperf_schema.file_instances\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#perf_schemamemory_events\&amp;#34;\u003e\u003ccode\u003eperf_schema.memory_events\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eperf_schema.memory_events\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#heartbeat&#34;&gt;&lt;code&gt;heartbeat&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;heartbeat&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#info_schemaprocesslist&#34;&gt;&lt;code&gt;info_schema.processlist&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;info_schema.processlist&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#info_schematables&#34;&gt;&lt;code&gt;info_schema.tables&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;info_schema.tables&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#mysqluser&#34;&gt;&lt;code&gt;mysql.user&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;mysql.user&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#perf_schemaeventsstatements&#34;&gt;&lt;code&gt;perf_schema.eventsstatements&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;perf_schema.eventsstatements&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#perf_schemafile_instances&#34;&gt;&lt;code&gt;perf_schema.file_instances&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;perf_schema.file_instances&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#perf_schemamemory_events&#34;&gt;&lt;code&gt;perf_schema.memory_events&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;perf_schema.memory_events&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;heartbeat&#34;&gt;&lt;code&gt;heartbeat&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;database&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Database to collect heartbeat data from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;heartbeat&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;table&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Table to collect heartbeat data from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;heartbeat&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;utc&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use UTC for timestamps of the current server. &lt;code&gt;pt-heartbeat&lt;/code&gt; is called with &lt;code&gt;--utc&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;info_schemaprocesslist&#34;&gt;&lt;code&gt;info_schema.processlist&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum time a thread must be in each state to be counted.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;processes_by_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable collecting the number of processes by host.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;processes_by_user&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable collecting the number of processes by user.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;info_schematables&#34;&gt;&lt;code&gt;info_schema.tables&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema_tables_databases&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression to match databases to collect table stats for.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;mysqluser&#34;&gt;&lt;code&gt;mysql.user&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;privileges&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable collecting user privileges from &lt;code&gt;mysql.user&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;perf_schemaeventsstatements&#34;&gt;&lt;code&gt;perf_schema.eventsstatements&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit the number of events statements digests, in descending order by &lt;code&gt;last_seen&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;250&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;text_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum length of the normalized statement text.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;120&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;time_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Limit how old, in seconds, the &lt;code&gt;last_seen&lt;/code&gt; events statements can be.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;86400&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;perf_schemafile_instances&#34;&gt;&lt;code&gt;perf_schema.file_instances&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;filter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression to select rows in &lt;code&gt;performance_schema.file_summary_by_instance&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;.*&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remove_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Prefix to trim away from &lt;code&gt;file_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/var/lib/mysql&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Refer to the &lt;a href=&#34;https://dev.mysql.com/doc/mysql-perfschema-excerpt/8.0/en/performance-schema-file-summary-tables.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;MySQL documentation&lt;/a&gt; for more detailed information about the tables used in &lt;code&gt;perf_schema_file_instances_filter&lt;/code&gt; and &lt;code&gt;perf_schema_file_instances_remove_prefix&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;perf_schemamemory_events&#34;&gt;&lt;code&gt;perf_schema.memory_events&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remove_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Prefix to trim away from &lt;code&gt;performance_schema.memory_summary_global_by_event_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;memory/&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;supported-collectors&#34;&gt;Supported Collectors&lt;/h3&gt;
&lt;p&gt;The full list of supported collectors is:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Enabled by default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;global_status&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;SHOW GLOBAL STATUS&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;global_variables&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;SHOW GLOBAL VARIABLES&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.innodb_cmpmem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.innodb_cmpmem&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.innodb_metric&lt;/code&gt;s&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.innodb_metrics&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.query_response_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect query response time distribution if &lt;code&gt;query_response_time_stats&lt;/code&gt; is ON.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;slave_status&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Scrape information from &lt;code&gt;SHOW SLAVE STATUS&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;auto_increment.columns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect &lt;code&gt;auto_increment&lt;/code&gt; columns and max values from &lt;code&gt;information_schema&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;binlog_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect the current size of all registered &lt;code&gt;binlog&lt;/code&gt; files.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;engine_innodb_status&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;SHOW ENGINE INNODB STATUS&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;engine_tokudb_status&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;SHOW ENGINE TOKUDB STATUS&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;heartbeat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from heartbeat database and tables.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.clientstats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If running with userstat=1, enable to collect client statistics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.innodb_tablespaces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.innodb_sys_tablespaces&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.processlist&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect current thread state counts from the &lt;code&gt;information_schema.processlist&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.replica_host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.replica_host_status&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.schemastats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If running with userstat=1, enable to collect schema statistics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.tables&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;information_schema.tables&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.tablestats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If running with userstat=1, enable to collect table statistics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info_schema.userstats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If running with userstat=1, enable to collect user statistics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mysql.user&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect data from &lt;code&gt;mysql.user&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.eventsstatements&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.events_statements_summary_by_digest&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.eventsstatementssum&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics of grand sums from &lt;code&gt;performance_schema.events_statements_summary_by_digest&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.eventswaits&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.events_waits_summary_global_by_event_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.file_events&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.file_summary_by_event_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.file_instances&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.file_summary_by_instance&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.indexiowaits&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.table_io_waits_summary_by_index_usage&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.memory_events&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.memory_summary_global_by_event_name&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.replication_applier_status_by_worker&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.replication_applier_status_by_worker&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.replication_group_member_stats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.replication_group_member_stats&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.replication_group_members&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.replication_group_members&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.tableiowaits&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.table_io_waits_summary_by_table&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf_schema.tablelocks&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collect metrics from &lt;code&gt;performance_schema.table_lock_waits_summary_by_table&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;slave_hosts&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Scrape information from &lt;code&gt;SHOW SLAVE HOSTS&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mysql&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mysql&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.mysql&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.mysql&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.mysql &amp;#34;example&amp;#34; {
  data_source_name  = &amp;#34;root@(server-a:3306)/&amp;#34;
  enable_collectors = [&amp;#34;heartbeat&amp;#34;, &amp;#34;mysql.user&amp;#34;]
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportermysql">&lt;code>prometheus.exporter.mysql&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.mysql&lt;/code> component embeds the &lt;a href="https://github.com/prometheus/mysqld_exporter" target="_blank" rel="noopener noreferrer">&lt;code>mysqld_exporter&lt;/code>&lt;/a> for collecting stats from a MySQL server.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.mysql &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
data_source_name = &amp;#34;&amp;lt;DATA_SOURCE_NAME&amp;gt;&amp;#34;
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.mysql&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.oracledb</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.oracledb/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.oracledb/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporteroracledb&#34;&gt;&lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt; component embeds
&lt;a href=&#34;https://github.com/oracle/oracle-db-appdev-monitoring&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;oracledb_exporter&lt;/code&gt;&lt;/a&gt; for collecting statistics from an OracleDB server.&lt;/p&gt;
&lt;p&gt;Ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Oracle Instant Client Basic installed on the system running Alloy&lt;/li&gt;
&lt;li&gt;Appropriate environment variables configured for Oracle Client libraries&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;oracle-instant-client-basic&#34;&gt;Oracle instant client basic&lt;/h3&gt;
&lt;p&gt;When you run the standalone binary, you must install the &lt;a href=&#34;http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Oracle Instant Client Basic&lt;/a&gt; for your operating system.
The exporter only requires the basic version.&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;You must also provide Oracle Instant Client Basic when you run Alloy in Docker or Kubernetes.
The &lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt; component relies on Oracle Instant Client libraries that are available in the container image or host environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;environment-variables&#34;&gt;Environment variables&lt;/h3&gt;
&lt;p&gt;Set the following environment variables for Oracle Client library access:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Linux&lt;/strong&gt;: Set &lt;code&gt;LD_LIBRARY_PATH&lt;/code&gt; to the Oracle Instant Client library directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;macOS (ARM)&lt;/strong&gt;: Set &lt;code&gt;DYLD_LIBRARY_PATH&lt;/code&gt; to the Oracle Instant Client library directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;ORACLE_BASE&lt;/code&gt;&lt;/strong&gt; (optional): Base directory for Oracle installations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;ORACLE_HOME&lt;/code&gt;&lt;/strong&gt; (optional): Location of the Oracle Instant Client installation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;TNS_ADMIN&lt;/code&gt;&lt;/strong&gt; (optional): Location of your Oracle wallet directory when using wallet authentication&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;database-user-permissions&#34;&gt;Database user permissions&lt;/h3&gt;
&lt;p&gt;The database user specified in the connection string must have permissions to query Oracle system views.
The user requires the &lt;code&gt;SELECT_CATALOG_ROLE&lt;/code&gt; role, or &lt;code&gt;SELECT&lt;/code&gt; privilege on specific system views.&lt;/p&gt;
&lt;p&gt;Refer to the &lt;a href=&#34;https://oracle.github.io/oracle-db-appdev-monitoring/docs/getting-started/basics&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Oracle AI Database Metrics Exporter Installation guide&lt;/a&gt; for the complete list of required permissions.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.oracledb &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    connection_string = &amp;#34;&amp;lt;CONNECTION_STRING&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;connection_string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The connection string used to connect to an Oracle Database.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;custom_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The paths to the custom metrics files. (TOML format)&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the default metrics file. (TOML format)&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_idle_conns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of maximum idle connections in the connection pool.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_open_conns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of maximum open connections in the connection pool.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The password to use for authentication to the Oracle Database.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;query_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The query timeout in seconds.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The username to use for authentication to the Oracle Database.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Refer to the &lt;a href=&#34;https://github.com/oracle/oracle-db-appdev-monitoring&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;oracledb_exporter&lt;/code&gt; repository&lt;/a&gt; for examples of TOML metrics files.&lt;/p&gt;
&lt;p&gt;For backward compatibility, you can still provide the &lt;code&gt;username&lt;/code&gt; and &lt;code&gt;password&lt;/code&gt; arguments in the &lt;code&gt;connection_string&lt;/code&gt; argument:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;conn&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-conn&#34;&gt;oracle://user:pass@host:port/service_name[?OPTION1=VALUE1[&amp;amp;OPTIONn=VALUEn]...]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If the &lt;code&gt;connection_string&lt;/code&gt; argument doesn&amp;rsquo;t contain the &lt;code&gt;username&lt;/code&gt; and &lt;code&gt;password&lt;/code&gt;, you must provide the &lt;code&gt;username&lt;/code&gt; and &lt;code&gt;password&lt;/code&gt; arguments.
In this case, the URL must have the format:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;conn&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-conn&#34;&gt;host:port/service_name[?OPTION1=VALUE1[&amp;amp;OPTIONn=VALUEn]...]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.oracledb&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.oracledb &amp;#34;example&amp;#34; {
  connection_string = &amp;#34;localhost:1521/orcl.localnet&amp;#34;
  username = &amp;#34;&amp;lt;DB_USERNAME&amp;gt;&amp;#34;
  password = &amp;#34;&amp;lt;DB_PASSWORD&amp;gt;&amp;#34;
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporteroracledb">&lt;code>prometheus.exporter.oracledb&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.oracledb&lt;/code> component embeds
&lt;a href="https://github.com/oracle/oracle-db-appdev-monitoring" target="_blank" rel="noopener noreferrer">&lt;code>oracledb_exporter&lt;/code>&lt;/a> for collecting statistics from an OracleDB server.&lt;/p>
&lt;p>Ensure you have the following:&lt;/p>
&lt;ul>
&lt;li>Oracle Instant Client Basic installed on the system running Alloy&lt;/li>
&lt;li>Appropriate environment variables configured for Oracle Client libraries&lt;/li>
&lt;/ul>
&lt;h3 id="oracle-instant-client-basic">Oracle instant client basic&lt;/h3>
&lt;p>When you run the standalone binary, you must install the &lt;a href="http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html" target="_blank" rel="noopener noreferrer">Oracle Instant Client Basic&lt;/a> for your operating system.
The exporter only requires the basic version.&lt;/p></description></item><item><title>prometheus.exporter.postgres</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.postgres/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.postgres/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterpostgres&#34;&gt;&lt;code&gt;prometheus.exporter.postgres&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus-community/postgres_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;postgres_exporter&lt;/code&gt;&lt;/a&gt; for collecting metrics from a PostgreSQL database.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.postgres &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    data_source_names = &amp;#34;&amp;lt;DATA_SOURCE_NAMES_LIST&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;data_source_names&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(secret)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies the PostgreSQL servers to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;custom_queries_config_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to YAML file containing custom queries to expose as metrics.&lt;/td&gt;
              &lt;td&gt;&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;disable_default_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt;, only exposes metrics supplied from &lt;code&gt;custom_queries_config_path&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_settings_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables collection of metrics from &lt;code&gt;pg_settings&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of collectors to enable. Refer to the information below for more detail.&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;Refer to the &lt;a href=&#34;https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;PostgreSQL documentation&lt;/a&gt; for more information about the format of the connection strings in &lt;code&gt;data_source_names&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Refer to the examples for the &lt;code&gt;custom_queries_config_path&lt;/code&gt; file in the &lt;a href=&#34;https://github.com/prometheus-community/postgres_exporter/blob/master/queries.yaml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;postgres_exporter&lt;/code&gt; repository&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;There are a number of environment variables that aren&amp;rsquo;t recommended for use, as they will affect &lt;em&gt;all&lt;/em&gt; &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; components.
Refer to the &lt;a href=&#34;https://github.com/prometheus-community/postgres_exporter#environment-variables&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;postgres_exporter&lt;/code&gt; repository&lt;/a&gt; for a full list of environment variables.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; component configures the embedded &lt;a href=&#34;https://github.com/prometheus-community/postgres_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;postgres_exporter&lt;/code&gt;&lt;/a&gt; to run with a collection timeout of 10 seconds.&lt;/p&gt;
&lt;p&gt;By default, the same set of metrics is enabled as in the upstream &lt;a href=&#34;https://github.com/prometheus-community/postgres_exporter/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;postgres_exporter&lt;/code&gt;&lt;/a&gt;.
If &lt;code&gt;custom_queries_config_path&lt;/code&gt; is set, additional metrics defined in the given configuration file will be exposed.
If &lt;code&gt;disable_default_metrics&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;, only the metrics defined in the &lt;code&gt;custom_queries_config_path&lt;/code&gt; file will be exposed.&lt;/p&gt;
&lt;p&gt;A subset of metrics collectors can be controlled by setting the &lt;code&gt;enabled_collectors&lt;/code&gt; argument.
The following collectors are available for selection:&lt;/p&gt;
&lt;div class=&#34;column-list&#34;&gt;
  &lt;ul&gt;
&lt;li&gt;&lt;code&gt;buffercache_summary&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;database_wraparound&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;database&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;locks&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;long_running_transactions&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;postmaster&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;process_idle&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;replication_slot&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;replication&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_activity_autovacuum&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_bgwriter&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_checkpointer&lt;/code&gt; - Only supported in PostgreSQL 17 and later&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_database&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_progress_vacuum&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_statements&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_user_tables&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_wal_receiver&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;statio_user_indexes&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;statio_user_tables&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wal&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;xlog_location&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;p&gt;By default, the following collectors are enabled:&lt;/p&gt;
&lt;div class=&#34;column-list&#34;&gt;
  &lt;ul&gt;
&lt;li&gt;&lt;code&gt;database&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;locks&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;replication_slot&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;replication&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;roles&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_bgwriter&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_database&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_progress_vacuum&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stat_user_tables&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;statio_user_tables&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wal&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Due to a limitation of the upstream exporter, when multiple &lt;code&gt;data_source_names&lt;/code&gt; are used, the collectors that are controlled via the &lt;code&gt;enabled_collectors&lt;/code&gt; argument is only applied to the first data source in the list.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following block with &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 2;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#autodiscovery\&amp;#34;\u003e\u003ccode\u003eautodiscovery\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eDatabase discovery settings.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#autodiscovery&#34;&gt;&lt;code&gt;autodiscovery&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Database discovery settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;autodiscovery&#34;&gt;&lt;code&gt;autodiscovery&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;autodiscovery&lt;/code&gt; block configures discovery of databases, outside of any specified in &lt;code&gt;data_source_names&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;database_allowlist&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of databases to filter for, meaning only these databases will be scraped.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;database_denylist&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of databases to filter out, meaning all other databases will be scraped.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to automatically discover other databases.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If &lt;code&gt;enabled&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt; and no allowlist or denylist is specified, the exporter scrapes from all databases.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;autodiscovery&lt;/code&gt; is disabled, neither &lt;code&gt;database_allowlist&lt;/code&gt; nor &lt;code&gt;database_denylist&lt;/code&gt; has any effect.&lt;/p&gt;
&lt;h3 id=&#34;stat_statements&#34;&gt;&lt;code&gt;stat_statements&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;stat_statements&lt;/code&gt; block configures the selection of both the query ID and the full SQL statement.
This configuration takes effect only when the &lt;code&gt;stat_statements&lt;/code&gt; collector is enabled.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_databases&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of database names to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_users&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of user names to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_query&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable the selection of query ID and SQL statement.&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;limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of statements to fetch.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;100&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;query_length&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum length of the statement query text.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;120&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;collect-metrics-from-a-postgresql-server&#34;&gt;Collect metrics from a PostgreSQL server&lt;/h3&gt;
&lt;p&gt;The following example uses a &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; component to collect metrics from a PostgreSQL server running locally with all default settings:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;// Because no autodiscovery is defined, this will only scrape the &amp;#39;database_name&amp;#39; database, as defined
// in the DSN below.
prometheus.exporter.postgres &amp;#34;example&amp;#34; {
  data_source_names = [&amp;#34;postgresql://username:password@localhost:5432/database_name?sslmode=disable&amp;#34;]
}

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

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

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;collect-custom-metrics-from-an-allowlisted-set-of-databases&#34;&gt;Collect custom metrics from an allowlisted set of databases&lt;/h3&gt;
&lt;p&gt;The following example uses a &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; component to collect custom metrics from a set of specific databases, replacing default metrics with custom metrics derived from queries in &lt;code&gt;/etc/alloy/custom-postgres-metrics.yaml&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.postgres &amp;#34;example&amp;#34; {
  data_source_names = [&amp;#34;postgresql://username:password@localhost:5432/database_name?sslmode=disable&amp;#34;]

  // This block configures autodiscovery to check for databases outside of the &amp;#39;database_name&amp;#39; db
  // specified in the DSN above. The database_allowlist field means that only the &amp;#39;frontend_app&amp;#39; and &amp;#39;backend_app&amp;#39;
  // databases will be scraped.
  autodiscovery {
    enabled            = true
    database_allowlist = [&amp;#34;frontend_app&amp;#34;, &amp;#34;backend_app&amp;#34;]
  }

  disable_default_metrics    = true
  custom_queries_config_path = &amp;#34;/etc/alloy/custom-postgres-metrics.yaml&amp;#34;
}

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

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

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;collect-metrics-from-all-databases-except-for-a-denylisted-database&#34;&gt;Collect metrics from all databases except for a denylisted database&lt;/h3&gt;
&lt;p&gt;This example uses a &lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; component to collect custom metrics from all databases except for the &lt;code&gt;secrets&lt;/code&gt; database.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.postgres &amp;#34;example&amp;#34; {
  data_source_names = [&amp;#34;postgresql://username:password@localhost:5432/database_name?sslmode=disable&amp;#34;]

  // The database_denylist field will filter out those databases from the list of databases to scrape,
  // meaning that all databases *except* these will be scraped.
  //
  // In this example it will scrape all databases except for the one named &amp;#39;secrets&amp;#39;.
  autodiscovery {
    enabled           = true
    database_denylist = [&amp;#34;secrets&amp;#34;]
  }
}

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

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

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;escape-special-characters-in-postgres-url&#34;&gt;Escape special characters in postgres url&lt;/h3&gt;
&lt;p&gt;If your PostgreSQL connection string includes special characters for e.g. password (&lt;code&gt;@&lt;/code&gt;, &lt;code&gt;:&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;, etc.), you should wrap the password using &lt;code&gt;encoding.url_encode&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.postgres &amp;#34;example&amp;#34; {
  data_source_names = [
    &amp;#34;postgresql://username:&amp;#34; &amp;#43; encoding.url_encode(&amp;#34;p@ss/w:ord!&amp;#34;) &amp;#43; &amp;#34;@localhost:5432/dbname?sslmode=disable&amp;#34;
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This ensures the DSN remains valid and correctly parsed.&lt;/p&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.postgres&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterpostgres">&lt;code>prometheus.exporter.postgres&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.postgres&lt;/code> component embeds the &lt;a href="https://github.com/prometheus-community/postgres_exporter" target="_blank" rel="noopener noreferrer">&lt;code>postgres_exporter&lt;/code>&lt;/a> for collecting metrics from a PostgreSQL database.&lt;/p>
&lt;p>You can specify multiple &lt;code>prometheus.exporter.postgres&lt;/code> components by giving them different labels.&lt;/p></description></item><item><title>prometheus.exporter.process</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.process/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.process/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterprocess&#34;&gt;&lt;code&gt;prometheus.exporter.process&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.process&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/ncabatoff/process-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;process_exporter&lt;/code&gt;&lt;/a&gt; for collecting process stats from &lt;code&gt;/proc&lt;/code&gt;.&lt;/p&gt;


&lt;div data-shared=&#34;reference/components/exporter-clustering-warning.md&#34;&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;We do not recommend using this exporter with &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;clustering&lt;/a&gt; enabled.&lt;/p&gt;
&lt;p&gt;The default &lt;code&gt;instance&lt;/code&gt; label set by this exporter is the hostname of the machine running Alloy.
Alloy clustering uses consistent hashing to distribute targets across the instances.
This requires the discovered targets to be the same and have the same labels across all cluster instances.&lt;/p&gt;
&lt;p&gt;If you do need to use this component in a cluster, use a dedicated &lt;code&gt;prometheus.scrape&lt;/code&gt; component that&amp;rsquo;s used to scrape
this exporter and doesn&amp;rsquo;t have clustering enabled. Alternatively, use &lt;code&gt;discovery.relabel&lt;/code&gt; to set the &lt;code&gt;instance&lt;/code&gt; label to a
value that is the same across all cluster instances.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.process &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.process&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;gather_smaps&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Gather metrics from the smaps file for a process.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;procfs_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The procfs mount point.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/proc&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;recheck_on_scrape&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Recheck process names on each scrape.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;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;remove_empty_groups&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Forget process groups with no processes.&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;track_children&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to track a process&amp;rsquo; children.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;track_threads&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Report metrics for a process&amp;rsquo; individual threads.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If you set &lt;code&gt;remove_empty_groups&lt;/code&gt; to the default, &lt;code&gt;false&lt;/code&gt;, the process &amp;ldquo;groups&amp;rdquo; created by the &lt;code&gt;matcher&lt;/code&gt; blocks continue to report metrics even after the processes in that group have stopped running.
This ensures you can see when a process count drops to zero, but it can cause unbounded growth in reported metrics and memory usage if your &lt;code&gt;matcher&lt;/code&gt; generates dynamic group names, for example, using specific PIDs.
The reporting continues until Alloy is restarted.&lt;/p&gt;
&lt;p&gt;When you set &lt;code&gt;remove_empty_groups&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;, process groups are forgotten and stop reporting metrics as soon as they contain no running processes.
Grafana recommends that you set &lt;code&gt;remove_empty_groups&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; if your name argument utilizes unique identifiers like &lt;code&gt;.PID&lt;/code&gt; or &lt;code&gt;.StartTime&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For example, when you set &lt;code&gt;remove_empty_groups&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; and the &lt;code&gt;name&lt;/code&gt; argument for a &lt;code&gt;matcher&lt;/code&gt; block utilizes the &lt;code&gt;.PID&lt;/code&gt; of a process, the &lt;code&gt;matcher&lt;/code&gt; creates a new process group for every new process instance.
The old process groups continue to report metrics with values of 0, even though no running processes are associated with them, leading to high cardinality.
Set &lt;code&gt;remove_empty_groups&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; to remove the old groups, and prevent the high cardinality.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following block with &lt;code&gt;prometheus.exporter.process&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 2;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#matcher\&amp;#34;\u003ematcher\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eA collection of matching rules to use for deciding which processes to monitor.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#matcher&#34;&gt;matcher&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A collection of matching rules to use for deciding which processes to monitor.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;matcher&#34;&gt;&lt;code&gt;matcher&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Each &lt;code&gt;matcher&lt;/code&gt; block configuration can match multiple processes, which are tracked as a single process &amp;ldquo;group.&amp;rdquo;&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cmdline&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of regular expressions applied to the &lt;code&gt;argv&lt;/code&gt; of the process.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;comm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of strings that match the base executable name for a process, truncated to 15 characters.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exe&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of strings that match &lt;code&gt;argv[0]&lt;/code&gt; for a process.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The name to use for identifying the process group name in the metric.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;{{.ExeBase}}&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;name&lt;/code&gt; argument can use the following template variables. By default it uses the base path of the executable:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;{{.Comm}}&lt;/code&gt;: Basename of the original executable from /proc/&amp;lt;pid&amp;gt;/stat.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.ExeBase}}&lt;/code&gt;: Basename of the executable from argv[0].&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.ExeFull}}&lt;/code&gt;: Fully qualified path of the executable.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.Username}}&lt;/code&gt;: Username of the effective user.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.Matches}}&lt;/code&gt;: Map containing all regular expression capture groups resulting from matching a process with the cmdline rule group.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.PID}}&lt;/code&gt;: PID of the process. Note that the PID is copied from the first executable found.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.StartTime}}&lt;/code&gt;: The start time of the process. This is useful when combined with PID as PIDS get reused over time.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{{.Cgroups}}&lt;/code&gt;: The cgroups, if supported, of the process (&lt;code&gt;/proc/self/cgroup&lt;/code&gt;). This is particularly useful for identifying to which container a process belongs.&lt;/li&gt;
&lt;/ul&gt;


&lt;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;Using &lt;code&gt;PID&lt;/code&gt; or &lt;code&gt;StartTime&lt;/code&gt; is discouraged, as it&amp;rsquo;s almost never what you want, and is likely to result in high cardinality metrics.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The value that&amp;rsquo;s used for matching &lt;code&gt;comm&lt;/code&gt; list elements is derived from reading the second field of &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/stat&lt;/code&gt;, stripped of parens.&lt;/p&gt;
&lt;p&gt;For values in &lt;code&gt;exe&lt;/code&gt;, if there are no slashes, only the basename of &lt;code&gt;argv[0]&lt;/code&gt; needs to match.
Otherwise, the name must be an exact match.
For example, &lt;code&gt;&amp;quot;postgres&amp;quot;&lt;/code&gt; may match any PostgreSQL binary, but &lt;code&gt;/usr/local/bin/postgres&lt;/code&gt; only matches a PostgreSQL process with that exact path.
If any of the strings match, the process is tracked.&lt;/p&gt;
&lt;p&gt;Each regular expression in &lt;code&gt;cmdline&lt;/code&gt; must match the corresponding &lt;code&gt;argv&lt;/code&gt; for the process to be tracked.
The first element that is matched is &lt;code&gt;argv[1]&lt;/code&gt;.
Regular expression captures are added to the &lt;code&gt;.Matches&lt;/code&gt; map for use in the name.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.process&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.process&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.process&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt; component to collect metrics from &lt;code&gt;prometheus.exporter.process&lt;/code&gt;:&lt;/p&gt;

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

  matcher {
    comm = [&amp;#34;alloy&amp;#34;]
  }
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterprocess">&lt;code>prometheus.exporter.process&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.process&lt;/code> component embeds the &lt;a href="https://github.com/ncabatoff/process-exporter" target="_blank" rel="noopener noreferrer">&lt;code>process_exporter&lt;/code>&lt;/a> for collecting process stats from &lt;code>/proc&lt;/code>.&lt;/p>
&lt;div data-shared="reference/components/exporter-clustering-warning.md">
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>We do not recommend using this exporter with &lt;a href="../../../../get-started/clustering/">clustering&lt;/a> enabled.&lt;/p></description></item><item><title>prometheus.exporter.redis</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.redis/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.redis/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterredis&#34;&gt;&lt;code&gt;prometheus.exporter.redis&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.redis&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/oliver006/redis_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;redis_exporter&lt;/code&gt;&lt;/a&gt; for collecting metrics from a Redis database.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.redis &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    redis_addr = &amp;#34;&amp;lt;REDIS_ADDRESS&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.redis&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;redis_addr&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Address (host and port) of the Redis instance to connect to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_key_groups_batch_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Check key or key groups batch size hint for the underlying SCAN.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_key_groups&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of Lua regular expressions (regex) for grouping keys.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_keys&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of key-patterns to export value and length/size, searched for with SCAN.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_single_keys&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of single keys to export value and length/size.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_single_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of single streams to export info about streams, groups, and consumers.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;check_streams&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of stream-patterns to export info about streams, groups, and consumers to search for with SCAN.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;config_command&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;What to use for the CONFIG command.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;CONFIG&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;connection_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for connection to Redis instance (in Golang duration format).&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;15s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;count_keys&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of individual keys to export counts for.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;export_client_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape Client List specific metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;export_client_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to include the client&amp;rsquo;s port when exporting the client list.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;export_key_values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to export key values as labels when using &lt;code&gt;check_keys&lt;/code&gt; or &lt;code&gt;check_single_keys&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;incl_system_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to include system metrics. For example &lt;code&gt;redis_total_system_memory_bytes&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;is_cluster&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether the connection is to a Redis cluster.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;is_tile38&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape Tile38-specific metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_distinct_key_groups&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of distinct key groups with the most memory utilization to present as distinct metrics per database.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;100&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Namespace for the metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;redis&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ping_on_connect&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to ping the Redis instance after connecting.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;redis_metrics_only&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to just export metrics or to also export go runtime metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;redis_password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of a file containing a password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;redis_password_map_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of a JSON file containing a map of Redis URIs to passwords.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;redis_password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Password of the Redis instance.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;redis_user&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;User name to use for authentication. Redis ACL for Redis 6.0 and newer.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;script_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to Lua Redis script for collecting extra metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;script_paths&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of paths to Lua Redis scripts for collecting extra metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;set_client_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to set client name to &lt;code&gt;redis_exporter&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;skip_tls_verification&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to skip TLS verification.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tls_ca_cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name of the CA certificate file (including full path) if the server requires TLS client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tls_client_cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name of the client certificate file (including full path) if the server requires TLS client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tls_client_key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name of the client key file (including full path) if the server requires TLS client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If &lt;code&gt;redis_password_file&lt;/code&gt; is defined, it takes precedence over &lt;code&gt;redis_password&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;check_key_groups&lt;/code&gt; isn&amp;rsquo;t set, no key groups are made.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;check_key_groups_batch_size&lt;/code&gt; argument name reflects key groups for backwards compatibility, but applies to both key and key groups.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;script_path&lt;/code&gt; argument may also be specified as a comma-separated string of paths, though it&amp;rsquo;s encouraged to use &lt;code&gt;script_paths&lt;/code&gt; when using multiple Lua scripts.&lt;/p&gt;
&lt;p&gt;Any leftover key groups beyond &lt;code&gt;max_distinct_key_groups&lt;/code&gt; are aggregated in the &amp;lsquo;overflow&amp;rsquo; bucket.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;is_cluster&lt;/code&gt; argument must be set to &lt;code&gt;true&lt;/code&gt; when connecting to a Redis cluster and using either of the &lt;code&gt;check_keys&lt;/code&gt; and &lt;code&gt;check_single_keys&lt;/code&gt; arguments.&lt;/p&gt;


&lt;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;Setting &lt;code&gt;export_client_port&lt;/code&gt; increases the cardinality of all Redis metrics.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.redis&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.redis&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.redis&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.redis&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.redis&lt;/code&gt;:&lt;/p&gt;

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

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterredis">&lt;code>prometheus.exporter.redis&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.redis&lt;/code> component embeds the &lt;a href="https://github.com/oliver006/redis_exporter" target="_blank" rel="noopener noreferrer">&lt;code>redis_exporter&lt;/code>&lt;/a> for collecting metrics from a Redis database.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.redis &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
redis_addr = &amp;#34;&amp;lt;REDIS_ADDRESS&amp;gt;&amp;#34;
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.redis&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.self</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.self/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.self/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterself&#34;&gt;&lt;code&gt;prometheus.exporter.self&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.self&lt;/code&gt; component collects and exposes metrics about Alloy itself.&lt;/p&gt;


&lt;div data-shared=&#34;reference/components/exporter-clustering-warning.md&#34;&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;We do not recommend using this exporter with &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;clustering&lt;/a&gt; enabled.&lt;/p&gt;
&lt;p&gt;The default &lt;code&gt;instance&lt;/code&gt; label set by this exporter is the hostname of the machine running Alloy.
Alloy clustering uses consistent hashing to distribute targets across the instances.
This requires the discovered targets to be the same and have the same labels across all cluster instances.&lt;/p&gt;
&lt;p&gt;If you do need to use this component in a cluster, use a dedicated &lt;code&gt;prometheus.scrape&lt;/code&gt; component that&amp;rsquo;s used to scrape
this exporter and doesn&amp;rsquo;t have clustering enabled. Alternatively, use &lt;code&gt;discovery.relabel&lt;/code&gt; to set the &lt;code&gt;instance&lt;/code&gt; label to a
value that is the same across all cluster instances.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.self &amp;#34;&amp;lt;LABEL&amp;gt;&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;prometheus.exporter.self&lt;/code&gt; component doesn&amp;rsquo;t support any arguments.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.self&lt;/code&gt; component doesn&amp;rsquo;t support any blocks.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.self&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.self&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.self&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.self&lt;/code&gt;:&lt;/p&gt;

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

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterself">&lt;code>prometheus.exporter.self&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.self&lt;/code> component collects and exposes metrics about Alloy itself.&lt;/p>
&lt;div data-shared="reference/components/exporter-clustering-warning.md">
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>We do not recommend using this exporter with &lt;a href="../../../../get-started/clustering/">clustering&lt;/a> enabled.&lt;/p>
&lt;p>The default &lt;code>instance&lt;/code> label set by this exporter is the hostname of the machine running Alloy.
Alloy clustering uses consistent hashing to distribute targets across the instances.
This requires the discovered targets to be the same and have the same labels across all cluster instances.&lt;/p></description></item><item><title>prometheus.exporter.snmp</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.snmp/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.snmp/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportersnmp&#34;&gt;&lt;code&gt;prometheus.exporter.snmp&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus/snmp_exporter/tree/v0.29.0&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;snmp_exporter&lt;/code&gt;&lt;/a&gt;.
The &lt;code&gt;snmp_exporter&lt;/code&gt; lets you collect SNMP data and expose them as Prometheus metrics.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;&lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; uses the latest configuration introduced in version v0.29.0 of the Prometheus &lt;code&gt;snmp_exporter&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

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

  target &amp;#34;&amp;lt;TARGET_NAME&amp;gt;&amp;#34; {
    address = &amp;#34;&amp;lt;TARGET_ADDRESS&amp;gt;&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.snmp &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  config_file = &amp;#34;&amp;lt;SNMP_CONFIG_FILE_PATH&amp;gt;&amp;#34;
  targets     = &amp;lt;TARGET_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.snmp&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;concurrency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SNMP exporter concurrency.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;config_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SNMP configuration file defining custom modules.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;config_merge_strategy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A strategy defining how &lt;code&gt;config&lt;/code&gt; or &lt;code&gt;config_file&lt;/code&gt; contents merge with the embedded SNMP config. Can be &lt;code&gt;replace&lt;/code&gt; or &lt;code&gt;merge&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;replace&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;config&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt; or &lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SNMP configuration as inline string.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SNMP targets.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;config_file&lt;/code&gt; argument points to a YAML file defining which snmp_exporter modules to use.
Refer to &lt;a href=&#34;https://github.com/prometheus/snmp_exporter/tree/v0.29.0?tab=readme-ov-file#configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;snmp_exporter&lt;/a&gt; for details on how to generate a configuration file.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;config&lt;/code&gt; argument must be a YAML document as string defining which SNMP modules and authorizations to use.
&lt;code&gt;config&lt;/code&gt; is typically loaded by using the exports of another component.
For example,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;local.file.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.http.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote.s3.LABEL.content&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Set &lt;code&gt;config_merge_strategy&lt;/code&gt; to &lt;code&gt;merge&lt;/code&gt; to add additional configuration to the embedded SNMP configuration.
For example, if you need to add a few custom &lt;code&gt;auth&lt;/code&gt; settings without regenerating the whole configuration.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;targets&lt;/code&gt; argument is an alternative to the [target][] block. This is useful when SNMP targets are supplied by another component.
The following labels can be set to a target:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;name&lt;/code&gt;: The name of the target (required).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;address&lt;/code&gt; or &lt;code&gt;__address__&lt;/code&gt;: The address of SNMP device (required).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;module&lt;/code&gt;: SNMP modules to use for polling, separated by comma.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;auth&lt;/code&gt;: The SNMP authentication profile to use.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;walk_params&lt;/code&gt;: The configuration to use for this target.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Any other labels defined are added to the scraped metrics.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.exporter.snmp&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 3;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#target\&amp;#34;\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures an SNMP target.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#walk_param\&amp;#34;\u003e\u003ccode\u003ewalk_param\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eSNMP connection profiles to override default SNMP settings.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#target&#34;&gt;&lt;code&gt;target&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures an SNMP target.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#walk_param&#34;&gt;&lt;code&gt;walk_param&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;SNMP connection profiles to override default SNMP settings.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;target&#34;&gt;&lt;code&gt;target&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;target&lt;/code&gt; block defines an individual SNMP target.
The &lt;code&gt;target&lt;/code&gt; block may be specified multiple times to define multiple targets.
The label of the block is required and is used in the target&amp;rsquo;s &lt;code&gt;job&lt;/code&gt; label.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The address of SNMP device.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;auth&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SNMP authentication profile to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Map of labels to apply to all metrics captured from the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;module&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;SNMP modules to use for polling, separated by comma.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;snmp_context&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Override the &lt;code&gt;context_name&lt;/code&gt; parameter in the SNMP configuration file.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;walk_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Config to use for this target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;walk_param&#34;&gt;&lt;code&gt;walk_param&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;walk_param&lt;/code&gt; block defines an individual SNMP connection profile that can be used to override default SNMP settings.
The &lt;code&gt;walk_param&lt;/code&gt; block may be specified multiple times to define multiple SNMP connection profiles.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_repetitions&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How many objects to request with GET/GETBULK.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;25&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name of the module to override.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;retries&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How many times to retry a failed request.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;3&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for each individual SNMP request.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.snmp&lt;/code&gt;:&lt;/p&gt;

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

    target &amp;#34;network_switch_1&amp;#34; {
        address     = &amp;#34;192.168.1.2&amp;#34;
        module      = &amp;#34;system,if_mib&amp;#34;
        walk_params = &amp;#34;public&amp;#34;
        labels = {
            &amp;#34;env&amp;#34; = &amp;#34;dev&amp;#34;,
        }
    }

    target &amp;#34;network_router_2&amp;#34; {
        address     = &amp;#34;192.168.1.3&amp;#34;
        module      = &amp;#34;system,if_mib,mikrotik&amp;#34;
        walk_params = &amp;#34;private&amp;#34;
    }

    walk_param &amp;#34;private&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }

    walk_param &amp;#34;public&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }
}

// Configure a prometheus.scrape component to collect SNMP metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
    targets    = prometheus.exporter.snmp.example.targets
    forward_to = [ /* ... */ ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example uses an embedded configuration with secrets:&lt;/p&gt;

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

prometheus.exporter.snmp &amp;#34;example&amp;#34; {
    config = local.file.snmp_config.content

    target &amp;#34;network_switch_1&amp;#34; {
        address     = &amp;#34;192.168.1.2&amp;#34;
        module      = &amp;#34;system,if_mib&amp;#34;
        walk_params = &amp;#34;public&amp;#34;
    }

    target &amp;#34;network_router_2&amp;#34; {
        address     = &amp;#34;192.168.1.3&amp;#34;
        module      = &amp;#34;system,if_mib,mikrotik&amp;#34;
        walk_params = &amp;#34;private&amp;#34;
    }

    walk_param &amp;#34;private&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }

    walk_param &amp;#34;public&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }
}

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

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

        basic_auth {
            username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
            password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PROMETHEUS_REMOTE_WRITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Prometheus &lt;code&gt;remote_write&lt;/code&gt; compatible server to send metrics to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password to use for authentication to the &lt;code&gt;remote_write&lt;/code&gt; API.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following example uses the alternative way to pass targets:&lt;/p&gt;

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

    targets = [
        {
            &amp;#34;name&amp;#34;        = &amp;#34;network_switch_1&amp;#34;,
            &amp;#34;address&amp;#34;     = &amp;#34;192.168.1.2&amp;#34;,
            &amp;#34;module&amp;#34;      = &amp;#34;system,if_mib&amp;#34;,
            &amp;#34;walk_params&amp;#34; = &amp;#34;public&amp;#34;,
            &amp;#34;env&amp;#34;         = &amp;#34;dev&amp;#34;,
        },
        {
            &amp;#34;name&amp;#34;        = &amp;#34;network_router_2&amp;#34;,
            &amp;#34;address&amp;#34;     = &amp;#34;192.168.1.3&amp;#34;,
            &amp;#34;module&amp;#34;      = &amp;#34;system,if_mib,mikrotik&amp;#34;,
            &amp;#34;walk_params&amp;#34; = &amp;#34;private&amp;#34;,
        },
    ]

    walk_param &amp;#34;private&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }

    walk_param &amp;#34;public&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }
}

// Configure a prometheus.scrape component to collect SNMP metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
    targets    = prometheus.exporter.snmp.example.targets
    forward_to = [ /* ... */ ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example uses the &lt;a href=&#34;../../local/local.file/&#34;&gt;&lt;code&gt;local.file&lt;/code&gt; component&lt;/a&gt; to read targets from a YAML file and send them to the &lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; component:&lt;/p&gt;

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

prometheus.exporter.snmp &amp;#34;example&amp;#34; {
    config_file = &amp;#34;snmp_modules.yml&amp;#34;

    targets = encoding.from_yaml(local.file.targets.content)

    walk_param &amp;#34;private&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }

    walk_param &amp;#34;public&amp;#34; {
        retries = &amp;#34;2&amp;#34;
    }
}

// Configure a prometheus.scrape component to collect SNMP metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
    targets    = prometheus.exporter.snmp.example.targets
    forward_to = [ /* ... */ ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The YAML file in this example looks like this:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;- name: t1
  address: localhost:161
  module: default
  auth: public_v2
- name: t2
  address: localhost:161
  module: default
  auth: public_v2&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example uses the &lt;a href=&#34;../../discovery/discovery.file/&#34;&gt;&lt;code&gt;discovery.file&lt;/code&gt; component&lt;/a&gt; to send targets to the &lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; component:&lt;/p&gt;

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

prometheus.exporter.snmp &amp;#34;example&amp;#34; {
  config_file = &amp;#34;snmp_modules.yml&amp;#34;
  targets = discovery.file.example.targets
}

// Configure a prometheus.scrape component to collect SNMP metrics.
prometheus.scrape &amp;#34;demo&amp;#34; {
    targets    = prometheus.exporter.snmp.example.targets
    forward_to = [ /* ... */ ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The YAML file in this example looks like this:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;- targets:
  - localhost:161
  labels:
    name: t1
    module: default
    auth: public_v2
- targets:
  - localhost:161
  labels:
    name: t2
    module: default
    auth: public_v2&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snmp&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#targets-consumers&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportersnmp">&lt;code>prometheus.exporter.snmp&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.snmp&lt;/code> component embeds the &lt;a href="https://github.com/prometheus/snmp_exporter/tree/v0.29.0" target="_blank" rel="noopener noreferrer">&lt;code>snmp_exporter&lt;/code>&lt;/a>.
The &lt;code>snmp_exporter&lt;/code> lets you collect SNMP data and expose them as Prometheus metrics.&lt;/p>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>&lt;code>prometheus.exporter.snmp&lt;/code> uses the latest configuration introduced in version v0.29.0 of the Prometheus &lt;code>snmp_exporter&lt;/code>.&lt;/p></description></item><item><title>prometheus.exporter.snowflake</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.snowflake/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.snowflake/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportersnowflake&#34;&gt;&lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/grafana/snowflake-prometheus-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;snowflake_exporter&lt;/code&gt;&lt;/a&gt; for collecting warehouse, database, table, and replication statistics from a Snowflake account via HTTP for Prometheus consumption.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;
&lt;p&gt;You can use the &lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt; component with password or RSA authentication.&lt;/p&gt;
&lt;h3 id=&#34;password-authentication&#34;&gt;Password Authentication&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.snowflake &amp;#34;LABEL&amp;#34; {
    account_name = &amp;#34;&amp;lt;SNOWFLAKE_ACCOUNT_NAME&amp;gt;&amp;#34;
    username =     &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
    password =     &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    warehouse =    &amp;#34;&amp;lt;VIRTUAL_WAREHOUSE&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;rsa-authentication&#34;&gt;RSA Authentication&lt;/h3&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.snowflake &amp;#34;LABEL&amp;#34; {
    account_name =         &amp;#34;&amp;lt;SNOWFLAKE_ACCOUNT_NAME&amp;gt;&amp;#34;
    username =             &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
    private_key_path =     &amp;#34;&amp;lt;RSA_PRIVATE_KEY_PATH&amp;gt;&amp;#34;
    private_key_password = &amp;#34;&amp;lt;RSA_PRIVATE_KEY_PASSWORD&amp;gt;&amp;#34;
    warehouse =            &amp;#34;&amp;lt;VIRTUAL_WAREHOUSE&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;account_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The account to collect metrics from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The username for the user used when querying metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;warehouse&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The warehouse to use when querying metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_tracing&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to have the snowflake database driver provide trace logging.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_deleted_tables&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to exclude deleted tables when querying table storage metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The password for the user used when querying metrics (required for password 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;private_key_password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The password for the user&amp;rsquo;s RSA private key (required for encrypted RSA key-pair 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;private_key_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the user&amp;rsquo;s RSA private key file (required for RSA key-pair 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;role&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The role to use when querying metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;ACCOUNTADMIN&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;One of &lt;code&gt;password&lt;/code&gt; or &lt;code&gt;private_key_path&lt;/code&gt; must be specified to authenticate.
Users with an encrypted private key will also need to provide a &lt;code&gt;private_key_password&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt; component to collect metrics from &lt;code&gt;prometheus.exporter.snowflake&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.snowflake &amp;#34;example&amp;#34; {
  account_name = &amp;#34;XXXXXXX-YYYYYYY&amp;#34;
  username     = &amp;#34;grafana&amp;#34;
  password     = &amp;#34;snowflake&amp;#34;
  warehouse    = &amp;#34;examples&amp;#34;
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportersnowflake">&lt;code>prometheus.exporter.snowflake&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.snowflake&lt;/code> component embeds the &lt;a href="https://github.com/grafana/snowflake-prometheus-exporter" target="_blank" rel="noopener noreferrer">&lt;code>snowflake_exporter&lt;/code>&lt;/a> for collecting warehouse, database, table, and replication statistics from a Snowflake account via HTTP for Prometheus consumption.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>You can use the &lt;code>prometheus.exporter.snowflake&lt;/code> component with password or RSA authentication.&lt;/p></description></item><item><title>prometheus.exporter.squid</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.squid/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.squid/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexportersquid&#34;&gt;&lt;code&gt;prometheus.exporter.squid&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.squid&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/boynux/squid-exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;squid_exporter&lt;/code&gt;&lt;/a&gt; for collecting metrics from a squid instance.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.squid &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    address = &amp;#34;&amp;lt;SQUID_ADDRESS&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.squid&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The squid address to collect metrics from.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The password for the user used when querying metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The username for the user used when querying metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.squid&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.squid&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.squid&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.squid&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.squid&lt;/code&gt;:&lt;/p&gt;

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

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexportersquid">&lt;code>prometheus.exporter.squid&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.squid&lt;/code> component embeds the &lt;a href="https://github.com/boynux/squid-exporter" target="_blank" rel="noopener noreferrer">&lt;code>squid_exporter&lt;/code>&lt;/a> for collecting metrics from a squid instance.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.squid &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
address = &amp;#34;&amp;lt;SQUID_ADDRESS&amp;gt;&amp;#34;
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.squid&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.static</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.static/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.static/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterstatic&#34;&gt;&lt;code&gt;prometheus.exporter.static&lt;/code&gt;&lt;/h1&gt;


&lt;div data-shared=&#34;stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;prometheus.exporter.static&lt;/code&gt; loads metrics from text specified in &lt;a href=&#34;https://prometheus.io/docs/instrumenting/exposition_formats/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;Prometheus exposition format&lt;/code&gt;&lt;/a&gt; and exposes them for scraping.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;prometheus.exporter.static&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.static &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following argument with &lt;code&gt;prometheus.exporter.static&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;text&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Text in Prometheus exposition format.&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;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.static&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.static&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.static&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.static&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.static &amp;#34;demo&amp;#34; {
    text = `
# HELP http_requests_total The total number of HTTP requests.
# TYPE http_requests_total counter
http_requests_total{method=&amp;#34;post&amp;#34;,code=&amp;#34;200&amp;#34;} 1027
http_requests_total{method=&amp;#34;post&amp;#34;,code=&amp;#34;400&amp;#34;}    3

# HELP http_request_duration_seconds A histogram of the request duration.
# TYPE http_request_duration_seconds histogram
http_request_duration_seconds_bucket{le=&amp;#34;0.05&amp;#34;} 24054
http_request_duration_seconds_bucket{le=&amp;#34;0.1&amp;#34;} 33444
http_request_duration_seconds_bucket{le=&amp;#34;0.2&amp;#34;} 100392
http_request_duration_seconds_bucket{le=&amp;#34;0.5&amp;#34;} 129389
http_request_duration_seconds_bucket{le=&amp;#34;1&amp;#34;} 133988
http_request_duration_seconds_bucket{le=&amp;#34;&amp;#43;Inf&amp;#34;} 144320
http_request_duration_seconds_sum 53423
http_request_duration_seconds_count 144320
    `
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterstatic">&lt;code>prometheus.exporter.static&lt;/code>&lt;/h1>
&lt;div data-shared="stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an &lt;a href="/docs/release-life-cycle/">experimental&lt;/a> component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code>stability.level&lt;/code>
&lt;a href="/docs/alloy/v1.15/reference/cli/run/">flag&lt;/a> to &lt;code>experimental&lt;/code>.&lt;/p></description></item><item><title>prometheus.exporter.statsd</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.statsd/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.statsd/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterstatsd&#34;&gt;&lt;code&gt;prometheus.exporter.statsd&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.statsd&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus/statsd_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;statsd_exporter&lt;/code&gt;&lt;/a&gt; for collecting StatsD-style metrics and exporting them as Prometheus metrics.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.statsd &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.statsd&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum size of your metric mapping cache. Relies on least recently used replacement policy if max size is reached.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cache_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Metric mapping cache type. Valid options are &amp;ldquo;lru&amp;rdquo; and &amp;ldquo;random&amp;rdquo;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;lru&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;event_flush_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time between event queue flushes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;200ms&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;event_flush_threshold&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of events to hold in queue before flushing.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;event_queue_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size of internal queue for processing events.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;listen_tcp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The TCP address on which to receive statsd metric lines. Use &lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt; to disable it.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;:9125&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;listen_udp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The UDP address on which to receive statsd metric lines. Use &lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt; to disable it.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;:9125&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;listen_unixgram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Unixgram socket path to receive statsd metric lines in datagram. Use &lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt; to disable it.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mapping_config_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to a YAML mapping file used to translate specific dot-separated StatsD metrics into labeled Prometheus metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;parse_dogstatsd_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Parse DogStatsd style tags.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;parse_influxdb_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Parse InfluxDB style tags.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;parse_librato_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Parse Librato style tags.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;parse_signalfx_tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Parse SignalFX style tags.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;read_buffer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Size (in bytes) of the operating system&amp;rsquo;s transmit read buffer associated with the UDP or Unixgram connection.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relay_addr&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Relay address configuration (UDP endpoint in the format &amp;lsquo;host:port&amp;rsquo;).&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relay_packet_length&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum relay output packet length to avoid fragmentation.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1400&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;unix_socket_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The permission mode of the Unix socket.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;755&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;At least one of &lt;code&gt;listen_udp&lt;/code&gt;, &lt;code&gt;listen_tcp&lt;/code&gt;, or &lt;code&gt;listen_unixgram&lt;/code&gt; should be enabled.
Refer to the &lt;a href=&#34;https://github.com/prometheus/statsd_exporter#metric-mapping-and-configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;statsd_exporter&lt;/code&gt; documentation&lt;/a&gt; more information about the mapping &lt;code&gt;config file&lt;/code&gt;.
Make sure the kernel parameter &lt;code&gt;net.core.rmem_max&lt;/code&gt; is set to a value greater than the value specified in &lt;code&gt;read_buffer&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;blocks&#34;&gt;Blocks&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.statsd&lt;/code&gt; component doesn&amp;rsquo;t support any blocks. You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.statsd&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.statsd&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.statsd&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.statsd&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.statsd &amp;#34;example&amp;#34; {
  listen_udp            = &amp;#34;&amp;#34;
  listen_tcp            = &amp;#34;:9125&amp;#34;
  listen_unixgram       = &amp;#34;&amp;#34;
  unix_socket_mode      = &amp;#34;755&amp;#34;
  mapping_config_path   = &amp;#34;mapTest.yaml&amp;#34;
  read_buffer           = 1
  cache_size            = 1000
  cache_type            = &amp;#34;lru&amp;#34;
  event_queue_size      = 10000
  event_flush_threshold = 1000
  event_flush_interval  = &amp;#34;200ms&amp;#34;
  parse_dogstatsd_tags  = true
  parse_influxdb_tags   = true
  parse_librato_tags    = true
  parse_signalfx_tags   = true
}

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterstatsd">&lt;code>prometheus.exporter.statsd&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.statsd&lt;/code> component embeds the &lt;a href="https://github.com/prometheus/statsd_exporter" target="_blank" rel="noopener noreferrer">&lt;code>statsd_exporter&lt;/code>&lt;/a> for collecting StatsD-style metrics and exporting them as Prometheus metrics.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">Alloy&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-alloy">prometheus.exporter.statsd &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="arguments">Arguments&lt;/h2>
&lt;p>You can use the following arguments with &lt;code>prometheus.exporter.statsd&lt;/code>:&lt;/p></description></item><item><title>prometheus.exporter.unix</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.unix/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.unix/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterunix&#34;&gt;&lt;code&gt;prometheus.exporter.unix&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.unix&lt;/code&gt; component uses the &lt;a href=&#34;https://github.com/prometheus/node_exporter&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;node_exporter&lt;/code&gt;&lt;/a&gt; to expose a wide variety of hardware and OS metrics for Unix-based systems.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;node_exporter&lt;/code&gt; itself is comprised of various &lt;em&gt;collectors&lt;/em&gt;, which you can enable and disable.
For more information on collectors, refer to the &lt;a href=&#34;#collectors-list&#34;&gt;&lt;code&gt;collectors-list&lt;/code&gt;&lt;/a&gt; section.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;prometheus.exporter.unix&lt;/code&gt; components by giving them different labels.&lt;/p&gt;


&lt;div data-shared=&#34;reference/components/exporter-clustering-warning.md&#34;&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;We do not recommend using this exporter with &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;clustering&lt;/a&gt; enabled.&lt;/p&gt;
&lt;p&gt;The default &lt;code&gt;instance&lt;/code&gt; label set by this exporter is the hostname of the machine running Alloy.
Alloy clustering uses consistent hashing to distribute targets across the instances.
This requires the discovered targets to be the same and have the same labels across all cluster instances.&lt;/p&gt;
&lt;p&gt;If you do need to use this component in a cluster, use a dedicated &lt;code&gt;prometheus.scrape&lt;/code&gt; component that&amp;rsquo;s used to scrape
this exporter and doesn&amp;rsquo;t have clustering enabled. Alternatively, use &lt;code&gt;discovery.relabel&lt;/code&gt; to set the &lt;code&gt;instance&lt;/code&gt; label to a
value that is the same across all cluster instances.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.unix &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.unix&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collectors to disable.&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;enable_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collectors to enable.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_exporter_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether metrics about the exporter itself should be reported.&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;procfs_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The procfs mount point.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/proc&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rootfs_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specify a prefix for accessing the host filesystem.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&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;set_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Overrides the default set of enabled collectors with the collectors listed.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sysfs_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The sysfs mount point.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/sys&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;udev_data_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The udev data path.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/run/udev/data&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;set_collectors&lt;/code&gt; defines a hand-picked list of enabled-by-default collectors.
If set, anything not provided in that list is disabled by default.
Refer to the &lt;a href=&#34;#collectors-list&#34;&gt;Collectors list&lt;/a&gt; for the default set of enabled collectors for each supported operating system.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;enable_collectors&lt;/code&gt; enables more collectors over the default set, or on top of the ones provided in &lt;code&gt;set_collectors&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;disable_collectors&lt;/code&gt; extends the default set of disabled collectors.
If there are conflicts, it takes precedence over &lt;code&gt;enable_collectors&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.exporter.unix&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 22;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#arp\&amp;#34;\u003e\u003ccode\u003earp\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003earp\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#bcache\&amp;#34;\u003e\u003ccode\u003ebcache\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003ebcache\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#cpu\&amp;#34;\u003e\u003ccode\u003ecpu\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003ecpu\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#disk\&amp;#34;\u003e\u003ccode\u003edisk\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003ediskstats\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#ethtool\&amp;#34;\u003e\u003ccode\u003eethtool\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eethtool\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#filesystem\&amp;#34;\u003e\u003ccode\u003efilesystem\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003efilesystem\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#hwmon\&amp;#34;\u003e\u003ccode\u003ehwmon\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003ehwmon\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#ipvs\&amp;#34;\u003e\u003ccode\u003eipvs\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eipvs\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#ntp\&amp;#34;\u003e\u003ccode\u003entp\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003entp\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#netclass\&amp;#34;\u003e\u003ccode\u003enetclass\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003enetclass\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#netdev\&amp;#34;\u003e\u003ccode\u003enetdev\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003enetdev\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#netstat\&amp;#34;\u003e\u003ccode\u003enetstat\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003enetstat\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#perf\&amp;#34;\u003e\u003ccode\u003eperf\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eperf\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#powersupply\&amp;#34;\u003e\u003ccode\u003epowersupply\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003epowersupply\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#runit\&amp;#34;\u003e\u003ccode\u003erunit\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003erunit\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#supervisord\&amp;#34;\u003e\u003ccode\u003esupervisord\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003esupervisord\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#sysctl\&amp;#34;\u003e\u003ccode\u003esysctl\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003esysctl\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#systemd\&amp;#34;\u003e\u003ccode\u003esystemd\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003esystemd\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#tapestats\&amp;#34;\u003e\u003ccode\u003etapestats\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003etapestats\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#textfile\&amp;#34;\u003e\u003ccode\u003etextfile\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003etextfile\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#vmstat\&amp;#34;\u003e\u003ccode\u003evmstat\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003evmstat\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#arp&#34;&gt;&lt;code&gt;arp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;arp&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#bcache&#34;&gt;&lt;code&gt;bcache&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;bcache&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#cpu&#34;&gt;&lt;code&gt;cpu&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;cpu&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#disk&#34;&gt;&lt;code&gt;disk&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;diskstats&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#ethtool&#34;&gt;&lt;code&gt;ethtool&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;ethtool&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#filesystem&#34;&gt;&lt;code&gt;filesystem&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;filesystem&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#hwmon&#34;&gt;&lt;code&gt;hwmon&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;hwmon&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#ipvs&#34;&gt;&lt;code&gt;ipvs&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;ipvs&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#ntp&#34;&gt;&lt;code&gt;ntp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;ntp&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#netclass&#34;&gt;&lt;code&gt;netclass&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;netclass&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#netdev&#34;&gt;&lt;code&gt;netdev&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;netdev&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#netstat&#34;&gt;&lt;code&gt;netstat&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;netstat&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#perf&#34;&gt;&lt;code&gt;perf&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;perf&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#powersupply&#34;&gt;&lt;code&gt;powersupply&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;powersupply&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#runit&#34;&gt;&lt;code&gt;runit&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;runit&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#supervisord&#34;&gt;&lt;code&gt;supervisord&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;supervisord&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#sysctl&#34;&gt;&lt;code&gt;sysctl&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;sysctl&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#systemd&#34;&gt;&lt;code&gt;systemd&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;systemd&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tapestats&#34;&gt;&lt;code&gt;tapestats&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;tapestats&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#textfile&#34;&gt;&lt;code&gt;textfile&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;textfile&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#vmstat&#34;&gt;&lt;code&gt;vmstat&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;vmstat&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;arp&#34;&gt;&lt;code&gt;arp&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of devices to exclude for &lt;code&gt;arp&lt;/code&gt; collector. Mutually exclusive with &lt;code&gt;device_include&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of devices to include for &lt;code&gt;arp&lt;/code&gt; collector. Mutually exclusive with &lt;code&gt;device_exclude&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;netlink&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use netlink to gather ARP stats instead of &lt;code&gt;/proc/net/arp&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;It is recommended to set &lt;code&gt;netlink&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; on systems with InfiniBand or other non-Ethernet devices.&lt;/p&gt;
&lt;h3 id=&#34;bcache&#34;&gt;&lt;code&gt;bcache&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;priority_stats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable exposing of expensive &lt;code&gt;bcache&lt;/code&gt; priority stats.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;cpu&#34;&gt;&lt;code&gt;cpu&lt;/code&gt;&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;bugs_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of &lt;code&gt;bugs&lt;/code&gt; field in &lt;code&gt;cpu&lt;/code&gt; info to filter.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;flags_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of &lt;code&gt;flags&lt;/code&gt; field in &lt;code&gt;cpu&lt;/code&gt; info to filter.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;guest&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable the &lt;code&gt;node_cpu_guest_seconds_total&lt;/code&gt; metric.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;info&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable the &lt;code&gt;cpu_info&lt;/code&gt; metric for the &lt;code&gt;cpu&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;disk&#34;&gt;&lt;code&gt;disk&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of devices to exclude for &lt;code&gt;diskstats&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d&#43;n\\d&#43;p)\\d&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of devices to include for &lt;code&gt;diskstats&lt;/code&gt;. If set, &lt;code&gt;device_exclude&lt;/code&gt; is ignored.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;ethtool&#34;&gt;&lt;code&gt;ethtool&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of &lt;code&gt;ethtool&lt;/code&gt; devices to exclude. Mutually exclusive with &lt;code&gt;device_include&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of &lt;code&gt;ethtool&lt;/code&gt; devices to include. Mutually exclusive with &lt;code&gt;device_exclude&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of &lt;code&gt;ethtool&lt;/code&gt; stats to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;.*&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;filesystem&#34;&gt;&lt;code&gt;filesystem&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The default values vary by the operating system Alloy runs on.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fs_types_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of filesystem types to ignore for filesystem collector.&lt;/td&gt;
              &lt;td&gt;&lt;em&gt;see below&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mount_points_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of mount points to ignore for filesystem collector.&lt;/td&gt;
              &lt;td&gt;&lt;em&gt;see below&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mount_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How long to wait for a mount to respond before marking it as stale.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;fs_types_exclude&lt;/code&gt; defaults to the following regular expression string:&lt;/p&gt;



  

  

  


&lt;div data-element=&#34;tabs&#34;&gt;
  &lt;div data-element=&#34;tabs-bar&#34;&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;0&#34; data-label=&#34;linux&#34;&gt;linux&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;1&#34; data-label=&#34;osx&#34;&gt;osx&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;2&#34; data-label=&#34;bsd&#34;&gt;bsd&lt;/div&gt;
    
  &lt;/div&gt;
  &lt;div data-element=&#34;tab-content&#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;linux&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-linux&#34;&gt;^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;osx&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-osx&#34;&gt;^(autofs|devfs)$&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;bsd&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bsd&#34;&gt;^devfs$&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;code&gt;mount_points_exclude&lt;/code&gt; defaults to the following regular expression string:&lt;/p&gt;



  

  

  


&lt;div data-element=&#34;tabs&#34;&gt;
  &lt;div data-element=&#34;tabs-bar&#34;&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;0&#34; data-label=&#34;linux&#34;&gt;linux&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;1&#34; data-label=&#34;osx&#34;&gt;osx&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;2&#34; data-label=&#34;bsd&#34;&gt;bsd&lt;/div&gt;
    
  &lt;/div&gt;
  &lt;div data-element=&#34;tab-content&#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;linux&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-linux&#34;&gt;^/(dev|proc|run/credentials/.&amp;#43;|sys|var/lib/docker/.&amp;#43;)($|/)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;osx&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-osx&#34;&gt;^/(dev)($|/)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;bsd&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bsd&#34;&gt;^/(dev)($|/)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;hwmon&#34;&gt;&lt;code&gt;hwmon&lt;/code&gt;&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;chip_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of &lt;code&gt;hwmon&lt;/code&gt; chip to include. Mutually exclusive to &lt;code&gt;chip-exclude&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;chip_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of &lt;code&gt;hwmon&lt;/code&gt; chip to exclude. Mutually exclusive to &lt;code&gt;chip-include&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;ipvs&#34;&gt;&lt;code&gt;ipvs&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;backend_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Array of IPVS backend stats labels.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[local_address, local_port, remote_address, remote_port, proto, local_mark]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;netclass&#34;&gt;&lt;code&gt;netclass&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignore_invalid_speed_device&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Ignore net devices with invalid speed values.&lt;/td&gt;
              &lt;td&gt;&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;ignored_devices&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of net devices to ignore for &lt;code&gt;netclass&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;netdev&#34;&gt;&lt;code&gt;netdev&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;address_info&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable collecting address-info for every device.&lt;/td&gt;
              &lt;td&gt;&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;device_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of net devices to exclude. Mutually exclusive with &lt;code&gt;device_include&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;device_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of net devices to include. Mutually exclusive with &lt;code&gt;device_exclude&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;netstat&#34;&gt;&lt;code&gt;netstat&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fields&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of fields to return for &lt;code&gt;netstat&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;&lt;em&gt;see below&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;fields&lt;/code&gt; defaults to the following regular expression string:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;&amp;#34;^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*|TCPSynRetrans|TCPTimeouts)|Tcp_(ActiveOpens|InSegs|OutSegs|OutRsts|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts|RcvbufErrors|SndbufErrors))$&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;ntp&#34;&gt;&lt;code&gt;ntp&lt;/code&gt;&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;ip_ttl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;TTL to use while sending NTP query.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;local_offset_tolerance&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Offset between local clock and local NTPD time to tolerate.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1ms&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_distance&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Max accumulated distance to the root.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;3466080us&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;protocol_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;NTP protocol version.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;4&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_is_local&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certifies that the server address isn&amp;rsquo;t a public NTP server.&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;server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;NTP server to use for the collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;127.0.0.1&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;perf&#34;&gt;&lt;code&gt;perf&lt;/code&gt;&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;cache_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;Perf&lt;/code&gt; cache profilers that should be collected.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cpus&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of CPUs from which &lt;code&gt;perf&lt;/code&gt; metrics should be collected.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_cache_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable &lt;code&gt;perf&lt;/code&gt; cache profilers.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_hardware_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable &lt;code&gt;perf&lt;/code&gt; hardware profilers.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_software_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disable &lt;code&gt;perf&lt;/code&gt; software profilers.&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;hardware_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;Perf&lt;/code&gt; hardware profilers that should be collected.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;software_profilers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;Perf&lt;/code&gt; software profilers that should be collected.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tracepoint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Array of &lt;code&gt;perf&lt;/code&gt; tracepoints that should be collected.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;powersupply&#34;&gt;&lt;code&gt;powersupply&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignored_supplies&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of power supplies to ignore for the &lt;code&gt;powersupplyclass&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;runit&#34;&gt;&lt;code&gt;runit&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;service_dir&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to &lt;code&gt;runit&lt;/code&gt; service directory.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/etc/service&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;supervisord&#34;&gt;&lt;code&gt;supervisord&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;XML RPC endpoint for the &lt;code&gt;supervisord&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;http://localhost:9001/RPC2&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Setting &lt;code&gt;SUPERVISORD_URL&lt;/code&gt; in the environment overrides the default value.
An explicit value in the block takes precedence over the environment variable.&lt;/p&gt;
&lt;h3 id=&#34;sysctl&#34;&gt;&lt;code&gt;sysctl&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Numeric &lt;code&gt;sysctl&lt;/code&gt; values to expose.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include_info&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;String &lt;code&gt;sysctl&lt;/code&gt; values to expose.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;systemd&#34;&gt;&lt;code&gt;systemd&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_restarts&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables service unit metric &lt;code&gt;service_restart_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&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;start_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables service unit metric &lt;code&gt;unit_start_time_seconds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&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;task_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables service unit task metrics &lt;code&gt;unit_tasks_current&lt;/code&gt; and &lt;code&gt;unit_tasks_max.&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;unit_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of systemd units to exclude. Units must both match include and not match exclude to be collected.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;.&#43;\\.(automount|device|mount|scope|slice)&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;unit_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of systemd units to include. Units must both match include and not match exclude to be collected.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;.&#43;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;tapestats&#34;&gt;&lt;code&gt;tapestats&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignored_devices&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of &lt;code&gt;tapestats&lt;/code&gt; devices to ignore.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;textfile&#34;&gt;&lt;code&gt;textfile&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;directory&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Directory to read &lt;code&gt;*.prom&lt;/code&gt; files from for the &lt;code&gt;textfile&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;vmstat&#34;&gt;&lt;code&gt;vmstat&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fields&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of fields to return for the &lt;code&gt;vmstat&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^(oom_kill|pgpg|pswp|pg.*fault).*&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.unix&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.unix&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.unix&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;collectors-list&#34;&gt;Collectors list&lt;/h2&gt;
&lt;p&gt;The following table lists the available collectors that &lt;code&gt;node_exporter&lt;/code&gt; brings bundled in.
Some collectors only work on specific operating systems.
Enabling a collector that&amp;rsquo;s not supported by the host operating system where Alloy is running is a no-op.&lt;/p&gt;
&lt;p&gt;You can choose to enable a subset of collectors to limit the amount of metrics exposed by the &lt;code&gt;prometheus.exporter.unix&lt;/code&gt; component, or disable collectors that are expensive to run.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;OS&lt;/th&gt;
              &lt;th&gt;Enabled by default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;arp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes ARP statistics from &lt;code&gt;/proc/net/arp&lt;/code&gt; or via netlink.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bcache&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes bcache statistics from &lt;code&gt;/sys/fs/bcache&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bonding&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes the number of configured and active slaves of Linux bonding interfaces.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;boottime&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes system boot time derived from the &lt;code&gt;kern.boottime sysctl&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, NetBSD, OpenBSD, Oracle Solaris&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;btrfs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics on btrfs.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;buddyinfo&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics of memory fragments as reported by &lt;code&gt;/proc/buddyinfo&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;conntrack&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Shows conntrack statistics. Does nothing if no &lt;code&gt;/proc/sys/net/netfilter/&lt;/code&gt; is present.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cpu&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes CPU statistics.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, Oracle Solaris, NetBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cpufreq&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes CPU frequency statistics.&lt;/td&gt;
              &lt;td&gt;Linux, Oracle Solaris&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;devstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes device statistics.&lt;/td&gt;
              &lt;td&gt;Dragonfly, FreeBSD&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;diskstats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes disk I/O statistics.&lt;/td&gt;
              &lt;td&gt;Darwin, Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;dmi&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes DMI information.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drbd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes Distributed Replicated Block Device statistics (to version 8.4).&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes GPU card info from &lt;code&gt;/sys/class/drm/card?/device&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;edac&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes error detection and correction statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;entropy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes available entropy.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ethtool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes ethtool stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exec&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes execution statistics.&lt;/td&gt;
              &lt;td&gt;Dragonfly, FreeBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fibrechannel&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes FibreChannel statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;filefd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes file descriptor statistics from &lt;code&gt;/proc/sys/fs/file-nr&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;filesystem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes filesystem statistics, such as disk space used.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;hwmon&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes hardware monitoring and sensor data from &lt;code&gt;/sys/class/hwmon&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;infiniband&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network statistics specific to InfiniBand and Intel OmniPath configurations.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;interrupts&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes detailed interrupts statistics.&lt;/td&gt;
              &lt;td&gt;Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ipvs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes IPVS status from &lt;code&gt;/proc/net/ip_vs&lt;/code&gt; and stats from &lt;code&gt;/proc/net/ip_vs_stats&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ksmd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes kernel and system statistics from &lt;code&gt;/sys/kernel/mm/ksm&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;lnstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes Linux network cache stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;loadavg&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes load average.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, NetBSD, OpenBSD, Oracle Solaris&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logind&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes session counts from logind.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mdadm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics about devices in &lt;code&gt;/proc/mdstat&lt;/code&gt;. Does nothing if no &lt;code&gt;/proc/mdstat&lt;/code&gt; is present.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;meminfo_numa&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes memory statistics from &lt;code&gt;/proc/meminfo_numa&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;meminfo&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes memory statistics.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, OpenBSD, NetBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mountstats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes filesystem statistics from &lt;code&gt;/proc/self/mountstats&lt;/code&gt;. Exposes detailed NFS client statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;netclass&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network interface info from &lt;code&gt;/sys/class/net&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;netdev&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network interface statistics such as bytes transferred.&lt;/td&gt;
              &lt;td&gt;Darwin, Dragonfly, FreeBSD, Linux, OpenBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;netisr&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes netisr statistics.&lt;/td&gt;
              &lt;td&gt;FreeBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;netstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network statistics from &lt;code&gt;/proc/net/netstat&lt;/code&gt;. This is the same information as &lt;code&gt;netstat -s&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;network_route&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes network route statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nfs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes NFS client statistics from &lt;code&gt;/proc/net/rpc/nfs&lt;/code&gt;. This is the same information as &lt;code&gt;nfsstat -c&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nfsd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes NFS kernel server statistics from &lt;code&gt;/proc/net/rpc/nfsd&lt;/code&gt;. This is the same information as &lt;code&gt;nfsstat -s&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ntp&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes local NTP daemon health to check time.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nvme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes NVMe statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;os&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes os-release information.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;perf&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes perf based metric. &lt;strong&gt;Warning&lt;/strong&gt;: Metrics are dependent on kernel configuration and settings.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;powersupplyclass&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collects information on power supplies.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pressure&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes pressure stall statistics from &lt;code&gt;/proc/pressure/&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux kernel 4.20&#43; or CONFIG_PSI&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;processes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes aggregate process statistics from /proc.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;qdisc&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes queuing discipline statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rapl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes various statistics from &lt;code&gt;/sys/class/powercap&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;runit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes service status from runit.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;schedstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes task scheduler statistics from &lt;code&gt;/proc/schedstat&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sockstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes various statistics from &lt;code&gt;/proc/net/sockstat&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;softirqs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes detailed softirq statistics from &lt;code&gt;/proc/softirqs&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;softnet&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics from &lt;code&gt;/proc/net/softnet_stat&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;stat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes various statistics from &lt;code&gt;/proc/stat&lt;/code&gt;. This includes boot time, forks and interrupts.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;supervisord&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes service status from supervisord.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sysctl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Expose sysctl values from &lt;code&gt;/proc/sys&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;systemd&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes service and system status from systemd.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tapestats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes tape device stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tcpstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes TCP connection status information from &lt;code&gt;/proc/net/tcp&lt;/code&gt; and &lt;code&gt;/proc/net/tcp6&lt;/code&gt;. &lt;strong&gt;Warning&lt;/strong&gt;: The current version has potential performance issues in high load situations.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;textfile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collects metrics from files in a directory matching the filename pattern &lt;code&gt;*.prom&lt;/code&gt;. The files must use &lt;a href=&#34;https://prometheus.io/docs/instrumenting/exposition_formats/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;text-based exposition formats&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;thermal_zone&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes thermal zone &amp;amp; cooling device statistics from &lt;code&gt;/sys/class/thermal&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;thermal&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes thermal statistics.&lt;/td&gt;
              &lt;td&gt;Darwin&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes the current system time.&lt;/td&gt;
              &lt;td&gt;any&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes selected &lt;code&gt;adjtimex(2)&lt;/code&gt; system call stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;udp_queues&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes UDP total lengths of the &lt;code&gt;rx_queue&lt;/code&gt; and &lt;code&gt;tx_queue&lt;/code&gt; from &lt;code&gt;/proc/net/udp&lt;/code&gt; and &lt;code&gt;/proc/net/udp6&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;uname&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes system information as provided by the uname system call.&lt;/td&gt;
              &lt;td&gt;Darwin, FreeBSD, Linux, OpenBSD, NetBSD&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;vmstat&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes statistics from &lt;code&gt;/proc/vmstat&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;wifi&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes WiFi device and station statistics.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;xfs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes XFS runtime statistics.&lt;/td&gt;
              &lt;td&gt;Linux kernel 4.4&#43;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;zfs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes ZFS performance statistics.&lt;/td&gt;
              &lt;td&gt;Linux, Oracle Solaris&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;zoneinfo&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Exposes zone stats.&lt;/td&gt;
              &lt;td&gt;Linux&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;run-on-dockerkubernetes&#34;&gt;Run on Docker/Kubernetes&lt;/h2&gt;
&lt;p&gt;When running Alloy in a Docker container, you need to bind mount the filesystem, procfs, and sysfs from the host machine, as well as set the corresponding arguments for the component to work.&lt;/p&gt;
&lt;p&gt;You may also need to add capabilities such as &lt;code&gt;SYS_TIME&lt;/code&gt; and make sure that Alloy is running with elevated privileges for some of the collectors to work properly.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; component&lt;/a&gt; to collect metrics from &lt;code&gt;prometheus.exporter.unix&lt;/code&gt;:&lt;/p&gt;

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

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

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

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterunix">&lt;code>prometheus.exporter.unix&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.unix&lt;/code> component uses the &lt;a href="https://github.com/prometheus/node_exporter" target="_blank" rel="noopener noreferrer">&lt;code>node_exporter&lt;/code>&lt;/a> to expose a wide variety of hardware and OS metrics for Unix-based systems.&lt;/p>
&lt;p>The &lt;code>node_exporter&lt;/code> itself is comprised of various &lt;em>collectors&lt;/em>, which you can enable and disable.
For more information on collectors, refer to the &lt;a href="#collectors-list">&lt;code>collectors-list&lt;/code>&lt;/a> section.&lt;/p></description></item><item><title>prometheus.exporter.windows</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.windows/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.exporter.windows/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusexporterwindows&#34;&gt;&lt;code&gt;prometheus.exporter.windows&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;prometheus.exporter.windows&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/tree/v0.31.3&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;windows_exporter&lt;/code&gt;&lt;/a&gt; which exposes a wide variety of hardware and OS metrics for Windows-based systems.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;windows_exporter&lt;/code&gt; itself comprises various &lt;em&gt;collectors&lt;/em&gt;, which you can enable and disable as needed.
For more information on collectors, refer to the &lt;a href=&#34;#collectors-list&#34;&gt;&lt;code&gt;collectors-list&lt;/code&gt;&lt;/a&gt; section.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;blacklist&lt;/code&gt; and &lt;code&gt;whitelist&lt;/code&gt; configuration arguments are deprecated but remain available for backwards compatibility.
Use the &lt;code&gt;include&lt;/code&gt; and &lt;code&gt;exclude&lt;/code&gt; arguments instead.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div data-shared=&#34;reference/components/exporter-clustering-warning.md&#34;&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;We do not recommend using this exporter with &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;clustering&lt;/a&gt; enabled.&lt;/p&gt;
&lt;p&gt;The default &lt;code&gt;instance&lt;/code&gt; label set by this exporter is the hostname of the machine running Alloy.
Alloy clustering uses consistent hashing to distribute targets across the instances.
This requires the discovered targets to be the same and have the same labels across all cluster instances.&lt;/p&gt;
&lt;p&gt;If you do need to use this component in a cluster, use a dedicated &lt;code&gt;prometheus.scrape&lt;/code&gt; component that&amp;rsquo;s used to scrape
this exporter and doesn&amp;rsquo;t have clustering enabled. Alternatively, use &lt;code&gt;discovery.relabel&lt;/code&gt; to set the &lt;code&gt;instance&lt;/code&gt; label to a
value that is the same across all cluster instances.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.windows &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.exporter.windows&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_collectors&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of collectors to enable.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;cpu&amp;quot;,&amp;quot;logical_disk&amp;quot;,&amp;quot;net&amp;quot;,&amp;quot;os&amp;quot;,&amp;quot;service&amp;quot;,&amp;quot;system&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;enabled_collectors&lt;/code&gt; defines a hand-picked list of collectors to enable by default.
If you set this argument, the component disables any collectors not in the list.
Refer to the &lt;a href=&#34;#collectors-list&#34;&gt;Collectors list&lt;/a&gt; for the default set.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;To use any of the configuration blocks below, you must add the corresponding collector name to the &lt;code&gt;enabled_collectors&lt;/code&gt; list.
For example, to use the &lt;code&gt;dns&lt;/code&gt; block, you must include &lt;code&gt;&amp;quot;dns&amp;quot;&lt;/code&gt; in your &lt;code&gt;enabled_collectors&lt;/code&gt; list.
A block has no effect unless you enable its collector.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.exporter.windows&lt;/code&gt;.
Each block only takes effect if you include its corresponding collector in &lt;code&gt;enabled_collectors&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 25;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#dfsr\&amp;#34;\u003e\u003ccode\u003edfsr\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003edfsr\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#dns\&amp;#34;\u003e\u003ccode\u003edns\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003edns\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#exchange\&amp;#34;\u003e\u003ccode\u003eexchange\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eexchange\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#filetime\&amp;#34;\u003e\u003ccode\u003efiletime\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003efiletime\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#iis\&amp;#34;\u003e\u003ccode\u003eiis\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eiis\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#logical_disk\&amp;#34;\u003e\u003ccode\u003elogical_disk\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003elogical_disk\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#mscluster\&amp;#34;\u003e\u003ccode\u003emscluster\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003emscluster\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#mssql\&amp;#34;\u003e\u003ccode\u003emssql\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003emssql\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#netframework\&amp;#34;\u003e\u003ccode\u003enetframework\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003enetframework\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#net\&amp;#34;\u003e\u003ccode\u003enet\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003enet\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#network\&amp;#34;\u003e\u003ccode\u003enetwork\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003enetwork\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#performancecounter\&amp;#34;\u003e\u003ccode\u003eperformancecounter\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eperformancecounter\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#physical_disk\&amp;#34;\u003e\u003ccode\u003ephysical_disk\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003ephysical_disk\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#printer\&amp;#34;\u003e\u003ccode\u003eprinter\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eprinter\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#process\&amp;#34;\u003e\u003ccode\u003eprocess\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eprocess\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#scheduled_task\&amp;#34;\u003e\u003ccode\u003escheduled_task\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003escheduled_task\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#service\&amp;#34;\u003e\u003ccode\u003eservice\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eservice\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#smb_client\&amp;#34;\u003e\u003ccode\u003esmb_client\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003esmb_client\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#smb\&amp;#34;\u003e\u003ccode\u003esmb\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003esmb\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#smtp\&amp;#34;\u003e\u003ccode\u003esmtp\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003esmtp\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#tcp\&amp;#34;\u003e\u003ccode\u003etcp\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003etcp\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#textfile\&amp;#34;\u003e\u003ccode\u003etextfile\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003etextfile\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#text_file-deprecated-use-textfile-instead\&amp;#34;\u003e\u003ccode\u003etext_file\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003e(Deprecated: use \u003ccode\u003etextfile\u003c/code\u003e instead) Configures the \u003ccode\u003etextfile\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#update\&amp;#34;\u003e\u003ccode\u003eupdate\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the \u003ccode\u003eupdate\u003c/code\u003e collector.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#dfsr&#34;&gt;&lt;code&gt;dfsr&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;dfsr&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#dns&#34;&gt;&lt;code&gt;dns&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;dns&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#exchange&#34;&gt;&lt;code&gt;exchange&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;exchange&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#filetime&#34;&gt;&lt;code&gt;filetime&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;filetime&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#iis&#34;&gt;&lt;code&gt;iis&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;iis&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#logical_disk&#34;&gt;&lt;code&gt;logical_disk&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;logical_disk&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#mscluster&#34;&gt;&lt;code&gt;mscluster&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;mscluster&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#mssql&#34;&gt;&lt;code&gt;mssql&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;mssql&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#netframework&#34;&gt;&lt;code&gt;netframework&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;netframework&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#net&#34;&gt;&lt;code&gt;net&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;net&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#network&#34;&gt;&lt;code&gt;network&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;network&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#performancecounter&#34;&gt;&lt;code&gt;performancecounter&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;performancecounter&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#physical_disk&#34;&gt;&lt;code&gt;physical_disk&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;physical_disk&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#printer&#34;&gt;&lt;code&gt;printer&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;printer&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#process&#34;&gt;&lt;code&gt;process&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;process&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#scheduled_task&#34;&gt;&lt;code&gt;scheduled_task&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;scheduled_task&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#service&#34;&gt;&lt;code&gt;service&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;service&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#smb_client&#34;&gt;&lt;code&gt;smb_client&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;smb_client&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#smb&#34;&gt;&lt;code&gt;smb&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;smb&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#smtp&#34;&gt;&lt;code&gt;smtp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;smtp&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tcp&#34;&gt;&lt;code&gt;tcp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;tcp&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#textfile&#34;&gt;&lt;code&gt;textfile&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;textfile&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#text_file-deprecated-use-textfile-instead&#34;&gt;&lt;code&gt;text_file&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;(Deprecated: use &lt;code&gt;textfile&lt;/code&gt; instead) Configures the &lt;code&gt;textfile&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#update&#34;&gt;&lt;code&gt;update&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the &lt;code&gt;update&lt;/code&gt; collector.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;



&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;The &lt;code&gt;text_file&lt;/code&gt; block is deprecated as of Alloy v1.11.0.
Use the &lt;code&gt;textfile&lt;/code&gt; block to configure the &lt;code&gt;textfile&lt;/code&gt; collector.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;msmq&lt;/code&gt; block is deprecated as of Alloy v1.9.0.
You can still include this block in your configuration files, but it has no effect.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;dfsr&#34;&gt;&lt;code&gt;dfsr&lt;/code&gt;&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;sources_enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of DFSR &lt;code&gt;Perflib&lt;/code&gt; sources to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;connection&amp;quot;,&amp;quot;folder&amp;quot;,&amp;quot;volume&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;dns&#34;&gt;&lt;code&gt;dns&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of collectors to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;metrics&amp;quot;, &amp;quot;wmi_stats&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;exchange&#34;&gt;&lt;code&gt;exchange&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of collectors to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;ADAccessProcesses&amp;quot;, &amp;quot;TransportQueues&amp;quot;, &amp;quot;HttpProxy&amp;quot;, &amp;quot;ActiveSync&amp;quot;, &amp;quot;AvailabilityService&amp;quot;, &amp;quot;OutlookWebAccess&amp;quot;, &amp;quot;Autodiscover&amp;quot;, &amp;quot;WorkloadManagement&amp;quot;, &amp;quot;RpcClientAccess&amp;quot;, &amp;quot;MapiHttpEmsmdb&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;filetime&#34;&gt;&lt;code&gt;filetime&lt;/code&gt;&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;file_patterns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of glob patterns that match files to monitor.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;iis&#34;&gt;&lt;code&gt;iis&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;app_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of applications to ignore.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;app_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of applications to report on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;site_exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of sites to ignore.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;site_include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of sites to report on.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;app_exclude&lt;/code&gt;, &lt;code&gt;app_include&lt;/code&gt;, &lt;code&gt;site_exclude&lt;/code&gt;, and &lt;code&gt;site_include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;
&lt;h3 id=&#34;logical_disk&#34;&gt;&lt;code&gt;logical_disk&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of collectors to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;metrics&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of volumes to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of volumes to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The collectors specified by &lt;code&gt;enabled_list&lt;/code&gt; can include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bitlocker_status&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component includes volume names that match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and don&amp;rsquo;t match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;exclude&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;
&lt;h3 id=&#34;mscluster&#34;&gt;&lt;code&gt;mscluster&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of collectors to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;cluster&amp;quot;,&amp;quot;network&amp;quot;,&amp;quot;node&amp;quot;,&amp;quot;resource&amp;quot;,&amp;quot;resourcegroup&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The collectors specified by &lt;code&gt;enabled_list&lt;/code&gt; can include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cluster&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;network&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;node&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resource&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resourcegroup&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, you can set &lt;code&gt;enabled_list&lt;/code&gt; to &lt;code&gt;[&amp;quot;cluster&amp;quot;]&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;mssql&#34;&gt;&lt;code&gt;mssql&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_classes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of MSSQL WMI classes to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;accessmethods&amp;quot;, &amp;quot;availreplica&amp;quot;, &amp;quot;bufman&amp;quot;, &amp;quot;databases&amp;quot;, &amp;quot;dbreplica&amp;quot;, &amp;quot;genstats&amp;quot;, &amp;quot;info&amp;quot;, &amp;quot;locks&amp;quot;, &amp;quot;memmgr&amp;quot;, &amp;quot;sqlerrors&amp;quot;, &amp;quot;sqlstats&amp;quot;, &amp;quot;transactions&amp;quot;, &amp;quot;waitstats&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;net&#34;&gt;&lt;code&gt;net&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of collectors to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;metrics&amp;quot;, &amp;quot;nic_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;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of NICs to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of NICs to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The collectors specified by &lt;code&gt;enabled_list&lt;/code&gt; can include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nic_info&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component includes NIC names that match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and don&amp;rsquo;t match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;exclude&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;
&lt;h3 id=&#34;network&#34;&gt;&lt;code&gt;network&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of NICs to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of NICs to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The component includes NIC names that match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and don&amp;rsquo;t match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;exclude&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;
&lt;h3 id=&#34;netframework&#34;&gt;&lt;code&gt;netframework&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of collectors to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;clrexceptions&amp;quot;,&amp;quot;clrinterop&amp;quot;,&amp;quot;clrjit&amp;quot;,&amp;quot;clrloading&amp;quot;,&amp;quot;clrlocksandthreads&amp;quot;,&amp;quot;clrmemory&amp;quot;,&amp;quot;clrremoting&amp;quot;,&amp;quot;clrsecurity&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The collectors specified by &lt;code&gt;enabled_list&lt;/code&gt; can include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;clrexceptions&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;clrinterop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;clrjit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;clrloading&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;clrlocksandthreads&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;clrmemory&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;clrremoting&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;clrsecurity&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, you can set &lt;code&gt;enabled_list&lt;/code&gt; to &lt;code&gt;[&amp;quot;clrjit&amp;quot;]&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;performancecounter&#34;&gt;&lt;code&gt;performancecounter&lt;/code&gt;&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;objects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;YAML string representing the counters to monitor.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;objects&lt;/code&gt; field accepts a YAML string that satisfies the schema in the exporter&amp;rsquo;s &lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.performancecounter.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;documentation&lt;/a&gt; for the &lt;code&gt;performancecounter&lt;/code&gt; collector.
You can construct this directly in Alloy syntax with &lt;a href=&#34;../../../../get-started/configuration-syntax/expressions/types_and_values/#raw-strings&#34;&gt;raw Alloy syntax strings&lt;/a&gt;, but the best way to configure this collector is to use a &lt;code&gt;local.file&lt;/code&gt; component.&lt;/p&gt;

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

prometheus.exporter.windows &amp;#34;default&amp;#34; {
  ...

  performancecounter {
    objects = local.file.counters.content
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;performance_counters.yaml&lt;/code&gt; file should be a YAML file that represents an array of objects matching the schema in the documentation, like the example below.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;# Monitor Memory performance counters
- name: memory
  object: &amp;#34;Memory&amp;#34;
  counters:
    - name: &amp;#34;Cache Faults/sec&amp;#34;
      type: &amp;#34;counter&amp;#34;  # Use &amp;#39;counter&amp;#39; for cumulative/rate metrics
    - name: &amp;#34;Available Bytes&amp;#34;
      type: &amp;#34;gauge&amp;#34;    # Use &amp;#39;gauge&amp;#39; for point-in-time values

# Monitor Processor performance counters
- name: processor
  object: &amp;#34;Processor&amp;#34;
  instances: [&amp;#34;_Total&amp;#34;]  # Optional: filter to specific instances
  counters:
    - name: &amp;#34;% Processor Time&amp;#34;
      type: &amp;#34;gauge&amp;#34;
    - name: &amp;#34;Interrupts/sec&amp;#34;
      type: &amp;#34;counter&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;physical_disk&#34;&gt;&lt;code&gt;physical_disk&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of physical disk to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of physical disk to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;exclude&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;
&lt;h3 id=&#34;printer&#34;&gt;&lt;code&gt;printer&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of printer to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of printer to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The component includes printers that match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and don&amp;rsquo;t match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;exclude&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;
&lt;h3 id=&#34;process&#34;&gt;&lt;code&gt;process&lt;/code&gt;&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;counter_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Version of the process collector to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_iis_worker_process&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable IIS worker process name queries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of processes to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of processes to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;counter_version&lt;/code&gt; may be &lt;code&gt;0&lt;/code&gt;, &lt;code&gt;1&lt;/code&gt;, or &lt;code&gt;2&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A value of &lt;code&gt;1&lt;/code&gt; uses the Windows &lt;code&gt;Process&lt;/code&gt; performance counters through the &lt;a href=&#34;https://learn.microsoft.com/en-us/windows/win32/perfctrs/using-the-registry-functions-to-consume-counter-data&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;registry&lt;/a&gt; API.&lt;/li&gt;
&lt;li&gt;A value of &lt;code&gt;2&lt;/code&gt; uses the Windows &lt;code&gt;Process V2&lt;/code&gt; performance counters through the &lt;a href=&#34;https://learn.microsoft.com/en-us/windows/win32/perfctrs/collecting-performance-data&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Performance Data Helper (PDH)&lt;/a&gt; API. These counters are available starting in Windows 11.&lt;/li&gt;
&lt;li&gt;A value of &lt;code&gt;0&lt;/code&gt; checks if &lt;code&gt;Process V2&lt;/code&gt; counters are available and falls back to &lt;code&gt;Process&lt;/code&gt; counters if they aren&amp;rsquo;t.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component includes processes that match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and don&amp;rsquo;t match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;exclude&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;
&lt;p&gt;The upstream collector warns that &lt;code&gt;enable_iis_worker_process&lt;/code&gt; may leak memory. Use with caution.&lt;/p&gt;
&lt;h3 id=&#34;scheduled_task&#34;&gt;&lt;code&gt;scheduled_task&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of tasks to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of tasks to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The component includes tasks that match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and don&amp;rsquo;t match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;exclude&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;
&lt;h3 id=&#34;service&#34;&gt;&lt;code&gt;service&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of services to exclude.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of services to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The component includes services that match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and don&amp;rsquo;t match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;exclude&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;use_api&lt;/code&gt;, &lt;code&gt;where_clause&lt;/code&gt;, and &lt;code&gt;enable_v2_collector&lt;/code&gt; attributes are deprecated as of Alloy v1.9.0.
You can still include these attributes in your configuration files, but they have no effect.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;smb&#34;&gt;&lt;code&gt;smb&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated (no-op), a list of collectors 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The collectors specified by &lt;code&gt;enabled_list&lt;/code&gt; can include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ServerShares&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, you can set &lt;code&gt;enabled_list&lt;/code&gt; to &lt;code&gt;[&amp;quot;ServerShares&amp;quot;]&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;smb_client&#34;&gt;&lt;code&gt;smb_client&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated (no-op), a list of collectors 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The collectors specified by &lt;code&gt;enabled_list&lt;/code&gt; can include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ClientShares&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, you can set &lt;code&gt;enabled_list&lt;/code&gt; to &lt;code&gt;[&amp;quot;ClientShares&amp;quot;]&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;smtp&#34;&gt;&lt;code&gt;smtp&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of virtual servers to ignore.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Regular expression of virtual servers to include.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;^.&#43;$&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The component includes server names that match the regular expression specified by &lt;code&gt;include&lt;/code&gt; and don&amp;rsquo;t match the regular expression specified by &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The component &lt;a href=&#34;#wrap-regular-expression-strings&#34;&gt;wraps&lt;/a&gt; user-supplied &lt;code&gt;exclude&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; strings in a regular expression.&lt;/p&gt;
&lt;h3 id=&#34;tcp&#34;&gt;&lt;code&gt;tcp&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled_list&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of collectors to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;metrics&amp;quot;,&amp;quot;connections_state&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The collectors specified by &lt;code&gt;enabled_list&lt;/code&gt; can include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;connections_state&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, you can set &lt;code&gt;enabled_list&lt;/code&gt; to &lt;code&gt;[&amp;quot;metrics&amp;quot;]&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;textfile&#34;&gt;&lt;code&gt;textfile&lt;/code&gt;&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;directories&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of directories containing files to ingest.&lt;/td&gt;
              &lt;td&gt;&lt;em&gt;see below&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;text_file_directory&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated. The directory containing files to ingest.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;By default, &lt;code&gt;directories&lt;/code&gt; contains the &lt;code&gt;textfile_inputs&lt;/code&gt; directory in the Alloy installation directory.
For example, if you install Alloy in &lt;code&gt;C:\Program Files\GrafanaLabs\Alloy\&lt;/code&gt;, the default is &lt;code&gt;[&amp;quot;C:\Program Files\GrafanaLabs\Alloy\textfile_inputs&amp;quot;]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The deprecated &lt;code&gt;text_file_directory&lt;/code&gt; attribute accepts a comma-separated string of directories.
If you set both &lt;code&gt;text_file_directory&lt;/code&gt; and &lt;code&gt;directories&lt;/code&gt;, the component combines them into a single list.&lt;/p&gt;
&lt;p&gt;For backwards compatibility, you can also use the deprecated &lt;code&gt;text_file&lt;/code&gt; block to configure the &lt;code&gt;textfile&lt;/code&gt; collector.
If you configure both blocks, the component combines the distinct directory values from each.&lt;/p&gt;
&lt;p&gt;The component only reads files with the &lt;code&gt;.prom&lt;/code&gt; extension inside the specified directories.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;.prom&lt;/code&gt; files must end with an empty line feed for the component to recognize and read them.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;text_file-deprecated-use-textfile-instead&#34;&gt;&lt;code&gt;text_file&lt;/code&gt; (Deprecated: use &lt;code&gt;textfile&lt;/code&gt; instead)&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;directories&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of directories containing files to ingest.&lt;/td&gt;
              &lt;td&gt;&lt;em&gt;see below&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;text_file_directory&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated. The directory containing files to ingest.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;This block is deprecated. Use the &lt;code&gt;textfile&lt;/code&gt; block instead.&lt;/p&gt;
&lt;p&gt;By default, &lt;code&gt;directories&lt;/code&gt; contains the &lt;code&gt;textfile_inputs&lt;/code&gt; directory in the Alloy installation directory.
For example, if you install Alloy in &lt;code&gt;C:\Program Files\GrafanaLabs\Alloy\&lt;/code&gt;, the default is &lt;code&gt;[&amp;quot;C:\Program Files\GrafanaLabs\Alloy\textfile_inputs&amp;quot;]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The deprecated &lt;code&gt;text_file_directory&lt;/code&gt; attribute accepts a comma-separated string of directories.
If you set both &lt;code&gt;text_file_directory&lt;/code&gt; and &lt;code&gt;directories&lt;/code&gt;, the component combines them into a single list.&lt;/p&gt;
&lt;p&gt;If you configure both &lt;code&gt;text_file&lt;/code&gt; and &lt;code&gt;textfile&lt;/code&gt; blocks, the component combines the distinct directory values from each.&lt;/p&gt;
&lt;p&gt;The component only reads files with the &lt;code&gt;.prom&lt;/code&gt; extension inside the specified directories.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;.prom&lt;/code&gt; files must end with an empty line feed for the component to recognize and read them.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;update&#34;&gt;&lt;code&gt;update&lt;/code&gt;&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;online&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to search for updates online.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently to scrape Windows Update information.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;6h&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/exporter-component-exports.md&#34;&gt;
            &lt;p&gt;The following fields are exported and can be referenced by other components.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The targets that can be used to collect exporter metrics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, the &lt;code&gt;targets&lt;/code&gt; can either be passed to a &lt;code&gt;discovery.relabel&lt;/code&gt; component to rewrite the targets&amp;rsquo; label sets or to a &lt;code&gt;prometheus.scrape&lt;/code&gt; component that collects the exposed metrics.&lt;/p&gt;
&lt;p&gt;The exported targets use the configured &lt;a href=&#34;../../../../get-started/component_controller/#in-memory-traffic&#34;&gt;in-memory traffic&lt;/a&gt; address specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.windows&lt;/code&gt; reports as unhealthy only when you provide an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.windows&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific
debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.exporter.windows&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific
debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;wrap-regular-expression-strings&#34;&gt;Wrap regular expression strings&lt;/h2&gt;
&lt;p&gt;Some collector blocks such as &lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.scheduled_task.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;scheduled_task&lt;/code&gt;&lt;/a&gt; accept a regular expression as a string argument.
&lt;code&gt;prometheus.exporter.windows&lt;/code&gt; prefixes some regular expression string arguments with &lt;code&gt;^(?:&lt;/code&gt; and suffixes them with &lt;code&gt;)$&lt;/code&gt;.
For example, if a user sets an &lt;code&gt;exclude&lt;/code&gt; argument to &lt;code&gt;&amp;quot;.*&amp;quot;&lt;/code&gt;, Alloy sets it to &lt;code&gt;&amp;quot;^(?:.*)$&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To find out if the component wraps a particular regular expression argument, refer to the collector block documentation.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The wrapping may change the behaviour of your regular expression.
For example, the &lt;code&gt;e.*&lt;/code&gt; regular expression would normally match both the &amp;ldquo;service&amp;rdquo; and &amp;ldquo;email&amp;rdquo; strings.
However, &lt;code&gt;^(?:e.*)$&lt;/code&gt; would only match &amp;ldquo;email&amp;rdquo;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;collectors-list&#34;&gt;Collectors list&lt;/h2&gt;
&lt;p&gt;The following table lists the available collectors in &lt;code&gt;windows_exporter&lt;/code&gt;.
Some collectors only work on specific operating systems. If you enable a collector that the host OS doesn&amp;rsquo;t support, it has no effect.&lt;/p&gt;
&lt;p&gt;You can enable a subset of collectors to limit the amount of metrics that the &lt;code&gt;prometheus.exporter.windows&lt;/code&gt; component exposes, or disable collectors that are expensive to run.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Enabled by default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.ad.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;ad&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Active Directory Domain Services&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.adcs.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;adcs&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Active Directory Certificate Services&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.adfs.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;adfs&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Active Directory Federation Services&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.cache.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;cache&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Cache metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.cpu.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;cpu&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;CPU usage&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.cpu_info.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;cpu_info&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;CPU Information&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.container.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;container&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Container metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.dfsr.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;dfsr&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;DFSR metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.dhcp.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;dhcp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;DHCP Server&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.dns.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;dns&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;DNS Server&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.exchange.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;exchange&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Exchange metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.filetime.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;filetime&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;File modification time metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.fsrmquota.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;fsrmquota&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Microsoft File Server Resource Manager (FSRM) Quotas collector&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.gpu.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;gpu&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;GPU usage and memory consumption&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.hyperv.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;hyperv&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Hyper-V hosts&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.iis.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;iis&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;IIS sites and applications&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.logical_disk.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;logical_disk&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Logical disks, disk I/O&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.memory.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;memory&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Memory usage metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.mscluster.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;mscluster&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;MSCluster metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.msmq.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;msmq&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;MSMQ queues&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.mssql.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;mssql&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/use-sql-server-objects#SQLServerPOs&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;SQL Server Performance Objects&lt;/a&gt; metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.netframework.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;netframework&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;.NET Framework metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.net.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;net&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Network interface I/O&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.os.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;os&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;OS metrics (memory, processes, users)&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.pagefile.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;pagefile&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Pagefile metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.performancecounter.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;performancecounter&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Performance Counter metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.physical_disk.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;physical_disk&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Physical disks&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.printer.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;printer&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Printer metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.process.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;process&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Per-process metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.remote_fx.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;remote_fx&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;RemoteFX protocol (RDP) metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.scheduled_task.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;scheduled_task&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Scheduled Tasks metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.service.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;service&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Service state metrics&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.smb.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;smb&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;SMB Server shares&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.smbclient.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;smb_client&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;SMB Client shares&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.smtp.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;smtp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;IIS SMTP Server&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.system.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;system&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;System calls&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.tcp.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;tcp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;TCP connections&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.time.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;time&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Windows Time Service&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.thermalzone.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;thermalzone&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Thermal information&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.terminal_services.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;terminal_services&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Terminal services (RDS)&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.textfile.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;textfile&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Read Prometheus metrics from a text file&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.udp.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;udp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;UDP connections&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.update.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;update&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Windows Update service metrics&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/docs/collector.vmware.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;vmware&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Performance counters installed by the VMware Guest agent&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Refer to the linked documentation on each collector for more information on reported metrics, configuration settings and usage examples.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Certain collectors cause Alloy to crash if you use them without the required infrastructure.
These include but aren&amp;rsquo;t limited to &lt;code&gt;mscluster&lt;/code&gt;, &lt;code&gt;VMware&lt;/code&gt;, &lt;code&gt;nps&lt;/code&gt;, &lt;code&gt;dns&lt;/code&gt;, &lt;code&gt;msmq&lt;/code&gt;, &lt;code&gt;ad&lt;/code&gt;, &lt;code&gt;hyperv&lt;/code&gt;, and &lt;code&gt;scheduled_task&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;cs&lt;/code&gt; and &lt;code&gt;logon&lt;/code&gt; collectors are deprecated and removed from the exporter.
You can still configure these collectors, but they have no effect.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses a &lt;a href=&#34;../prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt; component to collect metrics from &lt;code&gt;prometheus.exporter.windows&lt;/code&gt;:&lt;/p&gt;

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

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

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

    basic_auth {
      username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example shows you how to enable additional collectors and configure them:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.exporter.windows &amp;#34;advanced&amp;#34; {
  // Enable additional collectors beyond the default set
  enabled_collectors = [
    &amp;#34;cpu&amp;#34;, &amp;#34;logical_disk&amp;#34;, &amp;#34;net&amp;#34;, &amp;#34;os&amp;#34;, &amp;#34;service&amp;#34;, &amp;#34;system&amp;#34;,  // defaults
    &amp;#34;dns&amp;#34;, &amp;#34;iis&amp;#34;, &amp;#34;process&amp;#34;, &amp;#34;scheduled_task&amp;#34;                 // additional
  ]

  // Configure DNS collector settings
  dns {
    enabled_list = [&amp;#34;metrics&amp;#34;, &amp;#34;wmi_stats&amp;#34;]
  }

  // Configure IIS collector settings
  iis {
    site_include = &amp;#34;^(Default Web Site|Production)$&amp;#34;
    app_exclude  = &amp;#34;^$&amp;#34;
  }

  // Configure process collector settings
  process {
    include = &amp;#34;^(chrome|firefox|notepad).*&amp;#34;
    exclude = &amp;#34;^$&amp;#34;
  }
}

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


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusexporterwindows">&lt;code>prometheus.exporter.windows&lt;/code>&lt;/h1>
&lt;p>The &lt;code>prometheus.exporter.windows&lt;/code> component embeds the &lt;a href="https://github.com/prometheus-community/windows_exporter/tree/v0.31.3" target="_blank" rel="noopener noreferrer">&lt;code>windows_exporter&lt;/code>&lt;/a> which exposes a wide variety of hardware and OS metrics for Windows-based systems.&lt;/p>
&lt;p>The &lt;code>windows_exporter&lt;/code> itself comprises various &lt;em>collectors&lt;/em>, which you can enable and disable as needed.
For more information on collectors, refer to the &lt;a href="#collectors-list">&lt;code>collectors-list&lt;/code>&lt;/a> section.&lt;/p></description></item><item><title>prometheus.operator.podmonitors</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.operator.podmonitors/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.operator.podmonitors/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusoperatorpodmonitors&#34;&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; discovers &lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;PodMonitor&lt;/a&gt; resources in your Kubernetes cluster and scrapes the targets they reference.
This component performs three main functions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Discover PodMonitor resources from your Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;Discover Pods in your cluster that match those PodMonitors.&lt;/li&gt;
&lt;li&gt;Scrape metrics from those Pods, and forward them to a receiver.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The default configuration assumes Alloy is running inside a Kubernetes cluster, and uses the in-cluster configuration to access the Kubernetes API.
You can run it from outside the cluster by supplying connection info in the &lt;code&gt;client&lt;/code&gt; block, but network level access to Pods is required to scrape metrics from them.&lt;/p&gt;
&lt;p&gt;PodMonitors may reference secrets for authenticating to targets to scrape them.
In these cases, the secrets are loaded and refreshed only when the PodMonitor is updated or when this component refreshes its internal state, which happens on a 5-minute refresh cycle.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.podmonitors &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send scraped metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespaces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of namespaces to search for PodMonitor resources. If not specified, all namespaces are searched.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;informer_sync_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for initial sync of PodMonitor resources.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 12;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#client\&amp;#34;\u003e\u003ccode\u003eclient\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures Kubernetes client used to find PodMonitors.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#authorization\&amp;#34;\u003e\u003ccode\u003eauthorization\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure generic authorization to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure basic authentication to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#oauth2\&amp;#34;\u003e\u003ccode\u003eoauth2\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure OAuth 2.0 for authenticating to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ccode\u003eoauth2\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#clustering\&amp;#34;\u003e\u003ccode\u003eclustering\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure the component for when Alloy is running in clustered mode.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#rule\&amp;#34;\u003e\u003ccode\u003erule\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eRelabeling rules to apply to discovered targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#scrape\&amp;#34;\u003e\u003ccode\u003escrape\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eDefault scrape configuration to apply to discovered targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#selector\&amp;#34;\u003e\u003ccode\u003eselector\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLabel selector for which PodMonitors to discover.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eselector\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#match_expression\&amp;#34;\u003e\u003ccode\u003ematch_expression\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLabel selector expression for which PodMonitors to discover.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#client&#34;&gt;&lt;code&gt;client&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures Kubernetes client used to find PodMonitors.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic authentication to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth 2.0 for authenticating to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;code&gt;oauth2&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Alloy is running in clustered mode.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#scrape&#34;&gt;&lt;code&gt;scrape&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Default scrape configuration to apply to discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#selector&#34;&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector for which PodMonitors to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt; &amp;gt; &lt;a href=&#34;#match_expression&#34;&gt;&lt;code&gt;match_expression&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector expression for which PodMonitors to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;client&#34;&gt;&lt;code&gt;client&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures the Kubernetes client used to discover PodMonitors.
If the &lt;code&gt;client&lt;/code&gt; block isn&amp;rsquo;t provided, the default in-cluster configuration with the service account of the running Alloy Pod is used.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL of the Kubernetes API server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kubeconfig_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of the &lt;code&gt;kubeconfig&lt;/code&gt; file to use for connecting to Kubernetes.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom HTTP headers to be sent along with each request. The map key is the header name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to send requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[&lt;code&gt;authorization&lt;/code&gt;][authorization] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;basic_auth&lt;/code&gt;][basic_auth] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token_file&lt;/code&gt;][client] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token&lt;/code&gt;][client] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;oauth2&lt;/code&gt;][oauth2] block&lt;/li&gt;
&lt;/ul&gt;


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

        
&lt;h3 id=&#34;authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;credentials_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;credentials&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;password_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;password&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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;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_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;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_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;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;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;Using &lt;code&gt;client_secret_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;client_secret&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;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&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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; isn&amp;rsquo;t provided, the minimum acceptable TLS version is inherited from Go&amp;rsquo;s default minimum version, TLS 1.2.
If &lt;code&gt;min_version&lt;/code&gt; is provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When Alloy is &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;using clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true, then this component instance opts-in to participating in the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering assumes that all cluster nodes are running with the same configuration file, and that all &lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; components that have opted-in to using clustering, over the course of a scrape interval have the same configuration.&lt;/p&gt;
&lt;p&gt;All &lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; components instances opting in to clustering use target labels and a consistent hashing algorithm to determine ownership for each of the targets between the cluster peers.
Then, each peer only scrapes the subset of targets that it&amp;rsquo;s responsible for, so that the scrape load is distributed.
When a node joins or leaves the cluster, every peer recalculates ownership and continues scraping with the new target set.
This performs better than hashmod sharding where &lt;em&gt;all&lt;/em&gt; nodes have to be re-distributed, as only 1/N of the target&amp;rsquo;s ownership is transferred, but is eventually consistent (rather than fully consistent like hashmod sharding is).&lt;/p&gt;
&lt;p&gt;If Alloy is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op, and &lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; scrapes every target it receives in its arguments.&lt;/p&gt;
&lt;h3 id=&#34;rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;rule&lt;/code&gt; block configures relabeling rules to apply to discovered scrape targets.
The &lt;code&gt;drop&lt;/code&gt; and &lt;code&gt;keep&lt;/code&gt; actions filter targets, not individual metrics.
To filter or relabel metrics after scraping, use a &lt;a href=&#34;../prometheus.relabel/&#34;&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt;&lt;/a&gt; component.&lt;/p&gt;


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


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression capture groups can be referred to using either the &lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;scrape&#34;&gt;&lt;code&gt;scrape&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/prom-operator-scrape.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_sample_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default maximum samples per scrape. Used as the default if the target resource doesn&amp;rsquo;t provide a sample limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default interval between scraping targets. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape interval.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1m&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_scrape_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default timeout for scrape requests. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape timeout.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10s&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_type_and_unit_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Whether the metric type and unit should be added as labels to scraped metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;honor_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Indicates whether to send metric metadata to downstream components.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_native_histograms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape native histograms from targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: The &lt;code&gt;honor_metadata&lt;/code&gt; and &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; arguments are &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; features.&lt;/p&gt;
&lt;p&gt;If you enable the &lt;code&gt;honor_metadata&lt;/code&gt; argument, resource consumption may increase, particularly if you ingest many metrics with different names.
Some downstream components aren&amp;rsquo;t compatible with Prometheus metadata.
The following components are compatible:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; only when configured for Remote Write v2.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.write_queue&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; argument is enabled and available from the scrape, the metric type and unit are added as labels to each scraped sample.
This provides additional schema information about metrics directly in the label set.
This feature doesn&amp;rsquo;t require downstream components to support Remote Write v2.&lt;/p&gt;
&lt;p&gt;Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental feature, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;selector&#34;&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;selector&lt;/code&gt; block describes a Kubernetes label selector for PodMonitors.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;match_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label keys and values used to discover resources.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;match_labels&lt;/code&gt; argument is empty, all PodMonitor resources are matched.&lt;/p&gt;
&lt;h3 id=&#34;match_expression&#34;&gt;&lt;code&gt;match_expression&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;match_expression&lt;/code&gt; block describes a Kubernetes label matcher expression for PodMonitors discovery.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label name to match against.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;operator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The operator to use when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The values used when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;operator&lt;/code&gt; argument must be one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;In&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;NotIn&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;Exists&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;DoesNotExist&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If there are multiple &lt;code&gt;match_expressions&lt;/code&gt; blocks inside of a &lt;code&gt;selector&lt;/code&gt; block, they&amp;rsquo;re combined together with AND clauses.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; doesn&amp;rsquo;t export any fields.
It forwards all metrics it scrapes to the receiver configured with the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; is reported as unhealthy when given an invalid configuration, Prometheus components fail to initialize, or the connection to the Kubernetes API couldn&amp;rsquo;t be established properly.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; reports the status of the last scrape for each configured scrape job on the component&amp;rsquo;s debug endpoint, including discovered labels, and the last scrape time.&lt;/p&gt;
&lt;p&gt;It also exposes some debug information for each PodMonitor it has discovered, including any errors found while reconciling the scrape configuration from the PodMonitor.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example discovers all PodMonitors in your cluster, and forwards collected metrics to a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.remote_write &amp;#34;staging&amp;#34; {
  // Send metrics to a locally running Mimir.
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

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

prometheus.operator.podmonitors &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example limits discovered PodMonitors to ones with the label &lt;code&gt;team=ops&lt;/code&gt; in a specific namespace: &lt;code&gt;my-app&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.podmonitors &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    namespaces = [&amp;#34;my-app&amp;#34;]
    selector {
        match_expression {
            key = &amp;#34;team&amp;#34;
            operator = &amp;#34;In&amp;#34;
            values = [&amp;#34;ops&amp;#34;]
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example applies additional relabel rules to discovered targets to filter by hostname.
This may be useful if running Alloy as a DaemonSet.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.podmonitors &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    rule {
      action = &amp;#34;keep&amp;#34;
      regex = sys.env(&amp;#34;&amp;lt;HOSTNAME&amp;gt;&amp;#34;)
      source_labels = [&amp;#34;__meta_kubernetes_pod_node_name&amp;#34;]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusoperatorpodmonitors">&lt;code>prometheus.operator.podmonitors&lt;/code>&lt;/h1>
&lt;p>&lt;code>prometheus.operator.podmonitors&lt;/code> discovers &lt;a href="https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitor" target="_blank" rel="noopener noreferrer">PodMonitor&lt;/a> resources in your Kubernetes cluster and scrapes the targets they reference.
This component performs three main functions:&lt;/p>
&lt;ol>
&lt;li>Discover PodMonitor resources from your Kubernetes cluster.&lt;/li>
&lt;li>Discover Pods in your cluster that match those PodMonitors.&lt;/li>
&lt;li>Scrape metrics from those Pods, and forward them to a receiver.&lt;/li>
&lt;/ol>
&lt;p>The default configuration assumes Alloy is running inside a Kubernetes cluster, and uses the in-cluster configuration to access the Kubernetes API.
You can run it from outside the cluster by supplying connection info in the &lt;code>client&lt;/code> block, but network level access to Pods is required to scrape metrics from them.&lt;/p></description></item><item><title>prometheus.operator.probes</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.operator.probes/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.operator.probes/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusoperatorprobes&#34;&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; discovers &lt;a href=&#34;https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.Probe&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Probe&lt;/a&gt; resources in your Kubernetes cluster and scrapes the targets they reference.
This component performs three main functions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Discover Probe resources from your Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;Discover targets or ingresses that match those Probes.&lt;/li&gt;
&lt;li&gt;Scrape metrics from those endpoints, and forward them to a receiver.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The default configuration assumes Alloy is running inside a Kubernetes cluster, and uses the in-cluster configuration to access the Kubernetes API.
You can run it from outside the cluster by supplying connection info in the &lt;code&gt;client&lt;/code&gt; block, but network level access to pods is required to scrape metrics from them.&lt;/p&gt;
&lt;p&gt;Probes may reference secrets for authenticating to targets to scrape them.
In these cases, the secrets are loaded and refreshed only when the Probe is updated or when this component refreshes its&amp;rsquo; internal state, which happens on a 5-minute refresh cycle.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.probes &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.operator.probes&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send scraped metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;informer_sync_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for initial sync of Probe resources.&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;namespaces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of namespaces to search for Probe resources. If not specified, all namespaces are searched.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.operator.probes&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 12;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#client\&amp;#34;\u003e\u003ccode\u003eclient\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures Kubernetes client used to find Probes.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#authorization\&amp;#34;\u003e\u003ccode\u003eauthorization\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure generic authorization to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure basic authentication to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#oauth2\&amp;#34;\u003e\u003ccode\u003eoauth2\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure OAuth 2.0 for authenticating to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ccode\u003eoauth2\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#clustering\&amp;#34;\u003e\u003ccode\u003eclustering\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure the component for when Alloy is running in clustered mode.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#rule\&amp;#34;\u003e\u003ccode\u003erule\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eRelabeling rules to apply to discovered targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#scrape\&amp;#34;\u003e\u003ccode\u003escrape\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eDefault scrape configuration to apply to discovered targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#selector\&amp;#34;\u003e\u003ccode\u003eselector\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLabel selector for which Probes to discover.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eselector\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#match_expression\&amp;#34;\u003e\u003ccode\u003ematch_expression\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLabel selector expression for which Probes to discover.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#client&#34;&gt;&lt;code&gt;client&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures Kubernetes client used to find Probes.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic authentication to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth 2.0 for authenticating to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;code&gt;oauth2&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Alloy is running in clustered mode.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#scrape&#34;&gt;&lt;code&gt;scrape&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Default scrape configuration to apply to discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#selector&#34;&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector for which Probes to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt; &amp;gt; &lt;a href=&#34;#match_expression&#34;&gt;&lt;code&gt;match_expression&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector expression for which Probes to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;client&#34;&gt;&lt;code&gt;client&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures the Kubernetes client used to discover Probes.
If the &lt;code&gt;client&lt;/code&gt; block isn&amp;rsquo;t provided, the default in-cluster configuration with the service account of the running Alloy Pod is used.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL of the Kubernetes API server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom HTTP headers to be sent along with each request. The map key is the header name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kubeconfig_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of the &lt;code&gt;kubeconfig&lt;/code&gt; file to use for connecting to Kubernetes.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;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_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;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_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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[&lt;code&gt;authorization&lt;/code&gt;][authorization] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;basic_auth&lt;/code&gt;][basic_auth] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token_file&lt;/code&gt;][client] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token&lt;/code&gt;][client] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;oauth2&lt;/code&gt;][oauth2] block&lt;/li&gt;
&lt;/ul&gt;


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

        
&lt;h3 id=&#34;authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;credentials_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;credentials&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;password_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;password&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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;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_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;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_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;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;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;Using &lt;code&gt;client_secret_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;client_secret&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;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&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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; isn&amp;rsquo;t provided, the minimum acceptable TLS version is inherited from Go&amp;rsquo;s default minimum version, TLS 1.2.
If &lt;code&gt;min_version&lt;/code&gt; is provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When Alloy is running in &lt;a href=&#34;../../../cli/run/#clustering&#34;&gt;clustered mode&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true, then this component instance opts-in to participating in the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering assumes that all cluster nodes are running with the same configuration file, and that all &lt;code&gt;prometheus.operator.probes&lt;/code&gt; components that have opted-in to using clustering, over the course of a scrape interval have the same configuration.&lt;/p&gt;
&lt;p&gt;All &lt;code&gt;prometheus.operator.probes&lt;/code&gt; components instances opting in to clustering use target labels and a consistent hashing algorithm to determine ownership for each of the targets between the cluster peers.
Then, each peer only scrapes the subset of targets that it&amp;rsquo;s responsible for, so that the scrape load is distributed.
When a node joins or leaves the cluster, every peer recalculates ownership and continues scraping with the new target set.
This performs better than hashmod sharding where &lt;em&gt;all&lt;/em&gt; nodes have to be re-distributed, as only 1/N of the target&amp;rsquo;s ownership is transferred, but is eventually consistent (rather than fully consistent like hashmod sharding is).&lt;/p&gt;
&lt;p&gt;If Alloy is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op, and &lt;code&gt;prometheus.operator.probes&lt;/code&gt; scrapes every target it receives in its arguments.&lt;/p&gt;
&lt;h3 id=&#34;rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/h3&gt;


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


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression capture groups can be referred to using either the &lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;scrape&#34;&gt;&lt;code&gt;scrape&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/prom-operator-scrape.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_sample_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default maximum samples per scrape. Used as the default if the target resource doesn&amp;rsquo;t provide a sample limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default interval between scraping targets. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape interval.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1m&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_scrape_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default timeout for scrape requests. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape timeout.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10s&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_type_and_unit_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Whether the metric type and unit should be added as labels to scraped metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;honor_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Indicates whether to send metric metadata to downstream components.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_native_histograms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape native histograms from targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: The &lt;code&gt;honor_metadata&lt;/code&gt; and &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; arguments are &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; features.&lt;/p&gt;
&lt;p&gt;If you enable the &lt;code&gt;honor_metadata&lt;/code&gt; argument, resource consumption may increase, particularly if you ingest many metrics with different names.
Some downstream components aren&amp;rsquo;t compatible with Prometheus metadata.
The following components are compatible:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; only when configured for Remote Write v2.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.write_queue&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; argument is enabled and available from the scrape, the metric type and unit are added as labels to each scraped sample.
This provides additional schema information about metrics directly in the label set.
This feature doesn&amp;rsquo;t require downstream components to support Remote Write v2.&lt;/p&gt;
&lt;p&gt;Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental feature, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;selector&#34;&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;selector&lt;/code&gt; block describes a Kubernetes label selector for Probes.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;match_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label keys and values used to discover resources.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;match_labels&lt;/code&gt; argument is empty, all Probe resources are matched.&lt;/p&gt;
&lt;h3 id=&#34;match_expression&#34;&gt;&lt;code&gt;match_expression&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;match_expression&lt;/code&gt; block describes a Kubernetes label matcher expression for Probes discovery.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label name to match against.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;operator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The operator to use when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The values used when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;operator&lt;/code&gt; argument must be one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;In&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;NotIn&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;Exists&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;DoesNotExist&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If there are multiple &lt;code&gt;match_expressions&lt;/code&gt; blocks inside of a &lt;code&gt;selector&lt;/code&gt; block, they&amp;rsquo;re combined together with AND clauses.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; doesn&amp;rsquo;t export any fields.
It forwards all metrics it scrapes to the receivers configured with the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; is reported as unhealthy when given an invalid configuration, Prometheus components fail to initialize, or the connection to the Kubernetes API couldn&amp;rsquo;t be established properly.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; reports the status of the last scrape for each configured scrape job on the component&amp;rsquo;s debug endpoint, including discovered labels, and the last scrape time.&lt;/p&gt;
&lt;p&gt;It also exposes some debug information for each Probe it has discovered, including any errors found while reconciling the scrape configuration from the Probe.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example discovers all Probes in your cluster, and forwards collected metrics to a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.remote_write &amp;#34;staging&amp;#34; {
  // Send metrics to a locally running Mimir.
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

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

prometheus.operator.probes &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example limits discovered Probes to ones with the label &lt;code&gt;team=ops&lt;/code&gt; in a specific namespace: &lt;code&gt;my-app&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.probes &amp;#34;pods&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    namespaces = [&amp;#34;my-app&amp;#34;]
    selector {
        match_expression {
            key = &amp;#34;team&amp;#34;
            operator = &amp;#34;In&amp;#34;
            values = [&amp;#34;ops&amp;#34;]
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example applies additional relabel rules to discovered targets to filter by hostname.
This may be useful if running Alloy as a DaemonSet.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.probes &amp;#34;probes&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    rule {
      action = &amp;#34;keep&amp;#34;
      regex = sys.env(&amp;#34;HOSTNAME&amp;#34;)
      source_labels = [&amp;#34;__meta_kubernetes_pod_node_name&amp;#34;]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusoperatorprobes">&lt;code>prometheus.operator.probes&lt;/code>&lt;/h1>
&lt;p>&lt;code>prometheus.operator.probes&lt;/code> discovers &lt;a href="https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.Probe" target="_blank" rel="noopener noreferrer">Probe&lt;/a> resources in your Kubernetes cluster and scrapes the targets they reference.
This component performs three main functions:&lt;/p>
&lt;ol>
&lt;li>Discover Probe resources from your Kubernetes cluster.&lt;/li>
&lt;li>Discover targets or ingresses that match those Probes.&lt;/li>
&lt;li>Scrape metrics from those endpoints, and forward them to a receiver.&lt;/li>
&lt;/ol>
&lt;p>The default configuration assumes Alloy is running inside a Kubernetes cluster, and uses the in-cluster configuration to access the Kubernetes API.
You can run it from outside the cluster by supplying connection info in the &lt;code>client&lt;/code> block, but network level access to pods is required to scrape metrics from them.&lt;/p></description></item><item><title>prometheus.operator.scrapeconfigs</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.operator.scrapeconfigs/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.operator.scrapeconfigs/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusoperatorscrapeconfigs&#34;&gt;&lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt;&lt;/h1&gt;


&lt;div data-shared=&#34;stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; discovers &lt;a href=&#34;https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1alpha1.ScrapeConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ScrapeConfig&lt;/a&gt; resources in your Kubernetes cluster and scrapes the targets they reference.
This component performs two main functions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Discover ScrapeConfig resources from your Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;Scrape metrics from the targets, and forward them to a receiver.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The default configuration assumes Alloy is running inside a Kubernetes cluster, and uses the in-cluster configuration to access the Kubernetes API.
You can run Alloy from outside the cluster by supplying connection info in the &lt;code&gt;client&lt;/code&gt; block, but network level access to &lt;code&gt;scrapeconfigs&lt;/code&gt; is required to scrape metrics from them.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;scrapeconfigs&lt;/code&gt; may reference secrets for authenticating to targets to scrape them.
In these cases, the secrets are loaded and refreshed only when the ScrapeConfig is updated or when this component refreshes its internal state, which happens on a 5-minute refresh cycle.&lt;/p&gt;
&lt;h2 id=&#34;service-discovery-methods&#34;&gt;Service Discovery Methods&lt;/h2&gt;
&lt;p&gt;ScrapeConfig resources support multiple service discovery mechanisms:&lt;/p&gt;
&lt;h3 id=&#34;static-configuration&#34;&gt;Static Configuration&lt;/h3&gt;
&lt;p&gt;Static configurations define a fixed list of targets to scrape. This is useful when targets are known in advance and don&amp;rsquo;t change frequently.&lt;/p&gt;
&lt;h3 id=&#34;http-service-discovery&#34;&gt;HTTP Service Discovery&lt;/h3&gt;
&lt;p&gt;HTTP service discovery allows dynamic target discovery by querying an HTTP endpoint that returns target information in JSON format. The endpoint is polled at regular intervals to discover new targets or remove stale ones. This is particularly useful for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dynamic environments where targets are frequently added or removed&lt;/li&gt;
&lt;li&gt;Integration with external service registries&lt;/li&gt;
&lt;li&gt;Custom service discovery implementations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The HTTP endpoint returns a JSON array of target groups, where each target group contains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;targets&lt;/code&gt;: Array of &lt;code&gt;host:port&lt;/code&gt; combinations to scrape&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labels&lt;/code&gt;: Optional labels to apply to all targets in the group&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example JSON response:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;[
  {
    &amp;#34;targets&amp;#34;: [&amp;#34;service1.example.com:8080&amp;#34;, &amp;#34;service2.example.com:8080&amp;#34;],
    &amp;#34;labels&amp;#34;: {
      &amp;#34;job&amp;#34;: &amp;#34;web-servers&amp;#34;,
      &amp;#34;env&amp;#34;: &amp;#34;production&amp;#34;
    }
  },
  {
    &amp;#34;targets&amp;#34;: [&amp;#34;db1.example.com:9090&amp;#34;],
    &amp;#34;labels&amp;#34;: {
      &amp;#34;job&amp;#34;: &amp;#34;databases&amp;#34;,
      &amp;#34;env&amp;#34;: &amp;#34;production&amp;#34;
    }
  }
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.scrapeconfigs &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send scraped metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;informer_sync_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for initial sync of ScrapeConfig resources.&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;namespaces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of namespaces to search for ScrapeConfig resources. If not specified, all namespaces are searched.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 11;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#client\&amp;#34;\u003e\u003ccode\u003eclient\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures Kubernetes client used to find \u003ccode\u003escrapeconfigs\u003c/code\u003e.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#authorization\&amp;#34;\u003e\u003ccode\u003eauthorization\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure generic authorization to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure basic authentication to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#oauth2\&amp;#34;\u003e\u003ccode\u003eoauth2\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure OAuth2 for authenticating to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ccode\u003eoauth2\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#clustering\&amp;#34;\u003e\u003ccode\u003eclustering\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure the component for when Alloy is running in clustered mode.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#rule\&amp;#34;\u003e\u003ccode\u003erule\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eRelabeling rules to apply to discovered targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#scrape\&amp;#34;\u003e\u003ccode\u003escrape\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eDefault scrape configuration to apply to discovered targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#selector\&amp;#34;\u003e\u003ccode\u003eselector\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLabel selector for which \u003ccode\u003escrapeconfigs\u003c/code\u003e to discover.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eselector\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#match_expression\&amp;#34;\u003e\u003ccode\u003ematch_expression\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLabel selector expression for which \u003ccode\u003escrapeconfigs\u003c/code\u003e to discover.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#client&#34;&gt;&lt;code&gt;client&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures Kubernetes client used to find &lt;code&gt;scrapeconfigs&lt;/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&lt;/code&gt; &amp;gt; &lt;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic authentication to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth2 for authenticating to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;code&gt;oauth2&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Alloy is running in clustered mode.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#scrape&#34;&gt;&lt;code&gt;scrape&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Default scrape configuration to apply to discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#selector&#34;&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector for which &lt;code&gt;scrapeconfigs&lt;/code&gt; to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt; &amp;gt; &lt;a href=&#34;#match_expression&#34;&gt;&lt;code&gt;match_expression&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector expression for which &lt;code&gt;scrapeconfigs&lt;/code&gt; to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;client&#34;&gt;&lt;code&gt;client&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures the Kubernetes client used to discover &lt;code&gt;scrapeconfigs&lt;/code&gt;.
If the &lt;code&gt;client&lt;/code&gt; block isn&amp;rsquo;t provided, the default in-cluster configuration with the service account of the running Alloy Pod is used.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL of the Kubernetes API server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kubeconfig_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of the &lt;code&gt;kubeconfig&lt;/code&gt; file to use for connecting to Kubernetes.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;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_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;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_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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[&lt;code&gt;authorization&lt;/code&gt;][authorization] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;basic_auth&lt;/code&gt;][basic_auth] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token&lt;/code&gt;][client] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token_file&lt;/code&gt;][client] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;oauth2&lt;/code&gt;][oauth2] block&lt;/li&gt;
&lt;/ul&gt;


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

        
&lt;h3 id=&#34;authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;credentials_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;credentials&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;password_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;password&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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;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_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;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_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;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;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;Using &lt;code&gt;client_secret_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;client_secret&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;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&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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; isn&amp;rsquo;t provided, the minimum acceptable TLS version is inherited from Go&amp;rsquo;s default minimum version, TLS 1.2.
If &lt;code&gt;min_version&lt;/code&gt; is provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When Alloy is &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;using clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true, then this component instance opts-in to participating in the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering assumes that all cluster nodes are running with the same configuration file, and that all &lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; components that have opted-in to using clustering, over the course of a scrape interval have the same configuration.&lt;/p&gt;
&lt;p&gt;All &lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; components instances opting in to clustering use target labels and a consistent hashing algorithm to determine ownership for each of the targets between the cluster peers.
Then, each peer only scrapes the subset of targets that it is responsible for, so that the scrape load is distributed.
When a node joins or leaves the cluster, every peer recalculates ownership and continues scraping with the new target set.
This performs better than hashmod sharding where &lt;em&gt;all&lt;/em&gt; nodes have to be re-distributed, as only 1/N of the target&amp;rsquo;s ownership is transferred, but is eventually consistent (rather than fully consistent like hashmod sharding is).&lt;/p&gt;
&lt;p&gt;If Alloy is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op, and &lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; scrapes every target it receives in its arguments.&lt;/p&gt;
&lt;h3 id=&#34;rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/h3&gt;


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


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression capture groups can be referred to using either the &lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;scrape&#34;&gt;&lt;code&gt;scrape&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/prom-operator-scrape.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_sample_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default maximum samples per scrape. Used as the default if the target resource doesn&amp;rsquo;t provide a sample limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default interval between scraping targets. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape interval.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1m&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_scrape_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default timeout for scrape requests. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape timeout.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10s&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_type_and_unit_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Whether the metric type and unit should be added as labels to scraped metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;honor_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Indicates whether to send metric metadata to downstream components.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_native_histograms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape native histograms from targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: The &lt;code&gt;honor_metadata&lt;/code&gt; and &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; arguments are &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; features.&lt;/p&gt;
&lt;p&gt;If you enable the &lt;code&gt;honor_metadata&lt;/code&gt; argument, resource consumption may increase, particularly if you ingest many metrics with different names.
Some downstream components aren&amp;rsquo;t compatible with Prometheus metadata.
The following components are compatible:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; only when configured for Remote Write v2.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.write_queue&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; argument is enabled and available from the scrape, the metric type and unit are added as labels to each scraped sample.
This provides additional schema information about metrics directly in the label set.
This feature doesn&amp;rsquo;t require downstream components to support Remote Write v2.&lt;/p&gt;
&lt;p&gt;Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental feature, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;selector&#34;&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;selector&lt;/code&gt; block describes a Kubernetes label selector for &lt;code&gt;scrapeconfigs&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;match_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label keys and values used to discover resources.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;match_labels&lt;/code&gt; argument is empty, all ScrapeConfig resources will be matched.&lt;/p&gt;
&lt;h3 id=&#34;match_expression&#34;&gt;&lt;code&gt;match_expression&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;match_expression&lt;/code&gt; block describes a Kubernetes label matcher expression for scrapeconfigs discovery.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label name to match against.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;operator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The operator to use when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The values used when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;operator&lt;/code&gt; argument must be one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;In&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;NotIn&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;Exists&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;DoesNotExist&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If there are multiple &lt;code&gt;match_expressions&lt;/code&gt; blocks inside of a &lt;code&gt;selector&lt;/code&gt; block, they are combined together with AND clauses.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; doesn&amp;rsquo;t export any fields. It forwards all metrics it scrapes to the receiver configures with the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; is reported as unhealthy when given an invalid configuration, Prometheus components fail to initialize, or the connection to the Kubernetes API could not be established properly.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; reports the status of the last scrape for each configured scrape job on the component&amp;rsquo;s debug endpoint, including discovered labels, and the last scrape time.&lt;/p&gt;
&lt;p&gt;It also exposes some debug information for each ScrapeConfig it has discovered, including any errors found while reconciling the scrape configuration from the ScrapeConfig.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example discovers all scrapeconfigs in your cluster, and forwards collected metrics to a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.remote_write &amp;#34;staging&amp;#34; {
  // Send metrics to a locally running Mimir.
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

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

prometheus.operator.scrapeconfigs &amp;#34;scrapeconfigs&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example limits the discovered &lt;code&gt;scrapeconfigs&lt;/code&gt; to ones with the label &lt;code&gt;team=ops&lt;/code&gt; in a specific namespace: &lt;code&gt;my-app&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.scrapeconfigs &amp;#34;scrapeconfigs&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    namespaces = [&amp;#34;my-app&amp;#34;]
    selector {
        match_expression {
            key = &amp;#34;team&amp;#34;
            operator = &amp;#34;In&amp;#34;
            values = [&amp;#34;ops&amp;#34;]
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;static-configuration-example&#34;&gt;Static Configuration Example&lt;/h3&gt;
&lt;p&gt;This example shows a ScrapeConfig resource using static target discovery:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.coreos.com/v1alpha1
kind: ScrapeConfig
metadata:
  name: static-targets
  namespace: monitoring
spec:
  staticConfigs:
  - targets:
    - &amp;#34;web-server-1.example.com:8080&amp;#34;
    - &amp;#34;web-server-2.example.com:8080&amp;#34;
    labels:
      job: &amp;#34;web-servers&amp;#34;
      env: &amp;#34;production&amp;#34;
  metricsPath: /metrics
  scrapeInterval: 30s&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;http-service-discovery-example&#34;&gt;HTTP Service Discovery Example&lt;/h3&gt;
&lt;p&gt;This example shows a ScrapeConfig resource using HTTP service discovery:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.coreos.com/v1alpha1
kind: ScrapeConfig
metadata:
  name: http-discovery
  namespace: monitoring
spec:
  httpSDConfigs:
  - url: &amp;#34;http://service-registry.internal:8080/discover&amp;#34;
    refreshInterval: 60s
  metricsPath: /metrics
  scrapeInterval: 30s
  scrapeTimeout: 10s&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The HTTP endpoint (&lt;code&gt;http://service-registry.internal:8080/discover&lt;/code&gt;) returns JSON in this format:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;[
  {
    &amp;#34;targets&amp;#34;: [
      &amp;#34;api-server-1.example.com:8080&amp;#34;,
      &amp;#34;api-server-2.example.com:8080&amp;#34;
    ],
    &amp;#34;labels&amp;#34;: {
      &amp;#34;service&amp;#34;: &amp;#34;api&amp;#34;,
      &amp;#34;version&amp;#34;: &amp;#34;v1.2.3&amp;#34;
    }
  },
  {
    &amp;#34;targets&amp;#34;: [
      &amp;#34;worker-1.example.com:9090&amp;#34;,
      &amp;#34;worker-2.example.com:9090&amp;#34;
    ],
    &amp;#34;labels&amp;#34;: {
      &amp;#34;service&amp;#34;: &amp;#34;worker&amp;#34;,
      &amp;#34;version&amp;#34;: &amp;#34;v2.1.0&amp;#34;
    }
  }
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;extra-metric-labels&#34;&gt;Extra Metric Labels&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; adds the following extra
labels to all metrics scraped for &lt;a href=&#34;https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1alpha1.ScrapeConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ScrapeConfig&lt;/a&gt; objects.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Label&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__meta_kubernetes_scrapeconfig_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Namespace of the &lt;em&gt;ScrapeConfig&lt;/em&gt; object&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__meta_kubernetes_scrapeconfig_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Name of the &lt;em&gt;ScrapeConfig&lt;/em&gt; object&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusoperatorscrapeconfigs">&lt;code>prometheus.operator.scrapeconfigs&lt;/code>&lt;/h1>
&lt;div data-shared="stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an &lt;a href="/docs/release-life-cycle/">experimental&lt;/a> component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code>stability.level&lt;/code>
&lt;a href="/docs/alloy/v1.15/reference/cli/run/">flag&lt;/a> to &lt;code>experimental&lt;/code>.&lt;/p></description></item><item><title>prometheus.operator.servicemonitors</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.operator.servicemonitors/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.operator.servicemonitors/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusoperatorservicemonitors&#34;&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; discovers &lt;a href=&#34;https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.ServiceMonitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ServiceMonitor&lt;/a&gt; resources in your Kubernetes cluster and scrapes the targets they reference.
This component performs three main functions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Discover ServiceMonitor resources from your Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;Discover Services and Endpoints in your cluster that match those ServiceMonitors.&lt;/li&gt;
&lt;li&gt;Scrape metrics from those Endpoints, and forward them to a receiver.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The default configuration assumes Alloy is running inside a Kubernetes cluster, and uses the in-cluster configuration to access the Kubernetes API.
You can run it from outside the cluster by supplying connection info in the &lt;code&gt;client&lt;/code&gt; block, but network level access to discovered endpoints is required to scrape metrics from them.&lt;/p&gt;
&lt;p&gt;ServiceMonitors may reference secrets for authenticating to targets to scrape them.
In these cases, the secrets are loaded and refreshed only when the ServiceMonitor is updated or when this component refreshes its&amp;rsquo; internal state, which happens on a 5-minute refresh cycle.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.servicemonitors &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send scraped metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;informer_sync_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for initial sync of ServiceMonitor resources.&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;kubernetes_role&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Kubernetes role used for discovery. Supports &lt;code&gt;endpoints&lt;/code&gt; or &lt;code&gt;endpointslice&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;endpoints&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespaces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of namespaces to search for ServiceMonitor resources. If not specified, all namespaces are searched.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 12;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#client\&amp;#34;\u003e\u003ccode\u003eclient\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures Kubernetes client used to find ServiceMonitors.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#authorization\&amp;#34;\u003e\u003ccode\u003eauthorization\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure generic authorization to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure basic authentication to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#oauth2\&amp;#34;\u003e\u003ccode\u003eoauth2\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure OAuth 2.0 for authenticating to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ccode\u003eoauth2\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eclient\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the Kubernetes API.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#clustering\&amp;#34;\u003e\u003ccode\u003eclustering\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure the component for when Alloy is running in clustered mode.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#rule\&amp;#34;\u003e\u003ccode\u003erule\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eRelabeling rules to apply to discovered targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#scrape\&amp;#34;\u003e\u003ccode\u003escrape\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eDefault scrape configuration to apply to discovered targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#selector\&amp;#34;\u003e\u003ccode\u003eselector\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLabel selector for which ServiceMonitors to discover.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eselector\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#match_expression\&amp;#34;\u003e\u003ccode\u003ematch_expression\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLabel selector expression for which ServiceMonitors to discover.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#client&#34;&gt;&lt;code&gt;client&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures Kubernetes client used to find ServiceMonitors.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure basic authentication to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth 2.0 for authenticating to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;code&gt;oauth2&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the Kubernetes API.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Alloy is running in clustered mode.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#scrape&#34;&gt;&lt;code&gt;scrape&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Default scrape configuration to apply to discovered targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#selector&#34;&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector for which ServiceMonitors to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt; &amp;gt; &lt;a href=&#34;#match_expression&#34;&gt;&lt;code&gt;match_expression&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Label selector expression for which ServiceMonitors to discover.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;client&#34;&gt;&lt;code&gt;client&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; block configures the Kubernetes client used to discover ServiceMonitors.
If the &lt;code&gt;client&lt;/code&gt; block isn&amp;rsquo;t provided, the default in-cluster configuration with the service account of the running Alloy Pod is used.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;api_server&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL of the Kubernetes API server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom HTTP headers to be sent along with each request. The map key is the header name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kubeconfig_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path of the &lt;code&gt;kubeconfig&lt;/code&gt; file to use for connecting to Kubernetes.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;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_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;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_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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[&lt;code&gt;authorization&lt;/code&gt;][authorization] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;basic_auth&lt;/code&gt;][basic_auth] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token_file&lt;/code&gt;][client] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token&lt;/code&gt;][client] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;oauth2&lt;/code&gt;][oauth2] block&lt;/li&gt;
&lt;/ul&gt;


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

        
&lt;h3 id=&#34;authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;credentials_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;credentials&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;password_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;password&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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;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_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;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_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;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;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;Using &lt;code&gt;client_secret_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;client_secret&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;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&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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; isn&amp;rsquo;t provided, the minimum acceptable TLS version is inherited from Go&amp;rsquo;s default minimum version, TLS 1.2.
If &lt;code&gt;min_version&lt;/code&gt; is provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When Alloy is using &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true, then this component instance opts-in to participating in the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering assumes that all cluster nodes are running with the same configuration file, and that all &lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; components that have opted-in to using clustering, over the course of a scrape interval have the same configuration.&lt;/p&gt;
&lt;p&gt;All &lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; components instances opting in to clustering use target labels and a consistent hashing algorithm to determine ownership for each of the targets between the cluster peers.
Then, each peer only scrapes the subset of targets that it&amp;rsquo;s responsible for, so that the scrape load is distributed.
When a node joins or leaves the cluster, every peer recalculates ownership and continues scraping with the new target set.
This performs better than hashmod sharding where &lt;em&gt;all&lt;/em&gt; nodes have to be re-distributed, as only 1/N of the target&amp;rsquo;s ownership is transferred, but is eventually consistent (rather than fully consistent like hashmod sharding is).&lt;/p&gt;
&lt;p&gt;If Alloy is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op, and &lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; scrapes every target it receives in its arguments.&lt;/p&gt;
&lt;h3 id=&#34;rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/h3&gt;


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


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression capture groups can be referred to using either the &lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;scrape&#34;&gt;&lt;code&gt;scrape&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/prom-operator-scrape.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_sample_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default maximum samples per scrape. Used as the default if the target resource doesn&amp;rsquo;t provide a sample limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default interval between scraping targets. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape interval.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1m&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_scrape_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The default timeout for scrape requests. Used as the default if the target resource doesn&amp;rsquo;t provide a scrape timeout.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10s&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_type_and_unit_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Whether the metric type and unit should be added as labels to scraped metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;honor_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Indicates whether to send metric metadata to downstream components.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_native_histograms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape native histograms from targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: The &lt;code&gt;honor_metadata&lt;/code&gt; and &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; arguments are &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; features.&lt;/p&gt;
&lt;p&gt;If you enable the &lt;code&gt;honor_metadata&lt;/code&gt; argument, resource consumption may increase, particularly if you ingest many metrics with different names.
Some downstream components aren&amp;rsquo;t compatible with Prometheus metadata.
The following components are compatible:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; only when configured for Remote Write v2.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.write_queue&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; argument is enabled and available from the scrape, the metric type and unit are added as labels to each scraped sample.
This provides additional schema information about metrics directly in the label set.
This feature doesn&amp;rsquo;t require downstream components to support Remote Write v2.&lt;/p&gt;
&lt;p&gt;Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental feature, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;selector&#34;&gt;&lt;code&gt;selector&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;selector&lt;/code&gt; block describes a Kubernetes label selector for ServiceMonitors.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;match_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label keys and values used to discover resources.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;match_labels&lt;/code&gt; argument is empty, all ServiceMonitor resources are matched.&lt;/p&gt;
&lt;h3 id=&#34;match_expression&#34;&gt;&lt;code&gt;match_expression&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;match_expression&lt;/code&gt; block describes a Kubernetes label matcher expression for ServiceMonitors discovery.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label name to match against.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;operator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The operator to use when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;values&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The values used when matching.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;operator&lt;/code&gt; argument must be one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;In&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;NotIn&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;Exists&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;DoesNotExist&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If there are multiple &lt;code&gt;match_expressions&lt;/code&gt; blocks inside of a &lt;code&gt;selector&lt;/code&gt; block, they&amp;rsquo;re combined together with AND clauses.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; doesn&amp;rsquo;t export any fields. It forwards all metrics it scrapes to the receiver configures with the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; is reported as unhealthy when given an invalid configuration, Prometheus components fail to initialize, or the connection to the Kubernetes API couldn&amp;rsquo;t be established properly.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; reports the status of the last scrape for each configured scrape job on the component&amp;rsquo;s debug endpoint, including discovered labels, and the last scrape time.&lt;/p&gt;
&lt;p&gt;It also exposes some debug information for each ServiceMonitor it has discovered, including any errors found while reconciling the scrape configuration from the ServiceMonitor.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example discovers all ServiceMonitors in your cluster, and forwards collected metrics to a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.remote_write &amp;#34;staging&amp;#34; {
  // Send metrics to a locally running Mimir.
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

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

prometheus.operator.servicemonitors &amp;#34;services&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example limits discovered ServiceMonitors to ones with the label &lt;code&gt;team=ops&lt;/code&gt; in a specific namespace: &lt;code&gt;my-app&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.servicemonitors &amp;#34;services&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    namespaces = [&amp;#34;my-app&amp;#34;]
    selector {
        match_expression {
            key = &amp;#34;team&amp;#34;
            operator = &amp;#34;In&amp;#34;
            values = [&amp;#34;ops&amp;#34;]
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example applies additional relabel rules to discovered targets to filter by hostname.
This may be useful if running Alloy as a DaemonSet.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.operator.servicemonitors &amp;#34;services&amp;#34; {
    forward_to = [prometheus.remote_write.staging.receiver]
    rule {
      action = &amp;#34;keep&amp;#34;
      regex = sys.env(&amp;#34;HOSTNAME&amp;#34;)
      source_labels = [&amp;#34;__meta_kubernetes_pod_node_name&amp;#34;]
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusoperatorservicemonitors">&lt;code>prometheus.operator.servicemonitors&lt;/code>&lt;/h1>
&lt;p>&lt;code>prometheus.operator.servicemonitors&lt;/code> discovers &lt;a href="https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.ServiceMonitor" target="_blank" rel="noopener noreferrer">ServiceMonitor&lt;/a> resources in your Kubernetes cluster and scrapes the targets they reference.
This component performs three main functions:&lt;/p>
&lt;ol>
&lt;li>Discover ServiceMonitor resources from your Kubernetes cluster.&lt;/li>
&lt;li>Discover Services and Endpoints in your cluster that match those ServiceMonitors.&lt;/li>
&lt;li>Scrape metrics from those Endpoints, and forward them to a receiver.&lt;/li>
&lt;/ol>
&lt;p>The default configuration assumes Alloy is running inside a Kubernetes cluster, and uses the in-cluster configuration to access the Kubernetes API.
You can run it from outside the cluster by supplying connection info in the &lt;code>client&lt;/code> block, but network level access to discovered endpoints is required to scrape metrics from them.&lt;/p></description></item><item><title>prometheus.receive_http</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.receive_http/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.receive_http/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusreceive_http&#34;&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt; listens for HTTP requests containing Prometheus metric samples and forwards them to other components capable of receiving metrics.&lt;/p&gt;
&lt;p&gt;The HTTP API exposed is compatible with &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus &lt;code&gt;remote_write&lt;/code&gt; API&lt;/a&gt;.
This means that other &lt;a href=&#34;../prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; components can be used as a client and send requests to &lt;code&gt;prometheus.receive_http&lt;/code&gt; which enables using Alloy as a proxy for Prometheus metrics.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.receive_http &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  http {
    listen_address = &amp;#34;&amp;lt;LISTEN_ADDRESS&amp;gt;&amp;#34;
    listen_port = &amp;lt;PORT&amp;gt;
  }
  forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The component starts an HTTP server supporting the following endpoint:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;POST /api/v1/metrics/write&lt;/code&gt;: Sends metrics to the component, which in turn is forwarded to the receivers as configured in &lt;code&gt;forward_to&lt;/code&gt; argument.
The request format must be compatible with the &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus remote_write API&lt;/a&gt; and can use either the v1 or v2 format.
One way to send valid requests to this component is to use another Alloy with a &lt;a href=&#34;../prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.receive_http&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;accepted_remote_write_protobuf_messages&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Accepted remote write protobuf message types.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;prometheus.WriteRequest&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;append_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Pass metric metadata to downstream components.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_type_and_unit_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Add the metric type and unit as labels to the metric.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: The &lt;code&gt;append_metadata&lt;/code&gt;, &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt;, and using &lt;code&gt;&amp;quot;io.prometheus.write.v2.Request&amp;quot;&lt;/code&gt; in &lt;code&gt;accepted_remote_write_protobuf_messages&lt;/code&gt; are &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; features.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;append_metadata&lt;/code&gt; and &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; arguments only apply to remote write v2 payloads and only when metadata is included in those payloads.
Enabling support for remote write v2 payloads requires that &lt;code&gt;&amp;quot;io.prometheus.write.v2.Request&amp;quot;&lt;/code&gt; is included in &lt;code&gt;accepted_remote_write_protobuf_messages&lt;/code&gt;.
Remote write v1 payloads (&lt;code&gt;accepted_remote_write_protobuf_messages = [&amp;quot;prometheus.WriteRequest&amp;quot;]&lt;/code&gt;) cannot support these features.&lt;/p&gt;
&lt;p&gt;Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental feature, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.receive_http&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 3;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#http\&amp;#34;\u003e\u003ccode\u003ehttp\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the HTTP server that receives requests.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003ehttp\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls\&amp;#34;\u003e\u003ccode\u003etls\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures TLS for the HTTP server.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#http&#34;&gt;&lt;code&gt;http&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server that receives requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls&#34;&gt;&lt;code&gt;tls&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the HTTP server.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;http&#34;&gt;&lt;code&gt;http&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/server-http.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block configures the HTTP server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;http&lt;/code&gt; block. Any omitted fields take their default values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;conn_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of simultaneous HTTP connections. Defaults to no limit.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. Defaults to accepting all incoming connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;8080&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_idle_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Idle timeout for HTTP server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;120s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_read_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read timeout for HTTP server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_write_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write timeout for HTTP server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;

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


&lt;div data-shared=&#34;reference/components/server-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;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;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the 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;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;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_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;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;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;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;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;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;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt; doesn&amp;rsquo;t export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt; is reported as unhealthy if it&amp;rsquo;s given an invalid configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;The following are some of the metrics that are exposed when this component is used.
The metrics include labels such as &lt;code&gt;status_code&lt;/code&gt; where relevant, which can be used to measure request success rates.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_fanout_latency&lt;/code&gt; (histogram): Write latency for sending metrics to other components.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_forwarded_samples_total&lt;/code&gt; (counter): Total number of samples sent to downstream components.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_receive_http_request_duration_seconds&lt;/code&gt; (histogram): Time (in seconds) spent serving HTTP requests.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_receive_http_request_message_bytes&lt;/code&gt; (histogram): Size (in bytes) of messages received in the request.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_receive_http_response_message_bytes&lt;/code&gt; (histogram): Size (in bytes) of messages sent in response.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_receive_http_tcp_connections&lt;/code&gt; (gauge): Current number of accepted TCP connections.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;h3 id=&#34;receive-metrics-over-http&#34;&gt;Receive metrics over HTTP&lt;/h3&gt;
&lt;p&gt;The following example creates a &lt;code&gt;prometheus.receive_http&lt;/code&gt; component which starts an HTTP server listening on port &lt;code&gt;9999&lt;/code&gt; on all network interfaces.
The server receives metrics and forwards them to a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component which writes these metrics to the specified HTTP endpoint.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;// Receives metrics over HTTP
prometheus.receive_http &amp;#34;api&amp;#34; {
  http {
    listen_address = &amp;#34;0.0.0.0&amp;#34;
    listen_port = 9999
  }
  forward_to = [prometheus.remote_write.local.receiver]
}

// Send metrics to a locally running Mimir.
prometheus.remote_write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

    basic_auth {
      username = &amp;#34;example-user&amp;#34;
      password = &amp;#34;example-password&amp;#34;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;proxy-metrics&#34;&gt;Proxy metrics&lt;/h3&gt;
&lt;p&gt;To send metrics to the &lt;code&gt;prometheus.receive_http&lt;/code&gt; component defined in the previous example, another Alloy can run with the following configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;// Collects metrics of localhost:12345
prometheus.scrape &amp;#34;self&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;job&amp;#34; = &amp;#34;alloy&amp;#34;},
  ]
  forward_to = [prometheus.remote_write.local.receiver]
}

// Writes metrics to localhost:9999/api/v1/metrics/write - e.g. served by
// the prometheus.receive_http component from the example above.
prometheus.remote_write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://localhost:9999/api/v1/metrics/write&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;technical-details&#34;&gt;Technical details&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt; uses &lt;a href=&#34;https://en.wikipedia.org/wiki/Snappy_%28compression%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;snappy&lt;/a&gt; for compression.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusreceive_http">&lt;code>prometheus.receive_http&lt;/code>&lt;/h1>
&lt;p>&lt;code>prometheus.receive_http&lt;/code> listens for HTTP requests containing Prometheus metric samples and forwards them to other components capable of receiving metrics.&lt;/p>
&lt;p>The HTTP API exposed is compatible with &lt;a href="https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver" target="_blank" rel="noopener noreferrer">Prometheus &lt;code>remote_write&lt;/code> API&lt;/a>.
This means that other &lt;a href="../prometheus.remote_write/">&lt;code>prometheus.remote_write&lt;/code>&lt;/a> components can be used as a client and send requests to &lt;code>prometheus.receive_http&lt;/code> which enables using Alloy as a proxy for Prometheus metrics.&lt;/p></description></item><item><title>prometheus.relabel</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.relabel/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.relabel/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusrelabel&#34;&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;Prometheus metrics follow the &lt;a href=&#34;https://openmetrics.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenMetrics&lt;/a&gt; format.
Each time series is uniquely identified by its metric name, plus optional key-value pairs called labels.
Each sample represents a datapoint in the time series and contains a value and an optional timestamp.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;&amp;lt;metric name&amp;gt;{&amp;lt;label_1&amp;gt;=&amp;lt;label_val_1&amp;gt;, &amp;lt;label_2&amp;gt;=&amp;lt;label_val_2&amp;gt; ...} &amp;lt;value&amp;gt; [timestamp]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;prometheus.relabel&lt;/code&gt; component rewrites the label set of each metric passed along to the exported receiver by applying one or more relabeling &lt;code&gt;rule&lt;/code&gt;s.
If no rules are defined or applicable to some metrics, then those metrics are forwarded as-is to each receiver passed in the component&amp;rsquo;s arguments.
If no labels remain after the relabeling rules are applied, then the metric is dropped.&lt;/p&gt;
&lt;p&gt;The most common use of &lt;code&gt;prometheus.relabel&lt;/code&gt; is to filter Prometheus metrics or standardize the label set that&amp;rsquo;s passed to one or more downstream receivers.
The &lt;code&gt;rule&lt;/code&gt; blocks are applied to the label set of each metric in order of their appearance in the configuration file.
The configured rules can be retrieved by calling the function in the &lt;code&gt;rules&lt;/code&gt; export field.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;prometheus.relabel&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

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

  rule {
    ...
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.relabel&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Where the metrics should be forwarded to, after relabeling takes place.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of elements to hold in the relabeling cache.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;100000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following block with &lt;code&gt;prometheus.relabel&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 2;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eName\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#rule\&amp;#34;\u003e\u003ccode\u003erule\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eRelabeling rules to apply to received metrics.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to received metrics.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/h3&gt;


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


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression capture groups can be referred to using either the &lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The input receiver where samples are sent to be relabeled.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;RelabelRules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The currently configured relabeling rules.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields are kept at their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_fanout_latency&lt;/code&gt; (histogram): Write latency for sending to direct and indirect components.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_forwarded_samples_total&lt;/code&gt; (counter): Total number of samples sent to downstream components.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_relabel_cache_hits&lt;/code&gt; (counter): Total number of cache hits.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_relabel_cache_misses&lt;/code&gt; (counter): Total number of cache misses.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_relabel_cache_size&lt;/code&gt; (gauge): Total size of relabel cache.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_relabel_metrics_processed&lt;/code&gt; (counter): Total number of metrics processed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_relabel_metrics_written&lt;/code&gt; (counter): Total number of metrics written.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example shows how the &lt;code&gt;prometheus.relabel&lt;/code&gt; component applies relabel rules to the incoming metrics, and forwards the results to &lt;code&gt;prometheus.remote_write.onprem.receiver&lt;/code&gt;:&lt;/p&gt;

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

  rule {
    action        = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__address__&amp;#34;, &amp;#34;instance&amp;#34;]
    separator     = &amp;#34;/&amp;#34;
    target_label  = &amp;#34;host&amp;#34;
  }
  rule {
    action        = &amp;#34;keep&amp;#34;
    source_labels = [&amp;#34;app&amp;#34;]
    regex         = &amp;#34;backend&amp;#34;
  }
  rule {
    action = &amp;#34;labeldrop&amp;#34;
    regex  = &amp;#34;instance&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;metric_a{__address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;frontend&amp;#34;} 10
metric_a{__address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;backend&amp;#34;}  2
metric_a{__address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;frontend&amp;#34;} 7
metric_a{__address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;backend&amp;#34;}  9
metric_a{__address__ = &amp;#34;cluster_b&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;database&amp;#34;} 4&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After applying the first &lt;code&gt;rule&lt;/code&gt;, the &lt;code&gt;replace&lt;/code&gt; action populates a new label named &lt;code&gt;host&lt;/code&gt; by concatenating the contents of the &lt;code&gt;__address__&lt;/code&gt; and &lt;code&gt;instance&lt;/code&gt; labels, separated by a slash &lt;code&gt;/&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;metric_a{host = &amp;#34;localhost/development&amp;#34;, __address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;frontend&amp;#34;} 10
metric_a{host = &amp;#34;localhost/development&amp;#34;, __address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;backend&amp;#34;}  2
metric_a{host = &amp;#34;cluster_a/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;frontend&amp;#34;} 7
metric_a{host = &amp;#34;cluster_a/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;backend&amp;#34;}  9
metric_a{host = &amp;#34;cluster_b/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;database&amp;#34;} 4&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;On the second relabeling rule, the &lt;code&gt;keep&lt;/code&gt; action only keeps the metrics whose &lt;code&gt;app&lt;/code&gt; label matches &lt;code&gt;regex&lt;/code&gt;, dropping everything else, so the list of metrics is trimmed down to:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;metric_a{host = &amp;#34;localhost/development&amp;#34;, __address__ = &amp;#34;localhost&amp;#34;, instance = &amp;#34;development&amp;#34;, app = &amp;#34;backend&amp;#34;}  2
metric_a{host = &amp;#34;cluster_a/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, instance = &amp;#34;production&amp;#34;,  app = &amp;#34;backend&amp;#34;}  9&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The third and final relabeling rule which uses the &lt;code&gt;labeldrop&lt;/code&gt; action removes the &lt;code&gt;instance&lt;/code&gt; label from the set of labels.&lt;/p&gt;
&lt;p&gt;So in this case, the initial set of metrics passed to the exported receiver is:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;metric_a{host = &amp;#34;localhost/development&amp;#34;, __address__ = &amp;#34;localhost&amp;#34;, app = &amp;#34;backend&amp;#34;}  2
metric_a{host = &amp;#34;cluster_a/production&amp;#34;,  __address__ = &amp;#34;cluster_a&amp;#34;, app = &amp;#34;backend&amp;#34;}  9&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The two resulting metrics are then propagated to each receiver defined in the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-consumers&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusrelabel">&lt;code>prometheus.relabel&lt;/code>&lt;/h1>
&lt;p>Prometheus metrics follow the &lt;a href="https://openmetrics.io/" target="_blank" rel="noopener noreferrer">OpenMetrics&lt;/a> format.
Each time series is uniquely identified by its metric name, plus optional key-value pairs called labels.
Each sample represents a datapoint in the time series and contains a value and an optional timestamp.&lt;/p></description></item><item><title>prometheus.remote_write</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.remote_write/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.remote_write/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusremote_write&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; collects metrics sent from other components into a Write-Ahead Log (WAL) and forwards them over the network to a series of user-supplied endpoints.
Metrics are sent over the network using the &lt;a href=&#34;https://docs.google.com/document/d/1LPhVRSFkGNSuU1fBd81ulhsCPR4hkSZyyBj1SZ8fWOM/edit&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus Remote Write protocol&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;prometheus.remote_write&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

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

    ...
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following argument with &lt;code&gt;prometheus.remote_write&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;external_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Labels to add to metrics sent over the network.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.remote_write&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 15;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#endpoint\&amp;#34;\u003e\u003ccode\u003eendpoint\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLocation to send metrics to.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#authorization\&amp;#34;\u003e\u003ccode\u003eauthorization\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure generic authorization to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#azuread\&amp;#34;\u003e\u003ccode\u003eazuread\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure AzureAD for authenticating to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ccode\u003eazuread\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#managed_identity\&amp;#34;\u003e\u003ccode\u003emanaged_identity\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure Azure user-assigned managed identity.\u003c/td\u003e\n              \u003ctd\u003eyes\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ccode\u003eazuread\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#oauth\&amp;#34;\u003e\u003ccode\u003eoauth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure Azure OAuth.\u003c/td\u003e\n              \u003ctd\u003eyes\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ccode\u003eazuread\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#sdk\&amp;#34;\u003e\u003ccode\u003esdk\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure Azure SDK authentication.\u003c/td\u003e\n              \u003ctd\u003eyes\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure \u003ccode\u003ebasic_auth\u003c/code\u003e for authenticating to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#metadata_config\&amp;#34;\u003e\u003ccode\u003emetadata_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfiguration for how metric metadata is sent.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#oauth2\&amp;#34;\u003e\u003ccode\u003eoauth2\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure OAuth 2.0 for authenticating to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ccode\u003eoauth2\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#queue_config\&amp;#34;\u003e\u003ccode\u003equeue_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfiguration for how metrics are batched before sending.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#sigv4\&amp;#34;\u003e\u003ccode\u003esigv4\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure AWS Signature Verification 4 for authenticating to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#write_relabel_config\&amp;#34;\u003e\u003ccode\u003ewrite_relabel_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfiguration for \u003ccode\u003ewrite_relabel_config\u003c/code\u003e.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#wal\&amp;#34;\u003e\u003ccode\u003ewal\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfiguration for the component\u0026rsquo;s WAL.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#endpoint&#34;&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Location to send metrics to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&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;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#azuread&#34;&gt;&lt;code&gt;azuread&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure AzureAD for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;code&gt;azuread&lt;/code&gt; &amp;gt; &lt;a href=&#34;#managed_identity&#34;&gt;&lt;code&gt;managed_identity&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure Azure user-assigned managed identity.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;code&gt;azuread&lt;/code&gt; &amp;gt; &lt;a href=&#34;#oauth&#34;&gt;&lt;code&gt;oauth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure Azure OAuth.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;code&gt;azuread&lt;/code&gt; &amp;gt; &lt;a href=&#34;#sdk&#34;&gt;&lt;code&gt;sdk&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure Azure SDK authentication.&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure &lt;code&gt;basic_auth&lt;/code&gt; for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#metadata_config&#34;&gt;&lt;code&gt;metadata_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for how metric metadata is sent.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth 2.0 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;code&gt;oauth2&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&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;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#queue_config&#34;&gt;&lt;code&gt;queue_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for how metrics are batched before sending.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#sigv4&#34;&gt;&lt;code&gt;sigv4&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure AWS Signature Verification 4 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&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;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#write_relabel_config&#34;&gt;&lt;code&gt;write_relabel_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for &lt;code&gt;write_relabel_config&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#wal&#34;&gt;&lt;code&gt;wal&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for the component&amp;rsquo;s WAL.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;endpoint&#34;&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;endpoint&lt;/code&gt; block describes a single location to send metrics to.
You can define multiple &lt;code&gt;endpoint&lt;/code&gt; blocks to send metrics to multiple locations.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Full URL to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;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;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom HTTP headers to be sent along with each request. The map key is the header name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Extra headers to deliver with the request.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional name to identify the endpoint in metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;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;protobuf_message&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Protobuf message format to use for remote write. Must be &lt;code&gt;prometheus.WriteRequest&lt;/code&gt; or experimental &lt;code&gt;io.prometheus.write.v2.Request&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;prometheus.WriteRequest&amp;quot;&lt;/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;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_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;remote_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for requests made to the URL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send_exemplars&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether exemplars should be sent.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send_native_histograms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether native histograms should be sent.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[&lt;code&gt;authorization&lt;/code&gt;][authorization] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;azuread&lt;/code&gt;][azuread] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;basic_auth&lt;/code&gt;][basic_auth] block&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/a&gt; argument&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/a&gt; argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;oauth2&lt;/code&gt;][oauth2] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;sigv4&lt;/code&gt;][sigv4] block&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When multiple &lt;code&gt;endpoint&lt;/code&gt; blocks are provided, metrics are concurrently sent to all configured locations.
Each endpoint has a &lt;em&gt;queue&lt;/em&gt; which is used to read metrics from the WAL and queue them for sending.
The &lt;code&gt;queue_config&lt;/code&gt; block can be used to customize the behavior of the queue.&lt;/p&gt;
&lt;p&gt;Endpoints can be named for easier identification in debug metrics using the &lt;code&gt;name&lt;/code&gt; argument.
If the &lt;code&gt;name&lt;/code&gt; argument isn&amp;rsquo;t provided, a name is generated based on a hash of the endpoint settings.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;send_native_histograms&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, native Prometheus histogram samples sent to &lt;code&gt;prometheus.remote_write&lt;/code&gt; are forwarded to the configured endpoint.
If the endpoint doesn&amp;rsquo;t support receiving native histogram samples, pushing metrics fails.&lt;/p&gt;


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

        
&lt;h3 id=&#34;authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;credentials_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;credentials&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;azuread&#34;&gt;&lt;code&gt;azuread&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/azuread-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cloud&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Azure Cloud.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;AzurePublic&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The supported values for &lt;code&gt;cloud&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;AzurePublic&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;AzureChina&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;AzureGovernment&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;managed_identity&#34;&gt;&lt;code&gt;managed_identity&lt;/code&gt;&lt;/h3&gt;
&lt;span class=&#34;docs-labels__stage docs-labels__small docs-labels__item mr-half&#34;&gt;
  Required
  &lt;/span&gt;



&lt;div data-shared=&#34;reference/components/azure-managed_identity-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Client ID of the managed identity used to authenticate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;client_id&lt;/code&gt; should be a valid &lt;a href=&#34;https://en.wikipedia.org/wiki/Universally_unique_identifier&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;UUID&lt;/a&gt; in one of the supported formats:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Microsoft encoding: &lt;code&gt;{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Raw hex encoding: &lt;code&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;oauth&#34;&gt;&lt;code&gt;oauth&lt;/code&gt;&lt;/h3&gt;
&lt;span class=&#34;docs-labels__stage docs-labels__small docs-labels__item mr-half&#34;&gt;
  Required
  &lt;/span&gt;



&lt;div data-shared=&#34;reference/components/azure-oauth-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;The client ID of the Azure Active Directory application that&amp;rsquo;s being used to authenticate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The client secret of the Azure Active Directory application that&amp;rsquo;s being used to authenticate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tenant_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The tenant ID of the Azure Active Directory application that&amp;rsquo;s being used to authenticate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;

        
&lt;h3 id=&#34;sdk&#34;&gt;&lt;code&gt;sdk&lt;/code&gt;&lt;/h3&gt;
&lt;span class=&#34;docs-labels__stage docs-labels__small docs-labels__item mr-half&#34;&gt;
  Required
  &lt;/span&gt;



&lt;div data-shared=&#34;reference/components/azuread-sdk.md&#34;&gt;
            &lt;p&gt;This block configures &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure SDK authentication&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tenant_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The tenant ID of the Azure Active Directory application that&amp;rsquo;s being used to authenticate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;password_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;password&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;metadata_config&#34;&gt;&lt;code&gt;metadata_config&lt;/code&gt;&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;max_samples_per_send&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of metadata samples to send to the endpoint at once.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently metric metadata is sent to the endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Controls whether metric metadata is sent to the endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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;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_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;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_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;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;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;Using &lt;code&gt;client_secret_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;client_secret&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;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&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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; isn&amp;rsquo;t provided, the minimum acceptable TLS version is inherited from Go&amp;rsquo;s default minimum version, TLS 1.2.
If &lt;code&gt;min_version&lt;/code&gt; is provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;queue_config&#34;&gt;&lt;code&gt;queue_config&lt;/code&gt;&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;batch_send_deadline&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time samples wait in the buffer before sending.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;capacity&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of samples to buffer per shard.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_backoff&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum retry delay.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_samples_per_send&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of samples per send.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_shards&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of concurrent shards sending samples to the endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;50&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_backoff&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Initial retry delay. The backoff time gets doubled for each retry.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30ms&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_shards&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum amount of concurrent shards sending samples to the endpoint.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;retry_on_http_429&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Retry when an HTTP 429 status code is received.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sample_age_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum age of samples to send.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Each queue then manages a number of concurrent &lt;em&gt;shards&lt;/em&gt; which is responsible for sending a fraction of data to their respective endpoints.
The number of shards is automatically raised if samples aren&amp;rsquo;t being sent to the endpoint quickly enough.
The range of permitted shards can be configured with the &lt;code&gt;min_shards&lt;/code&gt; and &lt;code&gt;max_shards&lt;/code&gt; arguments.
Refer to &lt;a href=&#34;#tune-max_shards&#34;&gt;Tune &lt;code&gt;max_shards&lt;/code&gt;&lt;/a&gt; for more information about how to configure &lt;code&gt;max_shards&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Each shard has a buffer of samples it keeps in memory, controlled with the &lt;code&gt;capacity&lt;/code&gt; argument.
New metrics aren&amp;rsquo;t read from the WAL unless there is at least one shard that&amp;rsquo;s not at maximum capacity.&lt;/p&gt;
&lt;p&gt;The buffer of a shard is flushed and sent to the endpoint either after the shard reaches the number of samples specified by &lt;code&gt;max_samples_per_send&lt;/code&gt; or the duration specified by &lt;code&gt;batch_send_deadline&lt;/code&gt; has elapsed since the last flush
for that shard.&lt;/p&gt;
&lt;p&gt;Shards retry requests which fail due to a recoverable error.
An error is recoverable if the server responds with an &lt;code&gt;HTTP 5xx&lt;/code&gt; status code.
The delay between retries can be customized with the &lt;code&gt;min_backoff&lt;/code&gt; and &lt;code&gt;max_backoff&lt;/code&gt; arguments.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;retry_on_http_429&lt;/code&gt; argument specifies whether &lt;code&gt;HTTP 429&lt;/code&gt; status code responses should be treated as recoverable errors.
Other &lt;code&gt;HTTP 4xx&lt;/code&gt; status code responses are never considered recoverable errors.
When &lt;code&gt;retry_on_http_429&lt;/code&gt; is enabled, &lt;code&gt;Retry-After&lt;/code&gt; response headers from the servers are honored.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;sample_age_limit&lt;/code&gt; argument specifies the maximum age of samples to send.
Any samples older than the limit are dropped and won&amp;rsquo;t be sent to the remote storage.
The default value is &lt;code&gt;0s&lt;/code&gt;, which means that all samples are sent (feature is disabled).&lt;/p&gt;
&lt;h3 id=&#34;sigv4&#34;&gt;&lt;code&gt;sigv4&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/sigv4-block.md&#34;&gt;
            &lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;access_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS API access key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Named AWS profile used to authenticate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;region&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS region.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;role_arn&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS Role ARN, an alternative to using AWS API keys.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;secret_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;AWS API secret key.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If &lt;code&gt;region&lt;/code&gt; is left blank, the region from the default credentials chain is used.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;access_key&lt;/code&gt; is left blank, the environment variable &lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt; is used.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;secret_key&lt;/code&gt; is left blank, the environment variable &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt; is used.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;write_relabel_config&#34;&gt;&lt;code&gt;write_relabel_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/write_relabel_config.md&#34;&gt;
            &lt;!-- NOTE(@tpaschalis) This needs to be kept in sync with rule.md on the same
directory since these pages don&#39;t support some type of templating. --&gt;
&lt;p&gt;The &lt;code&gt;write_relabel_config&lt;/code&gt; block contains the definition of any relabeling rules that can be applied to an input metric.
If more than one &lt;code&gt;write_relabel_config&lt;/code&gt; block is defined, the transformations are applied in top-down order.&lt;/p&gt;
&lt;p&gt;The following arguments can be used to configure a &lt;code&gt;write_relabel_config&lt;/code&gt;.
All arguments are optional. Omitted fields take their default values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;action&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The relabeling action to perform.&lt;/td&gt;
              &lt;td&gt;replace&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;modulus&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A positive integer used to calculate the modulus of the hashed source label values.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A valid RE2 expression with support for parenthesized capture groups. Used to match the extracted value from the combination of the &lt;code&gt;source_label&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt; fields or filter labels during the &lt;code&gt;labelkeep/labeldrop/labelmap&lt;/code&gt; actions.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;(.*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replacement&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value against which a regular expression replace is performed, if the regular expression matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;$1&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The separator used to concatenate the values present in &lt;code&gt;source_labels&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of labels whose values are to be selected. Their content is concatenated using the &lt;code&gt;separator&lt;/code&gt; and matched against &lt;code&gt;regex&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;target_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label to which the resulting value will be written to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can use the following actions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;drop&lt;/code&gt;: Drops metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dropequal&lt;/code&gt;: Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do match &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hashmod&lt;/code&gt;: Hashes the concatenated labels, calculates its modulo &lt;code&gt;modulus&lt;/code&gt; and writes the result to the &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;keep&lt;/code&gt;: Keeps metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;keepequal&lt;/code&gt;: Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; don&amp;rsquo;t match &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labeldrop&lt;/code&gt;: Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelkeep&lt;/code&gt;: Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that don&amp;rsquo;t match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelmap&lt;/code&gt;: Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are renamed according to the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;lowercase&lt;/code&gt;: Sets &lt;code&gt;target_label&lt;/code&gt; to the lowercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;replace&lt;/code&gt;: Matches &lt;code&gt;regex&lt;/code&gt; to the concatenated labels. If there&amp;rsquo;s a match, it replaces the content of the &lt;code&gt;target_label&lt;/code&gt; using the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;uppercase&lt;/code&gt;: Sets &lt;code&gt;target_label&lt;/code&gt; to the uppercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The regular expression capture groups can be referred to using either the &lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;wal&#34;&gt;&lt;code&gt;wal&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;wal&lt;/code&gt; block customizes the Write-Ahead Log (WAL) used to temporarily store metrics before they&amp;rsquo;re sent to the configured set of endpoints.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;truncate_frequency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently to clean up the WAL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_keepalive_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum time to keep data in the WAL before it can be removed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_keepalive_time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time to keep data in the WAL before removing it.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;8h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The WAL serves two primary purposes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Buffer unsent metrics in case of intermittent network issues.&lt;/li&gt;
&lt;li&gt;Populate in-memory cache after a process restart.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The WAL is located inside a component-specific directory relative to the storage path Alloy is configured to use.
Refer to the &lt;a href=&#34;../../../cli/run/&#34;&gt;&lt;code&gt;run&lt;/code&gt; documentation&lt;/a&gt; for information about how to change the storage path.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;truncate_frequency&lt;/code&gt; argument configures how often to clean up the WAL.
Every time the &lt;code&gt;truncate_frequency&lt;/code&gt; period elapses, the lower two-thirds of data is removed from the WAL and is no longer available for sending.&lt;/p&gt;
&lt;p&gt;When a WAL clean-up starts, the lowest successfully sent timestamp is used to determine how much data is safe to remove from the WAL.
The &lt;code&gt;min_keepalive_time&lt;/code&gt; and &lt;code&gt;max_keepalive_time&lt;/code&gt; control the permitted age range of data in the WAL.
Samples aren&amp;rsquo;t removed until they&amp;rsquo;re at least as old as &lt;code&gt;min_keepalive_time&lt;/code&gt;, and samples are forcibly removed if they&amp;rsquo;re older than &lt;code&gt;max_keepalive_time&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value which other components can use to send metrics to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields are kept at their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_bytes_total&lt;/code&gt; (counter): Total number of bytes of data sent by queues after compression.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_enqueue_retries_total&lt;/code&gt; (counter): Total number of times enqueue has failed because a shard&amp;rsquo;s queue was full.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_dropped_total&lt;/code&gt; (counter): Total number of exemplars which were dropped after being read from the WAL before being sent to &lt;code&gt;remote_write&lt;/code&gt; because of an unknown reference ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_failed_total&lt;/code&gt; (counter): Total number of exemplars that failed to send to remote storage due to non-recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_in_total&lt;/code&gt; (counter): Exemplars read into remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_pending&lt;/code&gt; (gauge): The number of exemplars pending in shards to be sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_retried_total&lt;/code&gt; (counter): Total number of exemplars that failed to send to remote storage but were retried due to recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_exemplars_total&lt;/code&gt; (counter): Total number of exemplars sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_max_samples_per_send&lt;/code&gt; (gauge): The maximum number of samples each shard is allowed to send in a single request.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_bytes_total&lt;/code&gt; (counter): Total number of bytes of metadata sent by queues after compression.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_failed_total&lt;/code&gt; (counter): Total number of metadata entries that failed to send to remote storage due to non-recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_retried_total&lt;/code&gt; (counter): Total number of metadata entries that failed to send to remote storage but were retried due to recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_total&lt;/code&gt; (counter): Total number of metadata entries sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_queue_highest_sent_timestamp_seconds&lt;/code&gt; (gauge): Unix timestamp of the latest WAL sample successfully sent by a queue.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_dropped_total&lt;/code&gt; (counter): Total number of samples which were dropped after being read from the WAL before being sent to &lt;code&gt;remote_write&lt;/code&gt; because of an unknown reference ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_failed_total&lt;/code&gt; (counter): Total number of samples that failed to send to remote storage due to non-recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_in_total&lt;/code&gt; (counter): Samples read into remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_pending&lt;/code&gt; (gauge): The number of samples pending in shards to be sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_retries_total&lt;/code&gt; (counter): Total number of samples that failed to send to remote storage but were retried due to recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_total&lt;/code&gt; (counter): Total number of samples sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_sent_batch_duration_seconds&lt;/code&gt; (histogram): Duration of send calls to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shard_capacity&lt;/code&gt; (gauge): The capacity of shards within a given queue.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_desired&lt;/code&gt; (gauge): The number of shards a queue wants to run to be able to keep up with the amount of incoming metrics.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_max&lt;/code&gt; (gauge): The maximum number of a shards a queue is allowed to run.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_min&lt;/code&gt; (gauge): The minimum number of shards a queue is allowed to run.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards&lt;/code&gt; (gauge): The number of shards used for concurrent delivery of metrics to an endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_write_wal_exemplars_appended_total&lt;/code&gt; (counter): Total number of exemplars appended to the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_write_wal_out_of_order_samples_total&lt;/code&gt; (counter): Total number of out of order samples ingestion failed attempts.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_write_wal_metadata_updates_total&lt;/code&gt; (counter): Total number of metadata updates sent through the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_write_wal_samples_appended_total&lt;/code&gt; (counter): Total number of samples appended to the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_write_wal_storage_active_series&lt;/code&gt; (gauge): Current number of active series being tracked by the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_write_wal_storage_created_series_total&lt;/code&gt; (counter): Total number of created series appended to the WAL.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_write_wal_storage_deleted_series&lt;/code&gt; (gauge): Current number of series marked for deletion from memory.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_write_wal_storage_removed_series_total&lt;/code&gt; (counter): Total number of series removed from the WAL.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show you how to create &lt;code&gt;prometheus.remote_write&lt;/code&gt; components that send metrics to different destinations.&lt;/p&gt;
&lt;h3 id=&#34;send-metrics-to-a-local-mimir-instance&#34;&gt;Send metrics to a local Mimir instance&lt;/h3&gt;
&lt;p&gt;You can create a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component that sends your metrics to a local Mimir instance:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.remote_write &amp;#34;staging&amp;#34; {
  // Send metrics to a locally running Mimir.
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

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

// Configure a prometheus.scrape component to send metrics to
// prometheus.remote_write component.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets = [
    // Collect metrics from the default HTTP listen address.
    {&amp;#34;__address__&amp;#34; = &amp;#34;127.0.0.1:12345&amp;#34;},
  ]
  forward_to = [prometheus.remote_write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;send-metrics-to-a-mimir-instance-with-a-tenant-specified&#34;&gt;Send metrics to a Mimir instance with a tenant specified&lt;/h3&gt;
&lt;p&gt;You can create a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component that sends your metrics to a specific tenant within the Mimir instance.
This is useful when your Mimir instance is using more than one tenant:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.remote_write &amp;#34;staging&amp;#34; {
  // Send metrics to a Mimir instance
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

    headers = {
      &amp;#34;X-Scope-OrgID&amp;#34; = &amp;#34;staging&amp;#34;,
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;experimental-send-metrics-using-remote-write-v2-protocol&#34;&gt;Experimental: Send metrics using Remote Write v2 protocol&lt;/h3&gt;


&lt;div data-shared=&#34;stability/experimental_feature.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; feature.
Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental feature, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;You can configure &lt;code&gt;prometheus.remote_write&lt;/code&gt; to use the Remote Write v2 protocol if your endpoint supports it:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.remote_write &amp;#34;v2_example&amp;#34; {
  endpoint {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;
    protobuf_message = &amp;#34;io.prometheus.write.v2.Request&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;send-metrics-to-a-managed-service&#34;&gt;Send metrics to a managed service&lt;/h3&gt;
&lt;p&gt;You can create a &lt;code&gt;prometheus.remote_write&lt;/code&gt; component that sends your metrics to a managed service, for example, Grafana Cloud.
The Prometheus username and the Grafana Cloud API Key are injected in this example through environment variables.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.remote_write &amp;#34;default&amp;#34; {
  endpoint {
    url = &amp;#34;https://prometheus-xxx.grafana.net/api/prom/push&amp;#34;
      basic_auth {
        username = sys.env(&amp;#34;PROMETHEUS_USERNAME&amp;#34;)
        password = sys.env(&amp;#34;GRAFANA_CLOUD_API_KEY&amp;#34;)
      }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h2&gt;
&lt;h3 id=&#34;out-of-order-errors&#34;&gt;Out of order errors&lt;/h3&gt;
&lt;p&gt;You may sometimes see an &amp;ldquo;out of order&amp;rdquo; error in the Alloy log files.
This means that Alloy sent a metric sample that has an older timestamp than a sample that the database already ingested.
If your database is Mimir, the exact name of the &lt;a href=&#34;/docs/mimir/latest/manage/mimir-runbooks/#err-mimir-sample-out-of-order&#34;&gt;Mimir error&lt;/a&gt; is &lt;code&gt;err-mimir-sample-out-of-order&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The most common cause for this error is that there is more than one Alloy instance scraping the same target.
To troubleshoot, take the following steps in order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If you use &lt;a href=&#34;../../../../configure/clustering&#34;&gt;clustering&lt;/a&gt;, check if the number of Alloy instances changed at the time the error was logged.
This is the only situation in which it&amp;rsquo;s normal to experience an out of order error.
The error would only happen for a short period, until the cluster stabilizes and all Alloy instances have a new list of targets.
Since the time duration for the cluster to stabilize is expected to be much shorter than the scrape interval, this isn&amp;rsquo;t a real problem.
If the out of order error you see isn&amp;rsquo;t related to scaling of clustered collectors, it must be investigated.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check if there are active Alloy instances which shouldn&amp;rsquo;t be running.
There may be an older Alloy instance that wasn&amp;rsquo;t shut down before a new one was started.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inspect the configuration to see if there could be multiple Alloy instances which scrape the same target.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inspect the WAL to see which Alloy instance sent those metric samples.
The WAL is located in a directory set by the &lt;a href=&#34;../../../cli/run/&#34;&gt;run command&lt;/a&gt; &lt;code&gt;--storage.path&lt;/code&gt; argument.
You can use &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/command-line/promtool/#promtool-tsdb&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Promtool&lt;/a&gt; to inspect it and find out which metric series were sent by this Alloy instance since the last WAL truncation event.
For example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;./promtool tsdb dump --match=&amp;#39;{__name__=&amp;#34;otelcol_connector_spanmetrics_duration_seconds_bucket&amp;#34;, http_method=&amp;#34;GET&amp;#34;, job=&amp;#34;ExampleJobName&amp;#34;}&amp;#39; /path/to/wal/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;technical-details&#34;&gt;Technical details&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; uses &lt;a href=&#34;https://en.wikipedia.org/wiki/Snappy_%28compression%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;snappy&lt;/a&gt; for compression.&lt;/p&gt;
&lt;p&gt;Any labels that start with &lt;code&gt;__&lt;/code&gt; are removed before sending to the endpoint.&lt;/p&gt;
&lt;h3 id=&#34;data-retention&#34;&gt;Data retention&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;prometheus.remote_write&lt;/code&gt; component uses a Write Ahead Log (WAL) to prevent data loss during network outages.
The component buffers the received metrics in a WAL for each configured endpoint.
The queue shards can use the WAL after the network outage is resolved and flush the buffered metrics to the endpoints.&lt;/p&gt;
&lt;p&gt;The WAL records metrics in 128 MB files called segments.
To avoid having a WAL that grows on-disk indefinitely, the component &lt;em&gt;truncates&lt;/em&gt; its segments on a set interval.&lt;/p&gt;
&lt;p&gt;On each truncation, the WAL deletes references to series that are no longer present and also &lt;em&gt;checkpoints&lt;/em&gt; roughly the oldest two thirds of the segments (rounded down to the nearest integer) written to it since the last truncation period.
A checkpoint means that the WAL only keeps track of the unique identifier for each existing metrics series, and can no longer use the samples for remote writing.
If that data hasn&amp;rsquo;t yet been pushed to the remote endpoint, it&amp;rsquo;s lost.&lt;/p&gt;
&lt;p&gt;This behavior dictates the data retention for the &lt;code&gt;prometheus.remote_write&lt;/code&gt; component.
It also means that it&amp;rsquo;s impossible to directly correlate data retention directly to the data age itself, as the truncation logic works on &lt;em&gt;segments&lt;/em&gt;, not the samples themselves.
This makes data retention less predictable when the component receives a non-consistent rate of data.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;#wal&#34;&gt;WAL block&lt;/a&gt; contains some configurable parameters that can be used to control the tradeoff between memory usage, disk usage, and data retention.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;truncate_frequency&lt;/code&gt; or &lt;code&gt;wal_truncate_frequency&lt;/code&gt; parameter configures the interval at which truncations happen. A lower value leads to reduced memory usage, but also provides less resiliency to long outages.&lt;/p&gt;
&lt;p&gt;When a WAL clean-up starts, the most recently successfully sent timestamp is used to determine how much data is safe to remove from the WAL.
The &lt;code&gt;min_keepalive_time&lt;/code&gt; or &lt;code&gt;min_wal_time&lt;/code&gt; controls the minimum age of samples considered for removal.
No samples more recent than &lt;code&gt;min_keepalive_time&lt;/code&gt; are removed.
The &lt;code&gt;max_keepalive_time&lt;/code&gt; or &lt;code&gt;max_wal_time&lt;/code&gt; controls the maximum age of samples that can be kept in the WAL.
Samples older than &lt;code&gt;max_keepalive_time&lt;/code&gt; are forcibly removed.&lt;/p&gt;
&lt;h3 id=&#34;extended-remote_write-outages&#34;&gt;Extended &lt;code&gt;remote_write&lt;/code&gt; outages&lt;/h3&gt;
&lt;p&gt;When the remote write endpoint is unreachable over a period of time, the most recent successfully sent timestamp isn&amp;rsquo;t updated.
The &lt;code&gt;min_keepalive_time&lt;/code&gt; and &lt;code&gt;max_keepalive_time&lt;/code&gt; arguments control the age range of data kept in the WAL.&lt;/p&gt;
&lt;p&gt;If the remote write outage is longer than the &lt;code&gt;max_keepalive_time&lt;/code&gt; parameter, then the WAL is truncated, and the oldest data is lost.&lt;/p&gt;
&lt;h3 id=&#34;intermittent-remote_write-outages&#34;&gt;Intermittent &lt;code&gt;remote_write&lt;/code&gt; outages&lt;/h3&gt;
&lt;p&gt;If the remote write endpoint is intermittently reachable, the most recent successfully sent timestamp is updated whenever the connection is successful.
A successful connection updates the series&amp;rsquo; comparison with &lt;code&gt;min_keepalive_time&lt;/code&gt; and triggers a truncation on the next &lt;code&gt;truncate_frequency&lt;/code&gt; interval which checkpoints two thirds of the segments (rounded down to the nearest integer) written since the previous truncation.&lt;/p&gt;
&lt;h3 id=&#34;falling-behind&#34;&gt;Falling behind&lt;/h3&gt;
&lt;p&gt;If the queue shards can&amp;rsquo;t flush data quickly enough to keep up-to-date with the most recent data buffered in the WAL, the component is &amp;ldquo;falling behind&amp;rdquo;.
It&amp;rsquo;s not unusual for the component to temporarily fall behind 2 or 3 scrape intervals.
If the component falls behind more than one third of the data written since the last truncate interval, it&amp;rsquo;s possible for the truncate loop to checkpoint data before being pushed to the &lt;code&gt;remote_write&lt;/code&gt; endpoint.&lt;/p&gt;
&lt;h3 id=&#34;tune-max_shards&#34;&gt;Tune &lt;code&gt;max_shards&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;a href=&#34;#queue_config&#34;&gt;&lt;code&gt;queue_config&lt;/code&gt;&lt;/a&gt; block allows you to configure &lt;code&gt;max_shards&lt;/code&gt;.
The &lt;code&gt;max_shards&lt;/code&gt; is the maximum number of concurrent shards sending samples to the Prometheus-compatible remote write endpoint.
For each shard, a single remote write request can send up to &lt;code&gt;max_samples_per_send&lt;/code&gt; samples.&lt;/p&gt;
&lt;p&gt;Alloy tries not to use too many shards, but if the queue falls behind, the remote write component increases the number of shards up to &lt;code&gt;max_shards&lt;/code&gt; to increase throughput.
A high number of shards may potentially overwhelm the remote endpoint or increase Alloy memory utilization.
For this reason, it&amp;rsquo;s important to tune &lt;code&gt;max_shards&lt;/code&gt; to a reasonable value that&amp;rsquo;s good enough to keep up with the backlog of data to send to the remote endpoint without overwhelming it.&lt;/p&gt;
&lt;p&gt;The maximum throughput that Alloy can achieve when remote writing is equal to &lt;code&gt;max_shards * max_samples_per_send * &amp;lt;1 / average write request latency&amp;gt;&lt;/code&gt;.
For example, running Alloy with the default configuration of 50 &lt;code&gt;max_shards&lt;/code&gt; and 2000 &lt;code&gt;max_samples_per_send&lt;/code&gt;, and assuming the average latency of a remote write request is 500ms, the maximum throughput achievable is about &lt;code&gt;50 * 2000 * (1s / 500ms) = 200K samples / s&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The default &lt;code&gt;max_shards&lt;/code&gt; configuration is good for most use cases, especially if each Alloy instance scrapes up to 1 million active series.
However, if you run Alloy at a large scale and each instance scrapes more than 1 million series, we recommend increasing the value of &lt;code&gt;max_shards&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Alloy exposes a few metrics that you can use to monitor the remote write shards:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_desired&lt;/code&gt; (gauge): The number of shards a queue wants to run to keep up with the number of incoming metrics.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_max&lt;/code&gt; (gauge): The maximum number of shards a queue is allowed to run.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_min&lt;/code&gt; (gauge): The minimum number of shards a queue is allowed to run.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards&lt;/code&gt; (gauge): The number of shards used for concurrent delivery of metrics to an endpoint.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;re already running Alloy, a rule of thumb is to set &lt;code&gt;max_shards&lt;/code&gt; to 4x shard utilization.
Using the metrics explained above, you can run the following PromQL instant query to compute the suggested &lt;code&gt;max_shards&lt;/code&gt; value for each remote write endpoint &lt;code&gt;url&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;clamp_min(
    (
        # Calculate the 90th percentile desired shards over the last seven-day period.
        # If you&amp;#39;re running Alloy for less than seven days, then
        # reduce the [7d] period to cover only the time range since when you deployed it.
        ceil(quantile_over_time(0.9, prometheus_remote_storage_shards_desired[7d]))

        # Add room for spikes.
        * 4
    ),
    # We recommend setting max_shards to a value of no less than 50, as in the default configuration.
    50
)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you aren&amp;rsquo;t running Alloy yet, we recommend running it with the default &lt;code&gt;max_shards&lt;/code&gt; and then using the PromQL instant query mentioned above to compute the recommended &lt;code&gt;max_shards&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;wal-corruption&#34;&gt;WAL corruption&lt;/h3&gt;
&lt;p&gt;WAL corruption can occur when Alloy unexpectedly stops while the latest WAL segments are still being written to disk.
For example, the host computer has a general disk failure and crashes before you can stop Alloy and other running services.
When you restart Alloy, it verifies the WAL, removing any corrupt segments it finds.
Sometimes, this repair is unsuccessful, and you must manually delete the corrupted WAL to continue.
If the WAL becomes corrupted, Alloy writes error messages such as &lt;code&gt;err=&amp;quot;failed to find segment for index&amp;quot;&lt;/code&gt; to the log file.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Deleting a WAL segment or a WAL file permanently deletes the stored WAL data.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;To delete the corrupted WAL:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../set-up/run/&#34;&gt;Stop&lt;/a&gt; Alloy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Find and delete the contents of the &lt;code&gt;wal&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;By default the &lt;code&gt;wal&lt;/code&gt; directory is a subdirectory of the &lt;code&gt;data-alloy&lt;/code&gt; directory located in the Alloy working directory.
The WAL data directory may be different than the default depending on the path specified by the &lt;a href=&#34;../../../cli/run/&#34;&gt;command line flag&lt;/a&gt; &lt;code&gt;--storage-path&lt;/code&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;There is one &lt;code&gt;wal&lt;/code&gt; directory per &lt;code&gt;prometheus.remote_write&lt;/code&gt; component.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../set-up/run/&#34;&gt;Start&lt;/a&gt; Alloy and verify that the WAL is working correctly.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-consumers&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusremote_write">&lt;code>prometheus.remote_write&lt;/code>&lt;/h1>
&lt;p>&lt;code>prometheus.remote_write&lt;/code> collects metrics sent from other components into a Write-Ahead Log (WAL) and forwards them over the network to a series of user-supplied endpoints.
Metrics are sent over the network using the &lt;a href="https://docs.google.com/document/d/1LPhVRSFkGNSuU1fBd81ulhsCPR4hkSZyyBj1SZ8fWOM/edit" target="_blank" rel="noopener noreferrer">Prometheus Remote Write protocol&lt;/a>.&lt;/p></description></item><item><title>prometheus.scrape</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.scrape/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.scrape/</guid><content><![CDATA[&lt;h1 id=&#34;prometheusscrape&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; configures a Prometheus scraping job for a given set of &lt;code&gt;targets&lt;/code&gt;.
The scraped metrics are forwarded to the list of receivers passed in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;prometheus.scrape&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.scrape &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  targets    = &amp;lt;TARGET_LIST&amp;gt;
  forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component configures and starts a new scrape job to scrape all the input targets.
The list of arguments that can be used to configure the block is presented below.&lt;/p&gt;
&lt;p&gt;The scrape job name defaults to the component&amp;rsquo;s unique identifier.&lt;/p&gt;
&lt;p&gt;One of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[&lt;code&gt;authorization&lt;/code&gt;][authorization] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;basic_auth&lt;/code&gt;][basic_auth] block&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/a&gt; argument&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/a&gt; argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;oauth2&lt;/code&gt;][oauth2] block&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If conflicting attributes are passed, for example, defining both a &lt;code&gt;bearer_token&lt;/code&gt; and &lt;code&gt;bearer_token_file&lt;/code&gt; or configuring both &lt;code&gt;basic_auth&lt;/code&gt; and &lt;code&gt;oauth2&lt;/code&gt; at the same time, the component reports an error.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;prometheus.scrape&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(MetricsReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send scraped metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of targets to scrape.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;body_size_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An uncompressed response body larger than this many bytes causes the scrape to fail. 0 means no limit.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;convert_classic_histograms_to_nhcb&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to convert classic histograms to native histograms with custom buckets (NHCB).&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_compression&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether compression is enabled for the scrape.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether HTTP2 is supported for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_protobuf_negotiation&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated: use &lt;code&gt;scrape_protocols&lt;/code&gt; instead.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_type_and_unit_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Whether the metric type and unit should be added as labels to scraped metrics.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;extra_metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether extra metrics should be generated for scrape targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether redirects returned by the server should be followed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom HTTP headers to be sent along with each request. The map key is the header name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;honor_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Indicator whether the scraped metrics should remain unmodified.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;honor_timestamps&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Indicator whether the scraped timestamps should be respected.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;honor_metadata&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(Experimental) Indicates whether to send metric metadata to downstream components.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;job_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value to use for the job label if not already set.&lt;/td&gt;
              &lt;td&gt;component name&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;label_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this many labels post metric-relabeling causes the scrape to fail.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;label_name_length_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this label name length post metric-relabeling causes the scrape to fail.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;label_value_length_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this label value length post metric-relabeling causes the scrape to fail.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metric_name_escaping_scheme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The escaping scheme to use for metric names. See below for available values.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;underscores&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metric_name_validation_scheme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The validation scheme to use for metric names. See below for available values.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;legacy&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The HTTP resource path on which to fetch metrics from targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/metrics&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;native_histogram_bucket_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Native histogram buckets will be merged to stay within this limit. Disabled when set to zero.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;native_histogram_min_bucket_factor&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;float64&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If the growth from one bucket to the next is smaller than this, buckets will be merged. Disabled when set to zero.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;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;params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A set of query parameters with which the target is scraped.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;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;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_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;sample_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this many samples post metric-relabeling causes the scrape to fail&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scheme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The URL protocol scheme used to fetch metrics from targets.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_classic_histograms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape a classic histogram that&amp;rsquo;s also exposed as a native histogram.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_failure_log_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File to which scrape failures are logged.&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;scrape_fallback_protocol&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The fallback protocol to use if the target does not provide a valid Content-Type header. See below for available values.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;PrometheusText0_0_4&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently to scrape the targets of this scrape configuration.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;60s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_native_histograms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape native histograms. Currently, cannot be updated at runtime.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_protocols&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The protocols to negotiate during a scrape, in order of preference. See below for available values.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;OpenMetricsText1.0.0&amp;quot;, &amp;quot;OpenMetricsText0.0.1&amp;quot;, &amp;quot;PrometheusText1.0.0&amp;quot;, &amp;quot;PrometheusText0.0.4&amp;quot;]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrape_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The timeout for scraping targets of this configuration.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;target_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;More than this many targets after the target relabeling causes the scrapes to fail.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;track_timestamps_staleness&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Indicator whether to track the staleness of the scraped timestamps.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: The &lt;code&gt;honor_metadata&lt;/code&gt; argument is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; feature.
If you enable this argument, resource consumption may increase, particularly if you ingest many metrics with different names.
Some downstream components aren&amp;rsquo;t compatible with Prometheus metadata.
The following components are compatible:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;otelcol.receiver.prometheus&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt; only when configured for Remote Write v2.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.write_queue&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: The &lt;code&gt;enable_type_and_unit_labels&lt;/code&gt; argument is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; feature.
When enabled and available from the scrape, the metric type and unit are added as labels to each scraped sample.
This provides additional schema information about metrics directly in the label set.
This feature doesn&amp;rsquo;t require downstream components to support Remote Write v2.&lt;/p&gt;
&lt;p&gt;Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental feature, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The &lt;code&gt;scrape_protocols&lt;/code&gt; controls the preferred order of protocols to negotiate during a scrape.
The following values are supported:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;OpenMetricsText0.0.1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;OpenMetricsText1.0.0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PrometheusProto&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PrometheusText0.0.4&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PrometheusText1.0.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also use the &lt;code&gt;scrape_fallback_protocol&lt;/code&gt; argument to specify a fallback protocol to use if the target does not provide a valid Content-Type header.&lt;/p&gt;
&lt;p&gt;If you were using the deprecated &lt;code&gt;enable_protobuf_negotiation&lt;/code&gt; argument, switch to using &lt;code&gt;scrape_protocols = [&amp;quot;PrometheusProto&amp;quot;, &amp;quot;OpenMetricsText1.0.0&amp;quot;, &amp;quot;OpenMetricsText0.0.1&amp;quot;, &amp;quot;PrometheusText0.0.4&amp;quot;]&lt;/code&gt; instead.&lt;/p&gt;
&lt;p&gt;For now, native histograms are only available through the Prometheus Protobuf exposition format.
To scrape native histograms, &lt;code&gt;scrape_native_histograms&lt;/code&gt; must be set to &lt;code&gt;true&lt;/code&gt; and the first item in &lt;code&gt;scrape_protocols&lt;/code&gt; must be &lt;code&gt;PrometheusProto&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The default value for &lt;code&gt;scrape_protocols&lt;/code&gt; changes to &lt;code&gt;[&amp;quot;PrometheusProto&amp;quot;, &amp;quot;OpenMetricsText1.0.0&amp;quot;, &amp;quot;OpenMetricsText0.0.1&amp;quot;, &amp;quot;PrometheusText1.0.0&amp;quot;, &amp;quot;PrometheusText0.0.4&amp;quot;]&lt;/code&gt; when
&lt;code&gt;scrape_native_histograms&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;metric_name_validation_scheme&lt;/code&gt; controls how metric names are validated. The following values are supported:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;utf8&amp;quot;&lt;/code&gt; - Uses UTF-8 validation scheme.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;legacy&amp;quot;&lt;/code&gt; - Uses legacy validation scheme which was default in Prometheus v2 (default).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;metric_name_escaping_scheme&lt;/code&gt; controls how metric names are escaped. The following values are supported:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;allow-utf-8&amp;quot;&lt;/code&gt; - Allows UTF-8 characters in metric names. No escaping is required. (default when validation scheme is &amp;ldquo;utf8&amp;rdquo;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;underscores&amp;quot;&lt;/code&gt; - Replaces all legacy-invalid characters with underscores (default when validation scheme is &amp;ldquo;legacy&amp;rdquo;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;dots&amp;quot;&lt;/code&gt; - Replaces all legacy-invalid characters with dots except that dots are converted to &lt;code&gt;_dot_&lt;/code&gt; and pre-existing underscores are converted to &lt;code&gt;__&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;values&amp;quot;&lt;/code&gt; - Prepends the name with &lt;code&gt;U__&lt;/code&gt; and replaces all invalid characters with the unicode value, surrounded by underscores. Single underscores are replaced with double underscores.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: &lt;code&gt;metric_name_escaping_scheme&lt;/code&gt; cannot be set to &lt;code&gt;&amp;quot;allow-utf-8&amp;quot;&lt;/code&gt; while &lt;code&gt;metric_name_validation_scheme&lt;/code&gt; is not set to &lt;code&gt;&amp;quot;utf8&amp;quot;&lt;/code&gt;.&lt;/p&gt;


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

        
&lt;p&gt;&lt;code&gt;track_timestamps_staleness&lt;/code&gt; controls whether Prometheus tracks &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/querying/basics/#staleness&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;staleness&lt;/a&gt; of metrics with an explicit timestamp present in scraped data.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;An &amp;ldquo;explicit timestamp&amp;rdquo; is an optional timestamp in the &lt;a href=&#34;https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus metrics exposition format&lt;/a&gt;. For example, this sample has a timestamp of &lt;code&gt;1395066363000&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;http_requests_total{method=&amp;#34;post&amp;#34;,code=&amp;#34;200&amp;#34;} 1027 1395066363000&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If &lt;code&gt;track_timestamps_staleness&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;, a staleness marker will be inserted when a metric is no longer present or the target is down.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A &amp;ldquo;staleness marker&amp;rdquo; is just a &lt;span class=&#34;term&#34; x-data=&#34;app_term(&#39;sample&#39;, `&amp;lt;p&amp;gt;A sample is a single timestamped value in a time series.
Given the series &amp;lt;code&amp;gt;node_cpu_seconds_total{instance=&amp;amp;quot;10.0.0.1&amp;amp;quot;,mode=&amp;amp;quot;system&amp;amp;quot;}&amp;lt;/code&amp;gt; its stream of samples may look like:&amp;lt;/p&amp;gt;

&amp;lt;div class=&amp;#34;code-snippet code-snippet__mini&amp;#34;&amp;gt;&amp;lt;div class=&amp;#34;lang-toolbar__mini&amp;#34;&amp;gt;
    &amp;lt;span class=&amp;#34;code-clipboard&amp;#34;&amp;gt;
      &amp;lt;button x-data=&amp;#34;app_code_snippet()&amp;#34; x-init=&amp;#34;init()&amp;#34; @click=&amp;#34;copy()&amp;#34;&amp;gt;
        &amp;lt;img class=&amp;#34;code-clipboard__icon&amp;#34; src=&amp;#34;/media/images/icons/icon-copy-small-2.svg&amp;#34; alt=&amp;#34;Copy code to clipboard&amp;#34; width=&amp;#34;14&amp;#34; height=&amp;#34;13&amp;#34;&amp;gt;
        &amp;lt;span&amp;gt;Copy&amp;lt;/span&amp;gt;
      &amp;lt;/button&amp;gt;
    &amp;lt;/span&amp;gt;
  &amp;lt;/div&amp;gt;&amp;lt;div class=&amp;#34;code-snippet code-snippet__border&amp;#34;&amp;gt;
    &amp;lt;pre data-expanded=&amp;#34;false&amp;#34;&amp;gt;&amp;lt;code class=&amp;#34;language-none&amp;#34;&amp;gt;# Display format: &amp;amp;lt;value&amp;amp;gt; @&amp;amp;lt;timestamp&amp;amp;gt;
11775 @1603812134
11790 @1603812149
11805 @1603812164
11819 @1603812179
11834 @1603812194&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;`)&#34; x-init=&#34;init()&#34; :class=&#34;{ &#39;term-hover&#39; : open }&#34;&gt;&lt;span x-ref=&#34;tooltip&#34;&gt;sample&lt;/span&gt;&lt;/span&gt; with a specific NaN value which is reserved for internal use by Prometheus.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We recommend you set &lt;code&gt;track_timestamps_staleness&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; if the database where metrics are written to has enabled &lt;a href=&#34;/docs/mimir/latest/configure/configure-out-of-order-samples-ingestion/&#34;&gt;out of order ingestion&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If &lt;code&gt;track_timestamps_staleness&lt;/code&gt; is set to &lt;code&gt;false&lt;/code&gt;, samples with explicit timestamps will only be labeled as stale after a certain time period, which in Prometheus is 5 minutes by default.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.scrape&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 6;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#authorization\&amp;#34;\u003e\u003ccode\u003eauthorization\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure generic authorization to targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure \u003ccode\u003ebasic_auth\u003c/code\u003e for authenticating to targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#clustering\&amp;#34;\u003e\u003ccode\u003eclustering\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure the component for when Alloy is running in clustered mode.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#oauth2\&amp;#34;\u003e\u003ccode\u003eoauth2\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure OAuth 2.0 for authenticating to targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eoauth2\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to targets via OAuth 2.0\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure &lt;code&gt;basic_auth&lt;/code&gt; for authenticating to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Alloy is running in clustered mode.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth 2.0 for authenticating to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;oauth2&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to targets via OAuth 2.0&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;credentials_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;credentials&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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 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;Using &lt;code&gt;password_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;password&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When Alloy is &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;using clustering&lt;/a&gt;, and &lt;code&gt;enabled&lt;/code&gt; is set to true, then this &lt;code&gt;prometheus.scrape&lt;/code&gt; component instance opts-in to participating in the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering assumes that all cluster nodes are running with the same configuration file, have access to the same service discovery APIs, and that all &lt;code&gt;prometheus.scrape&lt;/code&gt; components that have opted-in to using clustering, over the course of a scrape interval, are converging on the same target set from
upstream components in their &lt;code&gt;targets&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;All &lt;code&gt;prometheus.scrape&lt;/code&gt; components instances opting in to clustering use target labels and a consistent hashing algorithm to determine ownership for each of the targets between the cluster peers.
Then, each peer only scrapes the subset of targets that it&amp;rsquo;s responsible for, so that the scrape load is distributed.
When a node joins or leaves the cluster, every peer recalculates ownership and continues scraping with the new target set.
This performs better than hashmod sharding where &lt;em&gt;all&lt;/em&gt; nodes have to be re-distributed, as only 1/N of the targets ownership is transferred, but is eventually consistent (rather than fully consistent like hashmod sharding is).&lt;/p&gt;
&lt;p&gt;If Alloy is &lt;em&gt;not&lt;/em&gt; running in clustered mode, then the block is a no-op and &lt;code&gt;prometheus.scrape&lt;/code&gt; scrapes every target it receives in its arguments.&lt;/p&gt;
&lt;h3 id=&#34;oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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;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_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;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_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;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;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;Using &lt;code&gt;client_secret_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;client_secret&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;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&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;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; isn&amp;rsquo;t provided, the minimum acceptable TLS version is inherited from Go&amp;rsquo;s default minimum version, TLS 1.2.
If &lt;code&gt;min_version&lt;/code&gt; is provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

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

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.scrape &amp;#34;prometheus&amp;#34; {
  ...
  scrape_native_histograms = true
  scrape_protocols = [&amp;#34;PrometheusProto&amp;#34;, &amp;#34;OpenMetricsText1.0.0&amp;#34;, &amp;#34;OpenMetricsText0.0.1&amp;#34;, &amp;#34;PrometheusText0.0.4&amp;#34;]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The&lt;code&gt;scrape_classic_histograms&lt;/code&gt; argument controls whether the component should also scrape the &amp;lsquo;classic&amp;rsquo; histogram equivalent of a native histogram, if it&amp;rsquo;s present. It&amp;rsquo;s an equivalent to the &lt;code&gt;always_scrape_classic_histograms&lt;/code&gt; argument in Prometheus v3.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;h3 id=&#34;set-up-scrape-jobs-for-blackbox-exporter-targets&#34;&gt;Set up scrape jobs for &lt;code&gt;blackbox exporter&lt;/code&gt; targets&lt;/h3&gt;
&lt;p&gt;The following example sets up the scrape job with certain attributes (scrape endpoint, scrape interval, query parameters) and lets it scrape two instances of the &lt;a href=&#34;https://github.com/prometheus/blackbox_exporter/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;blackbox exporter&lt;/a&gt;.
The exposed metrics are sent over to the provided list of receivers, as defined by other components.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.scrape &amp;#34;blackbox_scraper&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;blackbox-exporter:9115&amp;#34;, &amp;#34;instance&amp;#34; = &amp;#34;one&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;blackbox-exporter:9116&amp;#34;, &amp;#34;instance&amp;#34; = &amp;#34;two&amp;#34;},
  ]

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

  scrape_interval = &amp;#34;10s&amp;#34;
  params          = { &amp;#34;target&amp;#34; = [&amp;#34;grafana.com&amp;#34;], &amp;#34;module&amp;#34; = [&amp;#34;http_2xx&amp;#34;] }
  metrics_path    = &amp;#34;/probe&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The endpoints that are being scraped every 10 seconds are:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;http://blackbox-exporter:9115/probe?target=grafana.com&amp;amp;module=http_2xx
http://blackbox-exporter:9116/probe?target=grafana.com&amp;amp;module=http_2xx&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;authentication-with-the-kubernetes-api-server&#34;&gt;Authentication with the Kubernetes API server&lt;/h3&gt;
&lt;p&gt;The following example shows you how to authenticate with the Kubernetes API server.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.scrape &amp;#34;kubelet&amp;#34; {
        scheme = &amp;#34;https&amp;#34;
        tls_config {
            server_name = &amp;#34;kubernetes&amp;#34;
            ca_file = &amp;#34;/var/run/secrets/kubernetes.io/serviceaccount/ca.crt&amp;#34;
            insecure_skip_verify = false
        }
        bearer_token_file = &amp;#34;/var/run/secrets/kubernetes.io/serviceaccount/token&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;technical-details&#34;&gt;Technical details&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; supports &lt;a href=&#34;https://en.wikipedia.org/wiki/Gzip&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;gzip&lt;/a&gt; compression.&lt;/p&gt;
&lt;p&gt;The following special labels can change the behavior of &lt;code&gt;prometheus.scrape&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__address__&lt;/code&gt;: The name of the label that holds the &lt;code&gt;&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt; address of a scrape target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__metrics_path__&lt;/code&gt;: The name of the label that holds the path on which to scrape a target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__param_&amp;lt;name&amp;gt;&lt;/code&gt;: A prefix for labels that provide URL parameters &lt;code&gt;&amp;lt;name&amp;gt;&lt;/code&gt; used to scrape a target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__scheme__&lt;/code&gt;: the name of the label that holds the protocol scheme (&lt;code&gt;http&lt;/code&gt;, &lt;code&gt;https&lt;/code&gt;) on which to scrape a target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__scrape_interval__&lt;/code&gt;: The name of the label that holds the scrape interval used to scrape a target.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__scrape_timeout__&lt;/code&gt;: The name of the label that holds the scrape timeout used to scrape a target.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Special labels added after a scrape&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__name__&lt;/code&gt;: The label name indicating the metric name of a timeseries.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;instance&lt;/code&gt;: The label name used for the instance label.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;job&lt;/code&gt;: The label name indicating the job from which a timeseries was scraped.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-exporters&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheusscrape">&lt;code>prometheus.scrape&lt;/code>&lt;/h1>
&lt;p>&lt;code>prometheus.scrape&lt;/code> configures a Prometheus scraping job for a given set of &lt;code>targets&lt;/code>.
The scraped metrics are forwarded to the list of receivers passed in &lt;code>forward_to&lt;/code>.&lt;/p></description></item><item><title>prometheus.write.queue</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.write.queue/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/reference/components/prometheus/prometheus.write.queue/</guid><content><![CDATA[&lt;h1 id=&#34;prometheuswritequeue&#34;&gt;&lt;code&gt;prometheus.write.queue&lt;/code&gt;&lt;/h1&gt;


&lt;div data-shared=&#34;stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;prometheus.write.queue&lt;/code&gt; collects metrics sent from other components into a Write-Ahead Log (WAL) and forwards them over the network to a series of user-supplied endpoints.
Metrics are sent over the network using the &lt;a href=&#34;https://prometheus.io/docs/specs/remote_write_spec/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus Remote Write protocol&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;Starting with Alloy v1.14, &lt;code&gt;prometheus.write.queue&lt;/code&gt; is deprecated.
It will be removed in a future release.
Use &lt;code&gt;prometheus.remote_write&lt;/code&gt; instead.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can specify multiple &lt;code&gt;prometheus.write.queue&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

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

    ...
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following argument with &lt;code&gt;prometheus.write.queue&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ttl&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How long the samples can be queued for before they&amp;rsquo;re discarded.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;2h&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;prometheus.write.queue&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 5;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#endpoint\&amp;#34;\u003e\u003ccode\u003eendpoint\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLocation to send metrics to.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure \u003ccode\u003ebasic_auth\u003c/code\u003e for authenticating to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#parallelism\&amp;#34;\u003e\u003ccode\u003eparallelism\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure parallelism for the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#persistence\&amp;#34;\u003e\u003ccode\u003epersistence\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfiguration for persistence\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#endpoint&#34;&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Location to send metrics to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure &lt;code&gt;basic_auth&lt;/code&gt; for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&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;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#parallelism&#34;&gt;&lt;code&gt;parallelism&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure parallelism for the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#persistence&#34;&gt;&lt;code&gt;persistence&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration for persistence&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;endpoint&#34;&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;endpoint&lt;/code&gt; block describes a single location to send metrics to.
Multiple &lt;code&gt;endpoint&lt;/code&gt; blocks can be provided to send metrics to multiple locations.
Each &lt;code&gt;endpoint&lt;/code&gt; has its own WAL folder.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Full URL to send metrics to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;batch_count&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How many series to queue in each queue.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_round_robin&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use round robin load balancing when there are multiple IPs for a given endpoint.&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;external_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Labels to add to metrics sent over the network.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;flush_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How long to wait until sending if &lt;code&gt;batch_count&lt;/code&gt; isn&amp;rsquo;t triggered.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(secret)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom HTTP headers to add to all requests sent to the server.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_retry_attempts&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of retries before dropping the batch.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metadata_cache_enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables an LRU cache for tracking Metadata to support sparse metadata sending.&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;metadata_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of metadata entries to keep in cache to track what has been sent.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;protobuf_message&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Protobuf message format to use for remote write.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;prometheus.WriteRequest&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL of the HTTP proxy to use for requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;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;Whether to read proxy configuration from 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_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(secret)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP 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;retry_backoff&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How long to wait between retries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;1s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;write_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for requests made to the URL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;protobuf_message&lt;/code&gt; must be &lt;code&gt;prometheus.WriteRequest&lt;/code&gt; or &lt;code&gt;io.prometheus.write.v2.Request&lt;/code&gt;. These values represent prometheus remote write protocol versions 1 and 2.&lt;/p&gt;
&lt;p&gt;&amp;lsquo;metadata_cache_enabled&amp;rsquo; and &lt;code&gt;metadata_cache_size&lt;/code&gt; are only relevant when using &lt;code&gt;io.prometheus.write.v2.Request&lt;/code&gt;, and is intended to reduce the frequency of metadata sending to reduce overall network traffic.
A larger cache_size will consume more memory, but if you are sending many different metrics will also reduce how frequently metadata is sent with samples.&lt;/p&gt;
&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&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;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;h3 id=&#34;tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;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_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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;parallelism&#34;&gt;&lt;code&gt;parallelism&lt;/code&gt;&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;allowed_network_error_fraction&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;float&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The allowed error rate before scaling down. For example &lt;code&gt;0.50&lt;/code&gt; allows 50% error rate.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0.50&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;desired_check_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The length of time between checking for desired connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;desired_connections_lookback&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The length of time that previous desired connections are kept for determining desired connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drift_scale_down&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The minimum amount of time between the timestamps of incoming signals and outgoing signals before decreasing desired connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drift_scale_up&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum amount of time between the timestamps of incoming signals and outgoing signals before increasing desired connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;60s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_connections&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of desired connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;50&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_connections&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The minimum number of desired connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;network_flush_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The length of time that network successes and failures are kept for determining desired connections.&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;Parallelism determines when to scale up or down the number of desired connections.&lt;/p&gt;
&lt;p&gt;The drift between the incoming and outgoing timestamps determines whether to increase or decrease the desired connections.
The value stays the same if the drift is between &lt;code&gt;drift_scale_up_seconds&lt;/code&gt; and &lt;code&gt;drift_scale_down_seconds&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Network successes and failures are recorded and kept in memory.
This data helps determine the nature of the drift.
For example, if the drift is increasing and the network failures are increasing, the desired connections shouldn&amp;rsquo;t increase because that would increase the load on the endpoint.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;desired_check_interval&lt;/code&gt; prevents connection flapping.
Each time a desired connection is calculated, the connection is added to a lookback buffer.
Before increasing or decreasing the desired connections, &lt;code&gt;prometheus.write.queue&lt;/code&gt; chooses the highest value in the lookback buffer.
For example, for the past 5 minutes, the desired connections have been: [2,1,1].
The check determines that the desired connections are 1, and the number of desired connections won&amp;rsquo;t change because the value &lt;code&gt;2&lt;/code&gt; is still in the lookback buffer.
On the next check, the desired connections are [1,1,1].
Since the &lt;code&gt;2&lt;/code&gt; value has expired, the desired connections change to 1.
In general, the system is fast to increase and slow to decrease the desired connections.&lt;/p&gt;
&lt;h3 id=&#34;persistence&#34;&gt;&lt;code&gt;persistence&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;persistence&lt;/code&gt; block describes how often and at what limits to write to disk.
Persistence settings are shared for each &lt;code&gt;endpoint&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;batch_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How often to batch signals to disk if &lt;code&gt;max_signals_to_batch&lt;/code&gt; isn&amp;rsquo;t reached.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_signals_to_batch&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of signals before they&amp;rsquo;re batched to disk.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10000&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send metrics to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.write.queue&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields are kept at their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.write.queue&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;The following metrics are provided for backward compatibility.
They generally behave the same, but there are likely edge cases where they differ.&lt;/p&gt;
&lt;!-- * `prometheus_remote_storage_enqueue_retries_total` (counter): Total number of times enqueue has failed because a shard&#39;s queue was full.
* `prometheus_remote_storage_exemplars_dropped_total` (counter): Total number of exemplars that were dropped after being read from the WAL before being sent to `remote_write` because of an unknown reference ID.
* `prometheus_remote_storage_exemplars_failed_total` (counter): Total number of exemplars that failed to send to remote storage due to non-recoverable errors.
* `prometheus_remote_storage_exemplars_in_total` (counter): Exemplars read into remote storage.
* `prometheus_remote_storage_exemplars_retried_total` (counter): Total number of exemplars that failed to send to remote storage but were retried due to recoverable errors.
* `prometheus_remote_storage_exemplars_total` (counter): Total number of exemplars sent to remote storage. --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_failed_total&lt;/code&gt; (counter): Total number of metadata entries that failed to send to remote storage due to non-recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_retried_total&lt;/code&gt; (counter): Total number of metadata entries that failed to send to remote storage but were retried due to recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_metadata_total&lt;/code&gt; (counter): Total number of metadata entries sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_queue_highest_sent_timestamp_seconds&lt;/code&gt; (gauge): Unix timestamp of the latest WAL sample successfully sent by a queue.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_highest_timestamp_in_seconds&lt;/code&gt; TODO&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- * `prometheus_remote_storage_samples_dropped_total` (counter): Total number of samples which were dropped after being read from the WAL before being sent to `remote_write` because of an unknown reference ID. --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_failed_total&lt;/code&gt; (counter): Total number of samples that failed to send to remote storage due to non-recoverable errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- * `prometheus_remote_storage_samples_in_total` (counter): Samples read into remote storage. --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_retried_total&lt;/code&gt; (counter): Total number of samples that failed to send to remote storage but were retried due to recoverable errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_samples_total&lt;/code&gt; (counter): Total number of samples sent to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_sent_batch_duration_seconds&lt;/code&gt; (histogram): Duration of send calls to remote storage.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- * `prometheus_remote_write_wal_exemplars_appended_total` (counter): Total number of exemplars appended to the WAL. --&gt;
&lt;!-- * `prometheus_remote_write_wal_samples_appended_total` (counter): Total number of samples appended to the WAL. --&gt;
&lt;!-- * `prometheus_remote_write_wal_storage_created_series_total` (counter): Total number of created series appended to the WAL.
* `prometheus_remote_write_wal_storage_removed_series_total` (counter): Total number of series removed from the WAL. --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_bytes_total&lt;/code&gt; (counter): Total number of bytes of data sent by queues after compression.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_sent_bytes_total&lt;/code&gt; (counter): Total number of bytes of data sent by queues after compression. (same as &lt;code&gt;prometheus_remote_storage_bytes_total&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_sent_batch_duration_seconds&lt;/code&gt; (histogram): Duration of send calls to remote storage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_max&lt;/code&gt; (gauge): The maximum number of a shards a queue is allowed to run.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards_min&lt;/code&gt; (gauge): The minimum number of shards a queue is allowed to run.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus_remote_storage_shards&lt;/code&gt; (gauge): The number of shards used for concurrent delivery of metrics to an endpoint.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Metrics that are new to &lt;code&gt;prometheus.write.queue&lt;/code&gt;. These are highly subject to change.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_metadata_network_sent_total&lt;/code&gt; (counter): Number of metadata sent successfully.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_metadata_serializer_errors_total&lt;/code&gt; (counter): Number of errors for metadata written to serializer.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_metadata_serializer_incoming_signals_total&lt;/code&gt; (counter): Total number of metadata written to serialization.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_metadata_network_failed_total&lt;/code&gt; (counter): Number of metadata failed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_metadata_network_duration_seconds&lt;/code&gt; (histogram): Duration writing metadata to endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_metadata_network_errors_total&lt;/code&gt; (counter): Number of errors writing metadata to network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_metadata_network_retried_429_total&lt;/code&gt; (counter): Number of metadata retried due to status code 429.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_metadata_network_retried_5xx_total&lt;/code&gt; (counter): Number of metadata retried due to status code 5xx.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_metadata_network_retried_total&lt;/code&gt; (counter): Number of metadata retried due to network issues.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_network_failed_total&lt;/code&gt; (counter): Number of series failed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_network_duration_seconds&lt;/code&gt; (histogram): Duration writing series to endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_network_errors_total&lt;/code&gt; (counter): Number of errors writing series to network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_network_retried_429_total&lt;/code&gt; (counter): Number of series retried due to status code 429.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_network_retried_5xx_total&lt;/code&gt; (counter): Number of series retried due to status code 5xx.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_network_retried_total&lt;/code&gt; (counter): Number of series retried due to network issues.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_network_sent_total&lt;/code&gt; (counter): Number of series sent successfully.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_network_timestamp_seconds&lt;/code&gt; (gauge): Highest timestamp written to an endpoint.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_serializer_errors_total&lt;/code&gt; (counter): Number of errors for series written to serializer.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_serializer_incoming_signals_total&lt;/code&gt; (counter): Total number of series written to serialization.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_serializer_incoming_exemplars_total&lt;/code&gt; (counter): Total number of exemplars written to serialization.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_serializer_incoming_timestamp_seconds&lt;/code&gt; (gauge): Highest timestamp of incoming series.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_disk_compressed_bytes_read_total&lt;/code&gt; (counter): Total number of compressed bytes read from disk.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_disk_compressed_bytes_written_total&lt;/code&gt; (counter): Total number of compressed bytes written to disk.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_disk_uncompressed_bytes_read_total&lt;/code&gt; (counter): Total number of uncompressed bytes read from disk.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_disk_uncompressed_bytes_written_total&lt;/code&gt; (counter): Total number of uncompressed bytes written to disk.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_file_id_written&lt;/code&gt; (gauge): Current file id written, file id being a numeric number.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alloy_queue_series_file_id_read&lt;/code&gt; (gauge): Current file id read, file id being a numeric number.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show you how to create &lt;code&gt;prometheus.write.queue&lt;/code&gt; components that send metrics to different destinations.&lt;/p&gt;
&lt;h3 id=&#34;send-metrics-to-a-local-mimir-instance&#34;&gt;Send metrics to a local Mimir instance&lt;/h3&gt;
&lt;p&gt;You can create a &lt;code&gt;prometheus.write.queue&lt;/code&gt; component that sends your metrics to a local Mimir instance:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;prometheus.write.queue &amp;#34;staging&amp;#34; {
  // Send metrics to a locally running Mimir.
  endpoint &amp;#34;mimir&amp;#34; {
    url = &amp;#34;http://mimir:9009/api/v1/push&amp;#34;

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

// Configure a prometheus.scrape component to send metrics to
// prometheus.write.queue component.
prometheus.scrape &amp;#34;demo&amp;#34; {
  targets = [
    // Collect metrics from the default HTTP listen address.
    {&amp;#34;__address__&amp;#34; = &amp;#34;127.0.0.1:12345&amp;#34;},
  ]
  forward_to = [prometheus.write.queue.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;technical-details&#34;&gt;Technical details&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.write.queue&lt;/code&gt; uses &lt;a href=&#34;https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;zstd&lt;/a&gt; for compression.
&lt;code&gt;prometheus.write.queue&lt;/code&gt; sends native histograms by default.
Any labels that start with &lt;code&gt;__&lt;/code&gt; will be removed before sending to the endpoint.&lt;/p&gt;
&lt;h3 id=&#34;data-retention&#34;&gt;Data retention&lt;/h3&gt;
&lt;p&gt;Data is written to disk in blocks utilizing &lt;a href=&#34;https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;zstd&lt;/a&gt; compression. These blocks are read on startup and resent if they&amp;rsquo;re still within the TTL.
Any data that hasn&amp;rsquo;t been written to disk, or that&amp;rsquo;s in the network queues is lost if Alloy is restarted.&lt;/p&gt;
&lt;h3 id=&#34;retries&#34;&gt;Retries&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;prometheus.write.queue&lt;/code&gt;  retries sending data if the following errors or HTTP status codes are returned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Network errors.&lt;/li&gt;
&lt;li&gt;HTTP 429 errors.&lt;/li&gt;
&lt;li&gt;HTTP 5XX errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;prometheus.write.queue&lt;/code&gt; won&amp;rsquo;t retry sending data if any other unsuccessful status codes are returned.&lt;/p&gt;
&lt;h3 id=&#34;memory&#34;&gt;Memory&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;prometheus.write.queue&lt;/code&gt; is meant to be memory efficient.
You can adjust the &lt;code&gt;max_signals_to_batch&lt;/code&gt;, &lt;code&gt;parallelism&lt;/code&gt;, and &lt;code&gt;batch_size&lt;/code&gt; to control how much memory is used.
A higher &lt;code&gt;max_signals_to_batch&lt;/code&gt; allows for more efficient disk compression.
A higher &lt;code&gt;parallelism&lt;/code&gt; allows more parallel writes, and &lt;code&gt;batch_size&lt;/code&gt; allows more data sent at one time.
This can allow greater throughput at the cost of more memory on both Alloy and the endpoint.
The defaults are suitable for most common usages.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;prometheus.write.queue&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#prometheus-metricsreceiver-consumers&#34;&gt;Prometheus &lt;code&gt;MetricsReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="prometheuswritequeue">&lt;code>prometheus.write.queue&lt;/code>&lt;/h1>
&lt;div data-shared="stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an &lt;a href="/docs/release-life-cycle/">experimental&lt;/a> component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code>stability.level&lt;/code>
&lt;a href="/docs/alloy/v1.15/reference/cli/run/">flag&lt;/a> to &lt;code>experimental&lt;/code>.&lt;/p></description></item></channel></rss>