From c903505002bd04d05793b9104ab7b6391b089578 Mon Sep 17 00:00:00 2001 From: Piotr <17101802+thampiotr@users.noreply.github.com> Date: Thu, 4 Jan 2024 09:44:39 +0100 Subject: [PATCH] Move "configuration language" section to "concepts" (#6033) * Move 'configuration language' section to 'concepts' * fix relative aliases * add aliases of the deleted page * add missing alias --- docs/sources/flow/_index.md | 2 - .../flow/concepts/config-language/_index.md | 147 ++++++++++++++++++ .../config-language/components.md | 14 +- .../config-language/expressions/_index.md | 22 ++- .../expressions/function_calls.md | 10 +- .../config-language/expressions/operators.md | 10 +- .../expressions/referencing_exports.md | 14 +- .../expressions/types_and_values.md | 12 +- .../{ => concepts}/config-language/files.md | 10 +- .../{ => concepts}/config-language/syntax.md | 18 ++- .../flow/concepts/configuration_language.md | 96 ------------ docs/sources/flow/config-language/_index.md | 79 ---------- .../collect-prometheus-metrics.md | 4 +- .../migrating-from-prometheus.md | 4 +- .../migrating-from-promtail.md | 4 +- .../getting-started/migrating-from-static.md | 4 +- docs/sources/flow/monitoring/debugging.md | 4 +- .../flow/reference/compatibility/_index.md | 10 +- .../flow/reference/components/local.file.md | 2 +- .../flow/reference/components/module.file.md | 2 +- .../flow/reference/components/module.http.md | 2 +- .../components/otelcol.processor.filter.md | 2 +- .../components/otelcol.processor.transform.md | 8 +- .../flow/reference/components/remote.http.md | 2 +- .../flow/reference/components/remote.s3.md | 2 +- .../flow/reference/stdlib/nonsensitive.md | 2 +- .../collecting-prometheus-metrics.md | 4 +- 27 files changed, 254 insertions(+), 236 deletions(-) create mode 100644 docs/sources/flow/concepts/config-language/_index.md rename docs/sources/flow/{ => concepts}/config-language/components.md (82%) rename docs/sources/flow/{ => concepts}/config-language/expressions/_index.md (51%) rename docs/sources/flow/{ => concepts}/config-language/expressions/function_calls.md (63%) rename docs/sources/flow/{ => concepts}/config-language/expressions/operators.md (84%) rename docs/sources/flow/{ => concepts}/config-language/expressions/referencing_exports.md (68%) rename docs/sources/flow/{ => concepts}/config-language/expressions/types_and_values.md (90%) rename docs/sources/flow/{ => concepts}/config-language/files.md (53%) rename docs/sources/flow/{ => concepts}/config-language/syntax.md (81%) delete mode 100644 docs/sources/flow/concepts/configuration_language.md delete mode 100644 docs/sources/flow/config-language/_index.md diff --git a/docs/sources/flow/_index.md b/docs/sources/flow/_index.md index 37fbf743da99..7458fd016b03 100644 --- a/docs/sources/flow/_index.md +++ b/docs/sources/flow/_index.md @@ -82,7 +82,6 @@ This feature is experimental, and it doesn't support all River components. * Learn about the core [Concepts][] of {{< param "PRODUCT_NAME" >}}. * Follow our [Getting started][] guides for {{< param "PRODUCT_NAME" >}}. * Follow our [Tutorials][] to get started with {{< param "PRODUCT_NAME" >}}. -* Learn how to use the [Configuration language][]. * Check out our [Reference][] documentation to find specific information you might be looking for. @@ -90,6 +89,5 @@ This feature is experimental, and it doesn't support all River components. [Concepts]: {{< relref "./concepts/" >}} [Getting started]: {{< relref "./getting-started/" >}} [Tutorials]: {{< relref "./tutorials/ ">}} -[Configuration language]: {{< relref "./config-language/" >}} [Reference]: {{< relref "./reference" >}} diff --git a/docs/sources/flow/concepts/config-language/_index.md b/docs/sources/flow/concepts/config-language/_index.md new file mode 100644 index 000000000000..80699732f3ac --- /dev/null +++ b/docs/sources/flow/concepts/config-language/_index.md @@ -0,0 +1,147 @@ +--- +aliases: +- /docs/grafana-cloud/agent/flow/concepts/config-language/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/config-language/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/config-language/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/ +- configuration-language/ # /docs/agent/latest/flow/concepts/configuration-language/ +# Previous page aliases for backwards compatibility: +- /docs/grafana-cloud/agent/flow/config-language/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/ +- /docs/grafana-cloud/send-data/agent/flow/config-language/ +- ../configuration-language/ # /docs/agent/latest/flow/configuration-language/ +- ../concepts/configuration_language/ # /docs/agent/latest/flow/concepts/configuration_language/ +- /docs/grafana-cloud/agent/flow/concepts/configuration_language/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/configuration_language/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/configuration_language/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/configuration_language/ +canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/ +description: Learn about the configuration language +title: Configuration language +weight: 10 +--- + +# Configuration language + +{{< param "PRODUCT_NAME" >}} dynamically configures and connects components with a custom configuration language called River. + +River aims to reduce errors in configuration files by making configurations easier to read and write. +River configurations use blocks that can be easily copied and pasted from the documentation to help you get started as quickly as possible. + +A River configuration file tells {{< param "PRODUCT_NAME" >}} which components to launch and how to bind them together into a pipeline. + +The River syntax uses blocks, attributes, and expressions. + +```river +// Create a local.file component labeled my_file. +// This can be referenced by other components as local.file.my_file. +local.file "my_file" { + filename = "/tmp/my-file.txt" +} + +// Pattern for creating a labeled block, which the above block follows: +BLOCK_NAME "BLOCK_LABEL" { + // Block body + IDENTIFIER = EXPRESSION // Attribute +} + +// Pattern for creating an unlabeled block: +BLOCK_NAME { + // Block body + IDENTIFIER = EXPRESSION // Attribute +} +``` + +[River is designed][RFC] with the following requirements in mind: + +* _Fast_: The configuration language must be fast so the component controller can quickly evaluate changes. +* _Simple_: The configuration language must be easy to read and write to minimize the learning curve. +* _Debuggable_: The configuration language must give detailed information when there's a mistake in the configuration file. + +River is similar to HCL, the language Terraform and other Hashicorp projects use. +It's a distinct language with custom syntax and features, such as first-class functions. + +* Blocks are a group of related settings and usually represent creating a component. + Blocks have a name that consists of zero or more identifiers separated by `.`, an optional user label, and a body containing attributes and nested blocks. +* Attributes appear within blocks and assign a value to a name. +* Expressions represent a value, either literally or by referencing and combining other values. + You use expressions to compute a value for an attribute. + +River is declarative, so ordering components, blocks, and attributes within a block isn't significant. +The relationship between components determines the order of operations. + +## Attributes + +You use _Attributes_ to configure individual settings. +Attributes always take the form of `ATTRIBUTE_NAME = ATTRIBUTE_VALUE`. + +The following example shows how to set the `log_level` attribute to `"debug"`. + +```river +log_level = "debug" +``` + +## Expressions + +You use expressions to compute the value of an attribute. +The simplest expressions are constant values like `"debug"`, `32`, or `[1, 2, 3, 4]`. +River supports complex expressions, for example: + +* Referencing the exports of components: `local.file.password_file.content` +* Mathematical operations: `1 + 2`, `3 * 4`, `(5 * 6) + (7 + 8)` +* Equality checks: `local.file.file_a.content == local.file.file_b.content` +* Calling functions from River's standard library: `env("HOME")` retrieves the value of the `HOME` environment variable. + +You can use expressions for any attribute inside a component definition. + +### Referencing component exports + +The most common expression is to reference the exports of a component, for example, `local.file.password_file.content`. +You form a reference to a component's exports by merging the component's name (for example, `local.file`), +label (for example, `password_file`), and export name (for example, `content`), delimited by a period. + +## Blocks + +You use _Blocks_ to configure components and groups of attributes. +Each block can contain any number of attributes or nested blocks. + +```river +prometheus.remote_write "default" { + endpoint { + url = "http://localhost:9009/api/prom/push" + } +} +``` + +The preceding example has two blocks: + +* `prometheus.remote_write "default"`: A labeled block which instantiates a `prometheus.remote_write` component. + The label is the string `"default"`. +* `endpoint`: An unlabeled block inside the component that configures an endpoint to send metrics to. + This block sets the `url` attribute to specify the endpoint. + + +## Tooling + +You can use one or all of the following tools to help you write configuration files in River. + +* Experimental editor support for + * [vim](https://github.com/rfratto/vim-river) + * [VSCode](https://github.com/rfratto/vscode-river) + * [river-mode](https://github.com/jdbaldry/river-mode) for Emacs +* Code formatting using the [`agent fmt` command][fmt] + +You can also start developing your own tooling using the {{< param "PRODUCT_ROOT_NAME" >}} repository as a go package or use the +[tree-sitter grammar][] with other programming languages. + +[RFC]: https://github.com/grafana/agent/blob/97a55d0d908b26dbb1126cc08b6dcc18f6e30087/docs/rfcs/0005-river.md +[vim]: https://github.com/rfratto/vim-river +[VSCode]: https://github.com/rfratto/vscode-river +[river-mode]: https://github.com/jdbaldry/river-mode +[tree-sitter grammar]: https://github.com/grafana/tree-sitter-river + +{{% docs/reference %}} +[fmt]: "/docs/agent/ -> /docs/agent//flow/reference/cli/fmt" +[fmt]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/fmt" +{{% /docs/reference %}} \ No newline at end of file diff --git a/docs/sources/flow/config-language/components.md b/docs/sources/flow/concepts/config-language/components.md similarity index 82% rename from docs/sources/flow/config-language/components.md rename to docs/sources/flow/concepts/config-language/components.md index 3939363ba7a5..967d2437da8c 100644 --- a/docs/sources/flow/config-language/components.md +++ b/docs/sources/flow/concepts/config-language/components.md @@ -1,11 +1,17 @@ --- aliases: -- ../configuration-language/components/ +- ../configuration-language/components/ # /docs/agent/latest/flow/concepts/configuration-language/components/ +- /docs/grafana-cloud/agent/flow/concepts/config-language/components/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/config-language/components/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/config-language/components/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/components/ +# Previous page aliases for backwards compatibility: +- ../../configuration-language/components/ # /docs/agent/latest/flow/configuration-language/components/ - /docs/grafana-cloud/agent/flow/config-language/components/ - /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/components/ - /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/components/ - /docs/grafana-cloud/send-data/agent/flow/config-language/components/ -canonical: https://grafana.com/docs/agent/latest/flow/config-language/components/ +canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/components/ description: Learn about the components configuration language title: Components configuration language weight: 300 @@ -93,6 +99,6 @@ The value is type-checked and substituted into `prometheus.scrape.default`, wher [components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components" [controller]: "/docs/agent/ -> /docs/agent//flow/concepts/component_controller" [controller]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/component_controller" -[type]: "/docs/agent/ -> /docs/agent//flow/config-language/expressions/types_and_values" -[type]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/types_and_values" +[type]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/expressions/types_and_values" +[type]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values" {{% /docs/reference %}} \ No newline at end of file diff --git a/docs/sources/flow/config-language/expressions/_index.md b/docs/sources/flow/concepts/config-language/expressions/_index.md similarity index 51% rename from docs/sources/flow/config-language/expressions/_index.md rename to docs/sources/flow/concepts/config-language/expressions/_index.md index 991e7c163a20..56dc4c1ee4a1 100644 --- a/docs/sources/flow/config-language/expressions/_index.md +++ b/docs/sources/flow/concepts/config-language/expressions/_index.md @@ -1,11 +1,17 @@ --- aliases: -- ../configuration-language/expressions/ +- ../configuration-language/expressions/ # /docs/agent/latest/flow/concepts/configuration-language/expressions/ +- /docs/grafana-cloud/agent/flow/concepts/config-language/expressions/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/config-language/expressions/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/config-language/expressions/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/ +# Previous page aliases for backwards compatibility: +- ../../configuration-language/expressions/ # /docs/agent/latest/flow/configuration-language/expressions/ - /docs/grafana-cloud/agent/flow/config-language/expressions/ - /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/expressions/ - /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/expressions/ - /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/ -canonical: https://grafana.com/docs/agent/latest/flow/config-language/expressions/ +canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/expressions/ description: Learn about expressions title: Expressions weight: 400 @@ -23,10 +29,10 @@ All component arguments have an underlying [type][]. River checks the expression type before assigning the result to an attribute. {{% docs/reference %}} -[refer to values]: "/docs/agent/ -> /docs/agent//flow/config-language/expressions/referencing_exports" -[refer to values]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/referencing_exports" -[call functions]: "/docs/agent/ -> /docs/agent//flow/config-language/expressions/function_calls" -[call functions]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/function_calls" -[type]: "/docs/agent/ -> /docs/agent//flow/config-language/expressions/types_and_values" -[type]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/types_and_values" +[refer to values]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/expressions/referencing_exports" +[refer to values]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/referencing_exports" +[call functions]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/expressions/function_calls" +[call functions]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/function_calls" +[type]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/expressions/types_and_values" +[type]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values" {{% /docs/reference %}} diff --git a/docs/sources/flow/config-language/expressions/function_calls.md b/docs/sources/flow/concepts/config-language/expressions/function_calls.md similarity index 63% rename from docs/sources/flow/config-language/expressions/function_calls.md rename to docs/sources/flow/concepts/config-language/expressions/function_calls.md index 2b773138cf71..b9598fea91a1 100644 --- a/docs/sources/flow/config-language/expressions/function_calls.md +++ b/docs/sources/flow/concepts/config-language/expressions/function_calls.md @@ -1,11 +1,17 @@ --- aliases: -- ../../configuration-language/expressions/function-calls/ +- ../../configuration-language/expressions/function-calls/ # /docs/agent/latest/flow/concepts/configuration-language/expressions/function-calls/ +- /docs/grafana-cloud/agent/flow/concepts/config-language/expressions/function_calls/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/config-language/expressions/function_calls/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/config-language/expressions/function_calls/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/function_calls/ +# Previous page aliases for backwards compatibility: +- ../../../configuration-language/expressions/function-calls/ # /docs/agent/latest/flow/configuration-language/expressions/function-calls/ - /docs/grafana-cloud/agent/flow/config-language/expressions/function_calls/ - /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/expressions/function_calls/ - /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/expressions/function_calls/ - /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/function_calls/ -canonical: https://grafana.com/docs/agent/latest/flow/config-language/expressions/function_calls/ +canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/expressions/function_calls/ description: Learn about function calls title: Function calls weight: 400 diff --git a/docs/sources/flow/config-language/expressions/operators.md b/docs/sources/flow/concepts/config-language/expressions/operators.md similarity index 84% rename from docs/sources/flow/config-language/expressions/operators.md rename to docs/sources/flow/concepts/config-language/expressions/operators.md index 309afb78ddc5..19bb003f74f3 100644 --- a/docs/sources/flow/config-language/expressions/operators.md +++ b/docs/sources/flow/concepts/config-language/expressions/operators.md @@ -1,11 +1,17 @@ --- aliases: -- ../../configuration-language/expressions/operators/ +- ../../configuration-language/expressions/operators/ # /docs/agent/latest/flow/concepts/configuration-language/expressions/operators/ +- /docs/grafana-cloud/agent/flow/concepts/config-language/expressions/operators/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/config-language/expressions/operators/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/config-language/expressions/operators/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/operators/ +# Previous page aliases for backwards compatibility: +- ../../../configuration-language/expressions/operators/ # /docs/agent/latest/flow/configuration-language/expressions/operators/ - /docs/grafana-cloud/agent/flow/config-language/expressions/operators/ - /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/expressions/operators/ - /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/expressions/operators/ - /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/operators/ -canonical: https://grafana.com/docs/agent/latest/flow/config-language/expressions/operators/ +canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/expressions/operators/ description: Learn about operators title: Operators weight: 300 diff --git a/docs/sources/flow/config-language/expressions/referencing_exports.md b/docs/sources/flow/concepts/config-language/expressions/referencing_exports.md similarity index 68% rename from docs/sources/flow/config-language/expressions/referencing_exports.md rename to docs/sources/flow/concepts/config-language/expressions/referencing_exports.md index 5923d6bd89c0..2cc7a8ca5b21 100644 --- a/docs/sources/flow/config-language/expressions/referencing_exports.md +++ b/docs/sources/flow/concepts/config-language/expressions/referencing_exports.md @@ -1,11 +1,17 @@ --- aliases: -- ../../configuration-language/expressions/referencing-exports/ +- ../../configuration-language/expressions/referencing-exports/ # /docs/agent/latest/flow/concepts/configuration-language/expressions/referencing-exports/ +- /docs/grafana-cloud/agent/flow/concepts/config-language/expressions/referencing_exports/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/config-language/expressions/referencing_exports/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/config-language/expressions/referencing_exports/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/referencing_exports/ +# Previous page aliases for backwards compatibility: +- ../../../configuration-language/expressions/referencing-exports/ # /docs/agent/latest/flow/configuration-language/expressions/referencing-exports/ - /docs/grafana-cloud/agent/flow/config-language/expressions/referencing_exports/ - /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/expressions/referencing_exports/ - /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/expressions/referencing_exports/ - /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/referencing_exports/ -canonical: https://grafana.com/docs/agent/latest/flow/config-language/expressions/referencing_exports/ +canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/expressions/referencing_exports/ description: Learn about referencing component exports title: Referencing component exports weight: 200 @@ -55,6 +61,6 @@ While you can only configure attributes using the basic River types, the exports of components can take on special internal River types, such as Secrets or Capsules, which expose different functionality. {{% docs/reference %}} -[type]: "/docs/agent/ -> /docs/agent//flow/config-language/expressions/types_and_values" -[type]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/types_and_values" +[type]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/expressions/types_and_values" +[type]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values" {{% /docs/reference %}} \ No newline at end of file diff --git a/docs/sources/flow/config-language/expressions/types_and_values.md b/docs/sources/flow/concepts/config-language/expressions/types_and_values.md similarity index 90% rename from docs/sources/flow/config-language/expressions/types_and_values.md rename to docs/sources/flow/concepts/config-language/expressions/types_and_values.md index 9a641c34d286..1f27c0b5ecac 100644 --- a/docs/sources/flow/config-language/expressions/types_and_values.md +++ b/docs/sources/flow/concepts/config-language/expressions/types_and_values.md @@ -1,11 +1,17 @@ --- aliases: -- ../../configuration-language/expressions/types-and-values/ +- ../../configuration-language/expressions/types-and-values/ # /docs/agent/latest/flow/concepts/configuration-language/expressions/types-and-values/ +- /docs/grafana-cloud/agent/flow/concepts/config-language/expressions/types_and_values/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/config-language/expressions/types_and_values/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/config-language/expressions/types_and_values/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values/ +# Previous page aliases for backwards compatibility: +- ../../../configuration-language/expressions/types-and-values/ # /docs/agent/latest/flow/configuration-language/expressions/types-and-values/ - /docs/grafana-cloud/agent/flow/config-language/expressions/types_and_values/ - /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/expressions/types_and_values/ - /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/expressions/types_and_values/ - /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/types_and_values/ -canonical: https://grafana.com/docs/agent/latest/flow/config-language/expressions/types_and_values/ +canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/expressions/types_and_values/ description: Learn about the River types and values title: Types and values weight: 100 @@ -161,7 +167,7 @@ If the key isn't a valid identifier, you must wrap it in double quotes like a st } ``` -{{% admonition type="Note" %}} +{{% admonition type="note" %}} Don't confuse objects with blocks. * An _object_ is a value assigned to an [Attribute][]. You **must** use commas between key-value pairs on separate lines. diff --git a/docs/sources/flow/config-language/files.md b/docs/sources/flow/concepts/config-language/files.md similarity index 53% rename from docs/sources/flow/config-language/files.md rename to docs/sources/flow/concepts/config-language/files.md index 2b5e12f7b6e1..bd5565635fe7 100644 --- a/docs/sources/flow/config-language/files.md +++ b/docs/sources/flow/concepts/config-language/files.md @@ -1,11 +1,17 @@ --- aliases: -- ../configuration-language/files/ +- ../configuration-language/files/ # /docs/agent/latest/flow/concepts/configuration-language/files/ +- /docs/grafana-cloud/agent/flow/concepts/config-language/files/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/config-language/files/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/config-language/files/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/files/ +# Previous page aliases for backwards compatibility: +- ../../configuration-language/files/ # /docs/agent/latest/flow/configuration-language/files/ - /docs/grafana-cloud/agent/flow/config-language/files/ - /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/files/ - /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/files/ - /docs/grafana-cloud/send-data/agent/flow/config-language/files/ -canonical: https://grafana.com/docs/agent/latest/flow/config-language/files/ +canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/files/ description: Learn about River files title: Files weight: 100 diff --git a/docs/sources/flow/config-language/syntax.md b/docs/sources/flow/concepts/config-language/syntax.md similarity index 81% rename from docs/sources/flow/config-language/syntax.md rename to docs/sources/flow/concepts/config-language/syntax.md index e085ca967007..6f55701dab67 100644 --- a/docs/sources/flow/config-language/syntax.md +++ b/docs/sources/flow/concepts/config-language/syntax.md @@ -1,11 +1,17 @@ --- aliases: -- ../configuration-language/syntax/ +- ../configuration-language/syntax/ # /docs/agent/latest/flow/concepts/configuration-language/syntax/ +- /docs/grafana-cloud/agent/flow/concepts/config-language/syntax/ +- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/config-language/syntax/ +- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/config-language/syntax/ +- /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/syntax/ +# Previous page aliases for backwards compatibility: +- ../../configuration-language/syntax/ # /docs/agent/latest/flow/configuration-language/syntax/ - /docs/grafana-cloud/agent/flow/config-language/syntax/ - /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/syntax/ - /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/syntax/ - /docs/grafana-cloud/send-data/agent/flow/config-language/syntax/ -canonical: https://grafana.com/docs/agent/latest/flow/config-language/syntax/ +canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/syntax/ description: Learn about the River syntax title: Syntax weight: 200 @@ -112,8 +118,8 @@ River ignores other newlines and you can can enter as many newlines as you want. [identifier]: #identifiers {{% docs/reference %}} -[expression]: "/docs/agent/ -> /docs/agent//flow/config-language/expressions" -[expression]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/expressions" -[type]: "/docs/agent/ -> /docs/agent//flow/config-language/expressions/types_and_values" -[type]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/types_and_values" +[expression]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/expressions" +[expression]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions" +[type]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/expressions/types_and_values" +[type]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values" {{% /docs/reference %}} \ No newline at end of file diff --git a/docs/sources/flow/concepts/configuration_language.md b/docs/sources/flow/concepts/configuration_language.md deleted file mode 100644 index 69b1a7357e71..000000000000 --- a/docs/sources/flow/concepts/configuration_language.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -aliases: -- ../../concepts/configuration-language/ -- /docs/grafana-cloud/agent/flow/concepts/configuration_language/ -- /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/configuration_language/ -- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/configuration_language/ -- /docs/grafana-cloud/send-data/agent/flow/concepts/configuration_language/ -canonical: https://grafana.com/docs/agent/latest/flow/concepts/configuration_language/ -description: Learn about configuration language concepts -title: Configuration language concepts -weight: 400 ---- - -# Configuration language concepts - -The {{< param "PRODUCT_NAME" >}} _configuration language_, River, refers to the language used in configuration files that define and configure components to run. - -```river -prometheus.scrape "default" { - targets = [{ - "__address__" = "demo.robustperception.io:9090", - }] - forward_to = [prometheus.remote_write.default.receiver] -} - -prometheus.remote_write "default" { - endpoint { - url = "http://localhost:9009/api/prom/push" - } -} -``` - -River is designed with the following requirements in mind: - -* _Fast_: The configuration language must be fast so the component controller can quickly evaluate changes. -* _Simple_: The configuration language must be easy to read and write to minimize the learning curve. -* _Debuggable_: The configuration language must give detailed information when there's a mistake in the configuration file. - -## Attributes - -You use _Attributes_ to configure individual settings. -Attributes always take the form of `ATTRIBUTE_NAME = ATTRIBUTE_VALUE`. - -The following example shows how to set the `log_level` attribute to `"debug"`. - -```river -log_level = "debug" -``` - -## Expressions - -You use expressions to compute the value of an attribute. -The simplest expressions are constant values like `"debug"`, `32`, or `[1, 2, 3, 4]`. -River supports complex expressions, for example: - -* Referencing the exports of components: `local.file.password_file.content` -* Mathematical operations: `1 + 2`, `3 * 4`, `(5 * 6) + (7 + 8)` -* Equality checks: `local.file.file_a.content == local.file.file_b.content` -* Calling functions from River's standard library: `env("HOME")` retrieves the value of the `HOME` environment variable. - -You can use expressions for any attribute inside a component definition. - -### Referencing component exports - -The most common expression is to reference the exports of a component, for example, `local.file.password_file.content`. -You form a reference to a component's exports by merging the component's name (for example, `local.file`), -label (for example, `password_file`), and export name (for example, `content`), delimited by a period. - -## Blocks - -You use _Blocks_ to configure components and groups of attributes. -Each block can contain any number of attributes or nested blocks. - -```river -prometheus.remote_write "default" { - endpoint { - url = "http://localhost:9009/api/prom/push" - } -} -``` - -The preceding example has two blocks: - -* `prometheus.remote_write "default"`: A labeled block which instantiates a `prometheus.remote_write` component. - The label is the string `"default"`. -* `endpoint`: An unlabeled block inside the component that configures an endpoint to send metrics to. - This block sets the `url` attribute to specify the endpoint. - -## More information - -Refer to [Configuration language][config-docs] for more information about River. - -{{% docs/reference %}} -[config-docs]: "/docs/agent/ -> /docs/agent//flow/config-language" -[config-docs]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language" -{{% /docs/reference %}} diff --git a/docs/sources/flow/config-language/_index.md b/docs/sources/flow/config-language/_index.md deleted file mode 100644 index 2ed7afb8b284..000000000000 --- a/docs/sources/flow/config-language/_index.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -aliases: -- /docs/grafana-cloud/agent/flow/config-language/ -- /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/ -- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/config-language/ -- /docs/grafana-cloud/send-data/agent/flow/config-language/ -- configuration-language/ -canonical: https://grafana.com/docs/agent/latest/flow/config-language/ -description: Learn about the configuration language -title: Configuration language -weight: 400 ---- - -# Configuration language - -{{< param "PRODUCT_NAME" >}} dynamically configures and connects components with a custom configuration language called River. - -River aims to reduce errors in configuration files by making configurations easier to read and write. -River configurations use blocks that can be easily copied and pasted from the documentation to help you get started as quickly as possible. - -A River configuration file tells {{< param "PRODUCT_NAME" >}} which components to launch and how to bind them together into a pipeline. - -The River syntax uses blocks, attributes, and expressions. - -```river -// Create a local.file component labeled my_file. -// This can be referenced by other components as local.file.my_file. -local.file "my_file" { - filename = "/tmp/my-file.txt" -} - -// Pattern for creating a labeled block, which the above block follows: -BLOCK_NAME "BLOCK_LABEL" { - // Block body - IDENTIFIER = EXPRESSION // Attribute -} - -// Pattern for creating an unlabeled block: -BLOCK_NAME { - // Block body - IDENTIFIER = EXPRESSION // Attribute -} -``` - -[River][RFC] is similar to HCL, the language Terraform and other Hashicorp projects use. -It's a distinct language with custom syntax and features, such as first-class functions. - -* Blocks are a group of related settings and usually represent creating a component. - Blocks have a name that consists of zero or more identifiers separated by `.`, an optional user label, and a body containing attributes and nested blocks. -* Attributes appear within blocks and assign a value to a name. -* Expressions represent a value, either literally or by referencing and combining other values. - You use expressions to compute a value for an attribute. - -River is declarative, so ordering components, blocks, and attributes within a block isn't significant. -The relationship between components determines the order of operations. - -## Tooling - -You can use one or all of the following tools to help you write configuration files in River. - -* Experimental editor support for - * [vim](https://github.com/rfratto/vim-river) - * [VSCode](https://github.com/rfratto/vscode-river) - * [river-mode](https://github.com/jdbaldry/river-mode) for Emacs -* Code formatting using the [`agent fmt` command][fmt] - -You can also start developing your own tooling using the {{< param "PRODUCT_ROOT_NAME" >}} repository as a go package or use the -[tree-sitter grammar][] with other programming languages. - -[RFC]: https://github.com/grafana/agent/blob/97a55d0d908b26dbb1126cc08b6dcc18f6e30087/docs/rfcs/0005-river.md -[vim]: https://github.com/rfratto/vim-river -[VSCode]: https://github.com/rfratto/vscode-river -[river-mode]: https://github.com/jdbaldry/river-mode -[tree-sitter grammar]: https://github.com/grafana/tree-sitter-river - -{{% docs/reference %}} -[fmt]: "/docs/agent/ -> /docs/agent//flow/reference/cli/fmt" -[fmt]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/fmt" -{{% /docs/reference %}} \ No newline at end of file diff --git a/docs/sources/flow/getting-started/collect-prometheus-metrics.md b/docs/sources/flow/getting-started/collect-prometheus-metrics.md index cbd7eb271318..be6d2ce71e01 100644 --- a/docs/sources/flow/getting-started/collect-prometheus-metrics.md +++ b/docs/sources/flow/getting-started/collect-prometheus-metrics.md @@ -440,6 +440,6 @@ prometheus.remote_write "default" { [prometheus.scrape]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.scrape.md" [Components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" [Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components.md" -[Objects]: "/docs/agent/ -> /docs/agent//flow/config-language/expressions/types_and_values.md#objects" -[Objects]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/types_and_values.md#objects" +[Objects]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/expressions/types_and_values.md#objects" +[Objects]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values.md#objects" {{% /docs/reference %}} diff --git a/docs/sources/flow/getting-started/migrating-from-prometheus.md b/docs/sources/flow/getting-started/migrating-from-prometheus.md index a05f709d66f3..8d77d6914340 100644 --- a/docs/sources/flow/getting-started/migrating-from-prometheus.md +++ b/docs/sources/flow/getting-started/migrating-from-prometheus.md @@ -254,8 +254,8 @@ The following list is specific to the convert command and not {{< param "PRODUCT [Start]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/setup/start-agent.md" [DebuggingUI]: "/docs/agent/ -> /docs/agent//flow/monitoring/debugging.md" [DebuggingUI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/monitoring/debugging.md" -[River]: "/docs/agent/ -> /docs/agent//flow/config-language/_index.md" -[River]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/_index.md" +[River]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/_index.md" +[River]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/_index.md" [UI]: "/docs/agent/ -> /docs/agent//flow/monitoring/debugging#grafana-agent-flow-ui" [UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/monitoring/debugging#grafana-agent-flow-ui" {{% /docs/reference %}} diff --git a/docs/sources/flow/getting-started/migrating-from-promtail.md b/docs/sources/flow/getting-started/migrating-from-promtail.md index a82b27666128..4799e0e20b5f 100644 --- a/docs/sources/flow/getting-started/migrating-from-promtail.md +++ b/docs/sources/flow/getting-started/migrating-from-promtail.md @@ -237,8 +237,8 @@ The following list is specific to the convert command and not {{< param "PRODUCT [Start]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/setup/start-agent.md" [DebuggingUI]: "/docs/agent/ -> /docs/agent//flow/monitoring/debugging.md" [DebuggingUI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/monitoring/debugging.md" -[River]: "/docs/agent/ -> /docs/agent//flow/config-language/_index.md" -[River]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/_index.md" +[River]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/_index.md" +[River]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/_index.md" [UI]: "/docs/agent/ -> /docs/agent//flow/monitoring/debugging#grafana-agent-flow-ui" [UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/monitoring/debugging#grafana-agent-flow-ui" {{% /docs/reference %}} diff --git a/docs/sources/flow/getting-started/migrating-from-static.md b/docs/sources/flow/getting-started/migrating-from-static.md index 8c2a3ff88b22..8b7b1f98721e 100644 --- a/docs/sources/flow/getting-started/migrating-from-static.md +++ b/docs/sources/flow/getting-started/migrating-from-static.md @@ -372,8 +372,8 @@ The following list is specific to the convert command and not {{< param "PRODUCT [Start]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/setup/start-agent.md" [DebuggingUI]: "/docs/agent/ -> /docs/agent//flow/monitoring/debugging.md" [DebuggingUI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/monitoring/debugging.md" -[River]: "/docs/agent/ -> /docs/agent//flow/config-language/" -[River]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/" +[River]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/" +[River]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/" [Integrations next]: "/docs/agent/ -> /docs/agent//static/configuration/integrations/integrations-next/_index.md" [Integrations next]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/configuration/traces-config.md [Traces]: "/docs/agent/ -> /docs/agent//static/configuration/traces-config.md" diff --git a/docs/sources/flow/monitoring/debugging.md b/docs/sources/flow/monitoring/debugging.md index 98bbda9cee7e..a3d148e52487 100644 --- a/docs/sources/flow/monitoring/debugging.md +++ b/docs/sources/flow/monitoring/debugging.md @@ -113,8 +113,8 @@ To debug issues when using [clustering][], check for the following symptoms. [clustering]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/clustering.md" [install]: "/docs/agent/ -> /docs/agent//flow/setup/install" [install]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/setup/install" -[secret]: "/docs/agent/ -> /docs/agent//flow/config-language/expressions/types_and_values.md#secrets.md" -[secret]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/config-language/expressions/types_and_values.md#secrets.md" +[secret]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/expressions/types_and_values.md#secrets.md" +[secret]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values.md#secrets.md" [grafana-agent run]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md" [grafana-agent run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/run.md" {{% /docs/reference %}} diff --git a/docs/sources/flow/reference/compatibility/_index.md b/docs/sources/flow/reference/compatibility/_index.md index c619c974a4c3..9e225aa74b71 100644 --- a/docs/sources/flow/reference/compatibility/_index.md +++ b/docs/sources/flow/reference/compatibility/_index.md @@ -32,7 +32,7 @@ that can export or consume it. ## Targets -Targets are a `list(map(string))` - a [list]({{< relref "../../config-language/expressions/types_and_values/#naming-convention" >}}) of [maps]({{< relref "../../config-language/expressions/types_and_values/#naming-convention" >}}) with [string]({{< relref "../../config-language/expressions/types_and_values/#strings" >}}) values. +Targets are a `list(map(string))` - a [list]({{< relref "../../concepts/config-language/expressions/types_and_values/#naming-convention" >}}) of [maps]({{< relref "../../concepts/config-language/expressions/types_and_values/#naming-convention" >}}) with [string]({{< relref "../../concepts/config-language/expressions/types_and_values/#strings" >}}) values. They can contain different key-value pairs, and you can use them with a wide range of components. Some components require Targets to contain specific key-value pairs to work correctly. It is recommended to always check component references for @@ -152,7 +152,7 @@ The following components, grouped by namespace, _consume_ Targets. ## Prometheus `MetricsReceiver` The Prometheus metrics are sent between components using `MetricsReceiver`s. -`MetricsReceiver`s are [capsules]({{< relref "../../config-language/expressions/types_and_values/#capsules" >}}) +`MetricsReceiver`s are [capsules]({{< relref "../../concepts/config-language/expressions/types_and_values/#capsules" >}}) that are exported by components that can receive Prometheus metrics. Components that can consume Prometheus metrics can be passed the `MetricsReceiver` as an argument. Use the following components to build your Prometheus metrics pipeline: @@ -200,7 +200,7 @@ The following components, grouped by namespace, _consume_ Prometheus `MetricsRec ## Loki `LogsReceiver` -`LogsReceiver` is a [capsule]({{< relref "../../config-language/expressions/types_and_values/#capsules" >}}) +`LogsReceiver` is a [capsule]({{< relref "../../concepts/config-language/expressions/types_and_values/#capsules" >}}) that is exported by components that can receive Loki logs. Components that consume `LogsReceiver` as an argument typically send logs to it. Use the following components to build your Loki logs pipeline: @@ -265,7 +265,7 @@ The following components, grouped by namespace, _consume_ Loki `LogsReceiver`. ## OpenTelemetry `otelcol.Consumer` The OpenTelemetry data is sent between components using `otelcol.Consumer`s. -`otelcol.Consumer`s are [capsules]({{< relref "../../config-language/expressions/types_and_values/#capsules" >}}) +`otelcol.Consumer`s are [capsules]({{< relref "../../concepts/config-language/expressions/types_and_values/#capsules" >}}) that are exported by components that can receive OpenTelemetry data. Components that can consume OpenTelemetry data can be passed the `otelcol.Consumer` as an argument. Note that some components that use `otelcol.Consumer` only support a subset of telemetry signals, for example, only traces. Check the component @@ -342,7 +342,7 @@ The following components, grouped by namespace, _consume_ OpenTelemetry `otelcol ## Pyroscope `ProfilesReceiver` The Pyroscope profiles are sent between components using `ProfilesReceiver`s. -`ProfilesReceiver`s are [capsules]({{< relref "../../config-language/expressions/types_and_values/#capsules" >}}) +`ProfilesReceiver`s are [capsules]({{< relref "../../concepts/config-language/expressions/types_and_values/#capsules" >}}) that are exported by components that can receive Pyroscope profiles. Components that can consume Pyroscope profiles can be passed the `ProfilesReceiver` as an argument. Use the following components to build your Pyroscope profiles pipeline: diff --git a/docs/sources/flow/reference/components/local.file.md b/docs/sources/flow/reference/components/local.file.md index 63c44912686b..5e935a0bbbf5 100644 --- a/docs/sources/flow/reference/components/local.file.md +++ b/docs/sources/flow/reference/components/local.file.md @@ -39,7 +39,7 @@ Name | Type | Description | Default | Required `poll_frequency` | `duration` | How often to poll for file changes | `"1m"` | no `is_secret` | `bool` | Marks the file as containing a [secret][] | `false` | no -[secret]: {{< relref "../../config-language/expressions/types_and_values.md#secrets" >}} +[secret]: {{< relref "../../concepts/config-language/expressions/types_and_values.md#secrets" >}} {{< docs/shared lookup="flow/reference/components/local-file-arguments-text.md" source="agent" version="" >}} diff --git a/docs/sources/flow/reference/components/module.file.md b/docs/sources/flow/reference/components/module.file.md index 803883a9119c..0e4b8b19d249 100644 --- a/docs/sources/flow/reference/components/module.file.md +++ b/docs/sources/flow/reference/components/module.file.md @@ -51,7 +51,7 @@ Name | Type | Description | Default | Required `poll_frequency` | `duration` | How often to poll for file changes | `"1m"` | no `is_secret` | `bool` | Marks the file as containing a [secret][] | `false` | no -[secret]: {{< relref "../../config-language/expressions/types_and_values.md#secrets" >}} +[secret]: {{< relref "../../concepts/config-language/expressions/types_and_values.md#secrets" >}} {{< docs/shared lookup="flow/reference/components/local-file-arguments-text.md" source="agent" version="" >}} diff --git a/docs/sources/flow/reference/components/module.http.md b/docs/sources/flow/reference/components/module.http.md index e4e61e7b53fd..24e140f79430 100644 --- a/docs/sources/flow/reference/components/module.http.md +++ b/docs/sources/flow/reference/components/module.http.md @@ -52,7 +52,7 @@ Name | Type | Description | Default | Required `poll_timeout` | `duration` | Timeout when polling the URL. | `"10s"` | no `is_secret` | `bool` | Whether the response body should be treated as a secret. | false | no -[secret]: {{< relref "../../config-language/expressions/types_and_values.md#secrets" >}} +[secret]: {{< relref "../../concepts/config-language/expressions/types_and_values.md#secrets" >}} ## Blocks diff --git a/docs/sources/flow/reference/components/otelcol.processor.filter.md b/docs/sources/flow/reference/components/otelcol.processor.filter.md index 1912ad4ab1a1..49a11028a80c 100644 --- a/docs/sources/flow/reference/components/otelcol.processor.filter.md +++ b/docs/sources/flow/reference/components/otelcol.processor.filter.md @@ -290,7 +290,7 @@ Some values in the River strings are [escaped][river-strings]: * `\` is escaped with `\\` * `"` is escaped with `\"` -[river-strings]: {{< relref "../../config-language/expressions/types_and_values.md/#strings" >}} +[river-strings]: {{< relref "../../concepts/config-language/expressions/types_and_values.md/#strings" >}} [OTTL]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.85.0/pkg/ottl/README.md diff --git a/docs/sources/flow/reference/components/otelcol.processor.transform.md b/docs/sources/flow/reference/components/otelcol.processor.transform.md index cc214d8a5551..81967bb11c24 100644 --- a/docs/sources/flow/reference/components/otelcol.processor.transform.md +++ b/docs/sources/flow/reference/components/otelcol.processor.transform.md @@ -55,8 +55,8 @@ For example, the OTTL statement `set(description, "Sum") where type == "Sum"` ca Raw strings are generally more convenient for writing OTTL statements. -[river-strings]: {{< relref "../../config-language/expressions/types_and_values.md/#strings" >}} -[river-raw-strings]: {{< relref "../../config-language/expressions/types_and_values.md/#raw-strings" >}} +[river-strings]: {{< relref "../../concepts/config-language/expressions/types_and_values.md/#strings" >}} +[river-raw-strings]: {{< relref "../../concepts/config-language/expressions/types_and_values.md/#raw-strings" >}} {{% /admonition %}} {{% admonition type="note" %}} @@ -566,8 +566,8 @@ Each statement is enclosed in backticks instead of quotation marks. This constitutes a [raw string][river-raw-strings], and lets us avoid the need to escape each `"` with a `\"`, and each `\` with a `\\` inside a [normal][river-strings] River string. -[river-strings]: {{< relref "../../config-language/expressions/types_and_values.md/#strings" >}} -[river-raw-strings]: {{< relref "../../config-language/expressions/types_and_values.md/#raw-strings" >}} +[river-strings]: {{< relref "../../concepts/config-language/expressions/types_and_values.md/#strings" >}} +[river-raw-strings]: {{< relref "../../concepts/config-language/expressions/types_and_values.md/#raw-strings" >}} [traces protobuf]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.0.0/opentelemetry/proto/trace/v1/trace.proto [metrics protobuf]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.0.0/opentelemetry/proto/metrics/v1/metrics.proto diff --git a/docs/sources/flow/reference/components/remote.http.md b/docs/sources/flow/reference/components/remote.http.md index 7428cb62d18d..e91fc6c409a0 100644 --- a/docs/sources/flow/reference/components/remote.http.md +++ b/docs/sources/flow/reference/components/remote.http.md @@ -54,7 +54,7 @@ The poll is successful if the URL returns a `200 OK` response code. All other response codes are treated as errors and mark the component as unhealthy. After a successful poll, the response body from the URL is exported. -[secret]: {{< relref "../../config-language/expressions/types_and_values.md#secrets" >}} +[secret]: {{< relref "../../concepts/config-language/expressions/types_and_values.md#secrets" >}} ## Blocks diff --git a/docs/sources/flow/reference/components/remote.s3.md b/docs/sources/flow/reference/components/remote.s3.md index 7e927e11b51f..c4ec8e195e86 100644 --- a/docs/sources/flow/reference/components/remote.s3.md +++ b/docs/sources/flow/reference/components/remote.s3.md @@ -44,7 +44,7 @@ Name | Type | Description | Default | Required > **NOTE**: `path` must include a full path to a file. This does not support reading of directories. -[secret]: {{< relref "../../config-language/expressions/types_and_values.md#secrets" >}} +[secret]: {{< relref "../../concepts/config-language/expressions/types_and_values.md#secrets" >}} ## Blocks diff --git a/docs/sources/flow/reference/stdlib/nonsensitive.md b/docs/sources/flow/reference/stdlib/nonsensitive.md index 2763ac952ace..a2bb0bd31d49 100644 --- a/docs/sources/flow/reference/stdlib/nonsensitive.md +++ b/docs/sources/flow/reference/stdlib/nonsensitive.md @@ -20,7 +20,7 @@ title: nonsensitive > Strings resulting from calls to `nonsensitive` will be displayed in plaintext > in the UI and internal API calls. -[secret]: {{< relref "../../config-language/expressions/types_and_values.md#secrets" >}} +[secret]: {{< relref "../../concepts/config-language/expressions/types_and_values.md#secrets" >}} ## Examples diff --git a/docs/sources/flow/tutorials/collecting-prometheus-metrics.md b/docs/sources/flow/tutorials/collecting-prometheus-metrics.md index ecaf186e4a3d..a66547419064 100644 --- a/docs/sources/flow/tutorials/collecting-prometheus-metrics.md +++ b/docs/sources/flow/tutorials/collecting-prometheus-metrics.md @@ -99,8 +99,8 @@ To try out {{< param "PRODUCT_ROOT_NAME" >}} without using Docker: {{% docs/reference %}} [prometheus.scrape]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.scrape.md" [prometheus.scrape]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.scrape.md" -[attribute]: "/docs/agent/ -> /docs/agent//flow/concepts/configuration_language.md#attributes" -[attribute]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/configuration_language.md#attributes" +[attribute]: "/docs/agent/ -> /docs/agent//flow/concepts/config-language/#attributes" +[attribute]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/#attributes" [argument]: "/docs/agent/ -> /docs/agent//flow/concepts/components" [argument]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components" [export]: "/docs/agent/ -> /docs/agent//flow/concepts/components"