<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Migrate to Grafana Alloy on Grafana Labs</title><link>https://grafana.com/docs/alloy/v1.15/set-up/migrate/</link><description>Recent content in Migrate to Grafana Alloy on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/alloy/v1.15/set-up/migrate/index.xml" rel="self" type="application/rss+xml"/><item><title>Migrate Grafana Agent Static to Grafana Alloy</title><link>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-static/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-static/</guid><content><![CDATA[&lt;h1 id=&#34;migrate-from-grafana-agent-static-to-grafana-alloy&#34;&gt;Migrate from Grafana Agent Static to Grafana Alloy&lt;/h1&gt;
&lt;p&gt;The built-in Alloy convert command can migrate your &lt;a href=&#34;/docs/agent/latest/static/&#34;&gt;Grafana Agent Static&lt;/a&gt; configuration to an Alloy configuration.&lt;/p&gt;
&lt;p&gt;This topic describes how to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Convert a Grafana Agent Static configuration to an Alloy configuration.&lt;/li&gt;
&lt;li&gt;Run a Grafana Agent Static configuration natively using Alloy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;components-used-in-this-topic&#34;&gt;Components used in this topic&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/prometheus/prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&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;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/local/local.file_match/&#34;&gt;&lt;code&gt;local.file_match&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/loki/loki.process/&#34;&gt;&lt;code&gt;loki.process&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/loki/loki.source.file/&#34;&gt;&lt;code&gt;loki.source.file&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/loki/loki.write/&#34;&gt;&lt;code&gt;loki.write&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/otelcol/otelcol.receiver.otlp/&#34;&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/otelcol/otelcol.processor.batch/&#34;&gt;&lt;code&gt;otelcol.processor.batch&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/otelcol/otelcol.exporter.otlp/&#34;&gt;&lt;code&gt;otelcol.exporter.otlp&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;You must have a Grafana Agent Static configuration.&lt;/li&gt;
&lt;li&gt;You must be familiar with the &lt;a href=&#34;../../../get-started/components/&#34;&gt;Components&lt;/a&gt; concept in Alloy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;convert-a-grafana-agent-static-configuration&#34;&gt;Convert a Grafana Agent Static configuration&lt;/h2&gt;
&lt;p&gt;To fully migrate Grafana Agent Static to Alloy, you must convert your Grafana Agent Static configuration into an Alloy configuration.
This conversion allows you to take full advantage of the many additional features available in Alloy.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In this task, you use the &lt;a href=&#34;../../../reference/cli/convert/&#34;&gt;convert&lt;/a&gt; CLI command to output an Alloy configuration from a Grafana Agent Static configuration.&lt;/p&gt;&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open a terminal window and run the following command.&lt;/p&gt;

&lt;div class=&#34;code-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;alloy convert --source-format=static --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the configuration file for Grafana Agent Static.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;/docs/agent/latest/static/set-up/start-agent/&#34;&gt;Stop&lt;/a&gt; Grafana Agent static.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../set-up/run/&#34;&gt;Run&lt;/a&gt; Alloy using the new Alloy configuration from &lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;debugging&#34;&gt;Debugging&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If the convert command can&amp;rsquo;t convert a Grafana Agent Static configuration, diagnostic information is sent to &lt;code&gt;stderr&lt;/code&gt;.
You can use the &lt;code&gt;--bypass-errors&lt;/code&gt; flag to bypass any non-critical issues and output the Alloy configuration using a best-effort conversion.&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;If you bypass the errors, the behavior of the converted configuration may not match the original Grafana Agent Static configuration.
Make sure you fully test the converted configuration before using it in a production environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;alloy convert --source-format=static --bypass-errors --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the configuration file for Grafana Agent Static.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can use the &lt;code&gt;--report&lt;/code&gt; flag to output a diagnostic report.&lt;/p&gt;

&lt;div class=&#34;code-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;alloy convert --source-format=static --report=&amp;lt;OUTPUT_REPORT_PATH&amp;gt; --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the configuration file for Grafana Agent Static.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_REPORT_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The output path for the report.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using the &lt;a href=&#34;#example&#34;&gt;example&lt;/a&gt; Grafana Agent Static configuration below, the diagnostic report provides the following information.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;plaintext&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-plaintext&#34;&gt;(Warning) Please review your agent command line flags and ensure they are set in your Alloy configuration file where necessary.&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;run-a-grafana-agent-static-mode-configuration&#34;&gt;Run a Grafana Agent Static mode configuration&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re not ready to completely switch to an Alloy configuration, you can run Alloy using your Grafana Agent Static configuration.
The &lt;code&gt;--config.format=static&lt;/code&gt; flag tells Alloy to convert your Grafana Agent Static configuration to Alloy and load it directly without saving the configuration.
This allows you to try Alloy without modifying your Grafana Agent Static configuration infrastructure.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In this task, you use the &lt;a href=&#34;../../../reference/cli/run/&#34;&gt;run&lt;/a&gt; CLI command to run Alloy using a Grafana Agent Static configuration.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&#34;../../../reference/cli/run/&#34;&gt;Run&lt;/a&gt; Alloy and include the command line flag &lt;code&gt;--config.format=static&lt;/code&gt;.
Your configuration file must be a valid Grafana Agent Static configuration file.&lt;/p&gt;
&lt;h3 id=&#34;debug&#34;&gt;Debug&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Follow the convert CLI command &lt;a href=&#34;#debugging&#34;&gt;debugging&lt;/a&gt; instructions to generate a diagnostic report.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Refer to the Alloy &lt;a href=&#34;../../../troubleshoot/debug/&#34;&gt;debugging UI&lt;/a&gt; for more information about running Alloy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your Grafana Agent Static configuration can&amp;rsquo;t be converted and loaded directly into Alloy, diagnostic information is sent to &lt;code&gt;stderr&lt;/code&gt;.
You can use the &lt;code&gt;--config.bypass-conversion-errors&lt;/code&gt; flag with &lt;code&gt;--config.format=static&lt;/code&gt; to bypass any non-critical issues and start Alloy.&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;If you bypass the errors, the behavior of the converted configuration may not match the original Grafana Agent Static configuration.
Don&amp;rsquo;t use this flag in a production environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example demonstrates converting a Grafana Agent Static configuration file to an Alloy configuration file.&lt;/p&gt;
&lt;p&gt;The following Grafana Agent Static configuration file provides the input for the conversion.&lt;/p&gt;

&lt;div class=&#34;code-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;server:
  log_level: info

metrics:
  global:
    scrape_interval: 15s
    remote_write:
      - url: https://prometheus-us-central1.grafana.net/api/prom/push
        basic_auth:
          username: USERNAME
          password: PASSWORD
  configs:
    - name: test
      host_filter: false
      scrape_configs:
        - job_name: local-agent
          static_configs:
            - targets: [&amp;#39;127.0.0.1:12345&amp;#39;]
              labels:
                cluster: &amp;#39;localhost&amp;#39;

logs:
  global:
    file_watch_config:
      min_poll_frequency: 1s
      max_poll_frequency: 5s
  positions_directory: /var/lib/agent/data-agent
  configs:
    - name: varlogs
      scrape_configs:
        - job_name: varlogs
          static_configs:
            - targets:
              - localhost
              labels:
                job: varlogs
                host: mylocalhost
                __path__: /var/log/*.log
          pipeline_stages:
            - match:
                selector: &amp;#39;{filename=&amp;#34;/var/log/*.log&amp;#34;}&amp;#39;
                stages:
                - drop:
                    expression: &amp;#39;^[^0-9]{4}&amp;#39;
                - regex:
                    expression: &amp;#39;^(?P&amp;lt;timestamp&amp;gt;\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}) \[(?P&amp;lt;level&amp;gt;[[:alpha:]]&amp;#43;)\] (?:\d&amp;#43;)\#(?:\d&amp;#43;): \*(?:\d&amp;#43;) (?P&amp;lt;message&amp;gt;.&amp;#43;)$&amp;#39;
                - pack:
                    labels:
                      - level
      clients:
        - url: https://USER_ID:API_KEY@logs-prod3.grafana.net/loki/api/v1/push

traces:
  configs:
    - name: tempo
      receivers:
        otlp:
          protocols:
            grpc:
            http:
      batch:
        send_batch_size: 10000
        timeout: 20s
      remote_write:
        - endpoint: tempo-us-central1.grafana.net:443
          basic_auth:
            username: USERNAME
            password: PASSWORD&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The convert command takes the YAML file as input and outputs a &lt;a href=&#34;../../../get-started/configuration-syntax/&#34;&gt;Alloy configuration&lt;/a&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;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;alloy convert --source-format=static --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the configuration file for Grafana Agent Static.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Alloy configuration file 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;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&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;metrics_test_local_agent&amp;#34; {
    targets = [{
        __address__ = &amp;#34;127.0.0.1:12345&amp;#34;,
        cluster     = &amp;#34;localhost&amp;#34;,
    }]
    forward_to      = [prometheus.remote_write.metrics_test.receiver]
    job_name        = &amp;#34;local-agent&amp;#34;
    scrape_interval = &amp;#34;15s&amp;#34;
}

prometheus.remote_write &amp;#34;metrics_test&amp;#34; {
    endpoint {
        name = &amp;#34;test-4dec64&amp;#34;
        url  = &amp;#34;https://prometheus-us-central1.grafana.net/api/prom/push&amp;#34;

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

        queue_config { }

        metadata_config { }
    }
}

local.file_match &amp;#34;logs_varlogs_varlogs&amp;#34; {
    path_targets = [{
        __address__ = &amp;#34;localhost&amp;#34;,
        __path__    = &amp;#34;/var/log/*.log&amp;#34;,
        host        = &amp;#34;mylocalhost&amp;#34;,
        job         = &amp;#34;varlogs&amp;#34;,
    }]
}

loki.process &amp;#34;logs_varlogs_varlogs&amp;#34; {
    forward_to = [loki.write.logs_varlogs.receiver]

    stage.match {
        selector = &amp;#34;{filename=\&amp;#34;/var/log/*.log\&amp;#34;}&amp;#34;

        stage.drop {
            expression = &amp;#34;^[^0-9]{4}&amp;#34;
        }

        stage.regex {
            expression = &amp;#34;^(?P&amp;lt;timestamp&amp;gt;\\d{4}/\\d{2}/\\d{2} \\d{2}:\\d{2}:\\d{2}) \\[(?P&amp;lt;level&amp;gt;[[:alpha:]]&amp;#43;)\\] (?:\\d&amp;#43;)\\#(?:\\d&amp;#43;): \\*(?:\\d&amp;#43;) (?P&amp;lt;message&amp;gt;.&amp;#43;)$&amp;#34;
        }

        stage.pack {
            labels           = [&amp;#34;level&amp;#34;]
            ingest_timestamp = false
        }
    }
}

loki.source.file &amp;#34;logs_varlogs_varlogs&amp;#34; {
    targets    = local.file_match.logs_varlogs_varlogs.targets
    forward_to = [loki.process.logs_varlogs_varlogs.receiver]

    file_watch {
        min_poll_frequency = &amp;#34;1s&amp;#34;
        max_poll_frequency = &amp;#34;5s&amp;#34;
    }
    legacy_positions_file = &amp;#34;/var/lib/agent/data-agent/varlogs.yml&amp;#34;
}

loki.write &amp;#34;logs_varlogs&amp;#34; {
    endpoint {
        url = &amp;#34;https://USER_ID:API_KEY@logs-prod3.grafana.net/loki/api/v1/push&amp;#34;
    }
    external_labels = {}
}

otelcol.receiver.otlp &amp;#34;default&amp;#34; {
    grpc {
        include_metadata = true
    }

    http {
        include_metadata = true
    }

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

otelcol.processor.batch &amp;#34;default&amp;#34; {
    timeout         = &amp;#34;20s&amp;#34;
    send_batch_size = 10000

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

otelcol.exporter.otlp &amp;#34;default_0&amp;#34; {
    retry_on_failure {
        max_elapsed_time = &amp;#34;1m0s&amp;#34;
    }

    client {
        endpoint = &amp;#34;tempo-us-central1.grafana.net:443&amp;#34;
        headers  = {
            authorization = &amp;#34;Basic VVNFUk5BTUU6UEFTU1dPUkQ=&amp;#34;,
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;integrations-next&#34;&gt;Integrations Next&lt;/h2&gt;
&lt;p&gt;You can convert &lt;a href=&#34;/docs/agent/latest/static/configuration/integrations/integrations-next/&#34;&gt;integrations next&lt;/a&gt; configurations by adding the &lt;code&gt;extra-args&lt;/code&gt; flag for &lt;a href=&#34;../../../reference/cli/convert/&#34;&gt;convert&lt;/a&gt; or &lt;code&gt;config.extra-args&lt;/code&gt; for &lt;a href=&#34;../../../reference/cli/run/&#34;&gt;run&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;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;alloy convert --source-format=static --extra-args=&amp;#34;-enable-features=integrations-next&amp;#34; --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the configuration file for Grafana Agent Static.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;environment-variables&#34;&gt;Environment variables&lt;/h2&gt;
&lt;p&gt;You can use the &lt;code&gt;-config.expand-env&lt;/code&gt; command line flag to interpret environment variables in your Grafana Agent Static configuration.
You can pass these flags to &lt;a href=&#34;../../../reference/cli/convert/&#34;&gt;convert&lt;/a&gt; with &lt;code&gt;--extra-args=&amp;quot;-config.expand-env&amp;quot;&lt;/code&gt; or to &lt;a href=&#34;../../../reference/cli/run/&#34;&gt;run&lt;/a&gt; with &lt;code&gt;--config.extra-args=&amp;quot;-config.expand-env&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It&amp;rsquo;s possible to combine &lt;code&gt;integrations-next&lt;/code&gt; with &lt;code&gt;expand-env&lt;/code&gt;.
For &lt;a href=&#34;../../../reference/cli/convert/&#34;&gt;convert&lt;/a&gt;, you can use &lt;code&gt;--extra-args=&amp;quot;-enable-features=integrations-next -config.expand-env&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;limitations&#34;&gt;Limitations&lt;/h2&gt;
&lt;p&gt;Configuration conversion is done on a best-effort basis. Alloy issues warnings or errors if the conversion can&amp;rsquo;t be done.&lt;/p&gt;
&lt;p&gt;After the configuration is converted, review the Alloy configuration file and verify that it&amp;rsquo;s correct before starting to use it in a production environment.&lt;/p&gt;
&lt;p&gt;The following list is specific to the convert command and not Alloy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;a href=&#34;/docs/agent/latest/static/configuration/agent-management/&#34;&gt;Agent Management&lt;/a&gt; configuration options can&amp;rsquo;t be automatically converted to Alloy.
Any additional unsupported features are returned as errors during conversion.&lt;/li&gt;
&lt;li&gt;There is no gRPC server to configure for Alloy. Any non-default configuration shows as unsupported during the conversion.&lt;/li&gt;
&lt;li&gt;Check if you are using any extra command line arguments with Grafana Agent Static that aren&amp;rsquo;t present in your configuration file. For example, &lt;code&gt;-server.http.address&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Check if you are using any environment variables in your Grafana Agent Static configuration.
These are evaluated during conversion, and you may want to replace them with the Alloy Standard library &lt;a href=&#34;../../../reference/stdlib/sys/&#34;&gt;sys.env&lt;/a&gt; function after conversion.&lt;/li&gt;
&lt;li&gt;Review additional &lt;a href=&#34;../from-prometheus/#limitations&#34;&gt;Prometheus Limitations&lt;/a&gt; for limitations specific to your &lt;a href=&#34;/docs/agent/latest/static/configuration/metrics-config/&#34;&gt;Metrics&lt;/a&gt; configuration.&lt;/li&gt;
&lt;li&gt;Review additional &lt;a href=&#34;../from-promtail/#limitations&#34;&gt;Promtail Limitations&lt;/a&gt; for limitations specific to your &lt;a href=&#34;/docs/agent/latest/static/configuration/logs-config/&#34;&gt;Logs&lt;/a&gt; configuration.&lt;/li&gt;
&lt;li&gt;The logs produced by Alloy differ from those produced by Grafana Agent Static.&lt;/li&gt;
&lt;li&gt;Alloy exposes the Alloy &lt;a href=&#34;../../../troubleshoot/debug/#alloy-ui&#34;&gt;UI&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="migrate-from-grafana-agent-static-to-grafana-alloy">Migrate from Grafana Agent Static to Grafana Alloy&lt;/h1>
&lt;p>The built-in Alloy convert command can migrate your &lt;a href="/docs/agent/latest/static/">Grafana Agent Static&lt;/a> configuration to an Alloy configuration.&lt;/p>
&lt;p>This topic describes how to:&lt;/p></description></item><item><title>Migrate from Grafana Agent Operator to Grafana Alloy</title><link>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-operator/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-operator/</guid><content><![CDATA[&lt;h1 id=&#34;migrate-from-grafana-agent-operator-to-grafana-alloy&#34;&gt;Migrate from Grafana Agent Operator to Grafana Alloy&lt;/h1&gt;
&lt;p&gt;You can migrate from Grafana Agent Operator to Alloy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Monitor types (&lt;code&gt;PodMonitor&lt;/code&gt;, &lt;code&gt;ServiceMonitor&lt;/code&gt;, &lt;code&gt;Probe&lt;/code&gt;, &lt;code&gt;ScrapeConfig&lt;/code&gt;, and &lt;code&gt;PodLogs&lt;/code&gt;) are all supported natively by Alloy.&lt;/li&gt;
&lt;li&gt;The parts of Grafana Agent Operator that deploy Grafana Agent, &lt;code&gt;GrafanaAgent&lt;/code&gt;, &lt;code&gt;MetricsInstance&lt;/code&gt;, and &lt;code&gt;LogsInstance&lt;/code&gt; CRDs, are deprecated.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;deploy-alloy-with-helm&#34;&gt;Deploy Alloy with Helm&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a &lt;code&gt;values.yaml&lt;/code&gt; file, which contains options for deploying Alloy.
You can start with the &lt;a href=&#34;https://github.com/grafana/alloy/blob/main/operations/helm/charts/alloy/values.yaml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;default values&lt;/a&gt; and customize as you see fit, or start with this snippet, which should be a good starting point for what Grafana Agent Operator does.&lt;/p&gt;

&lt;div class=&#34;code-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: true
  clustering:
    enabled: true
controller:
  type: &amp;#39;statefulset&amp;#39;
  replicas: 2
crds:
  create: false&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This configuration deploys Alloy as a &lt;code&gt;StatefulSet&lt;/code&gt; using the built-in &lt;a href=&#34;../../../get-started/clustering/&#34;&gt;clustering&lt;/a&gt; functionality to allow distributing scrapes across all Alloy pods.&lt;/p&gt;
&lt;p&gt;This is one of many deployment possible modes. For example, you may want to use a &lt;code&gt;DaemonSet&lt;/code&gt; to collect host-level logs or metrics.
See the Alloy &lt;a href=&#34;../../../set-up/deploy/&#34;&gt;deployment guide&lt;/a&gt; for more details about different topologies.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create an Alloy configuration file, &lt;code&gt;config.alloy&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In the next step, you add to this configuration as you convert &lt;code&gt;MetricsInstances&lt;/code&gt;. You can add any additional configuration to this file as you need.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the Grafana Helm repository:&lt;/p&gt;

&lt;div class=&#34;code-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 repo add grafana https://grafana.github.io/helm-charts
helm repo update&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Helm release. You can name the release anything you like. The following command installs a release called &lt;code&gt;alloy-metrics&lt;/code&gt; in the &lt;code&gt;monitoring&lt;/code&gt; namespace.&lt;/p&gt;

&lt;div class=&#34;code-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 alloy-metrics grafana/alloy -i -n monitoring -f values.yaml --set-file alloy.configMap.content=config.alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This command uses the &lt;code&gt;--set-file&lt;/code&gt; flag to pass the configuration file as a Helm value so that you can continue to edit it as a regular Alloy configuration file.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;convert-metricsinstance-to-alloy-components&#34;&gt;Convert &lt;code&gt;MetricsInstance&lt;/code&gt; to Alloy components&lt;/h2&gt;
&lt;p&gt;A &lt;code&gt;MetricsInstance&lt;/code&gt; resource primarily defines:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The remote endpoints Grafana Agent should send metrics to.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;PodMonitor&lt;/code&gt;, &lt;code&gt;ServiceMonitor&lt;/code&gt;, &lt;code&gt;ScrapeConfig&lt;/code&gt;, and &lt;code&gt;Probe&lt;/code&gt; resources this Alloy should discover.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can use these functions in Alloy with the &lt;code&gt;prometheus.remote_write&lt;/code&gt;, &lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt;, &lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt;, and &lt;code&gt;prometheus.operator.probes&lt;/code&gt; components respectively.&lt;/p&gt;
&lt;p&gt;The following Alloy syntax sample is equivalent to the &lt;code&gt;MetricsInstance&lt;/code&gt; from the &lt;a href=&#34;/docs/agent/latest/operator/deploy-agent-operator-resources/#deploy-a-metricsinstance-resource&#34;&gt;operator guide&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;
// read the credentials secret for remote_write authorization
remote.kubernetes.secret &amp;#34;credentials&amp;#34; {
  namespace = &amp;#34;monitoring&amp;#34;
  name = &amp;#34;primary-credentials-metrics&amp;#34;
}

prometheus.remote_write &amp;#34;primary&amp;#34; {
    endpoint {
        url = &amp;#34;https://&amp;lt;PROMETHEUS_URL&amp;gt;/api/v1/push&amp;#34;
        basic_auth {
            username = convert.nonsensitive(remote.kubernetes.secret.credentials.data[&amp;#34;username&amp;#34;])
            password = remote.kubernetes.secret.credentials.data[&amp;#34;password&amp;#34;]
        }
    }
}

prometheus.operator.podmonitors &amp;#34;primary&amp;#34; {
    forward_to = [prometheus.remote_write.primary.receiver]
    // leave out selector to find all podmonitors in the entire cluster
    selector {
        match_labels = {instance = &amp;#34;primary&amp;#34;}
    }
}

prometheus.operator.servicemonitors &amp;#34;primary&amp;#34; {
    forward_to = [prometheus.remote_write.primary.receiver]
    // leave out selector to find all servicemonitors in the entire cluster
    selector {
        match_labels = {instance = &amp;#34;primary&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_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The endpoint you want to send metrics to.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This configuration discovers all &lt;code&gt;PodMonitor&lt;/code&gt;, &lt;code&gt;ServiceMonitor&lt;/code&gt;, &lt;code&gt;ScrapeConfig&lt;/code&gt;, and &lt;code&gt;Probe&lt;/code&gt; resources in your cluster that match the label selector &lt;code&gt;instance=primary&lt;/code&gt;.
It then scrapes metrics from the targets and forward them to your remote write endpoint.&lt;/p&gt;
&lt;p&gt;You may need to customize this configuration further if you use additional features in your &lt;code&gt;MetricsInstance&lt;/code&gt; resources.
Refer to the documentation for the relevant components for additional information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/remote/remote.kubernetes.secret/&#34;&gt;&lt;code&gt;remote.kubernetes.secret&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&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;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/prometheus/prometheus.operator.podmonitors/&#34;&gt;&lt;code&gt;prometheus.operator.podmonitors&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/prometheus/prometheus.operator.servicemonitors/&#34;&gt;&lt;code&gt;prometheus.operator.servicemonitors&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/prometheus/prometheus.operator.scrapeconfigs/&#34;&gt;&lt;code&gt;prometheus.operator.scrapeconfigs&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/prometheus/prometheus.operator.probes/&#34;&gt;&lt;code&gt;prometheus.operator.probes&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/prometheus/prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;collect-logs&#34;&gt;Collect logs&lt;/h2&gt;
&lt;p&gt;The current recommendation is to create an additional DaemonSet deployment of Alloy to scrape logs.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Alloy has components that can scrape Pod logs directly from the Kubernetes API without needing a DaemonSet deployment.
These are still considered experimental, but if you would like to try them, see the documentation for &lt;a href=&#34;../../../reference/components/loki/loki.source.kubernetes/&#34;&gt;&lt;code&gt;loki.source.kubernetes&lt;/code&gt;&lt;/a&gt; and &lt;a href=&#34;../../../reference/components/loki/loki.source.podlogs/&#34;&gt;&lt;code&gt;loki.source.podlogs&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;These values are close to what Grafana Agent Operator deploys for logs:&lt;/p&gt;

&lt;div class=&#34;code-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: true
  clustering:
    enabled: false
  controller:
    type: &amp;#39;daemonset&amp;#39;
  mounts:
    # -- Mount /var/log from the host into the container for log collection.
    varlog: true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This command installs a release named &lt;code&gt;alloy-logs&lt;/code&gt; in the &lt;code&gt;monitoring&lt;/code&gt; namespace:&lt;/p&gt;

&lt;div class=&#34;code-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 alloy-logs grafana/alloy -i -n monitoring -f values-logs.yaml --set-file alloy.configMap.content=config-logs.alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This simple configuration scrapes logs for every Pod on each node:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;// read the credentials secret for remote_write authorization
remote.kubernetes.secret &amp;#34;credentials&amp;#34; {
  namespace = &amp;#34;monitoring&amp;#34;
  name      = &amp;#34;primary-credentials-logs&amp;#34;
}

discovery.kubernetes &amp;#34;pods&amp;#34; {
  role = &amp;#34;pod&amp;#34;
  // limit to pods on this node to reduce the amount you need to filter
  selectors {
    role  = &amp;#34;pod&amp;#34;
    field = &amp;#34;spec.nodeName=&amp;#34; &amp;#43; sys.env(&amp;#34;&amp;lt;HOSTNAME&amp;gt;&amp;#34;)
  }
}

discovery.relabel &amp;#34;pod_logs&amp;#34; {
  targets = discovery.kubernetes.pods.targets
  rule {
    source_labels = [&amp;#34;__meta_kubernetes_namespace&amp;#34;]
    target_label  = &amp;#34;namespace&amp;#34;
  }
  rule {
    source_labels = [&amp;#34;__meta_kubernetes_pod_name&amp;#34;]
    target_label  = &amp;#34;pod&amp;#34;
  }
  rule {
    source_labels = [&amp;#34;__meta_kubernetes_pod_container_name&amp;#34;]
    target_label  = &amp;#34;container&amp;#34;
  }
  rule {
    source_labels = [&amp;#34;__meta_kubernetes_namespace&amp;#34;, &amp;#34;__meta_kubernetes_pod_name&amp;#34;]
    separator     = &amp;#34;/&amp;#34;
    target_label  = &amp;#34;job&amp;#34;
  }
  rule {
    source_labels = [&amp;#34;__meta_kubernetes_pod_uid&amp;#34;, &amp;#34;__meta_kubernetes_pod_container_name&amp;#34;]
    separator     = &amp;#34;/&amp;#34;
    action        = &amp;#34;replace&amp;#34;
    replacement   = &amp;#34;/var/log/pods/*$1/*.log&amp;#34;
    target_label  = &amp;#34;__path__&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_pod_container_id&amp;#34;]
    regex = &amp;#34;^(\\w&amp;#43;):\\/\\/.&amp;#43;$&amp;#34;
    replacement = &amp;#34;$1&amp;#34;
    target_label = &amp;#34;tmp_container_runtime&amp;#34;
  }
}

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

loki.source.file &amp;#34;pod_logs&amp;#34; {
  targets    = local.file_match.pod_logs.targets
  forward_to = [loki.process.pod_logs.receiver]
}

// basic processing to parse the container format. You can add additional processing stages
// to match your application logs.
loki.process &amp;#34;pod_logs&amp;#34; {
  stage.match {
    selector = &amp;#34;{tmp_container_runtime=\&amp;#34;containerd\&amp;#34;}&amp;#34;
    // the cri processing stage extracts the following k/v pairs: log, stream, time, flags
    stage.cri {}
    // Set the extract flags and stream values as labels
    stage.labels {
      values = {
        flags   = &amp;#34;&amp;#34;,
        stream  = &amp;#34;&amp;#34;,
      }
    }
  }

  // if the label tmp_container_runtime from above is docker parse using docker
  stage.match {
    selector = &amp;#34;{tmp_container_runtime=\&amp;#34;docker\&amp;#34;}&amp;#34;
    // the docker processing stage extracts the following k/v pairs: log, stream, time
    stage.docker {}

    // Set the extract stream value as a label
    stage.labels {
      values = {
        stream  = &amp;#34;&amp;#34;,
      }
    }
  }

  // drop the temporary container runtime label as it is no longer needed
  stage.label_drop {
    values = [&amp;#34;tmp_container_runtime&amp;#34;]
  }

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

loki.write &amp;#34;loki&amp;#34; {
  endpoint {
    url = &amp;#34;https://&amp;lt;LOKI_URL&amp;gt;/loki/api/v1/push&amp;#34;
    basic_auth {
      username = convert.nonsensitive(remote.kubernetes.secret.credentials.data[&amp;#34;username&amp;#34;])
      password = remote.kubernetes.secret.credentials.data[&amp;#34;password&amp;#34;]
    }
}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;LOKI_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The endpoint of your Loki instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The logging subsystem is very powerful and has many options for processing logs. For further details, see the &lt;a href=&#34;../../../reference/components/&#34;&gt;component documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;integrations&#34;&gt;Integrations&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;Integration&lt;/code&gt; CRD isn&amp;rsquo;t supported with Alloy.
However, all Grafana Agent Static mode integrations have an equivalent component in the &lt;a href=&#34;../../../reference/components/&#34;&gt;&lt;code&gt;prometheus.exporter&lt;/code&gt;&lt;/a&gt; namespace.
The &lt;a href=&#34;../../../reference/components/&#34;&gt;reference documentation&lt;/a&gt; should help convert those integrations to their Alloy equivalent.&lt;/p&gt;
&lt;!-- ToDo: Validate path --&gt;
]]></content><description>&lt;h1 id="migrate-from-grafana-agent-operator-to-grafana-alloy">Migrate from Grafana Agent Operator to Grafana Alloy&lt;/h1>
&lt;p>You can migrate from Grafana Agent Operator to Alloy.&lt;/p>
&lt;ul>
&lt;li>The Monitor types (&lt;code>PodMonitor&lt;/code>, &lt;code>ServiceMonitor&lt;/code>, &lt;code>Probe&lt;/code>, &lt;code>ScrapeConfig&lt;/code>, and &lt;code>PodLogs&lt;/code>) are all supported natively by Alloy.&lt;/li>
&lt;li>The parts of Grafana Agent Operator that deploy Grafana Agent, &lt;code>GrafanaAgent&lt;/code>, &lt;code>MetricsInstance&lt;/code>, and &lt;code>LogsInstance&lt;/code> CRDs, are deprecated.&lt;/li>
&lt;/ul>
&lt;h2 id="deploy-alloy-with-helm">Deploy Alloy with Helm&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>Create a &lt;code>values.yaml&lt;/code> file, which contains options for deploying Alloy.
You can start with the &lt;a href="https://github.com/grafana/alloy/blob/main/operations/helm/charts/alloy/values.yaml" target="_blank" rel="noopener noreferrer">default values&lt;/a> and customize as you see fit, or start with this snippet, which should be a good starting point for what Grafana Agent Operator does.&lt;/p></description></item><item><title>Migrate Grafana Agent Flow to Grafana Alloy</title><link>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-flow/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-flow/</guid><content><![CDATA[&lt;h1 id=&#34;migrate-from-grafana-agent-flow-to-grafana-alloy&#34;&gt;Migrate from Grafana Agent Flow to Grafana Alloy&lt;/h1&gt;
&lt;p&gt;This topic describes how to perform a live migration from Grafana Agent Flow to Grafana Alloy with minimal downtime.&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 procedure is only required for live migrations from a Grafana Agent Flow install to Alloy.&lt;/p&gt;
&lt;p&gt;If you want a fresh start with Alloy, you can &lt;a href=&#34;/docs/agent/latest/flow/get-started/install/&#34;&gt;uninstall Grafana Agent Flow&lt;/a&gt; and &lt;a href=&#34;../../../set-up/install/&#34;&gt;install Alloy&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;ul&gt;
&lt;li&gt;You must have a Grafana Agent Flow configuration to migrate.&lt;/li&gt;
&lt;li&gt;You must be running Grafana Agent Flow version v0.40 or later.&lt;/li&gt;
&lt;li&gt;If you use auto-scaling make sure you disable auto-scaling for your Grafana Agent Flow deployment to prevent it from scaling during the migration.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;differences-between-grafana-agent-flow-and-alloy&#34;&gt;Differences between Grafana Agent Flow and Alloy&lt;/h2&gt;
&lt;p&gt;By default, you can only use functionality marked &lt;em&gt;Generally available&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;You can enable functionality in &lt;em&gt;Experimental&lt;/em&gt; and &lt;em&gt;Public preview&lt;/em&gt; by setting the &lt;code&gt;--stability.level&lt;/code&gt; flag in &lt;a href=&#34;../../../reference/cli/run/&#34;&gt;run&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default value of &lt;code&gt;--storage.path&lt;/code&gt; has changed from &lt;code&gt;data-agent/&lt;/code&gt; to &lt;code&gt;data-alloy/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The default value of &lt;code&gt;--server.http.memory-addr&lt;/code&gt; has changed from &lt;code&gt;agent.internal:12345&lt;/code&gt; to &lt;code&gt;alloy.internal:12345&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Debug metrics reported by Alloy are prefixed with &lt;code&gt;alloy_&lt;/code&gt; instead of &lt;code&gt;agent_&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &amp;ldquo;classic modules&amp;rdquo;, &lt;code&gt;module.file&lt;/code&gt;, &lt;code&gt;module.git&lt;/code&gt;, &lt;code&gt;module.http&lt;/code&gt;, and &lt;code&gt;module.string&lt;/code&gt; have been removed in favor of import configuration blocks.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;prometheus.exporter.vsphere&lt;/code&gt; component has been replaced by the &lt;code&gt;otelcol.receiver.vcenter&lt;/code&gt; component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;steps&#34;&gt;Steps&lt;/h2&gt;
&lt;h3 id=&#34;prepare-your-grafana-agent-flow-configuration&#34;&gt;Prepare your Grafana Agent Flow configuration&lt;/h3&gt;
&lt;p&gt;Alloy uses the same configuration format as Grafana Agent Flow, but some functionality has been removed.&lt;/p&gt;
&lt;p&gt;Before migrating, modify your Grafana Agent Flow configuration to remove or replace any unsupported components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &amp;ldquo;classic modules&amp;rdquo; in Grafana Agent Flow have been removed in favor of the modules introduced in v0.40:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;module.file&lt;/code&gt; is replaced by the &lt;a href=&#34;../../../reference/config-blocks/import.file/&#34;&gt;&lt;code&gt;import.file&lt;/code&gt;&lt;/a&gt; configuration block.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;module.git&lt;/code&gt; is replaced by the &lt;a href=&#34;../../../reference/config-blocks/import.git/&#34;&gt;&lt;code&gt;import.git&lt;/code&gt;&lt;/a&gt; configuration block.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;module.http&lt;/code&gt; is replaced by the &lt;a href=&#34;../../../reference/config-blocks/import.http/&#34;&gt;&lt;code&gt;import.http&lt;/code&gt;&lt;/a&gt; configuration block.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;module.string&lt;/code&gt; is replaced by the &lt;a href=&#34;../../../reference/config-blocks/import.string/&#34;&gt;&lt;code&gt;import.string&lt;/code&gt;&lt;/a&gt; configuration block.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prometheus.exporter.vsphere&lt;/code&gt; is replaced by the &lt;a href=&#34;../../../reference/components/otelcol/otelcol.receiver.vcenter/&#34;&gt;&lt;code&gt;otelcol.receiver.vcenter&lt;/code&gt;&lt;/a&gt; component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;deploy-alloy-with-a-default-configuration&#34;&gt;Deploy Alloy with a default configuration&lt;/h3&gt;
&lt;p&gt;Follow the &lt;a href=&#34;../../../set-up/install/&#34;&gt;installation instructions&lt;/a&gt; for Alloy, using the default configuration file. The configuration file is customized in the following steps.&lt;/p&gt;
&lt;p&gt;When deploying Alloy, be aware of the following settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Alloy should be deployed with topology that&amp;rsquo;s the same as Grafana Agent Flow.
The CPU, and storage limits should match.&lt;/li&gt;
&lt;li&gt;Custom command-line flags configured in Grafana Agent Flow should be reflected in your Alloy installation.&lt;/li&gt;
&lt;li&gt;Alloy may need to be deployed with the &lt;code&gt;--stability.level&lt;/code&gt; flag in &lt;a href=&#34;../../../reference/cli/run/&#34;&gt;run&lt;/a&gt; to enable non-stable components:
&lt;ul&gt;
&lt;li&gt;Set &lt;code&gt;--stability.level&lt;/code&gt; to &lt;code&gt;experimental&lt;/code&gt; if you are using the following component:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/otelcol/otelcol.receiver.vcenter/&#34;&gt;otelcol.receiver.vcenter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Otherwise, &lt;code&gt;--stability.level&lt;/code&gt; may be omitted or set to the default value, &lt;code&gt;generally-available&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;When installing on Kubernetes, update your &lt;code&gt;values.yaml&lt;/code&gt; file to rename the &lt;code&gt;agent&lt;/code&gt; key to &lt;code&gt;alloy&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you are deploying Alloy as a cluster:
&lt;ul&gt;
&lt;li&gt;Set the number of instances to match the number of instances in your Grafana Agent Flow cluster.&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t enable auto-scaling until the migration is complete.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;migrate-grafana-agent-flow-data-to-alloy&#34;&gt;Migrate Grafana Agent Flow data to Alloy&lt;/h3&gt;
&lt;p&gt;Migrate your Grafana Agent Flow data to Alloy by copying the contents of the Grafana Agent Flow data directory to the Alloy data directory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Linux installations: copy the &lt;em&gt;contents&lt;/em&gt; of &lt;code&gt;/var/lib/grafana-agent-flow&lt;/code&gt; to &lt;code&gt;/var/lib/alloy/data&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;macOS installations: copy the &lt;em&gt;contents&lt;/em&gt; of &lt;code&gt;$(brew --prefix)/etc/grafana-agent-flow/data&lt;/code&gt; to &lt;code&gt;$(brew --prefix)/etc/alloy/data&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Windows installations: copy the &lt;em&gt;contents&lt;/em&gt; of &lt;code&gt;%ProgramData%\Grafana Agent Flow\data&lt;/code&gt; to &lt;code&gt;%ProgramData%\GrafanaLabs\Alloy\data&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Docker: copy the contents of mounted volumes to a new directory, and then mount the directory when running Alloy.&lt;/li&gt;
&lt;li&gt;Kubernetes: use &lt;code&gt;kubectl cp&lt;/code&gt; to copy the &lt;em&gt;contents&lt;/em&gt; of the data directory on Flow pods to the data directory on Alloy pods.
&lt;ul&gt;
&lt;li&gt;The data directory is determined by the &lt;code&gt;agent.storagePath&lt;/code&gt; (default &lt;code&gt;/tmp/agent&lt;/code&gt;) and &lt;code&gt;alloy.storagePath&lt;/code&gt; (default &lt;code&gt;/tmp/alloy&lt;/code&gt;) fields in &lt;code&gt;values.yaml&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;migrate-pipelines-that-receive-data-over-the-network&#34;&gt;Migrate pipelines that receive data over the network&lt;/h3&gt;
&lt;p&gt;Telemetry pipelines which receive data over the network (for example, pipelines using &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; or &lt;code&gt;prometheus.receive_http&lt;/code&gt;) should be configured in Alloy first:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Configure Alloy with all pipelines where telemetry data is received over the network.&lt;/li&gt;
&lt;li&gt;Reconfigure applications to send telemetry data to Alloy instead of Grafana Agent Flow.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;migrate-the-remaining-pipelines&#34;&gt;Migrate the remaining pipelines&lt;/h3&gt;
&lt;p&gt;Migrate remaining pipelines from Grafana Agent Flow to Alloy:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Disable remaining pipelines in Grafana Agent Flow to prevent Flow and Alloy from processing the same data.&lt;/li&gt;
&lt;li&gt;Configure Alloy with the remaining pipelines.&lt;/li&gt;
&lt;/ol&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 process results in minimal downtime as remaining pipelines are moved from Grafana Agent Flow to Alloy.&lt;/p&gt;
&lt;p&gt;To completely eliminate downtime, configure remaining pipelines in Alloy before disabling them in Grafana Agent Flow.
This alternative approach results in some duplicate data being sent to backends during the migration period.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;uninstall-grafana-agent-flow&#34;&gt;Uninstall Grafana Agent Flow&lt;/h3&gt;
&lt;p&gt;After you have completed the migration, you can uninstall Grafana Agent Flow.&lt;/p&gt;
&lt;h3 id=&#34;cleanup-temporary-changes&#34;&gt;Cleanup temporary changes&lt;/h3&gt;
&lt;p&gt;You can enable auto-scaling in your Alloy deployment if you disabled it during the migration process.&lt;/p&gt;
]]></content><description>&lt;h1 id="migrate-from-grafana-agent-flow-to-grafana-alloy">Migrate from Grafana Agent Flow to Grafana Alloy&lt;/h1>
&lt;p>This topic describes how to perform a live migration from Grafana Agent Flow to Grafana Alloy with minimal downtime.&lt;/p></description></item><item><title>Migrate from OpenTelemetry Collector to Grafana Alloy</title><link>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-otelcol/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-otelcol/</guid><content><![CDATA[&lt;h1 id=&#34;migrate-from-opentelemetry-collector-to-alloy&#34;&gt;Migrate from OpenTelemetry Collector to Alloy&lt;/h1&gt;
&lt;p&gt;The built-in Grafana Alloy convert command can migrate your &lt;a href=&#34;https://opentelemetry.io/docs/collector/configuration/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Collector&lt;/a&gt; configuration to a Alloy configuration.&lt;/p&gt;
&lt;p&gt;This topic describes how to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Convert an OpenTelemetry Collector configuration to a Alloy configuration.&lt;/li&gt;
&lt;li&gt;Run an OpenTelemetry Collector configuration natively using Alloy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;components-used-in-this-topic&#34;&gt;Components used in this topic&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/otelcol/otelcol.receiver.otlp/&#34;&gt;&lt;code&gt;otelcol.receiver.otlp&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/otelcol/otelcol.processor.memory_limiter/&#34;&gt;&lt;code&gt;otelcol.processor.memory_limiter&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/otelcol/otelcol.exporter.otlp/&#34;&gt;&lt;code&gt;otelcol.exporter.otlp&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;You must have an OpenTelemetry Collector configuration.&lt;/li&gt;
&lt;li&gt;You must have a set of OpenTelemetry Collector applications ready to push telemetry data to Alloy.&lt;/li&gt;
&lt;li&gt;You must be familiar with the concept of &lt;a href=&#34;../../../get-started/components/&#34;&gt;Components&lt;/a&gt; in Alloy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;convert-an-opentelemetry-collector-configuration&#34;&gt;Convert an OpenTelemetry Collector configuration&lt;/h2&gt;
&lt;p&gt;To fully migrate your configuration from &lt;a href=&#34;https://opentelemetry.io/docs/collector/configuration/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Collector&lt;/a&gt; to Alloy, you must convert your OpenTelemetry Collector configuration into a Alloy configuration.
This conversion allows you to take full advantage of the many additional features available in Alloy.&lt;/p&gt;
&lt;p&gt;In this task, you use the &lt;a href=&#34;../../../reference/cli/convert/&#34;&gt;convert&lt;/a&gt; CLI command to output a Alloy configuration from a OpenTelemetry Collector configuration.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open a terminal window and run the following command.&lt;/p&gt;

&lt;div class=&#34;code-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;alloy convert --source-format=otelcol --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the OpenTelemetry Collector configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../reference/cli/run/&#34;&gt;Run&lt;/a&gt; Alloy using the new Alloy configuration from &lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;debugging&#34;&gt;Debugging&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If the &lt;code&gt;convert&lt;/code&gt; command can&amp;rsquo;t convert an OpenTelemetry Collector configuration, diagnostic information is sent to &lt;code&gt;stderr&lt;/code&gt;.&lt;br /&gt;
You can bypass any non-critical issues and output the Alloy configuration using a best-effort conversion by including the &lt;code&gt;--bypass-errors&lt;/code&gt; flag.&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;If you bypass the errors, the behavior of the converted configuration may not match the original OpenTelemetry Collector configuration.
Make sure you fully test the converted configuration before using it in a production environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;alloy convert --source-format=otelcol --bypass-errors --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the OpenTelemetry Collector configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can also output a diagnostic report by including the &lt;code&gt;--report&lt;/code&gt; flag.&lt;/p&gt;

&lt;div class=&#34;code-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;alloy convert --source-format=otelcol --report=&amp;lt;OUTPUT_REPORT_PATH&amp;gt; --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the OpenTelemetry Collector configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_REPORT_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The output path for the report.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using the &lt;a href=&#34;#example&#34;&gt;example&lt;/a&gt; OpenTelemetry Collector configuration below, the diagnostic report provides the following information:&lt;/p&gt;

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

A configuration file was generated successfully.&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;run-an-opentelemetry-collector-configuration&#34;&gt;Run an OpenTelemetry Collector configuration&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re not ready to completely switch to a Alloy configuration, you can run Grafana Alloy using your OpenTelemetry Collector configuration.
The &lt;code&gt;--config.format=otelcol&lt;/code&gt; flag tells Grafana Alloy to convert your OpenTelemetry Collector configuration to a Alloy configuration and load it directly without saving the new configuration.
This allows you to try Alloy without modifying your OpenTelemetry Collector configuration infrastructure.&lt;/p&gt;
&lt;p&gt;In this task, you use the &lt;a href=&#34;../../../reference/cli/run/&#34;&gt;run&lt;/a&gt; CLI command to run Alloy using an OpenTelemetry Collector configuration.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;../../../reference/cli/run/&#34;&gt;Run&lt;/a&gt; Alloy and include the command line flag &lt;code&gt;--config.format=otelcol&lt;/code&gt;.
Your configuration file must be a valid OpenTelemetry Collector configuration file rather than a Alloy configuration file.&lt;/p&gt;
&lt;h3 id=&#34;debug&#34;&gt;Debug&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You can follow the convert CLI command &lt;a href=&#34;#debugging&#34;&gt;debugging&lt;/a&gt; instructions to generate a diagnostic report.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Refer to the Alloy &lt;a href=&#34;../../../troubleshoot/debug/&#34;&gt;Debugging&lt;/a&gt; for more information about a running Alloy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your OpenTelemetry Collector configuration can&amp;rsquo;t be converted and loaded directly into Alloy, diagnostic information is sent to &lt;code&gt;stderr&lt;/code&gt;.
You can bypass any non-critical issues and start Alloy by including the &lt;code&gt;--config.bypass-conversion-errors&lt;/code&gt; flag in addition to &lt;code&gt;--config.format=otelcol&lt;/code&gt;.&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;If you bypass the errors, the behavior of the converted configuration may not match the original Prometheus configuration.
Don&amp;rsquo;t use this flag in a production environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example demonstrates converting an OpenTelemetry Collector configuration file to a Alloy configuration file.&lt;/p&gt;
&lt;p&gt;The following OpenTelemetry Collector configuration file provides the input for the conversion.&lt;/p&gt;

&lt;div class=&#34;code-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;receivers:
  otlp:
    protocols:
      grpc:
      http:

exporters:
  otlp:
    endpoint: database:4317

processors:
  memory_limiter:
    limit_percentage: 90
    check_interval: 1s


service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [memory_limiter]
      exporters: [otlp]
    logs:
      receivers: [otlp]
      processors: [memory_limiter]
      exporters: [otlp]
    traces:
      receivers: [otlp]
      processors: [memory_limiter]
      exporters: [otlp]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The convert command takes the YAML file as input and outputs an Alloy 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;alloy convert --source-format=otelcol --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the OpenTelemetry Collector configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The new Alloy configuration file 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;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
    grpc { }

    http { }

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

otelcol.processor.memory_limiter &amp;#34;default&amp;#34; {
    check_interval   = &amp;#34;1s&amp;#34;
    limit_percentage = 90

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

otelcol.exporter.otlp &amp;#34;default&amp;#34; {
    client {
        endpoint = &amp;#34;database:4317&amp;#34;
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;limitations&#34;&gt;Limitations&lt;/h2&gt;
&lt;p&gt;Configuration conversion is done on a best-effort basis. Grafana Alloy issues warnings or errors where the conversion can&amp;rsquo;t be performed.&lt;/p&gt;
&lt;p&gt;After the configuration is converted, review the Alloy configuration file created and verify that it&amp;rsquo;s correct before starting to use it in a production environment.&lt;/p&gt;
&lt;p&gt;The following list is specific to the convert command and not Alloy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components are supported which directly embed upstream OpenTelemetry Collector features. You can get a general idea of which exist in
Alloy for conversion by reviewing the &lt;code&gt;otelcol.*&lt;/code&gt; components in the &lt;a href=&#34;../../../reference/components/&#34;&gt;Component Reference&lt;/a&gt;.
Any additional unsupported features are returned as errors during conversion.&lt;/li&gt;
&lt;li&gt;Check if you are using any extra command line arguments with OpenTelemetry Collector that aren&amp;rsquo;t present in your configuration file.&lt;/li&gt;
&lt;li&gt;Meta-monitoring metrics exposed by Alloy usually match OpenTelemetry Collector meta-monitoring metrics but uses a different name.
Make sure that you use the new metric names, for example, in your alerts and dashboards queries.&lt;/li&gt;
&lt;li&gt;The logs produced by Alloy differ from those produced by OpenTelemetry Collector.&lt;/li&gt;
&lt;li&gt;The Alloy &lt;a href=&#34;../../../troubleshoot/debug/#alloy-ui&#34;&gt;UI&lt;/a&gt; uses  Alloy naming conventions for components and their configuration blocks and arguments.&lt;/li&gt;
&lt;li&gt;Not all arguments in the &lt;code&gt;service/telemetry&lt;/code&gt; section are supported.&lt;/li&gt;
&lt;li&gt;Environment variables with a scheme other than &lt;code&gt;env&lt;/code&gt; aren&amp;rsquo;t supported. Environment variables with no scheme default to &lt;code&gt;env&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="migrate-from-opentelemetry-collector-to-alloy">Migrate from OpenTelemetry Collector to Alloy&lt;/h1>
&lt;p>The built-in Grafana Alloy convert command can migrate your &lt;a href="https://opentelemetry.io/docs/collector/configuration/" target="_blank" rel="noopener noreferrer">OpenTelemetry Collector&lt;/a> configuration to a Alloy configuration.&lt;/p>
&lt;p>This topic describes how to:&lt;/p></description></item><item><title>Migrate from Prometheus to Grafana Alloy</title><link>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-prometheus/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-prometheus/</guid><content><![CDATA[&lt;h1 id=&#34;migrate-from-prometheus-to-grafana-alloy&#34;&gt;Migrate from Prometheus to Grafana Alloy&lt;/h1&gt;
&lt;p&gt;The built-in Alloy convert command can migrate your &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus&lt;/a&gt; configuration to an Alloy configuration.&lt;/p&gt;
&lt;p&gt;This topic describes how to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Convert a Prometheus configuration to an Alloy configuration.&lt;/li&gt;
&lt;li&gt;Run a Prometheus configuration natively using Alloy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;components-used-in-this-topic&#34;&gt;Components used in this topic&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/prometheus/prometheus.scrape/&#34;&gt;&lt;code&gt;prometheus.scrape&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&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;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;You must have a Prometheus configuration.&lt;/li&gt;
&lt;li&gt;You must have a set of Prometheus applications ready to push telemetry data to Alloy.&lt;/li&gt;
&lt;li&gt;You must be familiar with the concept of &lt;a href=&#34;../../../get-started/components/&#34;&gt;Components&lt;/a&gt; in Alloy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;convert-a-prometheus-configuration&#34;&gt;Convert a Prometheus configuration&lt;/h2&gt;
&lt;p&gt;To fully migrate your configuration from &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus&lt;/a&gt; to Alloy, you must convert your Prometheus configuration into an Alloy configuration.
This conversion allows you to take full advantage of the many additional features available in Alloy.&lt;/p&gt;
&lt;p&gt;In this task, you use the &lt;a href=&#34;../../../reference/cli/convert/&#34;&gt;convert&lt;/a&gt; CLI command to output an Alloy configuration from a Prometheus configuration.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open a terminal window and run the following command.&lt;/p&gt;

&lt;div class=&#34;code-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;alloy convert --source-format=prometheus --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the Prometheus configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../reference/cli/run/&#34;&gt;Run&lt;/a&gt; Alloy using the new Alloy configuration from &lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;debugging&#34;&gt;Debugging&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If the &lt;code&gt;convert&lt;/code&gt; command can&amp;rsquo;t convert a Prometheus configuration, diagnostic information is sent to &lt;code&gt;stderr&lt;/code&gt;.&lt;br /&gt;
You can bypass any non-critical issues and output the Alloy configuration using a best-effort conversion by including the &lt;code&gt;--bypass-errors&lt;/code&gt; flag.&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;If you bypass the errors, the behavior of the converted configuration may not match the original Prometheus configuration.
Make sure you fully test the converted configuration before using it in a production environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;alloy convert --source-format=prometheus --bypass-errors --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the Prometheus configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can also output a diagnostic report by including the &lt;code&gt;--report&lt;/code&gt; flag.&lt;/p&gt;

&lt;div class=&#34;code-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;alloy convert --source-format=prometheus --report=&amp;lt;OUTPUT_REPORT_PATH&amp;gt; --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the Prometheus configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_REPORT_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The output path for the report.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using the &lt;a href=&#34;#example&#34;&gt;example&lt;/a&gt; Prometheus configuration below, the diagnostic report provides the following information:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;plaintext&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-plaintext&#34;&gt;(Info) Converted scrape_configs job_name &amp;#34;prometheus&amp;#34; into...
  A prometheus.scrape.prometheus component
(Info) Converted 1 remote_write[s] &amp;#34;grafana-cloud&amp;#34; into...
  A prometheus.remote_write.default component&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;run-a-prometheus-configuration&#34;&gt;Run a Prometheus configuration&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re not ready to completely switch to an Alloy configuration, you can run Alloy using your Prometheus configuration.
The &lt;code&gt;--config.format=prometheus&lt;/code&gt; flag tells Alloy to convert your Prometheus configuration to an Alloy configuration and load it directly without saving the new configuration.
This allows you to try Alloy without modifying your Prometheus configuration infrastructure.&lt;/p&gt;
&lt;p&gt;In this task, you use the &lt;a href=&#34;../../../reference/cli/run/&#34;&gt;run&lt;/a&gt; CLI command to run Alloy using a Prometheus configuration.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;../../../reference/cli/run/&#34;&gt;Run&lt;/a&gt; Alloy and include the command line flag &lt;code&gt;--config.format=prometheus&lt;/code&gt;.
Your configuration file must be a valid Prometheus configuration file rather than an Alloy configuration file.&lt;/p&gt;
&lt;h3 id=&#34;debug&#34;&gt;Debug&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You can follow the convert CLI command &lt;a href=&#34;#debugging&#34;&gt;debugging&lt;/a&gt; instructions to generate a diagnostic report.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Refer to &lt;a href=&#34;../../../troubleshoot/debug/&#34;&gt;Debug Alloy&lt;/a&gt; for more information about a running Alloy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your Prometheus configuration can&amp;rsquo;t be converted and loaded directly into Alloy, diagnostic information is sent to &lt;code&gt;stderr&lt;/code&gt;.
You can bypass any non-critical issues and start Alloy by including the &lt;code&gt;--config.bypass-conversion-errors&lt;/code&gt; flag in addition to &lt;code&gt;--config.format=prometheus&lt;/code&gt;.&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;If you bypass the errors, the behavior of the converted configuration may not match the original Prometheus configuration.
Don&amp;rsquo;t use this flag in a production environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example demonstrates converting a Prometheus configuration file to an Alloy configuration file.&lt;/p&gt;
&lt;p&gt;The following Prometheus configuration file provides the input for the conversion.&lt;/p&gt;

&lt;div class=&#34;code-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;global:
  scrape_timeout:    45s

scrape_configs:
  - job_name: &amp;#34;prometheus&amp;#34;
    static_configs:
      - targets: [&amp;#34;localhost:12345&amp;#34;]

remote_write:
  - name: &amp;#34;grafana-cloud&amp;#34;
    url: &amp;#34;https://prometheus-us-central1.grafana.net/api/prom/push&amp;#34;
    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;The convert command takes the YAML file as input and outputs a &lt;a href=&#34;../../../get-started/configuration-syntax/&#34;&gt;Alloy configuration&lt;/a&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;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;alloy convert --source-format=prometheus --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the Prometheus configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The new Alloy configuration file 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;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&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; {
  targets = [{
    __address__ = &amp;#34;localhost:12345&amp;#34;,
  }]
  forward_to     = [prometheus.remote_write.default.receiver]
  job_name       = &amp;#34;prometheus&amp;#34;
  scrape_timeout = &amp;#34;45s&amp;#34;
}

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

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

    queue_config {
      capacity             = 2500
      max_shards           = 200
      max_samples_per_send = 500
    }

    metadata_config {
      max_samples_per_send = 500
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;limitations&#34;&gt;Limitations&lt;/h2&gt;
&lt;p&gt;Configuration conversion is done on a best-effort basis. Alloy issues warnings or errors where the conversion can&amp;rsquo;t be performed.&lt;/p&gt;
&lt;p&gt;After the configuration is converted, review the Alloy configuration file created and verify that it&amp;rsquo;s correct before starting to use it in a production environment.&lt;/p&gt;
&lt;p&gt;The following list is specific to the convert command and not Alloy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The following configurations aren&amp;rsquo;t available for conversion to Alloy: &lt;code&gt;rule_files&lt;/code&gt;, &lt;code&gt;alerting&lt;/code&gt;, &lt;code&gt;remote_read&lt;/code&gt;, &lt;code&gt;storage&lt;/code&gt;, and &lt;code&gt;tracing&lt;/code&gt;.
Any additional unsupported features are returned as errors during conversion.&lt;/li&gt;
&lt;li&gt;Check if you are using any extra command line arguments with Prometheus that aren&amp;rsquo;t present in your configuration file. For example, &lt;code&gt;--web.listen-address&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Meta-monitoring metrics exposed by Alloy usually match Prometheus meta-monitoring metrics but uses a different name.
Make sure that you use the new metric names, for example, in your alerts and dashboards queries.&lt;/li&gt;
&lt;li&gt;The logs produced by Alloy differ from those produced by Prometheus.&lt;/li&gt;
&lt;li&gt;Alloy exposes the Alloy &lt;a href=&#34;../../../troubleshoot/debug/#alloy-ui&#34;&gt;UI&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="migrate-from-prometheus-to-grafana-alloy">Migrate from Prometheus to Grafana Alloy&lt;/h1>
&lt;p>The built-in Alloy convert command can migrate your &lt;a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/" target="_blank" rel="noopener noreferrer">Prometheus&lt;/a> configuration to an Alloy configuration.&lt;/p>
&lt;p>This topic describes how to:&lt;/p></description></item><item><title>Migrate from Promtail to Grafana Alloy</title><link>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-promtail/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/set-up/migrate/from-promtail/</guid><content><![CDATA[&lt;h1 id=&#34;migrate-from-promtail-to-grafana-alloy&#34;&gt;Migrate from Promtail to Grafana Alloy&lt;/h1&gt;
&lt;p&gt;The built-in Alloy convert command can migrate your &lt;a href=&#34;https://www.grafana.com/docs/loki/latest/clients/promtail/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Promtail&lt;/a&gt; configuration to an Alloy configuration.&lt;/p&gt;
&lt;p&gt;This topic describes how to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Convert a Promtail configuration to an Alloy configuration.&lt;/li&gt;
&lt;li&gt;Run a Promtail configuration natively using Alloy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;components-used-in-this-topic&#34;&gt;Components used in this topic&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/local/local.file_match/&#34;&gt;&lt;code&gt;local.file_match&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/loki/loki.source.file/&#34;&gt;&lt;code&gt;loki.source.file&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../reference/components/loki/loki.write/&#34;&gt;&lt;code&gt;loki.write&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;You must have a Promtail configuration.&lt;/li&gt;
&lt;li&gt;You must be familiar with the concept of &lt;a href=&#34;../../../get-started/components/&#34;&gt;Components&lt;/a&gt; in Alloy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;convert-a-promtail-configuration&#34;&gt;Convert a Promtail configuration&lt;/h2&gt;
&lt;p&gt;To fully migrate from &lt;a href=&#34;https://www.grafana.com/docs/loki/latest/clients/promtail/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Promtail&lt;/a&gt; to Alloy, you must convert your Promtail configuration into an Alloy configuration.
This conversion allows you to take full advantage of the many additional features available in Alloy.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In this task, you use the &lt;a href=&#34;../../../reference/cli/convert/&#34;&gt;convert&lt;/a&gt; CLI command to output an Alloy
configuration from a Promtail configuration.&lt;/p&gt;&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open a terminal window and run the following command.&lt;/p&gt;

&lt;div class=&#34;code-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;alloy convert --source-format=promtail --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the Promtail configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../reference/cli/run/&#34;&gt;Run&lt;/a&gt; Alloy using the new configuration from &lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;debugging&#34;&gt;Debugging&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If the convert command can&amp;rsquo;t convert a Promtail configuration, diagnostic information is sent to &lt;code&gt;stderr&lt;/code&gt;.
You can bypass any non-critical issues and output the Alloy configuration using a best-effort conversion by including the &lt;code&gt;--bypass-errors&lt;/code&gt; flag.&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;If you bypass the errors, the behavior of the converted configuration may not match the original Promtail configuration.
Make sure you fully test the converted configuration before using it in a production environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;alloy convert --source-format=promtail --bypass-errors --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the Promtail configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can also output a diagnostic report by including the &lt;code&gt;--report&lt;/code&gt; flag.&lt;/p&gt;

&lt;div class=&#34;code-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;alloy convert --source-format=promtail --report=&amp;lt;OUTPUT_REPORT_PATH&amp;gt; --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the Promtail configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_REPORT_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The output path for the report.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you use the &lt;a href=&#34;#example&#34;&gt;example&lt;/a&gt; Promtail configuration below, the diagnostic report provides the following information:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;plaintext&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-plaintext&#34;&gt;(Warning) If you have a tracing set up for Promtail, it cannot be migrated to Alloy automatically. Refer to the documentation on how to configure tracing in Alloy.
(Warning) The metrics from Alloy are different from the metrics emitted by Promtail. If you rely on Promtail&amp;#39;s metrics, you must change your configuration, for example, your alerts and dashboards.&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;run-a-promtail-configuration&#34;&gt;Run a Promtail configuration&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re not ready to completely switch to an Alloy configuration, you can run Alloy using your Promtail configuration.
The &lt;code&gt;--config.format=promtail&lt;/code&gt; flag tells Alloy to convert your Promtail configuration to Alloy and load it directly without saving the new configuration.
This allows you to try Alloy without modifying your Promtail configuration infrastructure.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In this task, you use the &lt;a href=&#34;../../../reference/cli/run/&#34;&gt;run&lt;/a&gt; CLI command to run Alloy using a Promtail configuration.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&#34;../../../reference/cli/run/&#34;&gt;Run&lt;/a&gt; Alloy and include the command line flag &lt;code&gt;--config.format=promtail&lt;/code&gt;.
Your configuration file must be a valid Promtail configuration file rather than an Alloy configuration file.&lt;/p&gt;
&lt;h3 id=&#34;debug&#34;&gt;Debug&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You can follow the convert CLI command &lt;a href=&#34;#debugging&#34;&gt;debugging&lt;/a&gt; instructions to generate a diagnostic report.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Refer to the Alloy  &lt;a href=&#34;../../../troubleshoot/debug/&#34;&gt;Debugging&lt;/a&gt; for more information about running Alloy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your Promtail configuration can&amp;rsquo;t be converted and loaded directly into Alloy, diagnostic information is sent to &lt;code&gt;stderr&lt;/code&gt;.
You can bypass any non-critical issues and start Alloy by including the &lt;code&gt;--config.bypass-conversion-errors&lt;/code&gt; flag in addition to &lt;code&gt;--config.format=promtail&lt;/code&gt;.&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;If you bypass the errors, the behavior of the converted configuration may not match the original Promtail configuration.
Don&amp;rsquo;t use this flag in a production environment.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example demonstrates converting a Promtail configuration file to an Alloy configuration file.&lt;/p&gt;
&lt;p&gt;The following Promtail configuration file provides the input for the conversion.&lt;/p&gt;

&lt;div class=&#34;code-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;clients:
  - url: http://localhost/loki/api/v1/push
scrape_configs:
  - job_name: example
    static_configs:
      - targets:
          - localhost
        labels:
          __path__: /var/log/*.log&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The convert command takes the YAML file as input and outputs an &lt;a href=&#34;../../../get-started/configuration-syntax/&#34;&gt;Alloy configuration&lt;/a&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;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;alloy convert --source-format=promtail --output=&amp;lt;OUTPUT_CONFIG_PATH&amp;gt; &amp;lt;INPUT_CONFIG_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;INPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to the Promtail configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OUTPUT_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt;: The full path to output the Alloy configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The new Alloy configuration file 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;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;local.file_match &amp;#34;example&amp;#34; {
  path_targets = [{
    __address__ = &amp;#34;localhost&amp;#34;,
    __path__    = &amp;#34;/var/log/*.log&amp;#34;,
  }]
}

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

loki.write &amp;#34;default&amp;#34; {
  endpoint {
    url = &amp;#34;http://localhost/loki/api/v1/push&amp;#34;
  }
  external_labels = {}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;limitations&#34;&gt;Limitations&lt;/h2&gt;
&lt;p&gt;Configuration conversion is done on a best-effort basis. Alloy issues warnings or errors where the conversion can&amp;rsquo;t be performed.&lt;/p&gt;
&lt;p&gt;After the configuration is converted, review the Alloy configuration file created and verify that it&amp;rsquo;s correct before starting to use it in a production environment.&lt;/p&gt;
&lt;p&gt;The following list is specific to the convert command and not Alloy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check if you are using any extra command line arguments with Promtail that aren&amp;rsquo;t present in your configuration file. For example, &lt;code&gt;-max-line-size&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Check if you are setting any environment variables, whether &lt;a href=&#34;https://www.grafana.com/docs/loki/latest/clients/promtail/configuration/#use-environment-variables-in-the-configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;expanded in the configuration file&lt;/a&gt; itself or consumed directly by Promtail, such as &lt;code&gt;JAEGER_AGENT_HOST&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In Alloy, the positions file is saved at a different location.
Refer to the &lt;a href=&#34;../../../reference/components/loki/loki.source.file/&#34;&gt;&lt;code&gt;loki.source.file&lt;/code&gt;&lt;/a&gt; documentation for more details.
Check if you have any setup, for example, a Kubernetes Persistent Volume, that you must update to use the new positions path.&lt;/li&gt;
&lt;li&gt;Meta-monitoring metrics exposed by Alloy usually match Promtail meta-monitoring metrics but uses a different name.
Make sure that you use the new metric names, for example, in your alerts and dashboards queries.&lt;/li&gt;
&lt;li&gt;The logs produced by Alloy differ from those produced by Promtail.&lt;/li&gt;
&lt;li&gt;Alloy exposes the Alloy &lt;a href=&#34;../../../troubleshoot/debug/#alloy-ui&#34;&gt;UI&lt;/a&gt;, which differs from the Promtail Web UI.&lt;/li&gt;
&lt;li&gt;If you are converting a Promtail configuration and not deploying as a Kubernetes daemonset, &lt;a href=&#34;../../../reference/components/discovery/discovery.kubernetes/#limit-to-only-pods-on-the-same-node&#34;&gt;modify the generated configuration&lt;/a&gt; to ensure &lt;code&gt;discovery.kubernetes&lt;/code&gt; discovery behaves as expected. The converter makes the same assumption as promtail that any &lt;code&gt;pod&lt;/code&gt; discovery is for a daemonset deployment.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="migrate-from-promtail-to-grafana-alloy">Migrate from Promtail to Grafana Alloy&lt;/h1>
&lt;p>The built-in Alloy convert command can migrate your &lt;a href="https://www.grafana.com/docs/loki/latest/clients/promtail/" target="_blank" rel="noopener noreferrer">Promtail&lt;/a> configuration to an Alloy configuration.&lt;/p>
&lt;p>This topic describes how to:&lt;/p></description></item></channel></rss>