From e4701cc01f31f2512cc84449331ba0b2e30310e4 Mon Sep 17 00:00:00 2001 From: Erik Baranowski <39704712+erikbaranowski@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:13:46 -0400 Subject: [PATCH] include environment var AGENT_MODE in migration docs (#4588) * include environment var AGENT_MODE in migration docs Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * fix typo in command examples Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --------- Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> (cherry picked from commit 74f539b9e780cd554c87af87496a2b0104adc16f) --- .../flow/getting-started/migrating-from-prometheus.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/sources/flow/getting-started/migrating-from-prometheus.md b/docs/sources/flow/getting-started/migrating-from-prometheus.md index 3096ae1c79c3..396c1e2db36c 100644 --- a/docs/sources/flow/getting-started/migrating-from-prometheus.md +++ b/docs/sources/flow/getting-started/migrating-from-prometheus.md @@ -52,7 +52,7 @@ additional features available in Grafana Agent flow mode. 1. Open a terminal window and run the following command: ```bash - grafana-agent convert --format=prometheus --output=OUTPUT_CONFIG_PATH INPUT_CONFIG_PATH + AGENT_MODE=flow; grafana-agent convert --source-format=prometheus --output=OUTPUT_CONFIG_PATH INPUT_CONFIG_PATH ``` Replace the following: @@ -71,13 +71,13 @@ additional features available in Grafana Agent flow mode. {{% admonition type="caution" %}}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.{{% /admonition %}} ```bash - grafana-agent convert --format=prometheus --bypass-errors --output=OUTPUT_CONFIG_PATH INPUT_CONFIG_PATH + AGENT_MODE=flow; grafana-agent convert --source-format=prometheus --bypass-errors --output=OUTPUT_CONFIG_PATH INPUT_CONFIG_PATH ``` 1. You can also output a diagnostic report by including the `--report` flag. ```bash - grafana-agent convert --format=prometheus --report=OUTPUT_REPORT_PATH --output=OUTPUT_CONFIG_PATH INPUT_CONFIG_PATH + AGENT_MODE=flow; grafana-agent convert --source-format=prometheus --report=OUTPUT_REPORT_PATH --output=OUTPUT_CONFIG_PATH INPUT_CONFIG_PATH ``` * Replace `OUTPUT_REPORT_PATH` with the output path for the report. @@ -147,7 +147,7 @@ remote_write: The convert command takes the YAML file as input and outputs a River file. ```bash -grafana-agent convert --format=prometheus --output=OUTPUT_CONFIG_PATH INPUT_CONFIG_PATH +AGENT_MODE=flow; grafana-agent convert --source-format=prometheus --output=OUTPUT_CONFIG_PATH INPUT_CONFIG_PATH ``` The new flow configuration file looks like this: