<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Configure Grafana Alloy on Grafana Labs</title><link>https://grafana.com/docs/alloy/v1.15/configure/</link><description>Recent content in Configure Grafana Alloy on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/alloy/v1.15/configure/index.xml" rel="self" type="application/rss+xml"/><item><title>Configure Grafana Alloy clustering in an existing installation</title><link>https://grafana.com/docs/alloy/v1.15/configure/clustering/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/configure/clustering/</guid><content><![CDATA[&lt;h1 id=&#34;configure-alloy-clustering-in-an-existing-installation&#34;&gt;Configure Alloy clustering in an existing installation&lt;/h1&gt;
&lt;p&gt;You can configure Alloy to run with &lt;a href=&#34;../clustering/&#34;&gt;clustering&lt;/a&gt; so that individual Alloys can work together for workload distribution and high availability.&lt;/p&gt;
&lt;p&gt;This topic describes how to add clustering to an existing installation.&lt;/p&gt;
&lt;h2 id=&#34;configure-alloy-clustering-with-helm-chart&#34;&gt;Configure Alloy clustering with Helm Chart&lt;/h2&gt;
&lt;p&gt;This section guides you through enabling clustering when Alloy is installed on Kubernetes using the Alloy &lt;a href=&#34;../../set-up/install/kubernetes/&#34;&gt;Helm chart&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Ensure that your &lt;code&gt;values.yaml&lt;/code&gt; file has &lt;code&gt;controller.type&lt;/code&gt; set to &lt;code&gt;statefulset&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;steps&#34;&gt;Steps&lt;/h3&gt;
&lt;p&gt;To configure clustering:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Amend your existing &lt;code&gt;values.yaml&lt;/code&gt; file to add &lt;code&gt;clustering.enabled=true&lt;/code&gt; inside the &lt;code&gt;alloy&lt;/code&gt; block.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;alloy:
  clustering:
    enabled: true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Upgrade your installation to use the new &lt;code&gt;values.yaml&lt;/code&gt; file:&lt;/p&gt;

&lt;div class=&#34;code-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;helm upgrade &amp;lt;RELEASE_NAME&amp;gt; -f values.yaml&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;RELEASE_NAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The name of the installation you chose when you installed the Helm chart.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the Alloy &lt;a href=&#34;../../troubleshoot/debug/#component-detail-page&#34;&gt;UI&lt;/a&gt; to verify the cluster status:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;strong&gt;Clustering&lt;/strong&gt; in the navigation bar.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ensure that all expected nodes appear in the resulting table.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="configure-alloy-clustering-in-an-existing-installation">Configure Alloy clustering in an existing installation&lt;/h1>
&lt;p>You can configure Alloy to run with &lt;a href="../clustering/">clustering&lt;/a> so that individual Alloys can work together for workload distribution and high availability.&lt;/p></description></item><item><title>Configure Grafana Alloy on Kubernetes</title><link>https://grafana.com/docs/alloy/v1.15/configure/kubernetes/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/configure/kubernetes/</guid><content><![CDATA[&lt;h1 id=&#34;configure-grafana-alloy-on-kubernetes&#34;&gt;Configure Grafana Alloy on Kubernetes&lt;/h1&gt;
&lt;p&gt;This page describes how to apply a new configuration to Alloy when running on Kubernetes with the Helm chart.
It assumes that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You have &lt;a href=&#34;../../set-up/install/kubernetes/&#34;&gt;installed Alloy on Kubernetes using the Helm chart&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You already have a Alloy configuration that you want to apply to your Helm chart installation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Refer to &lt;a href=&#34;../../collect/&#34;&gt;Collect and forward data&lt;/a&gt; for information about configuring Alloy to collect and forward data.&lt;/p&gt;
&lt;h2 id=&#34;configure-the-helm-chart&#34;&gt;Configure the Helm chart&lt;/h2&gt;
&lt;p&gt;To modify Alloy&amp;rsquo;s Helm chart configuration, perform the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a local &lt;code&gt;values.yaml&lt;/code&gt; file with a Helm chart configuration.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You can use your own copy of the values file or download a copy of the
default &lt;a href=&#34;https://raw.githubusercontent.com/grafana/alloy/main/operations/helm/charts/alloy/values.yaml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;values.yaml&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make changes to your &lt;code&gt;values.yaml&lt;/code&gt; to customize settings for the
Helm chart.&lt;/p&gt;
&lt;p&gt;Refer to the inline documentation in the default &lt;a href=&#34;https://raw.githubusercontent.com/grafana/alloy/main/operations/helm/charts/alloy/values.yaml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;values.yaml&lt;/code&gt;&lt;/a&gt; for more
information about each option.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command in a terminal to upgrade your Alloy installation:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;helm upgrade --namespace &amp;lt;NAMESPACE&amp;gt; &amp;lt;RELEASE_NAME&amp;gt; grafana/alloy -f &amp;lt;VALUES_PATH&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;NAMESPACE&amp;gt;&lt;/code&gt;&lt;/em&gt;: The namespace you used for your Alloy installation.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;RELEASE_NAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The name you used for your Alloy installation.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;VALUES_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The path to your copy of &lt;code&gt;values.yaml&lt;/code&gt; to use.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;kustomize-considerations&#34;&gt;Kustomize considerations&lt;/h2&gt;
&lt;p&gt;If you are using &lt;a href=&#34;https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kustomize&lt;/a&gt; to inflate and install the &lt;a href=&#34;https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm chart&lt;/a&gt;, be careful when using a &lt;code&gt;configMapGenerator&lt;/code&gt; to generate the ConfigMap containing the configuration.
By default, the generator appends a hash to the name and patches the resource mentioning it, triggering a rolling update.&lt;/p&gt;
&lt;p&gt;This behavior is undesirable for Alloy because the startup time can be significant, for example, when your deployment has a large metrics Write-Ahead Log.
You can use the &lt;a href=&#34;https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm chart&lt;/a&gt; sidecar container to watch the ConfigMap and trigger a dynamic reload.&lt;/p&gt;
&lt;p&gt;The following is an example snippet of a &lt;code&gt;kustomization&lt;/code&gt; that disables this behavior:&lt;/p&gt;

&lt;div class=&#34;code-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;configMapGenerator:
  - name: alloy
    files:
      - config.alloy
    options:
      disableNameSuffixHash: true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;configure-alloy&#34;&gt;Configure Alloy&lt;/h2&gt;
&lt;p&gt;This section describes how to modify the Alloy configuration, which is stored in a ConfigMap in the Kubernetes cluster.
There are two methods to perform this task.&lt;/p&gt;
&lt;h3 id=&#34;method-1-modify-the-configuration-in-the-valuesyaml-file&#34;&gt;Method 1: Modify the configuration in the values.yaml file&lt;/h3&gt;
&lt;p&gt;Use this method if you prefer to embed your Alloy configuration in the Helm chart&amp;rsquo;s &lt;code&gt;values.yaml&lt;/code&gt; file.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Modify the configuration file contents directly in the &lt;code&gt;values.yaml&lt;/code&gt; file:&lt;/p&gt;

&lt;div class=&#34;code-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;alloy:
  configMap:
    content: |-
      // Write your Alloy config here:
      logging {
        level = &amp;#34;info&amp;#34;
        format = &amp;#34;logfmt&amp;#34;
      }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command in a terminal to upgrade your Alloy installation:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;helm upgrade --namespace &amp;lt;NAMESPACE&amp;gt; &amp;lt;RELEASE_NAME&amp;gt; grafana/alloy -f &amp;lt;VALUES_PATH&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;NAMESPACE&amp;gt;&lt;/code&gt;&lt;/em&gt;: The namespace you used for your Alloy installation.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;RELEASE_NAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The name you used for your Alloy installation.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;VALUES_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The path to your copy of &lt;code&gt;values.yaml&lt;/code&gt; to use.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;method-2-create-a-separate-configmap-from-a-file&#34;&gt;Method 2: Create a separate ConfigMap from a file&lt;/h3&gt;
&lt;p&gt;Use this method if you prefer to write your Alloy configuration in a separate file.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Write your configuration to a file, for example, &lt;code&gt;config.alloy&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;// Write your Alloy config here:
logging {
  level = &amp;#34;info&amp;#34;
  format = &amp;#34;logfmt&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a ConfigMap called &lt;code&gt;alloy-config&lt;/code&gt; from the above file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;kubectl create configmap --namespace &amp;lt;NAMESPACE&amp;gt; alloy-config &amp;#34;--from-file=config.alloy=./config.alloy&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;NAMESPACE&amp;gt;&lt;/code&gt;&lt;/em&gt;: The namespace you used for your Alloy installation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Modify Helm Chart&amp;rsquo;s configuration in your &lt;code&gt;values.yaml&lt;/code&gt; to use the existing ConfigMap:&lt;/p&gt;

&lt;div class=&#34;code-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;alloy:
  configMap:
    create: false
    name: alloy-config
    key: config.alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command in a terminal to upgrade your Alloy installation:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;helm upgrade --namespace &amp;lt;NAMESPACE&amp;gt; &amp;lt;RELEASE_NAME&amp;gt; grafana/alloy -f &amp;lt;VALUES_PATH&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;NAMESPACE&amp;gt;&lt;/code&gt;&lt;/em&gt;: The namespace you used for your Alloy installation.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;RELEASE_NAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The name you used for your Alloy installation.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;VALUES_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The path to your copy of &lt;code&gt;values.yaml&lt;/code&gt; to use.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="configure-grafana-alloy-on-kubernetes">Configure Grafana Alloy on Kubernetes&lt;/h1>
&lt;p>This page describes how to apply a new configuration to Alloy when running on Kubernetes with the Helm chart.
It assumes that:&lt;/p></description></item><item><title>Use Grafana Alloy as a proxy or aggregation layer</title><link>https://grafana.com/docs/alloy/v1.15/configure/proxy/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/configure/proxy/</guid><content><![CDATA[&lt;h1 id=&#34;use-grafana-alloy-as-a-proxy-or-aggregation-layer&#34;&gt;Use Grafana Alloy as a proxy or aggregation layer&lt;/h1&gt;
&lt;p&gt;In larger deployments, you can run one or more Alloy instances as proxies in front of other Alloy instances.
This pattern reduces direct connections to backends such as Mimir, Loki, and Tempo, while centralizing egress traffic.
You can apply consistent relabeling, filtering, or routing logic at the proxy layer, isolating edge instances from backend changes.
This architecture also supports sharding and load distribution across multiple proxy instances.&lt;/p&gt;
&lt;p&gt;In OpenTelemetry terminology, this deployment model is often referred to as &lt;em&gt;gateway mode&lt;/em&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;The proxy configuration described here refers to using Alloy as a telemetry proxy that aggregates and forwards telemetry between instances.
It doesn&amp;rsquo;t cover configuring Alloy to use a corporate HTTP proxy for outbound traffic, such as &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; in &lt;a href=&#34;../../reference/components/prometheus/prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; or &lt;a href=&#34;../../reference/components/loki/loki.write/&#34;&gt;&lt;code&gt;loki.write&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Before you begin, ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A working Alloy installation on your edge nodes.&lt;/li&gt;
&lt;li&gt;Access to deploy additional Alloy instances as proxies.&lt;/li&gt;
&lt;li&gt;A load balancer or ingress controller for routing traffic to proxy instances.&lt;/li&gt;
&lt;li&gt;Network connectivity between edge instances, proxy instances, and backend services.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;architectural-patterns&#34;&gt;Architectural patterns&lt;/h2&gt;
&lt;p&gt;You can use two primary topologies when deploying Alloy as a proxy layer: push to proxy and pull from edge.&lt;/p&gt;
&lt;h3 id=&#34;push-to-proxy&#34;&gt;Push to proxy&lt;/h3&gt;
&lt;p&gt;In the push-to-proxy pattern, edge Alloy instances push telemetry to a pool of proxy Alloy instances.
This is the most common and recommended pattern because it provides a straightforward mental model, scales cleanly in dynamic environments, and works across networks with NAT or segmented connectivity.
You can centralize authentication and routing at the proxy layer, and the pattern is compatible with both Kubernetes and VM environments.&lt;/p&gt;

  &lt;script type=&#34;text/javascript&#34; src=&#34;/web/mermaid.867770685db36193a268b63e8c85a9291badc92208742df0df7a384e9ff1619d.js&#34; integrity=&#34;sha256-hndwaF2zYZOiaLY&amp;#43;jIWpKRutySIIdC3w33o4Tp/xYZ0=&#34; defer&gt;&lt;/script&gt;
  

&lt;div class=&#34;mermaid-container&#34;&gt;
  &lt;pre class=&#34;mermaid&#34;&gt;
flowchart LR

  EdgeAlloy[Edge Alloy]
  LoadBalancer[Load Balancer]
  ProxyAlloy[Proxy Alloy x N]
  Backend[Backend]

  EdgeAlloy --&gt;|remote_write| LoadBalancer
  LoadBalancer --&gt; ProxyAlloy
  ProxyAlloy --&gt; Backend

  %% Grafana styling
  classDef grafana fill:#ffffff,stroke:#F05A28,stroke-width:2px,rx:8,ry:8,color:#1f2937,font-weight:600;

  class EdgeAlloy,LoadBalancer,ProxyAlloy,Backend grafana
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;For metrics, edge instances push data using &lt;a href=&#34;../../reference/components/prometheus/prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; to proxy instances running &lt;a href=&#34;../../reference/components/prometheus/prometheus.receive_http/&#34;&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt;&lt;/a&gt;.
For logs, edge instances push data using &lt;a href=&#34;../../reference/components/loki/loki.write/&#34;&gt;&lt;code&gt;loki.write&lt;/code&gt;&lt;/a&gt; to proxy instances running &lt;a href=&#34;../../reference/components/loki/loki.source.api/&#34;&gt;&lt;code&gt;loki.source.api&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id=&#34;sticky-load-balancing-for-metrics&#34;&gt;Sticky load balancing for metrics&lt;/h4&gt;
&lt;p&gt;Sticky load balancing ensures that requests with the same identifier, such as a time series or trace ID, are consistently routed to the same backend instance.&lt;/p&gt;
&lt;p&gt;For Prometheus &lt;a href=&#34;../../reference/components/prometheus/prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; traffic, you must ensure consistent routing per time series.
When different proxy instances receive samples for the same series, you encounter out-of-order sample errors, increased ingestion load, and write-ahead log (WAL) churn.&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;Without sticky load balancing, metrics proxying can result in data loss or ingestion errors.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;To avoid these issues, configure your load balancer with sticky sessions, consistent hashing, or L4 hash-based load balancing.&lt;/p&gt;
&lt;h3 id=&#34;pull-from-edge&#34;&gt;Pull from edge&lt;/h3&gt;
&lt;p&gt;In the pull-from-edge pattern, proxy Alloy instances scrape targets directly, using sharding such as &lt;code&gt;hashmod&lt;/code&gt; to distribute targets across instances.&lt;/p&gt;
&lt;p&gt;This pattern works for metrics because Prometheus-style scraping supports deterministic target sharding.
For more information on distributing scrape load, refer to &lt;a href=&#34;../clustering/distribute-prometheus-scrape-load/&#34;&gt;Distribute Prometheus metrics scrape load&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;The pull model doesn&amp;rsquo;t apply to logs.
Logs must use a push model.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;While technically possible for metrics, using proxy instances to scrape other Alloy instances isn&amp;rsquo;t recommended as a primary aggregation strategy.
Push-based aggregation using &lt;a href=&#34;../../reference/components/prometheus/prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; provides clearer scaling characteristics, simpler configuration management, and better compatibility with dynamic environments.&lt;/p&gt;
&lt;h2 id=&#34;configure-metrics-proxying&#34;&gt;Configure metrics proxying&lt;/h2&gt;
&lt;p&gt;You can use the push pattern to proxy metrics between edge and proxy instances.&lt;/p&gt;
&lt;h3 id=&#34;configure-edge-instances-for-metrics&#34;&gt;Configure edge instances for metrics&lt;/h3&gt;
&lt;p&gt;Edge instances use &lt;a href=&#34;../../reference/components/prometheus/prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt; to scrape metrics locally and &lt;a href=&#34;../../reference/components/prometheus/prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; to push them to proxy instances.
The following example configuration scrapes a local Node Exporter and pushes metrics to a proxy:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&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;node&amp;#34; {
  targets = [{
    __address__ = &amp;#34;localhost:9100&amp;#34;
  }]
  forward_to = [prometheus.remote_write.to_proxy.receiver]
}

prometheus.remote_write &amp;#34;to_proxy&amp;#34; {
  endpoint {
    url = &amp;#34;https://&amp;lt;PROXY_LOAD_BALANCER&amp;gt;/api/v1/metrics/write&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;PROXY_LOAD_BALANCER&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of your load balancer in front of the proxy Alloy instances.&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;&lt;code&gt;&amp;lt;PROXY_LOAD_BALANCER&amp;gt;&lt;/code&gt; is the address where edge instances send data.
Your load balancer must forward each request path to the port exposed by your proxy Alloy instances.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Metrics: forward &lt;code&gt;https://&amp;lt;PROXY_LOAD_BALANCER&amp;gt;/api/v1/metrics/write&lt;/code&gt; to proxy instances listening on port &lt;code&gt;12345&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Logs: forward &lt;code&gt;https://&amp;lt;PROXY_LOAD_BALANCER&amp;gt;/loki/api/v1/push&lt;/code&gt; to proxy instances listening on port &lt;code&gt;3100&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;configure-proxy-instances-for-metrics&#34;&gt;Configure proxy instances for metrics&lt;/h3&gt;
&lt;p&gt;Proxy instances use &lt;a href=&#34;../../reference/components/prometheus/prometheus.receive_http/&#34;&gt;&lt;code&gt;prometheus.receive_http&lt;/code&gt;&lt;/a&gt; to receive metrics from edge instances and &lt;a href=&#34;../../reference/components/prometheus/prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; to forward them to the backend.
The following example configuration receives metrics and forwards them to Mimir:&lt;/p&gt;

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

prometheus.remote_write &amp;#34;to_backend&amp;#34; {
  endpoint {
    url = &amp;#34;https://&amp;lt;MIMIR_ENDPOINT&amp;gt;/api/v1/push&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;MIMIR_ENDPOINT&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of your Mimir instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can add relabeling, filtering, or tenant routing at the proxy layer by inserting a &lt;a href=&#34;../../reference/components/prometheus/prometheus.relabel/&#34;&gt;&lt;code&gt;prometheus.relabel&lt;/code&gt;&lt;/a&gt; component between the receiver and &lt;a href=&#34;../../reference/components/prometheus/prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;configure-logs-proxying&#34;&gt;Configure logs proxying&lt;/h2&gt;
&lt;p&gt;Logs must use a push model because you can&amp;rsquo;t pull logs from other Alloy instances.
Use &lt;a href=&#34;../../reference/components/loki/loki.write/&#34;&gt;&lt;code&gt;loki.write&lt;/code&gt;&lt;/a&gt; on edge instances and &lt;a href=&#34;../../reference/components/loki/loki.source.api/&#34;&gt;&lt;code&gt;loki.source.api&lt;/code&gt;&lt;/a&gt; on proxy instances.&lt;/p&gt;
&lt;h3 id=&#34;configure-edge-instances-for-logs&#34;&gt;Configure edge instances for logs&lt;/h3&gt;
&lt;p&gt;Edge instances use &lt;a href=&#34;../../reference/components/loki/loki.source.file/&#34;&gt;&lt;code&gt;loki.source.file&lt;/code&gt;&lt;/a&gt; to collect logs and &lt;a href=&#34;../../reference/components/loki/loki.write/&#34;&gt;&lt;code&gt;loki.write&lt;/code&gt;&lt;/a&gt; to push them to proxy instances.
The following example configuration collects logs from files and pushes them to a proxy:&lt;/p&gt;

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

loki.write &amp;#34;to_proxy&amp;#34; {
  endpoint {
    url = &amp;#34;https://&amp;lt;PROXY_LOAD_BALANCER&amp;gt;/loki/api/v1/push&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;PROXY_LOAD_BALANCER&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of your load balancer in front of the proxy Alloy instances.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;configure-proxy-instances-for-logs&#34;&gt;Configure proxy instances for logs&lt;/h3&gt;
&lt;p&gt;Proxy instances use &lt;a href=&#34;../../reference/components/loki/loki.source.api/&#34;&gt;&lt;code&gt;loki.source.api&lt;/code&gt;&lt;/a&gt; to receive logs from edge instances and &lt;a href=&#34;../../reference/components/loki/loki.write/&#34;&gt;&lt;code&gt;loki.write&lt;/code&gt;&lt;/a&gt; to forward them to the backend.
The following example configuration receives logs and forwards them to Loki:&lt;/p&gt;

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

loki.write &amp;#34;to_backend&amp;#34; {
  endpoint {
    url = &amp;#34;https://&amp;lt;LOKI_ENDPOINT&amp;gt;/loki/api/v1/push&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;LOKI_ENDPOINT&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of your Loki instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;configure-load-balancing&#34;&gt;Configure load balancing&lt;/h2&gt;
&lt;p&gt;For metrics proxying, configure your load balancer to provide consistent routing so that samples for the same time series always reach the same proxy instance.&lt;/p&gt;
&lt;p&gt;The following example shows a simplified NGINX configuration for consistent routing:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;nginx&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-nginx&#34;&gt;upstream alloy_proxies {
    hash $remote_addr consistent;
    server proxy1:12345;
    server proxy2:12345;
    server proxy3:12345;
}

server {
    listen 443 ssl;

    location /api/v1/metrics/write {
        proxy_pass http://alloy_proxies;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In production, prefer hashing based on series-identifying headers or use an L4 load balancer with source hashing for better distribution.&lt;/p&gt;
&lt;h2 id=&#34;signal-support&#34;&gt;Signal support&lt;/h2&gt;
&lt;p&gt;The following table shows what patterns each signal type supports:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Signal&lt;/th&gt;
              &lt;th&gt;Push through proxy&lt;/th&gt;
              &lt;th&gt;Pull with sharding&lt;/th&gt;
              &lt;th&gt;Notes&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Metrics&lt;/td&gt;
              &lt;td&gt;Supported&lt;/td&gt;
              &lt;td&gt;Supported&lt;/td&gt;
              &lt;td&gt;Sticky routing required for push&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Logs&lt;/td&gt;
              &lt;td&gt;Supported&lt;/td&gt;
              &lt;td&gt;Not supported&lt;/td&gt;
              &lt;td&gt;Push only&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Traces&lt;/td&gt;
              &lt;td&gt;Depends&lt;/td&gt;
              &lt;td&gt;Generally no&lt;/td&gt;
              &lt;td&gt;Use OpenTelemetry-compatible receivers&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Profiles&lt;/td&gt;
              &lt;td&gt;Supported&lt;/td&gt;
              &lt;td&gt;No&lt;/td&gt;
              &lt;td&gt;Edge &lt;code&gt;pyroscope.write&lt;/code&gt;, proxy &lt;code&gt;pyroscope.receive_http&lt;/code&gt;, backend &lt;code&gt;pyroscope.write&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For traces, you typically configure edge instances to send data to an OpenTelemetry-compatible receiver, such as &lt;a href=&#34;../../reference/components/otelcol/otelcol.receiver.otlp/&#34;&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt;&lt;/a&gt;, on proxy instances.
The proxy instances then export to the backend using an appropriate exporter.
Basic trace forwarding doesn&amp;rsquo;t require sticky routing, but if proxy instances run trace-derived components such as &lt;a href=&#34;../../reference/components/otelcol/otelcol.connector.spanmetrics/&#34;&gt;&lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt;&lt;/a&gt; or &lt;a href=&#34;../../reference/components/otelcol/otelcol.connector.servicegraph/&#34;&gt;&lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt;&lt;/a&gt;, you need consistent routing so all spans for a trace or service reach the same instance.
You can use &lt;a href=&#34;../../reference/components/otelcol/otelcol.exporter.loadbalancing/&#34;&gt;&lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt;&lt;/a&gt; on the edge instances to route by trace ID or service name.
Alternatively, you can add a unique label per proxy instance and aggregate the resulting metrics in PromQL or Adaptive Metrics.&lt;/p&gt;
&lt;p&gt;For profiles, edge instances use &lt;a href=&#34;../../reference/components/pyroscope/pyroscope.write/&#34;&gt;&lt;code&gt;pyroscope.write&lt;/code&gt;&lt;/a&gt; to push to proxy instances running &lt;a href=&#34;../../reference/components/pyroscope/pyroscope.receive_http/&#34;&gt;&lt;code&gt;pyroscope.receive_http&lt;/code&gt;&lt;/a&gt;.
Refer to that component for supported ingest endpoints and how it forwards to receivers such as &lt;code&gt;pyroscope.write&lt;/code&gt;.
For chained &lt;code&gt;pyroscope.write&lt;/code&gt; traffic, load balancing multiple receivers, and timeout configuration, refer to the troubleshooting sections on that component and on &lt;code&gt;pyroscope.write&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;high-availability-and-replication&#34;&gt;High availability and replication&lt;/h2&gt;
&lt;p&gt;When you run multiple proxy instances, ensure consistent routing for &lt;a href=&#34;../../reference/components/prometheus/prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; traffic to prevent out-of-order errors.
Avoid double-writing unless you intentionally want data replicated across backends.&lt;/p&gt;
&lt;p&gt;For high availability pairs, configure proper external labels such as &lt;code&gt;cluster&lt;/code&gt; and &lt;code&gt;replica&lt;/code&gt; so your backend can deduplicate data correctly.
Refer to your backend documentation for specific high availability deduplication requirements.
For example, Mimir requires specific label configurations to handle replica traffic.&lt;/p&gt;
&lt;h2 id=&#34;operational-considerations&#34;&gt;Operational considerations&lt;/h2&gt;
&lt;h3 id=&#34;capacity-planning&#34;&gt;Capacity planning&lt;/h3&gt;
&lt;p&gt;Proxy instances handle ingestion, WAL writes for metrics, retries, and fan-out to the backend.
Monitor CPU usage, memory usage, queue depth, remote write retries, and out-of-order sample errors to ensure your proxy instances have adequate capacity.&lt;/p&gt;
&lt;p&gt;For metrics proxying, memory usage scales with the number of active time series passing through the proxy, even if the proxy doesn&amp;rsquo;t scrape targets directly.
Each proxy instance maintains series state, WAL segments, and retry queues.
High-cardinality workloads can require significant memory, and you may need to scale proxy replicas to handle large active series counts.&lt;/p&gt;
&lt;p&gt;Resource requirements vary significantly depending on active series count, sample rate, log volume, relabeling complexity, and retry behavior.
There is no fixed ratio of series to memory or CPU that applies universally.
Always validate sizing assumptions under representative load conditions before production deployment.&lt;/p&gt;
&lt;p&gt;Test with realistic production write volume before rollout to establish baseline resource requirements.&lt;/p&gt;
&lt;h3 id=&#34;failure-modes&#34;&gt;Failure modes&lt;/h3&gt;
&lt;p&gt;When a proxy fails, edge instances retry sending data, which causes WAL growth on the edge instances.
Load shifts to the remaining healthy proxies, which may increase their resource usage.&lt;/p&gt;
&lt;p&gt;When load balancing isn&amp;rsquo;t sticky, you encounter out-of-order errors and ingestion amplification as samples for the same series arrive at different proxy instances.&lt;/p&gt;
&lt;p&gt;In environments with high ingestion rates, non-sticky routing can also amplify ingestion load on the backend.
When samples for the same series arrive at multiple proxy instances, retries and duplicate handling increase overall system pressure.
Always validate your load balancer configuration before rolling out proxying in production.&lt;/p&gt;
&lt;h3 id=&#34;fleet-management-compared-to-proxying&#34;&gt;Fleet management compared to proxying&lt;/h3&gt;
&lt;p&gt;Proxying is an architecture pattern for runtime data flow.
Fleet management, which includes centralized configuration distribution, rollout control, and secret management, helps you operate large numbers of Alloy instances but is separate from the proxy behavior.&lt;/p&gt;
&lt;p&gt;You can use fleet tooling to deploy proxy instances, manage their configurations, rotate credentials, and scale horizontally.
However, proxying itself doesn&amp;rsquo;t require a fleet management solution.&lt;/p&gt;
&lt;p&gt;If you use fleet management to deploy or manage proxy instances, configure &lt;a href=&#34;../../reference/components/prometheus/prometheus.remote_write/&#34;&gt;&lt;code&gt;prometheus.remote_write&lt;/code&gt;&lt;/a&gt; endpoints and self-monitoring pipelines consistently across edge and proxy layers.
Fleet tooling controls configuration distribution and rollout, but it doesn&amp;rsquo;t automatically create or enforce a proxy topology.
You must explicitly design the data flow, including which instances push to proxies and how load balancing and routing are configured.&lt;/p&gt;
&lt;p&gt;For information about configuring a proxy for Fleet Management API traffic in restricted network environments, refer to &lt;a href=&#34;/docs/grafana-cloud/send-data/fleet-management/set-up/connectivity-options/self-managed/#custom-proxy-setup&#34;&gt;Custom proxy setup&lt;/a&gt; in the Fleet Management documentation.&lt;/p&gt;
&lt;h2 id=&#34;when-to-use-a-proxy-layer&#34;&gt;When to use a proxy layer&lt;/h2&gt;
&lt;p&gt;A proxy layer is especially useful when you operate large fleets of Alloy instances.
Without aggregation, each instance maintains its own outbound connections to backends such as Grafana Cloud, Mimir, Loki, or Tempo.
In high-scale environments, this can lead to large numbers of TCP connections from a single network boundary, increasing firewall session load, ephemeral port usage, and operational risk.
A proxy layer consolidates outbound connections and reduces connection pressure on shared network infrastructure.&lt;/p&gt;
&lt;p&gt;Use proxy Alloy instances when you need to limit backend exposure, centralize relabeling or filtering, or isolate edge instances from backend authentication changes.
A proxy layer also helps when you want to reduce outbound internet access from edge nodes or operate in segmented or air-gapped environments.&lt;/p&gt;
&lt;p&gt;Avoid adding a proxy layer if you don&amp;rsquo;t need centralized control, already use a gateway such as the Mimir or Loki gateway, or want the simplest architecture possible.&lt;/p&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../clustering/&#34;&gt;Configure clustering&lt;/a&gt; to distribute workload across Alloy instances.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../clustering/distribute-prometheus-scrape-load/&#34;&gt;Distribute Prometheus metrics scrape load&lt;/a&gt; using clustering and auto-distribution.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../set-up/deploy/&#34;&gt;Deploy Alloy&lt;/a&gt; to learn about other deployment topologies.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="use-grafana-alloy-as-a-proxy-or-aggregation-layer">Use Grafana Alloy as a proxy or aggregation layer&lt;/h1>
&lt;p>In larger deployments, you can run one or more Alloy instances as proxies in front of other Alloy instances.
This pattern reduces direct connections to backends such as Mimir, Loki, and Tempo, while centralizing egress traffic.
You can apply consistent relabeling, filtering, or routing logic at the proxy layer, isolating edge instances from backend changes.
This architecture also supports sharding and load distribution across multiple proxy instances.&lt;/p></description></item><item><title>Configure Grafana Alloy on Linux</title><link>https://grafana.com/docs/alloy/v1.15/configure/linux/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/configure/linux/</guid><content><![CDATA[&lt;h1 id=&#34;configure-grafana-alloy-on-linux&#34;&gt;Configure Grafana Alloy on Linux&lt;/h1&gt;
&lt;p&gt;To configure Alloy on Linux, perform the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Edit the default configuration file at &lt;code&gt;/etc/alloy/config.alloy&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command in a terminal to reload the configuration file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;sudo systemctl reload alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To change the configuration file used by the service, perform the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Edit the environment file for the service:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Debian or Ubuntu: edit &lt;code&gt;/etc/default/alloy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;RHEL/Fedora or SUSE/openSUSE: edit &lt;code&gt;/etc/sysconfig/alloy&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the contents of the &lt;code&gt;CONFIG_FILE&lt;/code&gt; environment variable to point at the new configuration file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;sudo systemctl restart alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;pass-additional-command-line-flags&#34;&gt;Pass additional command-line flags&lt;/h2&gt;
&lt;p&gt;By default, the Alloy service launches with the &lt;a href=&#34;../../reference/cli/run/&#34;&gt;run&lt;/a&gt; command, passing the following flags:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--storage.path=/var/lib/alloy&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To pass additional command-line flags to the Alloy binary, perform the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Edit the environment file for the service:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Debian-based systems: edit &lt;code&gt;/etc/default/alloy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;RedHat or SUSE-based systems: edit &lt;code&gt;/etc/sysconfig/alloy&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the contents of the &lt;code&gt;CUSTOM_ARGS&lt;/code&gt; environment variable to specify
command-line flags to pass.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;sudo systemctl restart alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To see the list of valid command-line flags that can be passed to the service, refer to the documentation for the &lt;a href=&#34;../../reference/cli/run/&#34;&gt;run&lt;/a&gt; command.&lt;/p&gt;
&lt;h2 id=&#34;expose-the-ui-to-other-machines&#34;&gt;Expose the UI to other machines&lt;/h2&gt;
&lt;p&gt;By default, Alloy listens on the local network for its HTTP server.
This prevents other machines on the network from being able to access the &lt;a href=&#34;../../troubleshoot/debug/#alloy-ui&#34;&gt;UI for debugging&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To expose the UI to other machines, complete the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Follow &lt;a href=&#34;#pass-additional-command-line-flags&#34;&gt;Pass additional command-line flags&lt;/a&gt;
to edit command line flags passed to Alloy&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the following command line argument to &lt;code&gt;CUSTOM_ARGS&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;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;--server.http.listen-addr=&amp;lt;LISTEN_ADDR&amp;gt;:12345&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;&amp;lt;LISTEN_ADDR&amp;gt;&lt;/code&gt;&lt;/em&gt;: An IP address which other machines on the network have access to.
For example, the IP address of the machine Alloy is running on.&lt;/p&gt;
&lt;p&gt;To listen on all interfaces, replace &lt;em&gt;&lt;code&gt;&amp;lt;LISTEN_ADDR&amp;gt;&lt;/code&gt;&lt;/em&gt; with &lt;code&gt;0.0.0.0&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="configure-grafana-alloy-on-linux">Configure Grafana Alloy on Linux&lt;/h1>
&lt;p>To configure Alloy on Linux, perform the following steps:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Edit the default configuration file at &lt;code>/etc/alloy/config.alloy&lt;/code>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Run the following command in a terminal to reload the configuration file:&lt;/p></description></item><item><title>Configure Grafana Alloy on macOS</title><link>https://grafana.com/docs/alloy/v1.15/configure/macos/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/configure/macos/</guid><content><![CDATA[&lt;h1 id=&#34;configure-grafana-alloy-on-macos&#34;&gt;Configure Grafana Alloy on macOS&lt;/h1&gt;
&lt;p&gt;To configure Alloy on macOS, perform the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Edit the default configuration file at &lt;code&gt;$(brew --prefix)/etc/alloy/config.alloy&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command in a terminal to 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;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;brew services restart  grafana/grafana/alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;configure-the-alloy-service&#34;&gt;Configure the Alloy service&lt;/h2&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Due to limitations in Homebrew, customizing the service used by Alloy on macOS requires changing the Homebrew formula and reinstalling Alloy.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;To customize the Alloy service on macOS, perform the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Run the following command in a terminal:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;brew edit grafana/grafana/alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This opens the Alloy Homebrew Formula in an editor.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Modify the &lt;code&gt;service&lt;/code&gt; section as desired to change things such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Location of log files.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Modify the &lt;code&gt;COMMAND&lt;/code&gt; in the &lt;code&gt;install&lt;/code&gt; section as desired to change things such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The configuration file used by Alloy.&lt;/li&gt;
&lt;li&gt;Flags passed to the Alloy binary.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Save the modified file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reinstall the Alloy Formula by running the following command in a terminal:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;brew reinstall --formula  grafana/grafana/alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart the Alloy service by running the command in a terminal:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;brew services restart  grafana/grafana/alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;configure-environment-variables&#34;&gt;Configure environment variables&lt;/h2&gt;
&lt;p&gt;You can use 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/environment-variables/&#34;&gt;environment variables&lt;/a&gt; to control the run-time behavior of Alloy.
These environment variables are set in &lt;code&gt;$(brew --prefix)/etc/alloy/config.env&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To add the environment variables:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Edit the file at &lt;code&gt;$(brew --prefix)/etc/alloy/config.env&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add the specific environment variables you need.&lt;/li&gt;
&lt;li&gt;Restart Alloy.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For example, you can add the following environment variables to &lt;code&gt;$(brew --prefix)/etc/alloy/config.env&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;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;export GCLOUD_RW_API_KEY=&amp;#34;glc_xxx&amp;#34;
export GCLOUD_FM_COLLECTOR_ID=&amp;#34;my-collector&amp;#34;
export GCLOUD_FM_LOG_PATH=&amp;#34;/opt/homebrew/var/log/alloy.err.log&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;configure-command-line-flags&#34;&gt;Configure command line flags&lt;/h2&gt;
&lt;p&gt;You can use the file at &lt;code&gt;$(brew --prefix)/etc/alloy/extra-args.txt&lt;/code&gt; to pass multiple 
    &lt;a href=&#34;/docs/alloy/v1.15/reference/cli/run/&#34;&gt;command line flags&lt;/a&gt; to Alloy.&lt;/p&gt;
&lt;p&gt;To add the command line flags:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Edit the file at &lt;code&gt;$(brew --prefix)/etc/alloy/extra-args.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add the specific flags you need.&lt;/li&gt;
&lt;li&gt;Restart Alloy.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For example, you can add the following command line flag in &lt;code&gt;$(brew --prefix)/etc/alloy/extra-args.txt&lt;/code&gt; to enable the experimental components in Alloy.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;--stability.level=experimental&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;expose-the-ui-to-other-machines&#34;&gt;Expose the UI to other machines&lt;/h2&gt;
&lt;p&gt;By default, Alloy listens on the local network for its HTTP server.
This prevents other machines on the network from being able to access the &lt;a href=&#34;../../troubleshoot/debug/#alloy-ui&#34;&gt;UI for debugging&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To expose the UI to other machines, complete the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Follow &lt;a href=&#34;#configure-the-alloy-service&#34;&gt;Configure the Alloy service&lt;/a&gt; steps to edit command line flags passed to Alloy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Modify the &lt;code&gt;COMMAND&lt;/code&gt; line in the &lt;code&gt;install&lt;/code&gt; section containing &lt;code&gt;--server.http.listen-addr=127.0.0.1:12345&lt;/code&gt;, and replace &lt;code&gt;127.0.0.1&lt;/code&gt; with the IP address that other machines on the network have access to.
For example, the IP address of the machine Alloy is running on.&lt;/p&gt;
&lt;p&gt;To listen on all interfaces, replace &lt;code&gt;127.0.0.1&lt;/code&gt; with &lt;code&gt;0.0.0.0&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="configure-grafana-alloy-on-macos">Configure Grafana Alloy on macOS&lt;/h1>
&lt;p>To configure Alloy on macOS, perform the following steps:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Edit the default configuration file at &lt;code>$(brew --prefix)/etc/alloy/config.alloy&lt;/code>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Run the following command in a terminal to restart the Alloy service:&lt;/p></description></item><item><title>Configure Grafana Alloy on Windows</title><link>https://grafana.com/docs/alloy/v1.15/configure/windows/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/configure/windows/</guid><content><![CDATA[&lt;h1 id=&#34;configure-grafana-alloy-on-windows&#34;&gt;Configure Grafana Alloy on Windows&lt;/h1&gt;
&lt;p&gt;To configure Alloy on Windows, perform the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Edit the default configuration file at &lt;code&gt;%PROGRAMFILES%\GrafanaLabs\Alloy\config.alloy&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart the Alloy service:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the Windows Services manager:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Right click on the Start Menu and select &lt;strong&gt;Run&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type &lt;code&gt;services.msc&lt;/code&gt; and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Right click on the service called &lt;strong&gt;Alloy&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on &lt;strong&gt;All Tasks &amp;gt; Restart&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;change-command-line-arguments&#34;&gt;Change command-line arguments&lt;/h2&gt;
&lt;p&gt;By default, the Alloy service will launch and pass the following arguments to the Alloy binary:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;run&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%PROGRAMFILES%\GrafanaLabs\Alloy\config.alloy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--storage.path=%PROGRAMDATA%\GrafanaLabs\Alloy\data&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To change the set of command-line arguments passed to the Alloy binary, perform the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the Registry Editor:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Right click on the Start Menu and select &lt;strong&gt;Run&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type &lt;code&gt;regedit&lt;/code&gt; and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to the key at the path &lt;code&gt;HKEY_LOCAL_MACHINE\SOFTWARE\GrafanaLabs\Alloy&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Double-click on the value called &lt;strong&gt;Arguments&lt;/strong&gt;*.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the dialog box, enter the arguments to pass to the Alloy binary.
Make sure that each argument is on its own line.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart the Alloy service:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the Windows Services manager:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Right click on the Start Menu and select &lt;strong&gt;Run&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type &lt;code&gt;services.msc&lt;/code&gt; and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Right click on the service called &lt;strong&gt;Alloy&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on &lt;strong&gt;All Tasks &amp;gt; Restart&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;change-environment-variable-values&#34;&gt;Change environment variable values&lt;/h2&gt;
&lt;p&gt;The Go runtime provides several ways to modify the execution of a binary using &lt;a href=&#34;../../reference/cli/environment-variables/&#34;&gt;environment variables&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To change the environment variables used by Alloy, perform the following steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the Registry Editor:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Right click on the Start Menu and select &lt;strong&gt;Run&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type &lt;code&gt;regedit&lt;/code&gt; and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to the key at the path &lt;code&gt;HKEY_LOCAL_MACHINE\SOFTWARE\GrafanaLabs\Alloy&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Double-click on the multi-string value called &lt;strong&gt;Environment&lt;/strong&gt;*.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the dialog box, enter the environment variable values to pass to the Alloy binary.
Make sure that each variable is on its own line.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart the Alloy service:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the Windows Services manager (&lt;code&gt;services.msc&lt;/code&gt;):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Right click on the Start Menu and select &lt;strong&gt;Run&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type &lt;code&gt;services.msc&lt;/code&gt; and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Right click on the service called &lt;strong&gt;Alloy&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on &lt;strong&gt;All Tasks &amp;gt; Restart&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;expose-the-ui-to-other-machines&#34;&gt;Expose the UI to other machines&lt;/h2&gt;
&lt;p&gt;By default, Alloy listens on the local network for its HTTP
server. This prevents other machines on the network from being able to access
the &lt;a href=&#34;../../troubleshoot/debug/#alloy-ui&#34;&gt;UI for debugging&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To expose the UI to other machines, complete the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Follow &lt;a href=&#34;#change-command-line-arguments&#34;&gt;Change command-line arguments&lt;/a&gt; to edit command line flags passed to Alloy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the following command line 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;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;--server.http.listen-addr=LISTEN_ADDR:12345&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;&amp;lt;LISTEN_ADDR&amp;gt;&lt;/code&gt;&lt;/em&gt;: An IP address which other machines on the network have access to.
For example, the IP address of the machine Alloy is running on.&lt;/p&gt;
&lt;p&gt;To listen on all interfaces, replace &lt;em&gt;&lt;code&gt;&amp;lt;LISTEN_ADDR&amp;gt;&lt;/code&gt;&lt;/em&gt; with &lt;code&gt;0.0.0.0&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;configure-windows-permissions&#34;&gt;Configure Windows permissions&lt;/h2&gt;
&lt;p&gt;To effectively monitor Windows telemetry with Alloy, the user account you use to run Alloy requires specific access permissions.
These permissions ensure Alloy can collect the necessary data, manage its local storage, and communicate with other services.
The exact permissions depend on your system&amp;rsquo;s security configuration and the specific telemetry you need to collect.&lt;/p&gt;
&lt;h3 id=&#34;windows-security-groups&#34;&gt;Windows security groups&lt;/h3&gt;
&lt;p&gt;To collect common Windows telemetry, for example event logs and performance counters, the user account you use to run Alloy should be a member of the following &lt;a href=&#34;https://learn.microsoft.com/windows-server/identity/ad-ds/manage/understand-security-groups&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Windows security groups&lt;/a&gt;.
These groups provide the minimum required read access.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href=&#34;https://learn.microsoft.com/windows-server/identity/ad-ds/manage/understand-security-groups#event-log-readers&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Event Log Readers&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;This group allows members to read data from local event logs, including Application, System, Security, and other custom logs.
This is essential for any Alloy configuration that collects Windows Event Log data.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href=&#34;https://learn.microsoft.com/windows-server/identity/ad-ds/manage/understand-security-groups#performance-monitor-users&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Performance Monitor Users&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;This group allows non-administrator users to access performance counter data.
This group is important for Alloy components that collect Windows performance metrics, for example CPU, memory, disk I/O, and network usage.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href=&#34;http://learn.microsoft.com/windows-server/identity/ad-ds/manage/understand-security-groups#performance-log-users&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Performance Log Users&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;This group is used to schedule logging of performance counter data and manage performance alerts.
Performance Log Users is necessary for advanced or historical data collection scenarios, particularly those that involve the Windows Data Collector Sets.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;file-system-and-network-permissions&#34;&gt;File system and network permissions&lt;/h3&gt;
&lt;p&gt;Beyond the standard Windows groups, Alloy requires some specific permissions for its operational functions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;Storage directory permissions&lt;/dt&gt;
&lt;dd&gt;Alloy needs &lt;a href=&#34;https://learn.microsoft.com/windows/security/identity-protection/access-control/access-control&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;read, write, and modify permissions&lt;/a&gt; to manage files and directories within its data storage location.
The default location for the data storage is &lt;code&gt;%PROGRAMDATA%\GrafanaLabs\Alloy\data&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;Application log file read permissions&lt;/dt&gt;
&lt;dd&gt;If you configure Alloy to read application log files directly from disk, the user account you use to run Alloy must have read access to those log files and their containing directories.
You may need to modify the &lt;a href=&#34;https://learn.microsoft.com/windows/win32/secauthz/access-control-lists&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Access Control Lists&lt;/a&gt; for these resources or add the Alloy service account to a custom group that has these permissions.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;Network access for telemetry destinations&lt;/dt&gt;
&lt;dd&gt;Alloy needs network connectivity and, if applicable, proxy configuration, to communicate with its configured telemetry endpoints.
This includes source endpoints for scraping metrics from Prometheus exporters and pulling logs from remote APIs and destination endpoints for writing metrics to Prometheus or Grafana Cloud, and sending logs to Loki.
Make sure your firewall rules allow outbound connections from the Alloy host to these destinations on the necessary ports.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;Registry access&lt;/dt&gt;
&lt;dd&gt;The user account you use to run Alloy may need access to the &lt;a href=&#34;https://learn.microsoft.com/windows/win32/sysinfo/registry-key-security-and-access-rights&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Windows Registry&lt;/a&gt; to configure things like &lt;a href=&#34;/docs/alloy/latest/configure/windows/#change-environment-variable-values&#34;&gt;environment variables&lt;/a&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;UI port listening permission&lt;/dt&gt;
&lt;dd&gt;If you want to enable the Alloy UI, the user account you use to run Alloy must have &lt;a href=&#34;https://learn.microsoft.com/windows/security/operating-system-security/network-security/windows-firewall/rules&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;permission to listen&lt;/a&gt; on the configured UI port.
The default port is &lt;code&gt;12345&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;Run as a service permission&lt;/dt&gt;
&lt;dd&gt;By default, Alloy is installed and run as a Windows Service.
The user account you use to run Alloy must have the &lt;a href=&#34;https://learn.microsoft.com/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/log-on-as-a-service&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;Log on as a service&lt;/code&gt;&lt;/a&gt; user right.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;Temporary directory management&lt;/dt&gt;
&lt;dd&gt;Depending on how you configure components and data processing, Alloy might require permissions to create, read, and write temporary files in the system&amp;rsquo;s designated temporary directories.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;dl&gt;
&lt;dt&gt;Process and service enumeration&lt;/dt&gt;
&lt;dd&gt;If you are using the process or service collectors within the integrated Windows Exporter, the user account you use to run Alloy must have permissions to enumerate all running processes and services on the system.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="configure-grafana-alloy-on-windows">Configure Grafana Alloy on Windows&lt;/h1>
&lt;p>To configure Alloy on Windows, perform the following steps:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Edit the default configuration file at &lt;code>%PROGRAMFILES%\GrafanaLabs\Alloy\config.alloy&lt;/code>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Restart the Alloy service:&lt;/p></description></item><item><title>Run Alloy as a non-root user in Kubernetes</title><link>https://grafana.com/docs/alloy/v1.15/configure/nonroot/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/configure/nonroot/</guid><content><![CDATA[&lt;h1 id=&#34;run-alloy-as-a-non-root-user-in-kubernetes&#34;&gt;Run Alloy as a non-root user in Kubernetes&lt;/h1&gt;
&lt;p&gt;The &lt;a href=&#34;https://hub.docker.com/r/grafana/alloy&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Alloy Docker image&lt;/a&gt; contains two users:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;root&lt;/code&gt; user.&lt;/li&gt;
&lt;li&gt;A non-root user named &lt;code&gt;alloy&lt;/code&gt; with UID &lt;code&gt;473&lt;/code&gt; and gid &lt;code&gt;473&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By default, the &lt;code&gt;alloy&lt;/code&gt; binary runs as &lt;code&gt;root&lt;/code&gt;. This is because some Alloy components like &lt;a href=&#34;../../reference/components/beyla/beyla.ebpf/&#34;&gt;beyla.ebpf&lt;/a&gt; require root permissions.&lt;/p&gt;
&lt;p&gt;You can configure a non-root user when you deploy Alloy in Kubernetes.&lt;/p&gt;
&lt;h2 id=&#34;configure-alloy-to-run-as-a-non-root-user-in-kubernetes&#34;&gt;Configure Alloy to run as a non-root user in Kubernetes&lt;/h2&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Running Alloy as a non-root user won&amp;rsquo;t work if you are using components like &lt;a href=&#34;../../reference/components/beyla/beyla.ebpf/&#34;&gt;beyla.ebpf&lt;/a&gt; that require root rights.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;To run Alloy as a non-root user, configure a &lt;a href=&#34;https://kubernetes.io/docs/tasks/configure-pod-container/security-context/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;security context&lt;/a&gt; for the Alloy container. If you are using the &lt;a href=&#34;../../configure/kubernetes/#configure-the-helm-chart&#34;&gt;Grafana Helm chart&lt;/a&gt; you can add the following snippet to &lt;code&gt;values.yaml&lt;/code&gt;:&lt;/p&gt;

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

configReloader:
  securityContext:
    # this is the UID of the &amp;#34;nobody&amp;#34; user that the configReloader image runs as
    runAsUser: 65534
    runAsGroup: 65534&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This configuration makes the Alloy binary run with UID 473 and GID 473 rather than as root. It also runs the config reloader sidecar as UID 65534 and GID 65534.&lt;/p&gt;
&lt;h2 id=&#34;is-the-root-user-a-security-risk&#34;&gt;Is the root user a security risk?&lt;/h2&gt;
&lt;p&gt;Not really. The Linux kernel prevents Docker containers from accessing host resources. For example, Docker containers see a virtual file system rather than the host filesystem, a virtual network rather than the host network, a virtual process namespace rather than the host&amp;rsquo;s processes. Even if the user inside the Docker container is &lt;code&gt;root&lt;/code&gt; it can&amp;rsquo;t break out of this virtual environment.&lt;/p&gt;
&lt;p&gt;However, if there was a bug in the Linux kernel that allowed Docker containers to break out of the virtual environment, it would likely be easier to exploit this bug with a root user than with a non-root user. It&amp;rsquo;s worth noting that the attacker would not only need to find such a Linux kernel bug, but would also need to find a way to make Alloy exploit that bug.&lt;/p&gt;
]]></content><description>&lt;h1 id="run-alloy-as-a-non-root-user-in-kubernetes">Run Alloy as a non-root user in Kubernetes&lt;/h1>
&lt;p>The &lt;a href="https://hub.docker.com/r/grafana/alloy" target="_blank" rel="noopener noreferrer">Alloy Docker image&lt;/a> contains two users:&lt;/p>
&lt;ul>
&lt;li>A &lt;code>root&lt;/code> user.&lt;/li>
&lt;li>A non-root user named &lt;code>alloy&lt;/code> with UID &lt;code>473&lt;/code> and gid &lt;code>473&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>By default, the &lt;code>alloy&lt;/code> binary runs as &lt;code>root&lt;/code>. This is because some Alloy components like &lt;a href="../../reference/components/beyla/beyla.ebpf/">beyla.ebpf&lt;/a> require root permissions.&lt;/p></description></item></channel></rss>