Skip to content

Commit

Permalink
include environment var AGENT_MODE in migration docs (#4588)
Browse files Browse the repository at this point in the history
* include environment var AGENT_MODE in migration docs

Signed-off-by: erikbaranowski <[email protected]>

* fix typo in command examples

Signed-off-by: erikbaranowski <[email protected]>

---------

Signed-off-by: erikbaranowski <[email protected]>
  • Loading branch information
erikbaranowski authored Jul 25, 2023
1 parent 0bea143 commit 74f539b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 74f539b

Please sign in to comment.