Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cascade variable for Grafana Agent Flow name #5879

Merged
merged 21 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions docs/sources/flow/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ description: Grafana Agent Flow is a component-based revision of Grafana Agent w
a focus on ease-of-use, debuggability, and adaptability
title: Flow mode
weight: 400
cascade:
PRODUCT_NAME: Grafana Agent Flow
PRODUCT_ROOT_NAME: Grafana Agent
---

# Flow mode
# {{< param "PRODUCT_NAME" >}}

The Flow mode of Grafana Agent (also called Grafana Agent Flow) is a
_component-based_ revision of Grafana Agent with a focus on ease-of-use,
{{< param "PRODUCT_NAME" >}} is a _component-based_ revision of {{< param "PRODUCT_ROOT_NAME" >}} with a focus on ease-of-use,
debuggability, and ability to adapt to the needs of power users.

Components allow for reusability, composability, and focus on a single task.
Expand All @@ -34,7 +36,7 @@ Components allow for reusability, composability, and focus on a single task.
## Example

```river
// Discover Kubernetes pods to collect metrics from.
// Discover Kubernetes pods to collect metrics from
discovery.kubernetes "pods" {
role = "pod"
}
Expand Down Expand Up @@ -65,19 +67,20 @@ prometheus.remote_write "default" {
}
```

## Grafana Agent configuration generator
## {{< param "PRODUCT_ROOT_NAME" >}} configuration generator

The {{< param "PRODUCT_ROOT_NAME" >}} [configuration generator](https://grafana.github.io/agent-configurator/) will help you get a head start on creating flow code.

The [Grafana Agent configuration generator](https://grafana.github.io/agent-configurator/) will help you get a head start on creating flow code.
{{% admonition type="note" %}}
This feature is experimental, and it does not support all River components.
This feature is experimental, and it doesn't support all River components.
{{% /admonition %}}

## Next steps

* [Install][] Grafana Agent in flow mode.
* Learn about the core [Concepts][] of flow mode.
* Follow our [Getting started][] guides for Grafana Agent in flow mode.
* Follow our [Tutorials][] to get started with Grafana Agent in flow mode.
* [Install][] {{< param "PRODUCT_NAME" >}}.
* 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.
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ aliases:
- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/concepts/
- /docs/grafana-cloud/send-data/agent/flow/concepts/
canonical: https://grafana.com/docs/agent/latest/flow/concepts/
description: Learn about the Grafana Agent flow mode concepts
description: Learn about the Grafana Agent Flow concepts
title: Concepts
weight: 100
---

# Concepts

This section explains primary concepts of Grafana Agent Flow.
This section explains primary concepts of {{< param "PRODUCT_NAME" >}}.

{{< section >}}
18 changes: 9 additions & 9 deletions docs/sources/flow/concepts/clustering.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ weight: 500

# Clustering (beta)

Clustering enables a fleet of agents to work together for workload distribution
Clustering enables a fleet of {{< param "PRODUCT_ROOT_NAME" >}}s to work together for workload distribution
and high availability. It helps create horizontally scalable deployments with
minimal resource and operational overhead.

To achieve this, Grafana Agent makes use of an eventually consistent model that
assumes all participating Agents are interchangeable and converge on using the
To achieve this, {{< param "PRODUCT_NAME" >}} makes use of an eventually consistent model that
assumes all participating {{< param "PRODUCT_ROOT_NAME" >}}s are interchangeable and converge on using the
same configuration file.

The behavior of a standalone, non-clustered agent is the same as if it was a
The behavior of a standalone, non-clustered {{< param "PRODUCT_ROOT_NAME" >}} is the same as if it was a
single-node cluster.

You configure clustering by passing `cluster` command-line flags to the [run][]
Expand All @@ -35,7 +35,7 @@ command.

Target auto-distribution is the most basic use case of clustering; it allows
scraping components running on all peers to distribute scrape load between
themselves. For target auto-distribution to work correctly, all agents in the
themselves. For target auto-distribution to work correctly, all {{< param "PRODUCT_ROOT_NAME" >}} in the
same cluster must be able to reach the same service discovery APIs and must be
able to scrape the same targets.

Expand All @@ -53,13 +53,13 @@ prometheus.scrape "default" {
```

A cluster state change is detected when a new node joins or an existing node goes away. All participating components locally
recalculate target ownership and rebalance the number of targets they’re
recalculate target ownership and re-balance the number of targets they’re
scraping without explicitly communicating ownership over the network.

Target auto-distribution allows you to dynamically scale the number of agents to distribute workload during peaks.
Target auto-distribution allows you to dynamically scale the number of {{< param "PRODUCT_ROOT_NAME" >}}s to distribute workload during peaks.
It also provides resiliency because targets are automatically picked up by one of the node peers if a node goes away.

Grafana Agent uses a fully-local consistent hashing algorithm to distribute
{{< param "PRODUCT_NAME" >}} uses a fully-local consistent hashing algorithm to distribute
targets, meaning that, on average, only ~1/N of the targets are redistributed.

Refer to component reference documentation to discover whether it supports
Expand All @@ -72,7 +72,7 @@ clustering, such as:

## Cluster monitoring and troubleshooting

To monitor your cluster status, you can check the Flow UI [clustering page][].
To monitor your cluster status, you can check the {{< param "PRODUCT_NAME" >}} UI [clustering page][].
The [debugging][] topic contains some clues to help pin down probable
clustering issues.

Expand Down
6 changes: 3 additions & 3 deletions docs/sources/flow/concepts/component_controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ weight: 200

# Component controller

The _component controller_ is the core part of Grafana Agent Flow which manages
The _component controller_ is the core part of {{< param "PRODUCT_NAME" >}} which manages
components at runtime.

The component controller is responsible for:
Expand All @@ -29,8 +29,8 @@ As discussed in [Components][], a relationship between components is created
when an expression is used to set the argument of one component to an exported
field of another component.

The set of all components and the relationships between them define a [directed
acyclic graph][DAG] (DAG), which informs the component controller which
The set of all components and the relationships between them define a [Directed
Acyclic Graph][DAG] (DAG), which informs the component controller which
references are valid and in what order components must be evaluated.

For a configuration file to be valid, components must not reference themselves or
Expand Down
6 changes: 3 additions & 3 deletions docs/sources/flow/concepts/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ weight: 100

# Components

_Components_ are the building blocks of Grafana Agent Flow. Each component is
_Components_ are the building blocks of {{< param "PRODUCT_NAME" >}}. Each component is
responsible for handling a single task, such as retrieving secrets or
collecting Prometheus metrics.

Expand Down Expand Up @@ -50,7 +50,7 @@ discovery.kubernetes "nodes" {

## Pipelines

Most arguments for a component in a config file are constant values, such
Most arguments for a component in a configuration file are constant values, such
setting a `log_level` attribute to the quoted string `"debug"`:

```river
Expand Down Expand Up @@ -87,7 +87,7 @@ An example pipeline may look like this:
<img src="../../../assets/concepts_example_pipeline.svg" alt="Flow of example pipeline" width="500" />
</p>

The following config file represents the above pipeline:
The following configuration file represents the pipeline:

```river
// Get our API key from disk.
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/flow/concepts/configuration_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ weight: 400

# Configuration language concepts

The Grafana Agent Flow _configuration language_ refers to the language used in
The {{< param "PRODUCT_NAME" >}} _configuration language_ refers to the language used in
configuration files which define and configure components to run.

The configuration language is called River, a Terraform/HCL-inspired language:
Expand Down Expand Up @@ -99,7 +99,7 @@ This file has two blocks:
## More information

River is documented in detail in [Configuration language][config-docs] section
of the Grafana Agent Flow docs.
of the {{< param "PRODUCT_NAME" >}} docs.

{{% docs/reference %}}
[config-docs]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/config-language"
Expand Down
12 changes: 6 additions & 6 deletions docs/sources/flow/concepts/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ weight: 300

# Modules

_Modules_ are a way to create Grafana Agent Flow configurations which can be
_Modules_ are a way to create {{< param "PRODUCT_NAME" >}} configurations which can be
loaded as a component. Modules are a great way to parameterize a configuration
to create reusable pipelines.

Modules are Grafana Agent Flow configurations which have:
Modules are {{< param "PRODUCT_NAME" >}} configurations which have:

* Arguments: settings which configure a module.
* Exports: named values which a module exposes to the consumer of the module.
* Components: Grafana Agent Flow Components to run when the module is running.
* Components: {{< param "PRODUCT_NAME" >}} Components to run when the module is running.

Modules are loaded into Grafana Agent Flow by using a [Module
Modules are loaded into {{< param "PRODUCT_NAME" >}} by using a [Module
loader](#module-loaders).

Refer to the documentation for the [argument block][] and [export block][] to
learn how to define arguments and exports for a module.

## Module loaders

A _Module loader_ is a Grafana Agent Flow component which retrieves a module
A _Module loader_ is a {{< param "PRODUCT_NAME" >}} component which retrieves a module
and runs the components defined inside of it.

Module loader components are responsible for:
Expand All @@ -42,7 +42,7 @@ Module loader components are responsible for:
* Exposing exports from the loaded module.

Module loaders typically are called `module.LOADER_NAME`. The list of module
loader components can be found in the list of Grafana Agent Flow
loader components can be found in the list of {{< param "PRODUCT_NAME" >}}
[Components][].

Some module loaders may not support running modules with arguments or exports.
Expand Down
6 changes: 3 additions & 3 deletions docs/sources/flow/config-language/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ weight: 400

# Configuration language

Grafana Agent Flow contains a custom configuration language called River to
{{< param "PRODUCT_NAME" >}} contains a custom configuration language called River to
dynamically configure and connect components.

River aims to reduce errors in configuration files by making configurations
easier to read and write. River configurations are done in blocks which can be
easily copied-and-pasted from documentation to help users get started as
quickly as possible.

A River configuration file tells Grafana Agent Flow which components to launch
A River configuration file tells {{< param "PRODUCT_NAME" >}} which components to launch
and how to bind them together into a pipeline.

The syntax of River is centered around blocks, attributes, and expressions:
Expand Down Expand Up @@ -82,6 +82,6 @@ To help you write configuration files in River, the following tools are availabl
* [river-mode](https://github.com/jdbaldry/river-mode) for Emacs
* Code formatting using the [`agent fmt` command]({{< relref "../reference/cli/fmt" >}})

You can also start developing your own tooling using the agent repository as a
You can also start developing your own tooling using the {{< param "PRODUCT_NAME" >}} repository as a
clayton-cornell marked this conversation as resolved.
Show resolved Hide resolved
go package or use the [tree-sitter
grammar](https://github.com/grafana/tree-sitter-river) with other programming languages.
2 changes: 1 addition & 1 deletion docs/sources/flow/config-language/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ weight: 300
---

# Components configuration language
Components are the defining feature of Grafana Agent Flow. They are small,
Components are the defining feature of {{< param "PRODUCT_NAME" >}}. They are small,
reusable pieces of business logic that perform a single task (like retrieving
secrets or collecting Prometheus metrics) and can be wired together to form
programmable pipelines of telemetry data.
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/flow/config-language/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ to represent or compute more complex attribute values.

### Blocks

_Blocks_ are used to configure the Agent behavior as well as Flow components by
_Blocks_ are used to configure the {{< param "PRODUCT_NAME" >}} behavior as well as {{< param "PRODUCT_NAME" >}} components by
clayton-cornell marked this conversation as resolved.
Show resolved Hide resolved
grouping any number of attributes or nested blocks using curly braces.
Blocks have a _name_, an optional _label_ and a body that contains any number
of arguments and nested unlabeled blocks.
Expand Down
8 changes: 4 additions & 4 deletions docs/sources/flow/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ aliases:
- /docs/grafana-cloud/send-data/agent/flow/getting-started/
- getting_started/
canonical: https://grafana.com/docs/agent/latest/flow/getting-started/
description: Learn how to use Grafana Agent in flow mode
description: Learn how to use Grafana Agent Flow
menuTitle: Get started
title: Get started with Grafana Agent in flow mode
title: Get started with Grafana Agent Flow
weight: 200
---

# Get started with Grafana Agent in flow mode
# Get started with {{< param "PRODUCT_NAME" >}}

This section details guides for getting started with Grafana Agent in flow mode.
This section details guides for getting started with {{< param "PRODUCT_NAME" >}}.

{{< section >}}
18 changes: 8 additions & 10 deletions docs/sources/flow/getting-started/collect-opentelemetry-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ weight: 300

# Collect OpenTelemetry data

Grafana Agent Flow can be configured to collect [OpenTelemetry][]-compatible
{{< param "PRODUCT_NAME" >}} can be configured to collect [OpenTelemetry][]-compatible
data and forward it to any OpenTelemetry-compatible endpoint.

This topic describes how to:
Expand All @@ -33,10 +33,9 @@ This topic describes how to:

* Ensure that you have basic familiarity with instrumenting applications with
OpenTelemetry.
* Have a set of OpenTelemetry applications ready to push telemetry data to
Grafana Agent Flow.
* Identify where Grafana Agent Flow will write received telemetry data.
* Be familiar with the concept of [Components][] in Grafana Agent Flow.
* Have a set of OpenTelemetry applications ready to push telemetry data to {{< param "PRODUCT_NAME" >}}.
* Identify where {{< param "PRODUCT_NAME" >}} will write received telemetry data.
* Be familiar with the concept of [Components][] in {{< param "PRODUCT_NAME" >}}.

## Configure an OpenTelemetry Protocol exporter

Expand All @@ -47,7 +46,7 @@ to an external system.

In this task, we will use the [otelcol.exporter.otlp][] component to send
OpenTelemetry data to a server using the OpenTelemetry Protocol (OTLP). Once an
exporter component is defined, other Grafana Agent Flow components can be used
exporter component is defined, other {{< param "PRODUCT_NAME" >}} components can be used
to forward data to it.

> Refer to the list of available [Components][] for the full list of
Expand Down Expand Up @@ -153,7 +152,7 @@ Protocol, refer to [otelcol.exporter.otlp][].

## Configure batching

Production-ready Grafana Agent Flow configurations should not send
Production-ready {{< param "PRODUCT_NAME" >}} configurations should not send
OpenTelemetry data directly to an exporter for delivery. Instead, data is
usually sent to one or more _processor components_ that perform various
transformations on the data.
Expand Down Expand Up @@ -238,14 +237,13 @@ For more information on configuring OpenTelemetry data batching, refer to

## Configure an OpenTelemetry Protocol receiver

Grafana Agent Flow can be configured to receive OpenTelemetry metrics, logs,
{{< param "PRODUCT_NAME" >}} can be configured to receive OpenTelemetry metrics, logs,
and traces. An OpenTelemetry _receiver_ component is responsible for receiving
OpenTelemetry data from an external system.

In this task, we will use the [otelcol.receiver.otlp][] component to receive
OpenTelemetry data over the network using the OpenTelemetry Protocol (OTLP). A
receiver component can be configured to forward received data to other Grafana
Agent Flow components.
receiver component can be configured to forward received data to other {{< param "PRODUCT_NAME" >}} components.

> Refer to the list of available [Components][] for the full list of
> `otelcol.receiver` components that can be used to receive
Expand Down
Loading