From ecfb3eda11a759f9a4a51e76d0e62903c9045d51 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Tue, 21 May 2024 19:24:22 +0100 Subject: [PATCH] Replace docs/reference shortcode with ref URIs (#6883) * Replace all docs/reference use with ref URIs Signed-off-by: Jack Baldry * Regenerate generated files Signed-off-by: Jack Baldry * Fix missing parens Signed-off-by: Jack Baldry --------- Signed-off-by: Jack Baldry --- docs/sources/_index.md | 52 ++-- docs/sources/_index.md.t | 52 ++-- docs/sources/about.md | 109 +++++---- docs/sources/data-collection.md | 39 +-- docs/sources/flow/_index.md | 55 +++-- docs/sources/flow/concepts/clustering.md | 68 ++++-- .../flow/concepts/component_controller.md | 32 ++- .../flow/concepts/config-language/_index.md | 12 +- .../concepts/config-language/components.md | 32 ++- .../config-language/expressions/_index.md | 28 ++- .../expressions/function_calls.md | 12 +- .../expressions/referencing_exports.md | 12 +- .../expressions/types_and_values.md | 10 +- .../flow/concepts/config-language/syntax.md | 21 +- .../flow/get-started/install/_index.md | 12 +- .../flow/get-started/install/ansible.md | 12 +- .../flow/get-started/install/binary.md | 12 +- docs/sources/flow/get-started/install/chef.md | 12 +- .../flow/get-started/install/docker.md | 27 ++- .../flow/get-started/install/kubernetes.md | 14 +- .../sources/flow/get-started/install/linux.md | 21 +- .../sources/flow/get-started/install/macos.md | 21 +- .../flow/get-started/install/puppet.md | 12 +- .../flow/get-started/install/windows.md | 30 ++- docs/sources/flow/get-started/run/_index.md | 12 +- docs/sources/flow/get-started/run/binary.md | 21 +- docs/sources/flow/get-started/run/linux.md | 21 +- docs/sources/flow/get-started/run/macos.md | 30 ++- docs/sources/flow/get-started/run/windows.md | 21 +- .../flow/reference/config-blocks/argument.md | 21 +- .../flow/reference/config-blocks/declare.md | 35 +-- .../flow/reference/config-blocks/export.md | 21 +- .../reference/config-blocks/import.file.md | 8 +- .../reference/config-blocks/import.git.md | 8 +- .../reference/config-blocks/import.string.md | 8 +- .../flow/tasks/collect-opentelemetry-data.md | 77 +++--- .../flow/tasks/collect-prometheus-metrics.md | 56 +++-- .../flow/tasks/configure-agent-clustering.md | 30 ++- docs/sources/flow/tasks/configure/_index.md | 12 +- .../flow/tasks/configure/configure-linux.md | 23 +- .../flow/tasks/configure/configure-macos.md | 12 +- .../flow/tasks/configure/configure-windows.md | 12 +- docs/sources/flow/tasks/debug.md | 48 ++-- .../distribute-prometheus-scrape-load.md | 48 ++-- docs/sources/flow/tasks/metamonitoring.md | 43 ++-- .../flow/tasks/migrate/from-operator.md | 127 ++++++---- .../flow/tasks/migrate/from-otelcol.md | 97 +++++--- .../flow/tasks/migrate/from-prometheus.md | 88 ++++--- .../flow/tasks/migrate/from-promtail.md | 99 +++++--- .../sources/flow/tasks/migrate/from-static.md | 225 +++++++++++------- .../flow/tasks/monitor/component_metrics.md | 28 ++- .../flow/tasks/monitor/controller_metrics.md | 19 +- .../flow/tasks/opentelemetry-to-lgtm-stack.md | 105 +++++--- docs/sources/flow/tutorials/chaining.md | 12 +- .../collecting-prometheus-metrics.md | 46 ++-- .../flow/tutorials/filtering-metrics.md | 19 +- docs/sources/operator/release-notes.md | 22 +- docs/sources/static/_index.md | 30 ++- docs/sources/static/api/_index.md | 28 ++- docs/sources/static/configuration/_index.md | 66 +++-- .../configuration/create-config-file.md | 14 +- docs/sources/static/configuration/flags.md | 32 ++- .../static/configuration/metrics-config.md | 12 +- .../static/configuration/scraping-service.md | 21 +- docs/sources/static/operation-guide/_index.md | 45 ++-- docs/sources/static/release-notes.md | 32 ++- docs/sources/static/set-up/install/_index.md | 12 +- .../set-up/install/install-agent-binary.md | 50 ++-- .../set-up/install/install-agent-docker.md | 23 +- .../set-up/install/install-agent-linux.md | 21 +- .../set-up/install/install-agent-macos.md | 23 +- .../install/install-agent-on-windows.md | 37 +-- docs/sources/static/set-up/start-agent.md | 12 +- 73 files changed, 1637 insertions(+), 982 deletions(-) diff --git a/docs/sources/_index.md b/docs/sources/_index.md index d1d17fa8e314..3974801b5aef 100644 --- a/docs/sources/_index.md +++ b/docs/sources/_index.md @@ -11,6 +11,32 @@ weight: 350 cascade: AGENT_RELEASE: v0.40.5 OTEL_VERSION: v0.96.0 +refs: + variants: + - pattern: /docs/agent/ + destination: /docs/agent//about/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/about/ + static-mode: + - pattern: /docs/agent/ + destination: /docs/agent//static/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/ + static-mode-kubernetes-operator: + - pattern: /docs/agent/ + destination: /docs/agent//operator/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/operator/ + flow-mode: + - pattern: /docs/agent/ + destination: /docs/agent//flow/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/ + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui --- # Grafana Agent @@ -55,17 +81,17 @@ Grafana Agent can collect, transform, and send data to: * **Battle-tested**: Grafana Agent extends the existing battle-tested code from the Prometheus and OpenTelemetry Collector projects. * **Powerful**: Write programmable pipelines with ease, and debug them using a - [built-in UI][UI]. + [built-in UI](ref:ui). * **Batteries included**: Integrate with systems like MySQL, Kubernetes, and Apache to get telemetry that's immediately useful. ## Getting started -* Choose a [variant][variants] of Grafana Agent to run. +* Choose a [variant](ref:variants) of Grafana Agent to run. * Refer to the documentation for the variant to use: - * [Static mode][] - * [Static mode Kubernetes operator][] - * [Flow mode][] + * [Static mode](ref:static-mode) + * [Static mode Kubernetes operator](ref:static-mode-kubernetes-operator) + * [Flow mode](ref:flow-mode) ## Supported platforms @@ -106,19 +132,3 @@ updates. Patch and security releases may be created at any time. -{{% docs/reference %}} -[variants]: "/docs/agent/ -> /docs/agent//about" -[variants]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/about" - -[Static mode]: "/docs/agent/ -> /docs/agent//static" -[Static mode]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static" - -[Static mode Kubernetes operator]: "/docs/agent/ -> /docs/agent//operator" -[Static mode Kubernetes operator]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/operator" - -[Flow mode]: "/docs/agent/ -> /docs/agent//flow" -[Flow mode]: "/docs/grafana-cloud/ -> /docs/agent//flow" - -[UI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/agent//flow/tasks/debug.md#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/_index.md.t b/docs/sources/_index.md.t index af7244fff0d9..f2ba727cd617 100644 --- a/docs/sources/_index.md.t +++ b/docs/sources/_index.md.t @@ -11,6 +11,32 @@ weight: 350 cascade: AGENT_RELEASE: $AGENT_VERSION OTEL_VERSION: v0.96.0 +refs: + variants: + - pattern: /docs/agent/ + destination: /docs/agent//about/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/about/ + static-mode: + - pattern: /docs/agent/ + destination: /docs/agent//static/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/ + static-mode-kubernetes-operator: + - pattern: /docs/agent/ + destination: /docs/agent//operator/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/operator/ + flow-mode: + - pattern: /docs/agent/ + destination: /docs/agent//flow/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/ + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui --- # Grafana Agent @@ -55,17 +81,17 @@ Grafana Agent can collect, transform, and send data to: * **Battle-tested**: Grafana Agent extends the existing battle-tested code from the Prometheus and OpenTelemetry Collector projects. * **Powerful**: Write programmable pipelines with ease, and debug them using a - [built-in UI][UI]. + [built-in UI](ref:ui). * **Batteries included**: Integrate with systems like MySQL, Kubernetes, and Apache to get telemetry that's immediately useful. ## Getting started -* Choose a [variant][variants] of Grafana Agent to run. +* Choose a [variant](ref:variants) of Grafana Agent to run. * Refer to the documentation for the variant to use: - * [Static mode][] - * [Static mode Kubernetes operator][] - * [Flow mode][] + * [Static mode](ref:static-mode) + * [Static mode Kubernetes operator](ref:static-mode-kubernetes-operator) + * [Flow mode](ref:flow-mode) ## Supported platforms @@ -106,19 +132,3 @@ updates. Patch and security releases may be created at any time. -{{% docs/reference %}} -[variants]: "/docs/agent/ -> /docs/agent//about" -[variants]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/about" - -[Static mode]: "/docs/agent/ -> /docs/agent//static" -[Static mode]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static" - -[Static mode Kubernetes operator]: "/docs/agent/ -> /docs/agent//operator" -[Static mode Kubernetes operator]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/operator" - -[Flow mode]: "/docs/agent/ -> /docs/agent//flow" -[Flow mode]: "/docs/grafana-cloud/ -> /docs/agent//flow" - -[UI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/agent//flow/tasks/debug.md#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/about.md b/docs/sources/about.md index eca262408d7d..51d7a1bea499 100644 --- a/docs/sources/about.md +++ b/docs/sources/about.md @@ -10,6 +10,62 @@ description: Grafana Agent is a flexible, performant, vendor-neutral, telemetry menuTitle: Introduction title: Introduction to Grafana Agent weight: 100 +refs: + otel: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/collect-opentelemetry-data/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/tasks/collect-opentelemetry-data/ + vault: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/remote.vault/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/reference/components/remote.vault/ + rules: + - pattern: /docs/agent/ + destination: /docs/agent/latest/flow/reference/components/mimir.rules.kubernetes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent/latest/flow/reference/components/mimir.rules.kubernetes/ + loki: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/migrate/from-promtail/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/tasks/migrate/from-promtail/ + flow-mode: + - pattern: /docs/agent/ + destination: /docs/agent//flow/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/ + static-mode-kubernetes-operator: + - pattern: /docs/agent/ + destination: /docs/agent//operator/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/operator/ + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/reference/components/ + static-mode: + - pattern: /docs/agent/ + destination: /docs/agent//static/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/ + prometheus: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/collect-prometheus-metrics/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/tasks/collect-prometheus-metrics/ + clustering: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/clustering// + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/concepts/clustering// + integrations: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/integrations/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/configuration/integrations/ --- # Introduction to Grafana Agent @@ -18,30 +74,10 @@ Grafana Agent is a flexible, high performance, vendor-neutral telemetry collecto Grafana Agent is available in three different variants: -- [Static mode][]: The original Grafana Agent. -- [Static mode Kubernetes operator][]: The Kubernetes operator for Static mode. -- [Flow mode][]: The new, component-based Grafana Agent. - -{{% docs/reference %}} -[Static mode]: "/docs/agent/ -> /docs/agent//static" -[Static mode]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static" -[Static mode Kubernetes operator]: "/docs/agent/ -> /docs/agent//operator" -[Static mode Kubernetes operator]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/operator" -[Flow mode]: "/docs/agent/ -> /docs/agent//flow" -[Flow mode]: "/docs/grafana-cloud/ -> /docs/agent//flow" -[Prometheus]: "/docs/agent/ -> /docs/agent//flow/tasks/collect-prometheus-metrics.md" -[Prometheus]: "/docs/grafana-cloud/ -> /docs/agent//flow/tasks/collect-prometheus-metrics.md" -[OTel]: "/docs/agent/ -> /docs/agent//flow/tasks/collect-opentelemetry-data.md" -[OTel]: "/docs/grafana-cloud/ -> /docs/agent//flow/tasks/collect-opentelemetry-data.md" -[Loki]: "/docs/agent/ -> /docs/agent//flow/tasks/migrate/from-promtail.md" -[Loki]: "/docs/grafana-cloud/ -> /docs/agent//flow/tasks/migrate/from-promtail.md" -[clustering]: "/docs/agent/ -> /docs/agent//flow/concepts/clustering/_index.md" -[clustering]: "/docs/grafana-cloud/ -> /docs/agent//flow/concepts/clustering/_index.md" -[rules]: "/docs/agent/ -> /docs/agent/latest/flow/reference/components/mimir.rules.kubernetes.md" -[rules]: "/docs/grafana-cloud/ -> /docs/agent/latest/flow/reference/components/mimir.rules.kubernetes.md" -[vault]: "/docs/agent/ -> /docs/agent//flow/reference/components/remote.vault.md" -[vault]: "/docs/grafana-cloud/ -> /docs/agent//flow/reference/components/remote.vault.md" -{{% /docs/reference %}} +- [Static mode](ref:static-mode): The original Grafana Agent. +- [Static mode Kubernetes operator](ref:static-mode-kubernetes-operator): The Kubernetes operator for Static mode. +- [Flow mode](ref:flow-mode): The new, component-based Grafana Agent. + [Pyroscope]: https://grafana.com/docs/pyroscope/latest/configure-client/grafana-agent/go_pull [helm chart]: https://grafana.com/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/config-k8s-helmchart @@ -69,9 +105,9 @@ Each variant of Grafana Agent provides a different level of functionality. The f | | Grafana Agent Flow mode | Grafana Agent Static mode | Grafana Agent Operator | OpenTelemetry Collector | Prometheus Agent mode | |--------------|--------------------------|---------------------------|------------------------|-------------------------|-----------------------| -| **Metrics** | [Prometheus][], [OTel][] | Prometheus | Prometheus | OTel | Prometheus | -| **Logs** | [Loki][], [OTel][] | Loki | Loki | OTel | No | -| **Traces** | [OTel][] | OTel | OTel | OTel | No | +| **Metrics** | [Prometheus](ref:prometheus), [OTel](ref:otel) | Prometheus | Prometheus | OTel | Prometheus | +| **Logs** | [Loki](ref:loki), [OTel](ref:otel) | Loki | Loki | OTel | No | +| **Traces** | [OTel](ref:otel) | OTel | OTel | OTel | No | | **Profiles** | [Pyroscope][] | No | No | Planned | No | #### **OSS features** @@ -79,9 +115,9 @@ Each variant of Grafana Agent provides a different level of functionality. The f | | Grafana Agent Flow mode | Grafana Agent Static mode | Grafana Agent Operator | OpenTelemetry Collector | Prometheus Agent mode | |--------------------------|-------------------------|---------------------------|------------------------|-------------------------|-----------------------| | **Kubernetes native** | [Yes][helm chart] | No | Yes | Yes | No | -| **Clustering** | [Yes][clustering] | No | No | No | No | -| **Prometheus rules** | [Yes][rules] | No | No | No | No | -| **Native Vault support** | [Yes][vault] | No | No | No | No | +| **Clustering** | [Yes](ref:clustering) | No | No | No | No | +| **Prometheus rules** | [Yes](ref:rules) | No | No | No | No | +| **Native Vault support** | [Yes](ref:vault) | No | No | No | No | #### Grafana Cloud solutions @@ -94,7 +130,7 @@ Each variant of Grafana Agent provides a different level of functionality. The f ### Static mode -[Static mode][] is the original variant of Grafana Agent, introduced on March 3, 2020. +[Static mode](ref:static-mode) is the original variant of Grafana Agent, introduced on March 3, 2020. Static mode is the most mature variant of Grafana Agent. You should run Static mode when: @@ -110,7 +146,7 @@ Grafana Agent version 0.37 and newer provides Prometheus Operator compatibility You should use Grafana Agent Flow mode for all new Grafana Agent deployments. {{< /admonition >}} -The [Static mode Kubernetes operator][] is a variant of Grafana Agent introduced on June 17, 2021. It's currently in beta. +The [Static mode Kubernetes operator](ref:static-mode-kubernetes-operator) is a variant of Grafana Agent introduced on June 17, 2021. It's currently in beta. The Static mode Kubernetes operator provides compatibility with Prometheus Operator, allowing static mode to support resources from Prometheus Operator, such as ServiceMonitors, PodMonitors, and Probes. @@ -123,7 +159,7 @@ You should run the Static mode Kubernetes operator when: ### Flow mode -[Flow mode][] is a stable variant of Grafana Agent, introduced on September 29, 2022. +[Flow mode](ref:flow-mode) is a stable variant of Grafana Agent, introduced on September 29, 2022. Grafana Agent Flow mode focuses on vendor neutrality, ease-of-use, improved debugging, and ability to adapt to the needs of power users by adopting a configuration-as-code model. @@ -147,10 +183,3 @@ You should run Flow mode when: [BoringCrypto](https://pkg.go.dev/crypto/internal/boring) is an **EXPERIMENTAL** feature for building Grafana Agent binaries and images with BoringCrypto enabled. Builds and Docker images for Linux arm64/amd64 are made available. -{{% docs/reference %}} -[integrations]: "/docs/agent/ -> /docs/agent//static/configuration/integrations" -[integrations]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/configuration/integrations" - -[components]: "/docs/agent/ -> /docs/agent//flow/reference/components" -[components]: "/docs/grafana-cloud/ -> /docs/agent//flow/reference/components" -{{% /docs/reference %}} diff --git a/docs/sources/data-collection.md b/docs/sources/data-collection.md index 80fbd874cdcf..910d92653be2 100644 --- a/docs/sources/data-collection.md +++ b/docs/sources/data-collection.md @@ -10,6 +10,25 @@ description: Grafana Agent data collection menuTitle: Data collection title: Grafana Agent data collection weight: 500 +refs: + command-line-flag: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/reference/cli/run/ + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/reference/cli/run/ + flow: + - pattern: /docs/agent/ + destination: /docs/agent//flow/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/ + static: + - pattern: /docs/agent/ + destination: /docs/agent//static/ --- # Grafana Agent Data collection @@ -27,24 +46,14 @@ The usage information includes the following details: * Version of running Grafana Agent. * Operating system Grafana Agent is running on. * System architecture Grafana Agent is running on. -* List of enabled feature flags ([Static] mode only). -* List of enabled integrations ([Static] mode only). -* List of enabled [components][] ([Flow] mode only). +* List of enabled feature flags ([Static](ref:static) mode only). +* List of enabled integrations ([Static](ref:static) mode only). +* List of enabled [components](ref:components) ([Flow](ref:flow) mode only). * Method used to deploy Grafana Agent, for example Docker, Helm, RPM, or Operator. This list may change over time. All newly reported data is documented in the CHANGELOG. ## Opt-out of data collection -You can use the `-disable-reporting` [command line flag][] to disable the reporting and opt-out of the data collection. - -{{% docs/reference %}} -[command line flag]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md" -[command line flag]: "/docs/grafana-cloud/ -> /docs/agent//flow/reference/cli/run.md" -[components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -[components]: "/docs/grafana-cloud/ -> /docs/agent//flow/reference/cli/run.md" -[Static]: "/docs/agent/ -> /docs/agent//static" -[Static]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static -[Flow]: "/docs/agent/ -> /docs/agent//flow" -[Flow]: "/docs/grafana-cloud/ -> /docs/agent//flow" -{{% /docs/reference %}} \ No newline at end of file +You can use the `-disable-reporting` [command line flag](ref:command-line-flag) to disable the reporting and opt-out of the data collection. + diff --git a/docs/sources/flow/_index.md b/docs/sources/flow/_index.md index 947c898ecc4f..5b8185e891c4 100644 --- a/docs/sources/flow/_index.md +++ b/docs/sources/flow/_index.md @@ -12,6 +12,35 @@ weight: 400 cascade: PRODUCT_NAME: Grafana Agent Flow PRODUCT_ROOT_NAME: Grafana Agent +refs: + tasks: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/ + concepts: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/ + install: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/install/ + tutorials: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tutorials/ + reference: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/ + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/ --- # {{% param "PRODUCT_NAME" %}} @@ -38,7 +67,7 @@ Collector. Each distribution offers a different collection of components and capabilities. As a distribution, {{< param "PRODUCT_NAME" >}} includes dozens of -OpenTelemetry-native [components][] from the OpenTelemetry project and +OpenTelemetry-native [components](ref:components) from the OpenTelemetry project and introduces new features such as programmable pipelines, clustering support, and the ability to share pipelines around the world. @@ -91,25 +120,11 @@ This feature is experimental, and it doesn't support all River components. ## Next steps -* [Install][] {{< param "PRODUCT_NAME" >}}. -* Learn about the core [Concepts][] of {{< param "PRODUCT_NAME" >}}. -* Follow the [Tutorials][] for hands-on learning of {{< param "PRODUCT_NAME" >}}. -* Consult the [Tasks][] instructions to accomplish common objectives with {{< param "PRODUCT_NAME" >}}. -* Check out the [Reference][] documentation to find specific information you might be looking for. +* [Install](ref:install) {{< param "PRODUCT_NAME" >}}. +* Learn about the core [Concepts](ref:concepts) of {{< param "PRODUCT_NAME" >}}. +* Follow the [Tutorials](ref:tutorials) for hands-on learning of {{< param "PRODUCT_NAME" >}}. +* Consult the [Tasks](ref:tasks) instructions to accomplish common objectives with {{< param "PRODUCT_NAME" >}}. +* Check out the [Reference](ref:reference) documentation to find specific information you might be looking for. [distribution]: https://opentelemetry.io/ecosystem/distributions/ -{{% docs/reference %}} -[Install]: "/docs/agent/ -> /docs/agent//flow/get-started/install/" -[Install]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/install/" -[Concepts]: "/docs/agent/ -> /docs/agent//flow/concepts/" -[Concepts]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/" -[Tasks]: "/docs/agent/ -> /docs/agent//flow/tasks/" -[Tasks]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/" -[Tutorials]: "/docs/agent/ -> /docs/agent//flow/tutorials/" -[Tutorials]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tutorials/ -[Reference]: "/docs/agent/ -> /docs/agent//flow/reference/" -[Reference]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/" -[components]: "/docs/agent/ -> /docs/agent//flow/reference/" -[components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components" -{{% /docs/reference %}} diff --git a/docs/sources/flow/concepts/clustering.md b/docs/sources/flow/concepts/clustering.md index db118c56e9fe..9982004173f6 100644 --- a/docs/sources/flow/concepts/clustering.md +++ b/docs/sources/flow/concepts/clustering.md @@ -9,6 +9,42 @@ description: Learn about Grafana Agent clustering concepts menuTitle: Clustering title: Clustering weight: 500 +refs: + prometheus.operator.servicemonitors: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.operator.servicemonitors/#clustering-beta + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.operator.servicemonitors/#clustering-beta + prometheus.scrape: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.scrape/#clustering-beta + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.scrape/#clustering-beta + debugging: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#debugging-clustering-issues + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#debugging-clustering-issues + pyroscope.scrape: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/pyroscope.scrape/#clustering-beta + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/pyroscope.scrape/#clustering-beta + clustering-page: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#clustering-page + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#clustering-page + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/#clustering + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/#clustering + prometheus.operator.podmonitors: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.operator.podmonitors/#clustering-beta + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.operator.podmonitors/#clustering-beta --- # Clustering @@ -21,7 +57,7 @@ To achieve this, {{< param "PRODUCT_NAME" >}} makes use of an eventually consist The behavior of a standalone, non-clustered {{< param "PRODUCT_ROOT_NAME" >}} is the same as if it were a single-node cluster. -You configure clustering by passing `cluster` command-line flags to the [run][] command. +You configure clustering by passing `cluster` command-line flags to the [run](ref:run) command. ## Use cases @@ -53,29 +89,13 @@ It also provides resiliency because targets are automatically picked up by one o Refer to component reference documentation to discover whether it supports clustering, such as: -- [prometheus.scrape][] -- [pyroscope.scrape][] -- [prometheus.operator.podmonitors][] -- [prometheus.operator.servicemonitors][] +- [prometheus.scrape](ref:prometheus.scrape) +- [pyroscope.scrape](ref:pyroscope.scrape) +- [prometheus.operator.podmonitors](ref:prometheus.operator.podmonitors) +- [prometheus.operator.servicemonitors](ref:prometheus.operator.servicemonitors) ## Cluster monitoring and troubleshooting -You can use the {{< param "PRODUCT_NAME" >}} UI [clustering page][] to monitor your cluster status. -Refer to [Debugging clustering issues][debugging] for additional troubleshooting information. - -{{% docs/reference %}} -[run]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md#clustering" -[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/run.md#clustering" -[prometheus.scrape]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.scrape.md#clustering-beta" -[prometheus.scrape]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.scrape.md#clustering-beta" -[pyroscope.scrape]: "/docs/agent/ -> /docs/agent//flow/reference/components/pyroscope.scrape.md#clustering-beta" -[pyroscope.scrape]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/pyroscope.scrape.md#clustering-beta" -[prometheus.operator.podmonitors]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.operator.podmonitors.md#clustering-beta" -[prometheus.operator.podmonitors]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.operator.podmonitors.md#clustering-beta" -[prometheus.operator.servicemonitors]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.operator.servicemonitors.md#clustering-beta" -[prometheus.operator.servicemonitors]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.operator.servicemonitors.md#clustering-beta" -[clustering page]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#clustering-page" -[clustering page]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.md#clustering-page" -[debugging]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#debugging-clustering-issues" -[debugging]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.md#debugging-clustering-issues" -{{% /docs/reference %}} +You can use the {{< param "PRODUCT_NAME" >}} UI [clustering page](ref:clustering-page) to monitor your cluster status. +Refer to [Debugging clustering issues](ref:debugging) for additional troubleshooting information. + diff --git a/docs/sources/flow/concepts/component_controller.md b/docs/sources/flow/concepts/component_controller.md index 1a19e13b4979..904451b567a4 100644 --- a/docs/sources/flow/concepts/component_controller.md +++ b/docs/sources/flow/concepts/component_controller.md @@ -9,6 +9,22 @@ canonical: https://grafana.com/docs/agent/latest/flow/concepts/component_control description: Learn about the component controller title: Component controller weight: 200 +refs: + prometheus.exporter.unix: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.exporter.unix/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.exporter.unix/ + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ --- # Component controller @@ -24,7 +40,7 @@ The component controller is responsible for: ## Component graph -A relationship between [components][Components] is created when an expression is used to set the argument of one component to an exported field of another component. +A relationship between [components](ref: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 references are valid and in what order components must be evaluated. @@ -59,7 +75,7 @@ Components that don't depend on other components can be evaluated anytime during ## Component reevaluation -A [component][Components] is dynamic. A component can update its exports any number of times throughout its lifetime. +A [component](ref:components) is dynamic. A component can update its exports any number of times throughout its lifetime. A _controller reevaluation_ is triggered when a component updates its exports. The component controller reevaluates any component that references the changed component, any components that reference those components, @@ -97,11 +113,11 @@ If your `local.file` component, which watches API keys, suddenly stops working, ## In-memory traffic -Components that expose HTTP endpoints, such as [prometheus.exporter.unix][], can expose an internal address that completely bypasses the network and communicate in-memory. +Components that expose HTTP endpoints, such as [prometheus.exporter.unix](ref:prometheus.exporter.unix), can expose an internal address that completely bypasses the network and communicate in-memory. Components within the same process can communicate with one another without needing to be aware of any network-level protections such as authentication or mutual TLS. The internal address defaults to `agent.internal:12345`. -If this address collides with a real target on your network, change it to something unique using the `--server.http.memory-addr` flag in the [run][] command. +If this address collides with a real target on your network, change it to something unique using the `--server.http.memory-addr` flag in the [run](ref:run) command. Components must opt-in to using in-memory traffic. Refer to the individual documentation for components to learn if in-memory traffic is supported. @@ -115,11 +131,3 @@ All components managed by the controller are reevaluated after reloading. [DAG]: https://en.wikipedia.org/wiki/Directed_acyclic_graph -{{% docs/reference %}} -[prometheus.exporter.unix]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.exporter.unix.md" -[prometheus.exporter.unix]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.exporter.unix.md" -[run]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md" -[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/run.md" -[Components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -[Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/concepts/config-language/_index.md b/docs/sources/flow/concepts/config-language/_index.md index 80699732f3ac..4b38a4d83966 100644 --- a/docs/sources/flow/concepts/config-language/_index.md +++ b/docs/sources/flow/concepts/config-language/_index.md @@ -20,6 +20,12 @@ canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/ description: Learn about the configuration language title: Configuration language weight: 10 +refs: + fmt: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/fmt/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/fmt/ --- # Configuration language @@ -130,7 +136,7 @@ You can use one or all of the following tools to help you write configuration fi * [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] +* Code formatting using the [`agent fmt` command](ref: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. @@ -141,7 +147,3 @@ You can also start developing your own tooling using the {{< param "PRODUCT_ROOT [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/concepts/config-language/components.md b/docs/sources/flow/concepts/config-language/components.md index 967d2437da8c..0d9bc8541907 100644 --- a/docs/sources/flow/concepts/config-language/components.md +++ b/docs/sources/flow/concepts/config-language/components.md @@ -15,6 +15,22 @@ canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/c description: Learn about the components configuration language title: Components configuration language weight: 300 +refs: + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/ + controller: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/component_controller/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/component_controller/ + type: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/expressions/types_and_values/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values/ --- # Components configuration language @@ -23,11 +39,11 @@ Components are the defining feature of {{< param "PRODUCT_NAME" >}}. Components are small, reusable pieces of business logic that perform a single task like retrieving secrets or collecting Prometheus metrics, and you can wire them together to form programmable pipelines of telemetry data. -The [_component controller_][controller] is responsible for scheduling components, reporting their health and debug status, re-evaluating their arguments, and providing their exports. +The [_component controller_](ref:controller) is responsible for scheduling components, reporting their health and debug status, re-evaluating their arguments, and providing their exports. ## Configuring components -You create [components][] by defining a top-level River block. +You create [components](ref:components) by defining a top-level River block. All components are identified by their name, describing what the component is responsible for, and a user-specified _label_. ## Arguments and exports @@ -87,18 +103,10 @@ prometheus.scrape "default" { Each time the file contents change, the `local.file` updates its exports. The new value is sent to the `prometheus.scrape` targets field. -Each argument and exported field has an underlying [type][]. +Each argument and exported field has an underlying [type](ref:type). River checks the expression type before assigning a value to an attribute. -The documentation of each [component][components] provides more information about how to wire components together. +The documentation of each [component](ref:components) provides more information about how to wire components together. In the previous example, the contents of the `local.file.targets.content` expression is evaluated to a concrete value. The value is type-checked and substituted into `prometheus.scrape.default`, where you can configure it. -{{% docs/reference %}} -[components]: "/docs/agent/ -> /docs/agent//flow/reference/components" -[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/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/config-language/expressions/_index.md b/docs/sources/flow/concepts/config-language/expressions/_index.md index 56dc4c1ee4a1..85d8660c468b 100644 --- a/docs/sources/flow/concepts/config-language/expressions/_index.md +++ b/docs/sources/flow/concepts/config-language/expressions/_index.md @@ -15,6 +15,22 @@ canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/e description: Learn about expressions title: Expressions weight: 400 +refs: + call-functions: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/expressions/function_calls/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/function_calls/ + refer-to-values: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/expressions/referencing_exports/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/referencing_exports/ + type: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/expressions/types_and_values/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values/ --- # Expressions @@ -22,17 +38,9 @@ weight: 400 Expressions represent or compute values you can assign to attributes within a configuration. Basic expressions are literal values, like `"Hello, world!"` or `true`. -Expressions may also do things like [refer to values][] exported by components, perform arithmetic, or [call functions][]. +Expressions may also do things like [refer to values](ref:refer-to-values) exported by components, perform arithmetic, or [call functions](ref:call-functions). You use expressions when you configure any component. -All component arguments have an underlying [type][]. +All component arguments have an underlying [type](ref:type). River checks the expression type before assigning the result to an attribute. -{{% docs/reference %}} -[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/concepts/config-language/expressions/function_calls.md b/docs/sources/flow/concepts/config-language/expressions/function_calls.md index b9598fea91a1..a5738b44e0a6 100644 --- a/docs/sources/flow/concepts/config-language/expressions/function_calls.md +++ b/docs/sources/flow/concepts/config-language/expressions/function_calls.md @@ -15,6 +15,12 @@ canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/e description: Learn about function calls title: Function calls weight: 400 +refs: + standard-library: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/stdlib/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/stdlib/ --- # Function calls @@ -28,7 +34,7 @@ If a function fails, the expression isn't evaluated, and an error is reported. ## Standard library functions -River contains a [standard library][] of functions. +River contains a [standard library](ref:standard-library) of functions. Some functions enable interaction with the host system, for example, reading from an environment variable. Some functions allow for more complex expressions, for example, concatenating arrays or decoding JSON strings into objects. @@ -37,7 +43,3 @@ env("HOME") json_decode(local.file.cfg.content)["namespace"] ``` -{{% docs/reference %}} -[standard library]: "/docs/agent/ -> /docs/agent//flow/reference/stdlib" -[standard library]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/stdlib" -{{% /docs/reference %}} \ No newline at end of file diff --git a/docs/sources/flow/concepts/config-language/expressions/referencing_exports.md b/docs/sources/flow/concepts/config-language/expressions/referencing_exports.md index 2cc7a8ca5b21..1614583abc40 100644 --- a/docs/sources/flow/concepts/config-language/expressions/referencing_exports.md +++ b/docs/sources/flow/concepts/config-language/expressions/referencing_exports.md @@ -15,6 +15,12 @@ canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/e description: Learn about referencing component exports title: Referencing component exports weight: 200 +refs: + type: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/expressions/types_and_values/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values/ --- # Referencing component exports @@ -56,11 +62,7 @@ In the preceding example, you wired together a very simple pipeline by writing a ![Flow of example pipeline](/media/docs/agent/flow_referencing_exports_diagram.svg) -After the value is resolved, it must match the [type][] of the attribute it is assigned to. +After the value is resolved, it must match the [type](ref:type) of the attribute it is assigned to. 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/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/config-language/expressions/types_and_values.md b/docs/sources/flow/concepts/config-language/expressions/types_and_values.md index 70afaf790472..a1d46d2fd537 100644 --- a/docs/sources/flow/concepts/config-language/expressions/types_and_values.md +++ b/docs/sources/flow/concepts/config-language/expressions/types_and_values.md @@ -15,6 +15,12 @@ canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/e description: Learn about the River types and values title: Types and values weight: 100 +refs: + type: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/ --- # Types and values @@ -218,7 +224,3 @@ prometheus.scrape "default" { } ``` -{{% docs/reference %}} -[type]: "/docs/agent/ -> /docs/agent//flow/reference/components" -[type]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components" -{{% /docs/reference %}} \ No newline at end of file diff --git a/docs/sources/flow/concepts/config-language/syntax.md b/docs/sources/flow/concepts/config-language/syntax.md index 6f55701dab67..9bee7086c40a 100644 --- a/docs/sources/flow/concepts/config-language/syntax.md +++ b/docs/sources/flow/concepts/config-language/syntax.md @@ -15,6 +15,17 @@ canonical: https://grafana.com/docs/agent/latest/flow/concepts/config-language/s description: Learn about the River syntax title: Syntax weight: 200 +refs: + expression: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/expressions/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/ + type: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/expressions/types_and_values/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values/ --- # Syntax @@ -50,8 +61,8 @@ log_level = "debug" The `ATTRIBUTE_NAME` must be a valid River [identifier][]. -The `ATTRIBUTE_VALUE` can be either a constant value of a valid River [type][] (for example, a string, boolean, number), -or an [_expression_][expression] to represent or compute more complex attribute values. +The `ATTRIBUTE_VALUE` can be either a constant value of a valid River [type](ref:type) (for example, a string, boolean, number), +or an [_expression_](ref:expression) to represent or compute more complex attribute values. ### Blocks @@ -117,9 +128,3 @@ River ignores other newlines and you can can enter as many newlines as you want. [identifier]: #identifiers [identifier]: #identifiers -{{% docs/reference %}} -[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/get-started/install/_index.md b/docs/sources/flow/get-started/install/_index.md index 25b9a5b2f101..bb80d4aa078e 100644 --- a/docs/sources/flow/get-started/install/_index.md +++ b/docs/sources/flow/get-started/install/_index.md @@ -16,6 +16,12 @@ description: Learn how to install Grafana Agent Flow menuTitle: Install title: Install Grafana Agent Flow weight: 50 +refs: + data-collection: + - pattern: /docs/agent/ + destination: /docs/agent//data-collection/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/data-collection/ --- # Install {{% param "PRODUCT_NAME" %}} @@ -37,10 +43,6 @@ Installing {{< param "PRODUCT_NAME" >}} on other operating systems is possible, ## Data collection -By default, {{< param "PRODUCT_NAME" >}} sends anonymous usage information to Grafana Labs. Refer to [data collection][] for more information +By default, {{< param "PRODUCT_NAME" >}} sends anonymous usage information to Grafana Labs. Refer to [data collection](ref:data-collection) for more information about what data is collected and how you can opt-out. -{{% docs/reference %}} -[data collection]: "/docs/agent/ -> /docs/agent//data-collection.md" -[data collection]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/data-collection.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/install/ansible.md b/docs/sources/flow/get-started/install/ansible.md index 837f5553eb31..da424df6aa35 100644 --- a/docs/sources/flow/get-started/install/ansible.md +++ b/docs/sources/flow/get-started/install/ansible.md @@ -9,6 +9,12 @@ description: Learn how to install Grafana Agent Flow with Ansible menuTitle: Ansible title: Install Grafana Agent Flow with Ansible weight: 550 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-linux/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux/ --- # Install or uninstall {{% param "PRODUCT_NAME" %}} using Ansible @@ -78,9 +84,5 @@ Main PID: 3176 (agent-linux-amd) ## Next steps -- [Configure {{< param "PRODUCT_NAME" >}}][Configure] +- [Configure {{< param "PRODUCT_NAME" >}}](ref:configure) -{{% docs/reference %}} -[Configure]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-linux.md" -[Configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/install/binary.md b/docs/sources/flow/get-started/install/binary.md index fa304df0acb2..8b1dd7e67fc4 100644 --- a/docs/sources/flow/get-started/install/binary.md +++ b/docs/sources/flow/get-started/install/binary.md @@ -16,6 +16,12 @@ description: Learn how to install Grafana Agent Flow as a standalone binary menuTitle: Standalone title: Install Grafana Agent Flow as a standalone binary weight: 600 +refs: + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/run/binary/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/run/binary/ --- # Install {{% param "PRODUCT_NAME" %}} as a standalone binary @@ -51,9 +57,5 @@ To download {{< param "PRODUCT_NAME" >}} as a standalone binary, perform the fol ## Next steps -- [Run {{< param "PRODUCT_NAME" >}}][Run] +- [Run {{< param "PRODUCT_NAME" >}}](ref:run) -{{% docs/reference %}} -[Run]: "/docs/agent/ -> /docs/agent//flow/get-started/run/binary.md" -[Run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/run/binary.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/install/chef.md b/docs/sources/flow/get-started/install/chef.md index ef348384a5ed..46e885df1c7b 100644 --- a/docs/sources/flow/get-started/install/chef.md +++ b/docs/sources/flow/get-started/install/chef.md @@ -10,6 +10,12 @@ description: Learn how to install Grafana Agent Flow with Chef menuTitle: Chef title: Install Grafana Agent Flow with Chef weight: 550 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-linux/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux/ --- # Install {{% param "PRODUCT_NAME" %}} with Chef @@ -94,11 +100,7 @@ The default configuration file location is `/etc/grafana-agent-flow.river`. You ## Next steps -- [Configure {{< param "PRODUCT_NAME" >}}][Configure] +- [Configure {{< param "PRODUCT_NAME" >}}](ref:configure) [Chef]: https://www.chef.io/products/chef-infrastructure-management/ -{{% docs/reference %}} -[Configure]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-linux.md" -[Configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/install/docker.md b/docs/sources/flow/get-started/install/docker.md index c7e07b1b3b7a..85f38ca3f34d 100644 --- a/docs/sources/flow/get-started/install/docker.md +++ b/docs/sources/flow/get-started/install/docker.md @@ -16,6 +16,17 @@ description: Learn how to install Grafana Agent Flow on Docker menuTitle: Docker title: Run Grafana Agent Flow in a Docker container weight: 100 +refs: + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#grafana-agent-flow-ui + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ --- # Run {{% param "PRODUCT_NAME" %}} in a Docker container @@ -55,11 +66,11 @@ Replace the following: - _``_: The path of the configuration file on your host system. You can modify the last line to change the arguments passed to the {{< param "PRODUCT_NAME" >}} binary. -Refer to the documentation for [run][] for more information about the options available to the `run` command. +Refer to the documentation for [run](ref:run) for more information about the options available to the `run` command. {{< admonition type="note" >}} Make sure you pass `--server.http.listen-addr=0.0.0.0:12345` as an argument as shown in the example above. -If you don't pass this argument, the [debugging UI][UI] won't be available outside of the Docker container. +If you don't pass this argument, the [debugging UI](ref:ui) won't be available outside of the Docker container. {{< /admonition >}} ## Run a Windows Docker container @@ -80,24 +91,18 @@ Replace the following: - _``_: The path of the configuration file on your host system. You can modify the last line to change the arguments passed to the {{< param "PRODUCT_NAME" >}} binary. -Refer to the documentation for [run][] for more information about the options available to the `run` command. +Refer to the documentation for [run](ref:run) for more information about the options available to the `run` command. {{< admonition type="note" >}} Make sure you pass `--server.http.listen-addr=0.0.0.0:12345` as an argument as shown in the example above. -If you don't pass this argument, the [debugging UI][UI] won't be available outside of the Docker container. +If you don't pass this argument, the [debugging UI](ref:ui) won't be available outside of the Docker container. {{< /admonition >}} ## Verify -To verify that {{< param "PRODUCT_NAME" >}} is running successfully, navigate to and make sure the {{< param "PRODUCT_NAME" >}} [UI][] loads without error. +To verify that {{< param "PRODUCT_NAME" >}} is running successfully, navigate to and make sure the {{< param "PRODUCT_NAME" >}} [UI](ref:ui) loads without error. [Linux containers]: #run-a-linux-docker-container [Windows containers]: #run-a-windows-docker-container [Docker]: https://docker.io -{{% docs/reference %}} -[run]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md" -[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/run.md" -[UI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.md#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/install/kubernetes.md b/docs/sources/flow/get-started/install/kubernetes.md index b41a98fbd230..d97140ffcb23 100644 --- a/docs/sources/flow/get-started/install/kubernetes.md +++ b/docs/sources/flow/get-started/install/kubernetes.md @@ -16,6 +16,12 @@ description: Learn how to deploy Grafana Agent Flow on Kubernetes menuTitle: Kubernetes title: Deploy Grafana Agent Flow on Kubernetes weight: 200 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-kubernetes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-kubernetes/ --- # Deploy {{% param "PRODUCT_NAME" %}} on Kubernetes @@ -82,11 +88,11 @@ To deploy {{< param "PRODUCT_ROOT_NAME" >}} on Kubernetes using Helm, run the fo You have successfully deployed {{< param "PRODUCT_NAME" >}} on Kubernetes, using default Helm settings. To configure {{< param "PRODUCT_NAME" >}}, -see the [Configure {{< param "PRODUCT_NAME" >}} on Kubernetes][Configure] guide. +see the [Configure {{< param "PRODUCT_NAME" >}} on Kubernetes](ref:configure) guide. ## Next steps -- [Configure {{< param "PRODUCT_NAME" >}} on Kubernetes][Configure] +- [Configure {{< param "PRODUCT_NAME" >}} on Kubernetes](ref:configure) - Refer to the [{{< param "PRODUCT_NAME" >}} Helm chart documentation on Artifact Hub][Artifact Hub] for more information about Helm chart. @@ -94,7 +100,3 @@ see the [Configure {{< param "PRODUCT_NAME" >}} on Kubernetes][Configure] guide. [Helm]: https://helm.sh -{{% docs/reference %}} -[Configure]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-kubernetes.md" -[Configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-kubernetes.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/install/linux.md b/docs/sources/flow/get-started/install/linux.md index 2241aeb78d0a..88e8690b00c5 100644 --- a/docs/sources/flow/get-started/install/linux.md +++ b/docs/sources/flow/get-started/install/linux.md @@ -16,6 +16,17 @@ description: Learn how to install Grafana Agent Flow on Linux menuTitle: Linux title: Install Grafana Agent Flow on Linux weight: 300 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-linux/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux/ + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/run/linux/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/run/linux/ --- # Install or uninstall {{% param "PRODUCT_NAME" %}} on Linux @@ -125,12 +136,6 @@ To uninstall {{< param "PRODUCT_NAME" >}} on Linux, run the following commands i ## Next steps -- [Run {{< param "PRODUCT_NAME" >}}][Run] -- [Configure {{< param "PRODUCT_NAME" >}}][Configure] +- [Run {{< param "PRODUCT_NAME" >}}](ref:run) +- [Configure {{< param "PRODUCT_NAME" >}}](ref:configure) -{{% docs/reference %}} -[Run]: "/docs/agent/ -> /docs/agent//flow/get-started/run/linux.md" -[Run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/run/linux.md" -[Configure]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-linux.md" -[Configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/install/macos.md b/docs/sources/flow/get-started/install/macos.md index c16f70e6d941..1631055497a4 100644 --- a/docs/sources/flow/get-started/install/macos.md +++ b/docs/sources/flow/get-started/install/macos.md @@ -16,6 +16,17 @@ description: Learn how to install Grafana AgentFlow on macOS menuTitle: macOS title: Install Grafana Agent Flow on macOS weight: 400 +refs: + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/run/macos/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/run/macos/ + configure: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-macos/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-macos/ --- # Install {{% param "PRODUCT_NAME" %}} on macOS @@ -72,14 +83,8 @@ brew uninstall grafana-agent-flow ## Next steps -- [Run {{< param "PRODUCT_NAME" >}}][Run] -- [Configure {{< param "PRODUCT_NAME" >}}][Configure] +- [Run {{< param "PRODUCT_NAME" >}}](ref:run) +- [Configure {{< param "PRODUCT_NAME" >}}](ref:configure) [Homebrew]: https://brew.sh -{{% docs/reference %}} -[Run]: "/docs/agent/ -> /docs/agent//flow/get-started/run/macos.md" -[Run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/run/macos.md" -[Configure]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-macos.md" -[Configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-macos.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/install/puppet.md b/docs/sources/flow/get-started/install/puppet.md index db3fb2b4886d..7c144615e18d 100644 --- a/docs/sources/flow/get-started/install/puppet.md +++ b/docs/sources/flow/get-started/install/puppet.md @@ -10,6 +10,12 @@ description: Learn how to install Grafana Agent Flow with Puppet menuTitle: Puppet title: Install Grafana Agent Flow with Puppet weight: 560 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-linux/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux/ --- # Install {{% param "PRODUCT_NAME" %}} with Puppet @@ -103,11 +109,7 @@ The default configuration file location is `/etc/grafana-agent-flow.river`. You ## Next steps -- [Configure {{< param "PRODUCT_NAME" >}}][Configure] +- [Configure {{< param "PRODUCT_NAME" >}}](ref:configure) [Puppet]: https://www.puppet.com/ -{{% docs/reference %}} -[Configure]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-linux.md" -[Configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/install/windows.md b/docs/sources/flow/get-started/install/windows.md index b71ed6118970..a0c01294aab3 100644 --- a/docs/sources/flow/get-started/install/windows.md +++ b/docs/sources/flow/get-started/install/windows.md @@ -16,6 +16,22 @@ description: Learn how to install Grafana Agent Flow on Windows menuTitle: Windows title: Install Grafana Agent Flow on Windows weight: 500 +refs: + data-collection: + - pattern: /docs/agent/ + destination: /docs/agent//data-collection/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/data-collection/ + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/run/windows/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/run/windows/ + configure: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-windows/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-windows/ --- # Install {{% param "PRODUCT_NAME" %}} on Windows @@ -63,7 +79,7 @@ To do a silent install of {{< param "PRODUCT_NAME" >}} on Windows, perform the f ### Silent install options * `/CONFIG=` Path to the configuration file. Default: `$INSTDIR\config.river` -* `/DISABLEREPORTING=` Disable [data collection][]. Default: `no` +* `/DISABLEREPORTING=` Disable [data collection](ref:data-collection). Default: `no` * `/DISABLEPROFILING=` Disable profiling endpoint. Default: `no` * `/ENVIRONMENT="KEY=VALUE\0KEY2=VALUE2"` Define environment variables for Windows Service. Default: `` @@ -84,16 +100,8 @@ This includes any configuration files in the installation directory. ## Next steps -- [Run {{< param "PRODUCT_NAME" >}}][Run] -- [Configure {{< param "PRODUCT_NAME" >}}][Configure] +- [Run {{< param "PRODUCT_NAME" >}}](ref:run) +- [Configure {{< param "PRODUCT_NAME" >}}](ref:configure) [latest]: https://github.com/grafana/agent/releases/latest -{{% docs/reference %}} -[Run]: "/docs/agent/ -> /docs/agent//flow/get-started/run/windows.md" -[Run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/run/windows.md" -[Configure]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-windows.md" -[Configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-windows.md" -[data collection]: "/docs/agent/ -> /docs/agent//data-collection.md" -[data collection]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/data-collection.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/run/_index.md b/docs/sources/flow/get-started/run/_index.md index f98f8707354f..6b38643a6fcc 100644 --- a/docs/sources/flow/get-started/run/_index.md +++ b/docs/sources/flow/get-started/run/_index.md @@ -16,16 +16,18 @@ description: Learn how to run Grafana Agent Flow menuTitle: Run title: Run Grafana Agent Flow weight: 50 +refs: + install: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/install/ --- # Run {{% param "PRODUCT_NAME" %}} Use the following pages to learn how to start, restart, and stop {{< param "PRODUCT_NAME" >}} after it is installed. -For installation instructions, refer to [Install {{< param "PRODUCT_NAME" >}}][Install]. +For installation instructions, refer to [Install {{< param "PRODUCT_NAME" >}}](ref:install). {{< section >}} -{{% docs/reference %}} -[Install]: "/docs/agent/ -> /docs/agent//flow/get-started/install/" -[Install]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/install/" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/run/binary.md b/docs/sources/flow/get-started/run/binary.md index 0b9ac5b7d74a..1f398c645b35 100644 --- a/docs/sources/flow/get-started/run/binary.md +++ b/docs/sources/flow/get-started/run/binary.md @@ -9,11 +9,22 @@ description: Learn how to run Grafana Agent Flow as a standalone binary menuTitle: Standalone title: Run Grafana Agent Flow as a standalone binary weight: 600 +refs: + startlinux: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/run/linux/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/flow/get-started/run/linux/ + installbinary: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/binary/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/flow/get-started/install/binary/ --- # Run {{% param "PRODUCT_NAME" %}} as a standalone binary -If you [downloaded][InstallBinary] the standalone binary, you must run {{< param "PRODUCT_NAME" >}} from a terminal or command window. +If you [downloaded](ref:installbinary) the standalone binary, you must run {{< param "PRODUCT_NAME" >}} from a terminal or command window. ## Start {{% param "PRODUCT_NAME" %}} on Linux, macOS, or FreeBSD @@ -116,11 +127,5 @@ These steps assume you have a default systemd and {{< param "PRODUCT_NAME" >}} c sudo systemctl daemon-reload ``` -1. Use the [Linux][StartLinux] systemd commands to manage your standalone Linux installation of {{< param "PRODUCT_NAME" >}}. +1. Use the [Linux](ref:startlinux) systemd commands to manage your standalone Linux installation of {{< param "PRODUCT_NAME" >}}. -{{% docs/reference %}} -[InstallBinary]: "/docs/agent/ -> /docs/agent//flow/get-started/install/binary.md" -[InstallBinary]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/flow/get-started/install/binary.md" -[StartLinux]: "/docs/agent/ -> /docs/agent//flow/get-started/run/linux.md" -[StartLinux]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/flow/get-started/run/linux.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/run/linux.md b/docs/sources/flow/get-started/run/linux.md index 1085aaabdf46..38369e75ef47 100644 --- a/docs/sources/flow/get-started/run/linux.md +++ b/docs/sources/flow/get-started/run/linux.md @@ -9,11 +9,22 @@ description: Learn how to run Grafana Agent Flow on Linux menuTitle: Linux title: Run Grafana Agent Flow on Linux weight: 300 +refs: + installlinux: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/linux/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/flow/get-started/install/linux/ + configure: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-linux/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux/ --- # Run {{% param "PRODUCT_NAME" %}} on Linux -{{< param "PRODUCT_NAME" >}} is [installed][InstallLinux] as a [systemd][] service on Linux. +{{< param "PRODUCT_NAME" >}} is [installed](ref:installlinux) as a [systemd][] service on Linux. [systemd]: https://systemd.io/ @@ -65,11 +76,5 @@ sudo journalctl -u grafana-agent-flow ## Next steps -- [Configure {{< param "PRODUCT_NAME" >}}][Configure] +- [Configure {{< param "PRODUCT_NAME" >}}](ref:configure) -{{% docs/reference %}} -[InstallLinux]: "/docs/agent/ -> /docs/agent//flow/get-started/install/linux.md" -[InstallLinux]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/flow/get-started/install/linux.md" -[Configure]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-linux.md" -[Configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-linux.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/run/macos.md b/docs/sources/flow/get-started/run/macos.md index 8c7a055dd853..85bcc456ae47 100644 --- a/docs/sources/flow/get-started/run/macos.md +++ b/docs/sources/flow/get-started/run/macos.md @@ -9,11 +9,27 @@ description: Learn how to run Grafana Agent Flow on macOS menuTitle: macOS title: Run Grafana Agent Flow on macOS weight: 400 +refs: + configuremacos: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-macos/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-macos/ + configureservice: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-macos/#configure-the-grafana-agent-flow-service + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-macos/#configure-the-grafana-agent-flow-service + installmacos: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/macos/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/flow/get-started/install/macos/ --- # Run {{% param "PRODUCT_NAME" %}} on macOS -{{< param "PRODUCT_NAME" >}} is [installed][InstallMacOS] as a launchd service on macOS. +{{< param "PRODUCT_NAME" >}} is [installed](ref:installmacos) as a launchd service on macOS. ## Start {{% param "PRODUCT_NAME" %}} @@ -52,18 +68,10 @@ brew services stop grafana-agent-flow By default, logs are written to `$(brew --prefix)/var/log/grafana-agent-flow.log` and `$(brew --prefix)/var/log/grafana-agent-flow.err.log`. -If you followed [Configure the {{< param "PRODUCT_NAME" >}} service][ConfigureService] and changed the path where logs are written, +If you followed [Configure the {{< param "PRODUCT_NAME" >}} service](ref:configureservice) and changed the path where logs are written, refer to your current copy of the {{< param "PRODUCT_NAME" >}} formula to locate your log files. ## Next steps -- [Configure {{< param "PRODUCT_NAME" >}}][ConfigureMacOS] +- [Configure {{< param "PRODUCT_NAME" >}}](ref:configuremacos) -{{% docs/reference %}} -[InstallMacOS]: "/docs/agent/ -> /docs/agent//flow/get-started/install/macos.md" -[InstallMacOS]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/flow/get-started/install/macos.md" -[ConfigureMacOS]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-macos.md" -[ConfigureMacOS]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-macos.md" -[ConfigureService]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-macos.md#configure-the-grafana-agent-flow-service" -[ConfigureService]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-macos.md#configure-the-grafana-agent-flow-service" -{{% /docs/reference %}} diff --git a/docs/sources/flow/get-started/run/windows.md b/docs/sources/flow/get-started/run/windows.md index 2ee89710b028..d6f6a355dcf0 100644 --- a/docs/sources/flow/get-started/run/windows.md +++ b/docs/sources/flow/get-started/run/windows.md @@ -9,11 +9,22 @@ description: Learn how to run Grafana Agent Flow on Windows menuTitle: Windows title: Run Grafana Agent Flow on Windows weight: 500 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/configure-windows/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-windows/ + installwindows: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/windows/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/flow/get-started/install/windows/ --- # Run {{% param "PRODUCT_NAME" %}} on Windows -{{< param "PRODUCT_NAME" >}} is [installed][InstallWindows] as a Windows Service. The service is configured to automatically run on startup. +{{< param "PRODUCT_NAME" >}} is [installed](ref:installwindows) as a Windows Service. The service is configured to automatically run on startup. To verify that {{< param "PRODUCT_NAME" >}} is running as a Windows Service: @@ -44,11 +55,5 @@ To view the logs, perform the following steps: ## Next steps -- [Configure {{< param "PRODUCT_NAME" >}}][Configure] +- [Configure {{< param "PRODUCT_NAME" >}}](ref:configure) -{{% docs/reference %}} -[InstallWindows]: "/docs/agent/ -> /docs/agent//flow/get-started/install/windows.md" -[InstallWindows]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/flow/get-started/install/windows.md" -[Configure]: "/docs/agent/ -> /docs/agent//flow/tasks/configure/configure-windows.md" -[Configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure/configure-windows.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/reference/config-blocks/argument.md b/docs/sources/flow/reference/config-blocks/argument.md index 758ec1d5ee24..f1a1617daaca 100644 --- a/docs/sources/flow/reference/config-blocks/argument.md +++ b/docs/sources/flow/reference/config-blocks/argument.md @@ -8,14 +8,25 @@ canonical: https://grafana.com/docs/agent/latest/flow/reference/config-blocks/ar description: Learn about the argument configuration block menuTitle: argument title: argument block +refs: + declare: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/config-blocks/declare/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/declare/ + custom-component: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/custom_components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/custom_components/ --- # argument block -`argument` is an optional configuration block used to specify parameterized input to a [custom component][]. +`argument` is an optional configuration block used to specify parameterized input to a [custom component](ref:custom-component). `argument` blocks must be given a label which determines the name of the argument. -The `argument` block may only be specified inside the definition of [a `declare` block][declare]. +The `argument` block may only be specified inside the definition of [a `declare` block](ref:declare). {{< admonition type="note" >}} In [classic modules][], the `argument` block is valid as a top-level block in a classic module. @@ -81,9 +92,3 @@ declare "self_collect" { } ``` -{{% docs/reference %}} -[custom component]: "/docs/agent/ -> /docs/agent//flow/concepts/custom_components" -[custom component]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/custom_components" -[declare]: "/docs/agent/ -> /docs/agent//flow/reference/config-blocks/declare" -[declare]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/declare" -{{% /docs/reference %}} diff --git a/docs/sources/flow/reference/config-blocks/declare.md b/docs/sources/flow/reference/config-blocks/declare.md index f4f6f455a4bf..2a8c579f4a40 100644 --- a/docs/sources/flow/reference/config-blocks/declare.md +++ b/docs/sources/flow/reference/config-blocks/declare.md @@ -8,6 +8,21 @@ canonical: https://grafana.com/docs/agent/latest/flow/reference/config-blocks/de description: Learn about the declare configuration block menuTitle: declare title: declare block +refs: + import: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/modules/#importing-modules + export: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/config-blocks/export/ + declare: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/config-blocks/declare/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/declare/ + argument: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/config-blocks/argument/ --- # declare block @@ -29,10 +44,10 @@ The `declare` block has no predefined schema for its arguments. The body of the `declare` block is used as the component definition. The body can contain the following: -* [argument][] blocks -* [export][] blocks -* [declare][] blocks -* [import][] blocks +* [argument](ref:argument) blocks +* [export](ref:export) blocks +* [declare](ref:declare) blocks +* [import](ref:import) blocks * Component definitions (either built-in or custom components) The `declare` block may not contain any configuration blocks that aren't listed above. @@ -40,7 +55,7 @@ The `declare` block may not contain any configuration blocks that aren't listed ## Exported fields The `declare` block has no predefined schema for its exports. -The fields exported by the `declare` block are determined by the [export blocks][export] found in its definition. +The fields exported by the `declare` block are determined by the [export blocks](ref:export) found in its definition. ## Example @@ -73,13 +88,3 @@ prometheus.remote_write "example" { } ``` -{{% docs/reference %}} -[argument]: "/docs/agent/ -> /docs/agent//flow/reference/config-blocks/argument" -[argument]:"/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/argument" -[export]: "/docs/agent/ -> /docs/agent//flow/reference/config-blocks/export" -[export]:"/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/export" -[declare]: "/docs/agent/ -> /docs/agent//flow/reference/config-blocks/declare" -[declare]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/declare" -[import]: "/docs/agent/ -> /docs/agent//flow/concepts/modules#importing-modules" -[import]:"/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/modules#importing-modules" -{{% /docs/reference %}} diff --git a/docs/sources/flow/reference/config-blocks/export.md b/docs/sources/flow/reference/config-blocks/export.md index 0b119e4b639e..06d049716901 100644 --- a/docs/sources/flow/reference/config-blocks/export.md +++ b/docs/sources/flow/reference/config-blocks/export.md @@ -8,14 +8,25 @@ canonical: https://grafana.com/docs/agent/latest/flow/reference/config-blocks/ex description: Learn about the export configuration block menuTitle: export title: export block +refs: + custom-component: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/custom_components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/custom_components/ + declare: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/config-blocks/declare/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/declare/ --- # export block -`export` is an optional configuration block used to specify an emitted value of a [custom component][]. +`export` is an optional configuration block used to specify an emitted value of a [custom component](ref:custom-component). `export` blocks must be given a label which determine the name of the export. -The `export` block may only be specified inside the definition of [a `declare` block][declare]. +The `export` block may only be specified inside the definition of [a `declare` block](ref:declare). {{< admonition type="note" >}} In [classic modules][], the `export` block is valid as a top-level block in a classic module. Classic modules are deprecated and scheduled to be removed in the release after v0.40. @@ -69,9 +80,3 @@ declare "pods_and_nodes" { } ``` -{{% docs/reference %}} -[custom component]: "/docs/agent/ -> /docs/agent//flow/concepts/custom_components" -[custom component]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/custom_components" -[declare]: "/docs/agent/ -> /docs/agent//flow/reference/config-blocks/declare" -[declare]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/declare" -{{% /docs/reference %}} diff --git a/docs/sources/flow/reference/config-blocks/import.file.md b/docs/sources/flow/reference/config-blocks/import.file.md index b2c320430096..63befc6e2007 100644 --- a/docs/sources/flow/reference/config-blocks/import.file.md +++ b/docs/sources/flow/reference/config-blocks/import.file.md @@ -9,6 +9,10 @@ description: Learn about the import.file configuration block labels: stage: beta title: import.file +refs: + module: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/modules/ --- # import.file @@ -76,7 +80,3 @@ math.add "default" { {{< /collapse >}} -{{% docs/reference %}} -[module]: "/docs/agent/ -> /docs/agent//flow/concepts/modules" -[module]:"/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/modules" -{{% /docs/reference %}} diff --git a/docs/sources/flow/reference/config-blocks/import.git.md b/docs/sources/flow/reference/config-blocks/import.git.md index 24ff1b301c20..508a0aaec1eb 100644 --- a/docs/sources/flow/reference/config-blocks/import.git.md +++ b/docs/sources/flow/reference/config-blocks/import.git.md @@ -7,6 +7,10 @@ aliases: canonical: https://grafana.com/docs/agent/latest/flow/reference/config-blocks/import.git/ description: Learn about the import.git configuration block title: import.git +refs: + module: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/modules/ --- # import.git @@ -113,7 +117,3 @@ math.add "default" { [basic_auth]: #basic_auth-block [ssh_key]: #ssh_key-block -{{% docs/reference %}} -[module]: "/docs/agent/ -> /docs/agent//flow/concepts/modules" -[module]:"/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/modules" -{{% /docs/reference %}} diff --git a/docs/sources/flow/reference/config-blocks/import.string.md b/docs/sources/flow/reference/config-blocks/import.string.md index 32cc24c906ab..f0aae61e9bc8 100644 --- a/docs/sources/flow/reference/config-blocks/import.string.md +++ b/docs/sources/flow/reference/config-blocks/import.string.md @@ -7,6 +7,10 @@ aliases: canonical: https://grafana.com/docs/agent/latest/flow/reference/config-blocks/import.string/ description: Learn about the import.string configuration block title: import.string +refs: + module: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/modules/ --- # import.string @@ -56,7 +60,3 @@ math.add "default" { } ``` -{{% docs/reference %}} -[module]: "/docs/agent/ -> /docs/agent//flow/concepts/modules" -[module]:"/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/modules" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/collect-opentelemetry-data.md b/docs/sources/flow/tasks/collect-opentelemetry-data.md index 22248f9f70f9..17624679b17a 100644 --- a/docs/sources/flow/tasks/collect-opentelemetry-data.md +++ b/docs/sources/flow/tasks/collect-opentelemetry-data.md @@ -14,6 +14,37 @@ canonical: https://grafana.com/docs/agent/latest/flow/tasks/collect-opentelemetr description: Learn how to collect OpenTelemetry data title: Collect OpenTelemetry data weight: 300 +refs: + otelcol.exporter.otlp: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.exporter.otlp/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.otlp/ + otelcol.auth.basic: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.auth.basic/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.auth.basic/ + otelcol.exporter.otlphttp: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.exporter.otlphttp/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.otlphttp/ + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ + otelcol.processor.batch: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.processor.batch/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.processor.batch/ + otelcol.receiver.otlp: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.receiver.otlp/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.receiver.otlp/ --- # Collect OpenTelemetry data @@ -29,28 +60,28 @@ This topic describes how to: ## Components used in this topic -* [otelcol.auth.basic][] -* [otelcol.exporter.otlp][] -* [otelcol.exporter.otlphttp][] -* [otelcol.processor.batch][] -* [otelcol.receiver.otlp][] +* [otelcol.auth.basic](ref:otelcol.auth.basic) +* [otelcol.exporter.otlp](ref:otelcol.exporter.otlp) +* [otelcol.exporter.otlphttp](ref:otelcol.exporter.otlphttp) +* [otelcol.processor.batch](ref:otelcol.processor.batch) +* [otelcol.receiver.otlp](ref:otelcol.receiver.otlp) ## Before you begin * Ensure that you have basic familiarity with instrumenting applications with OpenTelemetry. * Have a set of OpenTelemetry applications ready to push telemetry data to {{< param "PRODUCT_NAME" >}}. * Identify where {{< param "PRODUCT_NAME" >}} writes received telemetry data. -* Be familiar with the concept of [Components][] in {{< param "PRODUCT_NAME" >}}. +* Be familiar with the concept of [Components](ref:components) in {{< param "PRODUCT_NAME" >}}. ## Configure an OpenTelemetry Protocol exporter Before components can receive OpenTelemetry data, you must have a component responsible for exporting the OpenTelemetry data. An OpenTelemetry _exporter component_ is responsible for writing (exporting) OpenTelemetry data to an external system. -In this task, you will use the [otelcol.exporter.otlp][] component to send OpenTelemetry data to a server using the OpenTelemetry Protocol (OTLP). +In this task, you will use the [otelcol.exporter.otlp](ref:otelcol.exporter.otlp) component to send OpenTelemetry data to a server using the OpenTelemetry Protocol (OTLP). After an exporter component is defined, you can use other {{< param "PRODUCT_NAME" >}} components to forward data to it. -> Refer to the list of available [Components][] for the full list of +> Refer to the list of available [Components](ref:components) for the full list of > `otelcol.exporter` components that you can use to export OpenTelemetry data. To configure an `otelcol.exporter.otlp` component for exporting OpenTelemetry data using OTLP, complete the following steps: @@ -104,7 +135,7 @@ To configure an `otelcol.exporter.otlp` component for exporting OpenTelemetry da > `otelcol.exporter.otlp` sends data using OTLP over gRPC (HTTP/2). > To send to a server using HTTP/1.1, follow the preceding steps, -> but use the [otelcol.exporter.otlphttp component][otelcol.exporter.otlphttp] instead. +> but use the [otelcol.exporter.otlphttp component](ref:otelcol.exporter.otlphttp) instead. The following example demonstrates configuring `otelcol.exporter.otlp` with authentication and a component that forwards data to it: @@ -140,7 +171,7 @@ otelcol.receiver.otlp "example" { } ``` -For more information on writing OpenTelemetry data using the OpenTelemetry Protocol, refer to [otelcol.exporter.otlp][]. +For more information on writing OpenTelemetry data using the OpenTelemetry Protocol, refer to [otelcol.exporter.otlp](ref:otelcol.exporter.otlp). ## Configure batching @@ -149,9 +180,9 @@ Instead, data is usually sent to one or more _processor components_ that perform Ensuring data is batched is a production-readiness step to improve data compression and reduce the number of outgoing network requests to external systems. -In this task, you will configure an [otelcol.processor.batch][] component to batch data before sending it to the exporter. +In this task, you will configure an [otelcol.processor.batch](ref:otelcol.processor.batch) component to batch data before sending it to the exporter. -> Refer to the list of available [Components][] for the full list of +> Refer to the list of available [Components](ref:components) for the full list of > `otelcol.processor` components that you can use to process OpenTelemetry > data. You can chain processors by having one processor send data to another > processor. @@ -211,17 +242,17 @@ otelcol.exporter.otlp "default" { } ``` -For more information on configuring OpenTelemetry data batching, refer to [otelcol.processor.batch][]. +For more information on configuring OpenTelemetry data batching, refer to [otelcol.processor.batch](ref:otelcol.processor.batch). ## Configure an OpenTelemetry Protocol receiver You can configure {{< param "PRODUCT_NAME" >}} to receive OpenTelemetry metrics, logs, and traces. An OpenTelemetry _receiver_ component is responsible for receiving OpenTelemetry data from an external system. -In this task, you will use the [otelcol.receiver.otlp][] component to receive OpenTelemetry data over the network using the OpenTelemetry Protocol (OTLP). +In this task, you will use the [otelcol.receiver.otlp](ref:otelcol.receiver.otlp) component to receive OpenTelemetry data over the network using the OpenTelemetry Protocol (OTLP). You can configure a receiver component to forward received data to other {{< param "PRODUCT_NAME" >}} components. -> Refer to the list of available [Components][] for the full list of +> Refer to the list of available [Components](ref:components) for the full list of > `otelcol.receiver` components that you can use to receive > OpenTelemetry-compatible data. @@ -313,23 +344,9 @@ otelcol.exporter.otlp "default" { } ``` -For more information on receiving OpenTelemetry data using the OpenTelemetry Protocol, refer to [otelcol.receiver.otlp][]. +For more information on receiving OpenTelemetry data using the OpenTelemetry Protocol, refer to [otelcol.receiver.otlp](ref:otelcol.receiver.otlp). [OpenTelemetry]: https://opentelemetry.io [Configure an OpenTelemetry Protocol exporter]: #configure-an-opentelemetry-protocol-exporter [Configure batching]: #configure-batching -{{% docs/reference %}} -[otelcol.auth.basic]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.auth.basic.md" -[otelcol.auth.basic]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.auth.basic.md" -[otelcol.exporter.otlp]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.exporter.otlp.md" -[otelcol.exporter.otlp]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.otlp.md" -[otelcol.exporter.otlphttp]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.exporter.otlphttp.md" -[otelcol.exporter.otlphttp]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.otlphttp.md" -[otelcol.processor.batch]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.processor.batch.md" -[otelcol.processor.batch]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.processor.batch.md" -[otelcol.receiver.otlp]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.receiver.otlp.md" -[otelcol.receiver.otlp]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.receiver.otlp.md" -[Components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -[Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/collect-prometheus-metrics.md b/docs/sources/flow/tasks/collect-prometheus-metrics.md index 350ce1ccfd4d..0fd225cf5ddc 100644 --- a/docs/sources/flow/tasks/collect-prometheus-metrics.md +++ b/docs/sources/flow/tasks/collect-prometheus-metrics.md @@ -14,6 +14,32 @@ canonical: https://grafana.com/docs/agent/latest/flow/tasks/collect-prometheus-m description: Learn how to collect and forward Prometheus metrics title: Collect and forward Prometheus metrics weight: 200 +refs: + prometheus.scrape: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.scrape/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.scrape/ + discovery.kubernetes: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/discovery.kubernetes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/discovery.kubernetes/ + prometheus.remote_write: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.remote_write/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write/ + objects: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/expressions/types_and_values/#objects + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values/#objects + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ --- # Collect and forward Prometheus metrics @@ -27,9 +53,9 @@ This topic describes how to: ## Components used in this topic -* [discovery.kubernetes][] -* [prometheus.remote_write][] -* [prometheus.scrape][] +* [discovery.kubernetes](ref:discovery.kubernetes) +* [prometheus.remote_write](ref:prometheus.remote_write) +* [prometheus.scrape](ref:prometheus.scrape) ## Before you begin @@ -37,13 +63,13 @@ This topic describes how to: * Have a set of Prometheus exports or applications exposing Prometheus metrics that you want to collect metrics from. * Identify where you will write collected metrics. Metrics can be written to Prometheus or Prometheus-compatible endpoints such as Grafana Mimir, Grafana Cloud, or Grafana Enterprise Metrics. -* Be familiar with the concept of [Components][] in {{< param "PRODUCT_NAME" >}}. +* Be familiar with the concept of [Components](ref:components) in {{< param "PRODUCT_NAME" >}}. ## Configure metrics delivery Before components can collect Prometheus metrics, you must have a component responsible for writing those metrics somewhere. -The [prometheus.remote_write][] component is responsible for delivering Prometheus metrics to one or Prometheus-compatible endpoints. +The [prometheus.remote_write](ref:prometheus.remote_write) component is responsible for delivering Prometheus metrics to one or Prometheus-compatible endpoints. After a `prometheus.remote_write` component is defined, you can use other {{< param "PRODUCT_NAME" >}} components to forward metrics to it. To configure a `prometheus.remote_write` component for metrics delivery, complete the following steps: @@ -109,7 +135,7 @@ prometheus.scrape "example" { } ``` -For more information on configuring metrics delivery, refer to [prometheus.remote_write][]. +For more information on configuring metrics delivery, refer to [prometheus.remote_write](ref:prometheus.remote_write). ## Collect metrics from Kubernetes Pods @@ -235,7 +261,7 @@ prometheus.remote_write "default" { } ``` -For more information on configuring Kubernetes service delivery and collecting metrics, refer to [discovery.kubernetes][] and [prometheus.scrape][]. +For more information on configuring Kubernetes service delivery and collecting metrics, refer to [discovery.kubernetes](ref:discovery.kubernetes) and [prometheus.scrape](ref:prometheus.scrape). ## Collect metrics from Kubernetes Services @@ -361,7 +387,7 @@ prometheus.remote_write "default" { } ``` -For more information on configuring Kubernetes service delivery and collecting metrics, refer to [discovery.kubernetes][] and [prometheus.scrape][]. +For more information on configuring Kubernetes service delivery and collecting metrics, refer to [discovery.kubernetes](ref:discovery.kubernetes) and [prometheus.scrape](ref:prometheus.scrape). ## Collect metrics from custom targets @@ -384,7 +410,7 @@ To collect metrics from a custom set of targets, complete the following steps. - _``: The label for the component, such as `custom_targets`. The label you use must be unique across all `prometheus.scrape` components in the same configuration file. - - _``_: A comma-delimited list of [Objects][] denoting the Prometheus target. + - _``_: A comma-delimited list of [Objects](ref:objects) denoting the Prometheus target. Each object must conform to the following rules: * There must be an `__address__` key denoting the `HOST:PORT` of the target to collect metrics from. @@ -437,15 +463,3 @@ prometheus.remote_write "default" { [Labels and Selectors]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#set-based-requirement [Configure metrics delivery]: #configure-metrics-delivery -{{% docs/reference %}} -[discovery.kubernetes]: "/docs/agent/ -> /docs/agent//flow/reference/components/discovery.kubernetes.md" -[discovery.kubernetes]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/discovery.kubernetes.md" -[prometheus.remote_write]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.remote_write.md" -[prometheus.remote_write]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write.md" -[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" -[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/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/tasks/configure-agent-clustering.md b/docs/sources/flow/tasks/configure-agent-clustering.md index cd222cba1733..89ab83d8329e 100644 --- a/docs/sources/flow/tasks/configure-agent-clustering.md +++ b/docs/sources/flow/tasks/configure-agent-clustering.md @@ -15,17 +15,33 @@ description: Learn how to configure Grafana Agent clustering in an existing inst menuTitle: Configure Grafana Agent clustering title: Configure Grafana Agent clustering in an existing installation weight: 400 +refs: + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#component-detail-page + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#component-detail-page + install-helm: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/kubernetes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/install/kubernetes/ + clustering: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/clustering/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/clustering/ --- # Configure {{% param "PRODUCT_NAME" %}} clustering in an existing installation -You can configure {{< param "PRODUCT_NAME" >}} to run with [clustering][] so that individual {{< param "PRODUCT_ROOT_NAME" >}}s can work together for workload distribution and high availability. +You can configure {{< param "PRODUCT_NAME" >}} to run with [clustering](ref:clustering) so that individual {{< param "PRODUCT_ROOT_NAME" >}}s can work together for workload distribution and high availability. This topic describes how to add clustering to an existing installation. ## Configure {{% param "PRODUCT_NAME" %}} clustering with Helm Chart -This section guides you through enabling clustering when {{< param "PRODUCT_NAME" >}} is installed on Kubernetes using the {{< param "PRODUCT_ROOT_NAME" >}} [Helm chart][install-helm]. +This section guides you through enabling clustering when {{< param "PRODUCT_NAME" >}} is installed on Kubernetes using the {{< param "PRODUCT_ROOT_NAME" >}} [Helm chart](ref:install-helm). ### Before you begin @@ -53,17 +69,9 @@ To configure clustering: - _``_: The name of the installation you chose when you installed the Helm chart. -1. Use the {{< param "PRODUCT_NAME" >}} [UI][] to verify the cluster status: +1. Use the {{< param "PRODUCT_NAME" >}} [UI](ref:ui) to verify the cluster status: 1. Click **Clustering** in the navigation bar. 1. Ensure that all expected nodes appear in the resulting table. -{{% docs/reference %}} -[clustering]: "/docs/agent/ -> /docs/agent//flow/concepts/clustering.md" -[clustering]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/clustering.md" -[install-helm]: "/docs/agent/ -> /docs/agent//flow/get-started/install/kubernetes.md" -[install-helm]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/install/kubernetes.md" -[UI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#component-detail-page" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.md#component-detail-page" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/configure/_index.md b/docs/sources/flow/tasks/configure/_index.md index 01f924703912..f0a353f75097 100644 --- a/docs/sources/flow/tasks/configure/_index.md +++ b/docs/sources/flow/tasks/configure/_index.md @@ -15,11 +15,17 @@ description: Configure Grafana Agent Flow after it is installed menuTitle: Configure title: Configure Grafana Agent Flow weight: 70 +refs: + install: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/install/ --- # Configure {{% param "PRODUCT_NAME" %}} -You can configure {{< param "PRODUCT_NAME" >}} after it is [installed][Install]. +You can configure {{< param "PRODUCT_NAME" >}} after it is [installed](ref:install). The default River configuration file for {{< param "PRODUCT_NAME" >}} is located at: * Linux: `/etc/grafana-agent-flow.river` @@ -30,7 +36,3 @@ This section includes information that helps you configure {{< param "PRODUCT_NA {{< section >}} -{{% docs/reference %}} -[Install]: "/docs/agent/ -> /docs/agent//flow/get-started/install/" -[Install]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/install/" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/configure/configure-linux.md b/docs/sources/flow/tasks/configure/configure-linux.md index 4b0bd3344ec6..67b870e3a62d 100644 --- a/docs/sources/flow/tasks/configure/configure-linux.md +++ b/docs/sources/flow/tasks/configure/configure-linux.md @@ -15,6 +15,17 @@ description: Learn how to configure Grafana Agent Flow on Linux menuTitle: Linux title: Configure Grafana Agent Flow on Linux weight: 300 +refs: + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#grafana-agent-flow-ui + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ --- # Configure {{% param "PRODUCT_NAME" %}} on Linux @@ -47,7 +58,7 @@ To change the configuration file used by the service, perform the following step ## Pass additional command-line flags -By default, the {{< param "PRODUCT_NAME" >}} service launches with the [run][] +By default, the {{< param "PRODUCT_NAME" >}} service launches with the [run](ref:run) command, passing the following flags: * `--storage.path=/var/lib/grafana-agent-flow` @@ -70,13 +81,13 @@ the following steps: ``` To see the list of valid command-line flags that can be passed to the service, -refer to the documentation for the [run][] command. +refer to the documentation for the [run](ref:run) command. ## Expose the UI to other machines By default, {{< param "PRODUCT_NAME" >}} listens on the local network for its HTTP server. This prevents other machines on the network from being able to access -the [UI for debugging][UI]. +the [UI for debugging](ref:ui). To expose the UI to other machines, complete the following steps: @@ -96,9 +107,3 @@ To expose the UI to other machines, complete the following steps: To listen on all interfaces, replace `LISTEN_ADDR` with `0.0.0.0`. -{{% docs/reference %}} -[run]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md" -[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/run.md" -[UI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.md#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/configure/configure-macos.md b/docs/sources/flow/tasks/configure/configure-macos.md index 8b860a010dcd..da71e2e49c45 100644 --- a/docs/sources/flow/tasks/configure/configure-macos.md +++ b/docs/sources/flow/tasks/configure/configure-macos.md @@ -15,6 +15,12 @@ description: Learn how to configure Grafana Agent Flow on macOS menuTitle: macOS title: Configure Grafana Agent Flow on macOS weight: 400 +refs: + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#grafana-agent-flow-ui --- # Configure {{% param "PRODUCT_NAME" %}} on macOS @@ -72,7 +78,7 @@ steps: By default, {{< param "PRODUCT_NAME" >}} listens on the local network for its HTTP server. This prevents other machines on the network from being able to access -the [UI for debugging][UI]. +the [UI for debugging](ref:ui). To expose the UI to other machines, complete the following steps: @@ -87,7 +93,3 @@ To expose the UI to other machines, complete the following steps: To listen on all interfaces, replace `127.0.0.1` with `0.0.0.0`. -{{% docs/reference %}} -[UI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.md#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/configure/configure-windows.md b/docs/sources/flow/tasks/configure/configure-windows.md index 806579ea1359..ab2136bed3c3 100644 --- a/docs/sources/flow/tasks/configure/configure-windows.md +++ b/docs/sources/flow/tasks/configure/configure-windows.md @@ -15,6 +15,12 @@ description: Learn how to configure Grafana Agent Flow on Windows menuTitle: Windows title: Configure Grafana Agent Flow on Windows weight: 500 +refs: + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#grafana-agent-flow-ui --- # Configure {{% param "PRODUCT_NAME" %}} on Windows @@ -75,7 +81,7 @@ binary, perform the following steps: By default, {{< param "PRODUCT_NAME" >}} listens on the local network for its HTTP server. This prevents other machines on the network from being able to access -the [UI for debugging][UI]. +the [UI for debugging](ref:ui). To expose the UI to other machines, complete the following steps: @@ -95,8 +101,4 @@ To expose the UI to other machines, complete the following steps: To listen on all interfaces, replace `LISTEN_ADDR` with `0.0.0.0`. -{{% docs/reference %}} -[UI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.md#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/debug.md b/docs/sources/flow/tasks/debug.md index e87fb9d183be..9b5dfb2cab90 100644 --- a/docs/sources/flow/tasks/debug.md +++ b/docs/sources/flow/tasks/debug.md @@ -15,6 +15,32 @@ description: Learn about debugging issues with Grafana Agent Flow title: Debug issues with Grafana Agent Flow menuTitle: Debug issues weight: 1000 +refs: + install: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/install/ + secret: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/expressions/types_and_values/#secrets.md + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/expressions/types_and_values/#secrets.md + grafana-agent-run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ + logging: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/config-blocks/logging/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/logging/ + clustering: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/clustering/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/clustering/ --- # Debug {{< param "PRODUCT_NAME" >}} @@ -31,7 +57,7 @@ Follow these steps to debug issues with {{< param "PRODUCT_NAME" >}}: > **NOTE**: For security reasons, installations of {{< param "PRODUCT_NAME" >}} on non-containerized platforms default to listening on `localhost`. > This default prevents other machines on the network from being able to view the UI. > -> To expose the UI to other machines on the network on non-containerized platforms, refer to the documentation for how you [installed][install] {{< param "PRODUCT_NAME" >}}. +> To expose the UI to other machines on the network on non-containerized platforms, refer to the documentation for how you [installed](ref:install) {{< param "PRODUCT_NAME" >}}. > > If you are running a custom installation of {{< param "PRODUCT_NAME" >}}, > refer to the documentation for [the `grafana-agent run` command][grafana-agent run] to learn how to change the HTTP listen address, @@ -65,7 +91,7 @@ The component detail page shows the following information for each component: * The current exports for the component. * The current debug info for the component (if the component has debug info). -> Values marked as a [secret][] are obfuscated and display as the text `(secret)`. +> Values marked as a [secret](ref:secret) are obfuscated and display as the text `(secret)`. ### Clustering page @@ -90,14 +116,14 @@ To debug using the UI: Logs may also help debug issues with {{< param "PRODUCT_NAME" >}}. To reduce logging noise, many components hide debugging info behind debug-level log lines. -It is recommended that you configure the [`logging` block][logging] to show debug-level log lines when debugging issues with {{< param "PRODUCT_NAME" >}}. +It is recommended that you configure the [`logging` block](ref:logging) to show debug-level log lines when debugging issues with {{< param "PRODUCT_NAME" >}}. The location of {{< param "PRODUCT_NAME" >}} logs is different based on how it's deployed. -Refer to the [`logging` block][logging] page to see how to find logs for your system. +Refer to the [`logging` block](ref:logging) page to see how to find logs for your system. ## Debugging clustering issues -To debug issues when using [clustering][], check for the following symptoms. +To debug issues when using [clustering](ref:clustering), check for the following symptoms. - **Cluster not converging**: The cluster peers aren't converging on the same view of their peers' status. This is most likely due to network connectivity issues between the cluster nodes. @@ -119,16 +145,4 @@ for example, problems with scraping or service discovery can result in missing metrics for an agent that can be interpreted as a node not joining the cluster. {{< /admonition >}} -{{% docs/reference %}} -[logging]: "/docs/agent/ -> /docs/agent//flow/reference/config-blocks/logging.md" -[logging]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/config-blocks/logging.md" -[clustering]: "/docs/agent/ -> /docs/agent//flow/concepts/clustering.md" -[clustering]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/clustering.md" -[install]: "/docs/agent/ -> /docs/agent//flow/get-started/install" -[install]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/install" -[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/tasks/distribute-prometheus-scrape-load.md b/docs/sources/flow/tasks/distribute-prometheus-scrape-load.md index 7bf8e98e4d17..95b9eaa262cd 100644 --- a/docs/sources/flow/tasks/distribute-prometheus-scrape-load.md +++ b/docs/sources/flow/tasks/distribute-prometheus-scrape-load.md @@ -15,18 +15,44 @@ description: Learn how to distribute your Prometheus metrics scrape load menuTitle: Distribute Prometheus metrics scrape load title: Distribute Prometheus metrics scrape load weight: 500 +refs: + configure-prometheus-metrics-collection: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/collect-prometheus-metrics/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/collect-prometheus-metrics/ + configure-grafana-agent: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure/ + clustering: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/clustering/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/clustering/ + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#component-detail-page + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#component-detail-page + configure-clustering: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/configure-agent-clustering/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/configure-agent-clustering/ --- # Distribute Prometheus metrics scrape load A good predictor for the size of an {{< param "PRODUCT_NAME" >}} deployment is the number of Prometheus targets each {{< param "PRODUCT_ROOT_NAME" >}} scrapes. -[Clustering][] with target auto-distribution allows a fleet of {{< param "PRODUCT_ROOT_NAME" >}}s to work together to dynamically distribute their scrape load, providing high-availability. +[Clustering](ref:clustering) with target auto-distribution allows a fleet of {{< param "PRODUCT_ROOT_NAME" >}}s to work together to dynamically distribute their scrape load, providing high-availability. ## Before you begin -- Familiarize yourself with how to [configure existing {{< param "PRODUCT_NAME" >}} installations][configure-grafana-agent]. -- [Configure Prometheus metrics collection][]. -- [Configure clustering][]. +- Familiarize yourself with how to [configure existing {{< param "PRODUCT_NAME" >}} installations](ref:configure-grafana-agent). +- [Configure Prometheus metrics collection](ref:configure-prometheus-metrics-collection). +- [Configure clustering](ref:configure-clustering). - Ensure that all of your clustered {{< param "PRODUCT_ROOT_NAME" >}}s have the same configuration file. ## Steps @@ -45,19 +71,7 @@ To distribute Prometheus metrics scrape load with clustering: 1. Validate that auto-distribution is functioning: - 1. Using the {{< param "PRODUCT_ROOT_NAME" >}} [UI][] on each {{< param "PRODUCT_ROOT_NAME" >}}, navigate to the details page for one of the `prometheus.scrape` components you modified. + 1. Using the {{< param "PRODUCT_ROOT_NAME" >}} [UI](ref:ui) on each {{< param "PRODUCT_ROOT_NAME" >}}, navigate to the details page for one of the `prometheus.scrape` components you modified. 1. Compare the Debug Info sections between two different {{< param "PRODUCT_ROOT_NAME" >}} to ensure that they're not scraping the same sets of targets. -{{% docs/reference %}} -[Clustering]: "/docs/agent/ -> /docs/agent//flow/concepts/clustering.md" -[Clustering]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/clustering.md" -[configure-grafana-agent]: "/docs/agent/ -> /docs/agent//flow/tasks/configure" -[configure-grafana-agent]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure" -[Configure Prometheus metrics collection]: "/docs/agent/ -> /docs/agent//flow/tasks/collect-prometheus-metrics.md" -[Configure Prometheus metrics collection]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/collect-prometheus-metrics.md" -[Configure clustering]: "/docs/agent/ -> /docs/agent//flow/tasks/configure-agent-clustering.md" -[Configure clustering]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/configure-agent-clustering.md" -[UI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md#component-detail-page" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.md#component-detail-page" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/metamonitoring.md b/docs/sources/flow/tasks/metamonitoring.md index 4839fb4986d0..13c4ca176eaa 100644 --- a/docs/sources/flow/tasks/metamonitoring.md +++ b/docs/sources/flow/tasks/metamonitoring.md @@ -3,6 +3,22 @@ canonical: https://grafana.com/docs/agent/latest/flow/tasks/metamonitoring/ description: Learn how to set up meta-monitoring for Grafana Agent Flow title: Set up meta-monitoring weight: 200 +refs: + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + tracing: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/config-blocks/tracing/ + prometheus.exporter.self: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.exporter.self/ + logging: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/config-blocks/logging/ + prometheus.scrape: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.scrape/ --- # Set up meta-monitoring @@ -13,21 +29,21 @@ This topic describes how to collect and forward {{< param "PRODUCT_NAME" >}}'s m ## Components and configuration blocks used in this topic -* [prometheus.exporter.self][] -* [prometheus.scrape][] -* [logging][] -* [tracing][] +* [prometheus.exporter.self](ref:prometheus.exporter.self) +* [prometheus.scrape](ref:prometheus.scrape) +* [logging](ref:logging) +* [tracing](ref:tracing) ## Before you begin * Identify where to send {{< param "PRODUCT_NAME" >}}'s telemetry data. -* Be familiar with the concept of [Components][] in {{< param "PRODUCT_NAME" >}}. +* Be familiar with the concept of [Components](ref:components) in {{< param "PRODUCT_NAME" >}}. ## Meta-monitoring metrics {{< param "PRODUCT_NAME" >}} exposes its internal metrics using the Prometheus exposition format. -In this task, you will use the [prometheus.exporter.self][] and [prometheus.scrape][] components to scrape {{< param "PRODUCT_NAME" >}}'s internal metrics and forward it to compatible {{< param "PRODUCT_NAME" >}} components. +In this task, you will use the [prometheus.exporter.self](ref:prometheus.exporter.self) and [prometheus.scrape](ref:prometheus.scrape) components to scrape {{< param "PRODUCT_NAME" >}}'s internal metrics and forward it to compatible {{< param "PRODUCT_NAME" >}} components. 1. Add the following `prometheus.exporter.self` component to your configuration. The component accepts no arguments. @@ -72,9 +88,9 @@ prometheus.remote_write "default" { ## Meta-monitoring logs -The [logging][] block defines the logging behavior of {{< param "PRODUCT_NAME" >}}. +The [logging](ref:logging) block defines the logging behavior of {{< param "PRODUCT_NAME" >}}. -In this task, you will use the [logging][] block to forward {{< param "PRODUCT_NAME" >}}'s logs to a compatible component. +In this task, you will use the [logging](ref:logging) block to forward {{< param "PRODUCT_NAME" >}}'s logs to a compatible component. The block is specified without a label and can only be provided once per configuration file. 1. Add the following `logging` configuration block to the top level of your configuration file. @@ -114,9 +130,9 @@ loki.write "default" { ## Meta-monitoring traces -The [tracing][] block defines the tracing behavior of {{< param "PRODUCT_NAME" >}}. +The [tracing](ref:tracing) block defines the tracing behavior of {{< param "PRODUCT_NAME" >}}. -In this task you will use the [tracing][] block to forward {{< param "PRODUCT_NAME" >}} internal traces to a compatible component. The block is specified without a label and can only be provided once per configuration file. +In this task you will use the [tracing](ref:tracing) block to forward {{< param "PRODUCT_NAME" >}} internal traces to a compatible component. The block is specified without a label and can only be provided once per configuration file. 1. Add the following `tracing` configuration block to the top level of your configuration file. @@ -147,10 +163,3 @@ otelcol.exporter.otlp "default" { } ``` -{{% docs/reference %}} -[prometheus.exporter.self]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.exporter.self.md" -[prometheus.scrape]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.scrape.md" -[logging]: "/docs/agent/ -> /docs/agent//flow/reference/config-blocks/logging.md" -[tracing]: "/docs/agent/ -> /docs/agent//flow/reference/config-blocks/tracing.md" -[Components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/migrate/from-operator.md b/docs/sources/flow/tasks/migrate/from-operator.md index 1b19ac260a94..b8f7c1053995 100644 --- a/docs/sources/flow/tasks/migrate/from-operator.md +++ b/docs/sources/flow/tasks/migrate/from-operator.md @@ -11,6 +11,77 @@ description: Migrate from Grafana Agent Operator to Grafana Agent Flow menuTitle: Migrate from Operator title: Migrate from Grafana Agent Operator to Grafana Agent Flow weight: 300 +refs: + loki.source.kubernetes: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/loki.source.kubernetes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/loki.source.kubernetes/ + helm-chart: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/install/kubernetes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/get-started/install/kubernetes/ + prometheus.scrape: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.scrape/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/prometheus.scrape/ + prometheus.exporter: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/ + prometheus.operator.servicemonitors: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.operator.servicemonitors/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/prometheus.operator.servicemonitors/ + remote.kubernetes.secret: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/remote.kubernetes.secret/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/remote.kubernetes.secret/ + clustering: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/clustering/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/clustering/ + operator-guide: + - pattern: /docs/agent/ + destination: /docs/agent//operator/deploy-agent-operator-resources/#deploy-a-metricsinstance-resource + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/operator/deploy-agent-operator-resources/#deploy-a-metricsinstance-resource + loki.source.podlogs: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/loki.source.podlogs/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/loki.source.podlogs/ + prometheus.remote_write: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.remote_write/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/prometheus.remote_write/ + prometheus.operator.podmonitors: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.operator.podmonitors/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/prometheus.operator.podmonitors/ + prometheus.operator.probes: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.operator.probes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/prometheus.operator.probes/ + component-documentation: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/reference/components/ + deployment-guide: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/deploy-agent/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/flow/get-started/deploy-agent/ --- # Migrate from Grafana Agent Operator to {{% param "PRODUCT_NAME" %}} @@ -44,10 +115,10 @@ This guide provides some steps to get started with {{< param "PRODUCT_NAME" >}} create: false ``` - This configuration deploys {{< param "PRODUCT_NAME" >}} as a `StatefulSet` using the built-in [clustering][] functionality to allow distributing scrapes across all {{< param "PRODUCT_ROOT_NAME" >}} Pods. + This configuration deploys {{< param "PRODUCT_NAME" >}} as a `StatefulSet` using the built-in [clustering](ref:clustering) functionality to allow distributing scrapes across all {{< param "PRODUCT_ROOT_NAME" >}} Pods. This is one of many deployment possible modes. For example, you may want to use a `DaemonSet` to collect host-level logs or metrics. - See the {{< param "PRODUCT_NAME" >}} [deployment guide][] for more details about different topologies. + See the {{< param "PRODUCT_NAME" >}} [deployment guide](ref:deployment-guide) for more details about different topologies. 1. Create a {{< param "PRODUCT_ROOT_NAME" >}} configuration file, `agent.river`. @@ -77,7 +148,7 @@ A `MetricsInstance` resource primarily defines: You can use these functions in {{< param "PRODUCT_NAME" >}} with the `prometheus.remote_write`, `prometheus.operator.podmonitors`, `prometheus.operator.servicemonitors`, and `prometheus.operator.probes` components respectively. -The following River sample is equivalent to the `MetricsInstance` from the [operator guide][]. +The following River sample is equivalent to the `MetricsInstance` from the [operator guide](ref:operator-guide). ```river @@ -125,20 +196,20 @@ It then scrapes metrics from the targets and forward them to your remote write e You may need to customize this configuration further if you use additional features in your `MetricsInstance` resources. Refer to the documentation for the relevant components for additional information: -- [remote.kubernetes.secret][] -- [prometheus.remote_write][] -- [prometheus.operator.podmonitors][] -- [prometheus.operator.servicemonitors][] -- [prometheus.operator.probes][] -- [prometheus.scrape][] +- [remote.kubernetes.secret](ref:remote.kubernetes.secret) +- [prometheus.remote_write](ref:prometheus.remote_write) +- [prometheus.operator.podmonitors](ref:prometheus.operator.podmonitors) +- [prometheus.operator.servicemonitors](ref:prometheus.operator.servicemonitors) +- [prometheus.operator.probes](ref:prometheus.operator.probes) +- [prometheus.scrape](ref:prometheus.scrape) ## Collecting Logs Our current recommendation is to create an additional DaemonSet deployment of {{< param "PRODUCT_ROOT_NAME" >}}s to scrape logs. > We have 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 [loki.source.kubernetes][] and -> [loki.source.podlogs][]. +> still considered experimental, but if you would like to try them, see the documentation for [loki.source.kubernetes](ref:loki.source.kubernetes) and +> [loki.source.podlogs](ref:loki.source.podlogs). These values are close to what the Operator currently deploys for logs: @@ -277,43 +348,13 @@ Replace the following: - _``_: The endpoint of your Loki instance. -The logging subsystem is very powerful and has many options for processing logs. For further details, see the [component documentation][]. +The logging subsystem is very powerful and has many options for processing logs. For further details, see the [component documentation](ref:component-documentation). ## Integrations The `Integration` CRD isn't supported with {{< param "PRODUCT_NAME" >}}. -However, all static mode integrations have an equivalent component in the [`prometheus.exporter`][] namespace. +However, all static mode integrations have an equivalent component in the [`prometheus.exporter`](ref:prometheus.exporter) namespace. The [reference documentation][component documentation] should help convert those integrations to their {{< param "PRODUCT_NAME" >}} equivalent. [default values]: https://github.com/grafana/agent/blob/main/operations/helm/charts/grafana-agent/values.yaml -{{% docs/reference %}} -[clustering]: "/docs/agent/ -> /docs/agent//flow/concepts/clustering" -[clustering]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/clustering" -[deployment guide]: "/docs/agent/ -> /docs/agent//flow/get-started/deploy-agent" -[deployment guide]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/get-started/deploy-agent" -[operator guide]: "/docs/agent/ -> /docs/agent//operator/deploy-agent-operator-resources.md#deploy-a-metricsinstance-resource" -[operator guide]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/operator/deploy-agent-operator-resources.md#deploy-a-metricsinstance-resource" -[Helm chart]: "/docs/agent/ -> /docs/agent//flow/get-started/install/kubernetes" -[Helm chart]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/get-started/install/kubernetes" -[remote.kubernetes.secret]: "/docs/agent/ -> /docs/agent//flow/reference/components/remote.kubernetes.secret.md" -[remote.kubernetes.secret]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components/remote.kubernetes.secret.md" -[prometheus.remote_write]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.remote_write.md" -[prometheus.remote_write]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components/prometheus.remote_write.md" -[prometheus.operator.podmonitors]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.operator.podmonitors.md" -[prometheus.operator.podmonitors]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components/prometheus.operator.podmonitors.md" -[prometheus.operator.servicemonitors]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.operator.servicemonitors.md" -[prometheus.operator.servicemonitors]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components/prometheus.operator.servicemonitors.md" -[prometheus.operator.probes]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.operator.probes.md" -[prometheus.operator.probes]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components/prometheus.operator.probes.md" -[prometheus.scrape]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.scrape.md" -[prometheus.scrape]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components/prometheus.scrape" -[loki.source.kubernetes]: "/docs/agent/ -> /docs/agent//flow/reference/components/loki.source.kubernetes.md" -[loki.source.kubernetes]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components/loki.source.kubernetes.md" -[loki.source.podlogs]: "/docs/agent/ -> /docs/agent//flow/reference/components/loki.source.podlogs.md" -[loki.source.podlogs]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components/loki.source.podlogs.md" -[component documentation]: "/docs/agent/ -> /docs/agent//flow/reference/components" -[component documentation]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components" -[`prometheus.exporter`]: "/docs/agent/ -> /docs/agent//flow/reference/components" -[`prometheus.exporter`]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/flow/reference/components" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/migrate/from-otelcol.md b/docs/sources/flow/tasks/migrate/from-otelcol.md index 60b9fa44e4a2..6d5c55bb11f3 100644 --- a/docs/sources/flow/tasks/migrate/from-otelcol.md +++ b/docs/sources/flow/tasks/migrate/from-otelcol.md @@ -4,6 +4,56 @@ description: Learn how to migrate from OpenTelemetry Collector to Grafana Agent menuTitle: Migrate from OpenTelemetry Collector title: Migrate from OpenTelemetry Collector to Grafana Agent Flow weight: 310 +refs: + component-reference: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components// + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components// + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ + river: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language// + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language// + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#grafana-agent-flow-ui + debuggingui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/ + otelcol.exporter.otlp: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.exporter.otlp/ + convert: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/convert/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/convert/ + otelcol.receiver.otlp: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.receiver.otlp/ + otelcol.processor.memory_limiter: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.processor.memory_limiter/ + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/run/ --- # Migrate from OpenTelemetry Collector to {{% param "PRODUCT_NAME" %}} @@ -17,22 +67,22 @@ This topic describes how to: ## Components used in this topic -* [otelcol.receiver.otlp][] -* [otelcol.processor.memory_limiter][] -* [otelcol.exporter.otlp][] +* [otelcol.receiver.otlp](ref:otelcol.receiver.otlp) +* [otelcol.processor.memory_limiter](ref:otelcol.processor.memory_limiter) +* [otelcol.exporter.otlp](ref:otelcol.exporter.otlp) ## Before you begin * You must have an existing OpenTelemetry Collector configuration. * You must have a set of OpenTelemetry Collector applications ready to push telemetry data to {{< param "PRODUCT_NAME" >}}. -* You must be familiar with the concept of [Components][] in {{< param "PRODUCT_NAME" >}}. +* You must be familiar with the concept of [Components](ref:components) in {{< param "PRODUCT_NAME" >}}. ## Convert an OpenTelemetry Collector configuration -To fully migrate your configuration from [OpenTelemetry Collector] to {{< param "PRODUCT_NAME" >}}, you must convert your OpenTelemetry Collector configuration into a {{< param "PRODUCT_NAME" >}} configuration. +To fully migrate your configuration from[OpenTelemetry Collector][] to {{< param "PRODUCT_NAME" >}}, you must convert your OpenTelemetry Collector configuration into a {{< param "PRODUCT_NAME" >}} configuration. This conversion will enable you to take full advantage of the many additional features available in {{< param "PRODUCT_NAME" >}}. -> In this task, you will use the [convert][] CLI command to output a {{< param "PRODUCT_NAME" >}} +> In this task, you will use the [convert](ref:convert) CLI command to output a {{< param "PRODUCT_NAME" >}} > configuration from a OpenTelemetry Collector configuration. 1. Open a terminal window and run the following command. @@ -54,7 +104,7 @@ This conversion will enable you to take full advantage of the many additional fe - _``_: The full path to the OpenTelemetry Collector configuration. - _``_: The full path to output the {{< param "PRODUCT_NAME" >}} configuration. -1. [Run][] {{< param "PRODUCT_NAME" >}} using the new {{< param "PRODUCT_NAME" >}} configuration from _``_: +1. [Run](ref:run) {{< param "PRODUCT_NAME" >}} using the new {{< param "PRODUCT_NAME" >}} configuration from _``_: ### Debugging @@ -119,17 +169,17 @@ If you’re not ready to completely switch to a {{< param "PRODUCT_NAME" >}} con The `--config.format=otelcol` flag tells {{< param "PRODUCT_ROOT_NAME" >}} to convert your OpenTelemetry Collector configuration to a {{< param "PRODUCT_NAME" >}} configuration and load it directly without saving the new configuration. This allows you to try {{< param "PRODUCT_NAME" >}} without modifying your existing OpenTelemetry Collector configuration infrastructure. -> In this task, you will use the [run][] CLI command to run {{< param "PRODUCT_NAME" >}} +> In this task, you will use the [run](ref:run) CLI command to run {{< param "PRODUCT_NAME" >}} > using an OpenTelemetry Collector configuration. -[Run][] {{< param "PRODUCT_NAME" >}} and include the command line flag `--config.format=otelcol`. +[Run](ref:run) {{< param "PRODUCT_NAME" >}} and include the command line flag `--config.format=otelcol`. Your configuration file must be a valid OpenTelemetry Collector configuration file rather than a {{< param "PRODUCT_NAME" >}} configuration file. ### Debugging 1. You can follow the convert CLI command [debugging][] instructions to generate a diagnostic report. -1. Refer to the {{< param "PRODUCT_NAME" >}} [Debugging][DebuggingUI] for more information about a running {{< param "PRODUCT_NAME" >}}. +1. Refer to the {{< param "PRODUCT_NAME" >}} [Debugging](ref:debuggingui) for more information about a running {{< param "PRODUCT_NAME" >}}. 1. If your OpenTelemetry Collector configuration can't be converted and loaded directly into {{< param "PRODUCT_NAME" >}}, diagnostic information is sent to `stderr`. You can bypass any non-critical issues and start the Agent by including the `--config.bypass-conversion-errors` flag in addition to `--config.format=otelcol`. @@ -178,7 +228,7 @@ service: exporters: [otlp] ``` -The convert command takes the YAML file as input and outputs a [River][] file. +The convert command takes the YAML file as input and outputs a [River](ref:river) file. {{< code >}} @@ -239,36 +289,15 @@ After the configuration is converted, review the {{< param "PRODUCT_NAME" >}} co The following list is specific to the convert command and not {{< param "PRODUCT_NAME" >}}: * Components are supported which directly embed upstream OpenTelemetry Collector features. You can get a general idea of which exist in - {{< param "PRODUCT_NAME" >}} for conversion by reviewing the `otelcol.*` components in the [Component Reference][]. + {{< param "PRODUCT_NAME" >}} for conversion by reviewing the `otelcol.*` components in the [Component Reference](ref:component-reference). Any additional unsupported features are returned as errors during conversion. * Check if you are using any extra command line arguments with OpenTelemetry Collector that aren't present in your configuration file. * Metamonitoring metrics exposed by {{< param "PRODUCT_NAME" >}} usually match OpenTelemetry Collector metamonitoring metrics but will use a different name. Make sure that you use the new metric names, for example, in your alerts and dashboards queries. * The logs produced by {{< param "PRODUCT_NAME" >}} differ from those produced by OpenTelemetry Collector. -* {{< param "PRODUCT_ROOT_NAME" >}} exposes the {{< param "PRODUCT_NAME" >}} [UI][]. +* {{< param "PRODUCT_ROOT_NAME" >}} exposes the {{< param "PRODUCT_NAME" >}} [UI](ref:ui). [OpenTelemetry Collector]: https://opentelemetry.io/docs/collector/configuration/ [debugging]: #debugging [example]: #example -{{% docs/reference %}} -[otelcol.receiver.otlp]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.receiver.otlp.md" -[otelcol.processor.memory_limiter]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.processor.memory_limiter.md" -[otelcol.exporter.otlp]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.exporter.otlp.md" -[Components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -[Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components.md" -[Component Reference]: "/docs/agent/ -> /docs/agent//flow/reference/components/_index.md" -[Component Reference]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/_index.md" -[convert]: "/docs/agent/ -> /docs/agent//flow/reference/cli/convert.md" -[convert]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/convert.md" -[run]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md" -[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/run.md" -[Run]: "/docs/agent/ -> /docs/agent//flow/get-started/run/" -[Run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/run/" -[DebuggingUI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md" -[DebuggingUI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.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/tasks/debug#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/migrate/from-prometheus.md b/docs/sources/flow/tasks/migrate/from-prometheus.md index 84241791ec24..65fa724d6783 100644 --- a/docs/sources/flow/tasks/migrate/from-prometheus.md +++ b/docs/sources/flow/tasks/migrate/from-prometheus.md @@ -15,6 +15,52 @@ description: Learn how to migrate from Prometheus to Grafana Agent Flow menuTitle: Migrate from Prometheus title: Migrate from Prometheus to Grafana Agent Flow weight: 320 +refs: + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/run/ + prometheus.scrape: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.scrape/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.scrape/ + debuggingui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/ + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#grafana-agent-flow-ui + convert: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/convert/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/convert/ + prometheus.remote_write: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.remote_write/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write/ + river: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language// + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language// + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ --- # Migrate from Prometheus to {{% param "PRODUCT_NAME" %}} @@ -28,21 +74,21 @@ This topic describes how to: ## Components used in this topic -* [prometheus.scrape][] -* [prometheus.remote_write][] +* [prometheus.scrape](ref:prometheus.scrape) +* [prometheus.remote_write](ref:prometheus.remote_write) ## Before you begin * You must have an existing Prometheus configuration. * You must have a set of Prometheus applications ready to push telemetry data to {{< param "PRODUCT_NAME" >}}. -* You must be familiar with the concept of [Components][] in {{< param "PRODUCT_NAME" >}}. +* You must be familiar with the concept of [Components](ref:components) in {{< param "PRODUCT_NAME" >}}. ## Convert a Prometheus configuration -To fully migrate your configuration from [Prometheus] to {{< param "PRODUCT_NAME" >}}, you must convert your Prometheus configuration into a {{< param "PRODUCT_NAME" >}} configuration. +To fully migrate your configuration from[Prometheus][] to {{< param "PRODUCT_NAME" >}}, you must convert your Prometheus configuration into a {{< param "PRODUCT_NAME" >}} configuration. This conversion will enable you to take full advantage of the many additional features available in {{< param "PRODUCT_NAME" >}}. -> In this task, you will use the [convert][] CLI command to output a {{< param "PRODUCT_NAME" >}} +> In this task, you will use the [convert](ref:convert) CLI command to output a {{< param "PRODUCT_NAME" >}} > configuration from a Prometheus configuration. 1. Open a terminal window and run the following command. @@ -64,7 +110,7 @@ This conversion will enable you to take full advantage of the many additional fe - _``_: The full path to the Prometheus configuration. - _``_: The full path to output the {{< param "PRODUCT_NAME" >}} configuration. -1. [Run][] {{< param "PRODUCT_NAME" >}} using the new {{< param "PRODUCT_NAME" >}} configuration from _``_: +1. [Run](ref:run) {{< param "PRODUCT_NAME" >}} using the new {{< param "PRODUCT_NAME" >}} configuration from _``_: ### Debugging @@ -128,17 +174,17 @@ If you’re not ready to completely switch to a {{< param "PRODUCT_NAME" >}} con The `--config.format=prometheus` flag tells {{< param "PRODUCT_ROOT_NAME" >}} to convert your Prometheus configuration to a {{< param "PRODUCT_NAME" >}} configuration and load it directly without saving the new configuration. This allows you to try {{< param "PRODUCT_NAME" >}} without modifying your existing Prometheus configuration infrastructure. -> In this task, you will use the [run][] CLI command to run {{< param "PRODUCT_NAME" >}} +> In this task, you will use the [run](ref:run) CLI command to run {{< param "PRODUCT_NAME" >}} > using a Prometheus configuration. -[Run][] {{< param "PRODUCT_NAME" >}} and include the command line flag `--config.format=prometheus`. +[Run](ref:run) {{< param "PRODUCT_NAME" >}} and include the command line flag `--config.format=prometheus`. Your configuration file must be a valid Prometheus configuration file rather than a {{< param "PRODUCT_NAME" >}} configuration file. ### Debugging 1. You can follow the convert CLI command [debugging][] instructions to generate a diagnostic report. -1. Refer to the {{< param "PRODUCT_NAME" >}} [Debugging][DebuggingUI] for more information about a running {{< param "PRODUCT_NAME" >}}. +1. Refer to the {{< param "PRODUCT_NAME" >}} [Debugging](ref:debuggingui) for more information about a running {{< param "PRODUCT_NAME" >}}. 1. If your Prometheus configuration can't be converted and loaded directly into {{< param "PRODUCT_NAME" >}}, diagnostic information is sent to `stderr`. You can bypass any non-critical issues and start the Agent by including the `--config.bypass-conversion-errors` flag in addition to `--config.format=prometheus`. @@ -171,7 +217,7 @@ remote_write: password: ``` -The convert command takes the YAML file as input and outputs a [River][] file. +The convert command takes the YAML file as input and outputs a [River](ref:river) file. {{< code >}} @@ -239,29 +285,9 @@ The following list is specific to the convert command and not {{< param "PRODUCT * Metamonitoring metrics exposed by {{< param "PRODUCT_NAME" >}} usually match Prometheus metamonitoring metrics but will use a different name. Make sure that you use the new metric names, for example, in your alerts and dashboards queries. * The logs produced by {{< param "PRODUCT_NAME" >}} differ from those produced by Prometheus. -* {{< param "PRODUCT_ROOT_NAME" >}} exposes the {{< param "PRODUCT_NAME" >}} [UI][]. +* {{< param "PRODUCT_ROOT_NAME" >}} exposes the {{< param "PRODUCT_NAME" >}} [UI](ref:ui). [Prometheus]: https://prometheus.io/docs/prometheus/latest/configuration/configuration/ [debugging]: #debugging [example]: #example -{{% 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" -[prometheus.remote_write]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.remote_write.md" -[prometheus.remote_write]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write.md" -[Components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -[Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components.md" -[convert]: "/docs/agent/ -> /docs/agent//flow/reference/cli/convert.md" -[convert]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/convert.md" -[run]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md" -[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/run.md" -[Run]: "/docs/agent/ -> /docs/agent//flow/get-started/run/" -[Run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/run/" -[DebuggingUI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md" -[DebuggingUI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.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/tasks/debug#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/migrate/from-promtail.md b/docs/sources/flow/tasks/migrate/from-promtail.md index 7a0dda9b9248..efbfe2762d5f 100644 --- a/docs/sources/flow/tasks/migrate/from-promtail.md +++ b/docs/sources/flow/tasks/migrate/from-promtail.md @@ -15,6 +15,57 @@ description: Learn how to migrate from Promtail to Grafana Agent Flow menuTitle: Migrate from Promtail title: Migrate from Promtail to Grafana Agent Flow weight: 330 +refs: + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#grafana-agent-flow-ui + debuggingui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/ + loki.source.file: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/loki.source.file/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.source.file/ + convert: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/convert/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/convert/ + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ + river: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language// + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language// + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/run/ + loki.write: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/loki.write/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.write/ + local.file_match: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/local.file_match/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/local.file_match/ --- # Migrate from Promtail to {{% param "PRODUCT_NAME" %}} @@ -28,21 +79,21 @@ This topic describes how to: ## Components used in this topic -* [local.file_match][] -* [loki.source.file][] -* [loki.write][] +* [local.file_match](ref:local.file_match) +* [loki.source.file](ref:loki.source.file) +* [loki.write](ref:loki.write) ## Before you begin * You must have an existing Promtail configuration. -* You must be familiar with the concept of [Components][] in {{< param "PRODUCT_NAME" >}}. +* You must be familiar with the concept of [Components](ref:components) in {{< param "PRODUCT_NAME" >}}. ## Convert a Promtail configuration -To fully migrate from [Promtail] to {{< param "PRODUCT_NAME" >}}, you must convert your Promtail configuration into a {{< param "PRODUCT_NAME" >}} configuration. +To fully migrate from[Promtail][] to {{< param "PRODUCT_NAME" >}}, you must convert your Promtail configuration into a {{< param "PRODUCT_NAME" >}} configuration. This conversion will enable you to take full advantage of the many additional features available in {{< param "PRODUCT_NAME" >}}. -> In this task, you will use the [convert][] CLI command to output a {{< param "PRODUCT_NAME" >}} +> In this task, you will use the [convert](ref:convert) CLI command to output a {{< param "PRODUCT_NAME" >}} > configuration from a Promtail configuration. 1. Open a terminal window and run the following command. @@ -64,7 +115,7 @@ This conversion will enable you to take full advantage of the many additional fe * _``_: The full path to the Promtail configuration. * _``_: The full path to output the {{< param "PRODUCT_NAME" >}} configuration. -1. [Run][] {{< param "PRODUCT_NAME" >}} using the new configuration from _``_: +1. [Run](ref:run) {{< param "PRODUCT_NAME" >}} using the new configuration from _``_: ### Debugging @@ -125,16 +176,16 @@ If you’re not ready to completely switch to a {{< param "PRODUCT_NAME" >}} con The `--config.format=promtail` flag tells {{< param "PRODUCT_ROOT_NAME" >}} to convert your Promtail configuration to {{< param "PRODUCT_NAME" >}} and load it directly without saving the new configuration. This allows you to try {{< param "PRODUCT_NAME" >}} without modifying your existing Promtail configuration infrastructure. -> In this task, you will use the [run][] CLI command to run {{< param "PRODUCT_NAME" >}} using a Promtail configuration. +> In this task, you will use the [run](ref:run) CLI command to run {{< param "PRODUCT_NAME" >}} using a Promtail configuration. -[Run][] {{< param "PRODUCT_NAME" >}} and include the command line flag `--config.format=promtail`. +[Run](ref:run) {{< param "PRODUCT_NAME" >}} and include the command line flag `--config.format=promtail`. Your configuration file must be a valid Promtail configuration file rather than a {{< param "PRODUCT_NAME" >}} configuration file. ### Debugging 1. You can follow the convert CLI command [debugging][] instructions to generate a diagnostic report. -1. Refer to the {{< param "PRODUCT_NAME" >}} [Debugging][DebuggingUI] for more information about running {{< param "PRODUCT_NAME" >}}. +1. Refer to the {{< param "PRODUCT_NAME" >}} [Debugging](ref:debuggingui) for more information about running {{< param "PRODUCT_NAME" >}}. 1. If your Promtail configuration can't be converted and loaded directly into {{< param "PRODUCT_ROOT_NAME" >}}, diagnostic information is sent to `stderr`. You can bypass any non-critical issues and start {{< param "PRODUCT_ROOT_NAME" >}} by including the `--config.bypass-conversion-errors` flag in addition to `--config.format=promtail`. @@ -162,7 +213,7 @@ scrape_configs: __path__: /var/log/*.log ``` -The convert command takes the YAML file as input and outputs a [River][] file. +The convert command takes the YAML file as input and outputs a [River](ref:river) file. {{< code >}} @@ -215,36 +266,14 @@ The following list is specific to the convert command and not {{< param "PRODUCT * Check if you are using any extra command line arguments with Promtail that aren't present in your configuration file. For example, `-max-line-size`. * Check if you are setting any environment variables, whether [expanded in the configuration file][] itself or consumed directly by Promtail, such as `JAEGER_AGENT_HOST`. * In {{< param "PRODUCT_NAME" >}}, the positions file is saved at a different location. - Refer to the [loki.source.file][] documentation for more details. + Refer to the [loki.source.file](ref:loki.source.file) documentation for more details. Check if you have any existing setup, for example, a Kubernetes Persistent Volume, that you must update to use the new positions file path. * Metamonitoring metrics exposed by {{< param "PRODUCT_NAME" >}} usually match Promtail metamonitoring metrics but will use a different name. Make sure that you use the new metric names, for example, in your alerts and dashboards queries. * The logs produced by {{< param "PRODUCT_NAME" >}} will differ from those produced by Promtail. -* {{< param "PRODUCT_NAME" >}} exposes the {{< param "PRODUCT_NAME" >}} [UI][], which differs from Promtail's Web UI. +* {{< param "PRODUCT_NAME" >}} exposes the {{< param "PRODUCT_NAME" >}} [UI](ref:ui), which differs from Promtail's Web UI. [Promtail]: https://www.grafana.com/docs/loki//clients/promtail/ [debugging]: #debugging [expanded in the configuration file]: https://www.grafana.com/docs/loki//clients/promtail/configuration/#use-environment-variables-in-the-configuration -{{% docs/reference %}} -[local.file_match]: "/docs/agent/ -> /docs/agent//flow/reference/components/local.file_match.md" -[local.file_match]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/local.file_match.md" -[loki.source.file]: "/docs/agent/ -> /docs/agent//flow/reference/components/loki.source.file.md" -[loki.source.file]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.source.file.md" -[loki.write]: "/docs/agent/ -> /docs/agent//flow/reference/components/loki.write.md" -[loki.write]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.write.md" -[Components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -[Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components.md" -[convert]: "/docs/agent/ -> /docs/agent//flow/reference/cli/convert.md" -[convert]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/convert.md" -[run]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md" -[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/run.md" -[Run]: "/docs/agent/ -> /docs/agent//flow/get-started/run/" -[Run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/run/" -[DebuggingUI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md" -[DebuggingUI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.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/tasks/debug#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/migrate/from-static.md b/docs/sources/flow/tasks/migrate/from-static.md index eb035223ce80..44f062c80e65 100644 --- a/docs/sources/flow/tasks/migrate/from-static.md +++ b/docs/sources/flow/tasks/migrate/from-static.md @@ -15,11 +15,120 @@ description: Learn how to migrate your configuration from Grafana Agent Static t menuTitle: Migrate from Static to Flow title: Migrate Grafana Agent Static to Grafana Agent Flow weight: 340 +refs: + prometheus-limitations: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/migrate/from-prometheus/#limitations + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/migrate/from-prometheus/#limitations + static: + - pattern: /docs/agent/ + destination: /docs/agent//static/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/ + agent-management: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/agent-management/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/configuration/agent-management/ + logs: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/logs-config/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/logs-config/ + integrations-next: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/integrations/integrations-next// + metrics: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/metrics-config/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/configuration/metrics-config/ + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/get-started/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/get-started/run/ + loki.process: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/loki.process/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.process/ + prometheus.scrape: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.scrape/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.scrape/ + loki.write: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/loki.write/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.write/ + local.file_match: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/local.file_match/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/local.file_match/ + debuggingui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/ + ui: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/debug/#grafana-agent-flow-ui + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/debug/#grafana-agent-flow-ui + convert: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/convert/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/convert/ + loki.source.file: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/loki.source.file/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.source.file/ + promtail-limitations: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/migrate/from-promtail/#limitations + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/migrate/from-promtail/#limitations + prometheus.remote_write: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.remote_write/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write/ + river: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/ + traces: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/traces-config/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/configuration/traces-config/ + run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ + env: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/stdlib/env/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/stdlib/env/ --- # Migrate from {{% param "PRODUCT_ROOT_NAME" %}} Static to {{% param "PRODUCT_NAME" %}} -The built-in {{< param "PRODUCT_ROOT_NAME" >}} convert command can migrate your [Static][] configuration to a {{< param "PRODUCT_NAME" >}} configuration. +The built-in {{< param "PRODUCT_ROOT_NAME" >}} convert command can migrate your [Static](ref:static) configuration to a {{< param "PRODUCT_NAME" >}} configuration. This topic describes how to: @@ -28,24 +137,24 @@ This topic describes how to: ## Components used in this topic -* [prometheus.scrape][] -* [prometheus.remote_write][] -* [local.file_match][] -* [loki.process][] -* [loki.source.file][] -* [loki.write][] +* [prometheus.scrape](ref:prometheus.scrape) +* [prometheus.remote_write](ref:prometheus.remote_write) +* [local.file_match](ref:local.file_match) +* [loki.process](ref:loki.process) +* [loki.source.file](ref:loki.source.file) +* [loki.write](ref:loki.write) ## Before you begin * You must have an existing Grafana Agent Static configuration. -* You must be familiar with the [Components][] concept in {{< param "PRODUCT_NAME" >}}. +* You must be familiar with the [Components](ref:components) concept in {{< param "PRODUCT_NAME" >}}. ## Convert a Grafana Agent Static configuration -To fully migrate Grafana Agent [Static][] to {{< param "PRODUCT_NAME" >}}, you must convert your Static configuration into a {{< param "PRODUCT_NAME" >}} configuration. +To fully migrate Grafana Agent [Static](ref:static) to {{< param "PRODUCT_NAME" >}}, you must convert your Static configuration into a {{< param "PRODUCT_NAME" >}} configuration. This conversion will enable you to take full advantage of the many additional features available in {{< param "PRODUCT_NAME" >}}. -> In this task, you will use the [convert][] CLI command to output a {{< param "PRODUCT_NAME" >}} +> In this task, you will use the [convert](ref:convert) CLI command to output a {{< param "PRODUCT_NAME" >}} > configuration from a Static configuration. 1. Open a terminal window and run the following command. @@ -64,14 +173,14 @@ This conversion will enable you to take full advantage of the many additional fe Replace the following: - * _``_: The full path to the [Static][] configuration. + * _``_: The full path to the [Static](ref:static) configuration. * _`_`: The full path to output the {{< param "PRODUCT_NAME" >}} configuration. -1. [Run][] {{< param "PRODUCT_NAME" >}} using the new {{< param "PRODUCT_NAME" >}} configuration from _``_: +1. [Run](ref:run) {{< param "PRODUCT_NAME" >}} using the new {{< param "PRODUCT_NAME" >}} configuration from _``_: ### Debugging -1. If the convert command can't convert a [Static][] configuration, diagnostic information is sent to `stderr`. +1. If the convert command can't convert a [Static](ref:static) configuration, diagnostic information is sent to `stderr`. You can use the `--bypass-errors` flag to bypass any non-critical issues and output the {{< param "PRODUCT_NAME" >}} configuration using a best-effort conversion. {{< admonition type="caution" >}} @@ -93,7 +202,7 @@ This conversion will enable you to take full advantage of the many additional fe Replace the following: - * _``_: The full path to the [Static][] configuration. + * _``_: The full path to the [Static](ref:static) configuration. * _``_: The full path to output the {{< param "PRODUCT_NAME" >}} configuration. 1. You can use the `--report` flag to output a diagnostic report. @@ -112,7 +221,7 @@ This conversion will enable you to take full advantage of the many additional fe Replace the following: - * _``_: The full path to the [Static][] configuration. + * _``_: The full path to the [Static](ref:static) configuration. * _``_: The full path to output the {{< param "PRODUCT_NAME" >}} configuration. * _``_: The output path for the report. @@ -125,21 +234,21 @@ This conversion will enable you to take full advantage of the many additional fe ## Run a Static mode configuration If you’re not ready to completely switch to a {{< param "PRODUCT_NAME" >}} configuration, you can run {{< param "PRODUCT_ROOT_NAME" >}} using your existing Grafana Agent Static configuration. -The `--config.format=static` flag tells {{< param "PRODUCT_ROOT_NAME" >}} to convert your [Static] configuration to {{< param "PRODUCT_NAME" >}} and load it directly without saving the new configuration. +The `--config.format=static` flag tells {{< param "PRODUCT_ROOT_NAME" >}} to convert your[Static](ref:static) configuration to {{< param "PRODUCT_NAME" >}} and load it directly without saving the new configuration. This allows you to try {{< param "PRODUCT_NAME" >}} without modifying your existing Grafana Agent Static configuration infrastructure. -> In this task, you will use the [run][] CLI command to run {{< param "PRODUCT_NAME" >}} using a Static configuration. +> In this task, you will use the [run](ref:run) CLI command to run {{< param "PRODUCT_NAME" >}} using a Static configuration. -[Run][] {{< param "PRODUCT_NAME" >}} and include the command line flag `--config.format=static`. -Your configuration file must be a valid [Static] configuration file. +[Run](ref:run) {{< param "PRODUCT_NAME" >}} and include the command line flag `--config.format=static`. +Your configuration file must be a valid[Static](ref:static) configuration file. ### Debugging 1. You can follow the convert CLI command [debugging][] instructions to generate a diagnostic report. -1. Refer to the {{< param "PRODUCT_NAME" >}} [debugging UI][DebuggingUI] for more information about running {{< param "PRODUCT_NAME" >}}. +1. Refer to the {{< param "PRODUCT_NAME" >}} [debugging UI](ref:debuggingui) for more information about running {{< param "PRODUCT_NAME" >}}. -1. If your [Static] configuration can't be converted and loaded directly into {{< param "PRODUCT_NAME" >}}, diagnostic information is sent to `stderr`. +1. If your[Static](ref:static) configuration can't be converted and loaded directly into {{< param "PRODUCT_NAME" >}}, diagnostic information is sent to `stderr`. You can use the `--config.bypass-conversion-errors` flag with `--config.format=static` to bypass any non-critical issues and start {{< param "PRODUCT_NAME" >}}. {{< admonition type="caution" >}} @@ -149,9 +258,9 @@ Your configuration file must be a valid [Static] configuration file. ## Example -This example demonstrates converting a [Static] configuration file to a {{< param "PRODUCT_NAME" >}} configuration file. +This example demonstrates converting a[Static](ref:static) configuration file to a {{< param "PRODUCT_NAME" >}} configuration file. -The following [Static] configuration file provides the input for the conversion. +The following[Static](ref:static) configuration file provides the input for the conversion. ```yaml server: @@ -207,7 +316,7 @@ logs: - url: https://USER_ID:API_KEY@logs-prod3.grafana.net/loki/api/v1/push ``` -The convert command takes the YAML file as input and outputs a [River][] file. +The convert command takes the YAML file as input and outputs a [River](ref:river) file. {{< code >}} @@ -223,7 +332,7 @@ grafana-agent-flow convert --source-format=static --output= Replace the following: -* _``_: The full path to the [Static][] configuration. +* _``_: The full path to the [Static](ref:static) configuration. * _``_: The full path to output the {{< param "PRODUCT_NAME" >}} configuration. The new {{< param "PRODUCT_NAME" >}} configuration file looks like this: @@ -305,7 +414,7 @@ loki.write "logs_varlogs" { ## Integrations Next -You can convert [integrations next][] configurations by adding the `extra-args` flag for [convert][] or `config.extra-args` for [run][]. +You can convert [integrations next][] configurations by adding the `extra-args` flag for [convert](ref:convert) or `config.extra-args` for [run](ref:run). {{< code >}} @@ -320,16 +429,16 @@ grafana-agent-flow convert --source-format=static --extra-args="-enable-features {{< /code >}} Replace the following: - * _``_: The full path to the [Static][] configuration. + * _``_: The full path to the [Static](ref:static) configuration. * _``_: The full path to output the {{< param "PRODUCT_NAME" >}} configuration. ## Environment Vars You can use the `-config.expand-env` command line flag to interpret environment variables in your Grafana Agent Static configuration. -You can pass these flags to [convert][] with `--extra-args="-config.expand-env"` or to [run][] with `--config.extra-args="-config.expand-env"`. +You can pass these flags to [convert](ref:convert) with `--extra-args="-config.expand-env"` or to [run](ref:run) with `--config.extra-args="-config.expand-env"`. > It's possible to combine `integrations-next` with `expand-env`. -> For [convert][], you can use `--extra-args="-enable-features=integrations-next -config.expand-env"` +> For [convert](ref:convert), you can use `--extra-args="-enable-features=integrations-next -config.expand-env"` ## Limitations @@ -339,63 +448,17 @@ After the configuration is converted, review the {{< param "PRODUCT_NAME" >}} co The following list is specific to the convert command and not {{< param "PRODUCT_NAME" >}}: -* The [Agent Management][] configuration options can't be automatically converted to {{< param "PRODUCT_NAME" >}}. +* The [Agent Management](ref:agent-management) configuration options can't be automatically converted to {{< param "PRODUCT_NAME" >}}. Any additional unsupported features are returned as errors during conversion. * There is no gRPC server to configure for {{< param "PRODUCT_NAME" >}}, as any non-default configuration will show as unsupported during the conversion. * Check if you are using any extra command line arguments with Static that aren't present in your configuration file. For example, `-server.http.address`. -* Check if you are using any environment variables in your [Static][] configuration. - These will be evaluated during conversion and you may want to replace them with the {{< param "PRODUCT_NAME" >}} Standard library [env][] function after conversion. -* Review additional [Prometheus Limitations][] for limitations specific to your [Metrics][] configuration. -* Review additional [Promtail Limitations][] for limitations specific to your [Logs][] configuration. +* Check if you are using any environment variables in your [Static](ref:static) configuration. + These will be evaluated during conversion and you may want to replace them with the {{< param "PRODUCT_NAME" >}} Standard library [env](ref:env) function after conversion. +* Review additional [Prometheus Limitations](ref:prometheus-limitations) for limitations specific to your [Metrics](ref:metrics) configuration. +* Review additional [Promtail Limitations](ref:promtail-limitations) for limitations specific to your [Logs](ref:logs) configuration. * The logs produced by {{< param "PRODUCT_NAME" >}} mode will differ from those produced by Static. -* {{< param "PRODUCT_ROOT_NAME" >}} exposes the {{< param "PRODUCT_NAME" >}} [UI][]. +* {{< param "PRODUCT_ROOT_NAME" >}} exposes the {{< param "PRODUCT_NAME" >}} [UI](ref:ui). [debugging]: #debugging [example]: #example -{{% docs/reference %}} -[Static]: "/docs/agent/ -> /docs/agent//static" -[Static]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static" -[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" -[prometheus.remote_write]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.remote_write.md" -[prometheus.remote_write]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write.md" -[local.file_match]: "/docs/agent/ -> /docs/agent//flow/reference/components/local.file_match.md" -[local.file_match]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/local.file_match.md" -[loki.process]: "/docs/agent/ -> /docs/agent//flow/reference/components/loki.process.md" -[loki.process]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.process.md" -[loki.source.file]: "/docs/agent/ -> /docs/agent//flow/reference/components/loki.source.file.md" -[loki.source.file]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.source.file.md" -[loki.write]: "/docs/agent/ -> /docs/agent//flow/reference/components/loki.write.md" -[loki.write]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.write.md" -[Components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -[Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components.md" -[convert]: "/docs/agent/ -> /docs/agent//flow/reference/cli/convert.md" -[convert]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/convert.md" -[run]: "/docs/agent/ -> /docs/agent//flow/reference/cli/run.md" -[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/cli/run.md" -[Run]: "/docs/agent/ -> /docs/agent//flow/get-started/run/" -[Run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/get-started/run/" -[DebuggingUI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug.md" -[DebuggingUI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug.md" -[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" -[Traces]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/configuration/traces-config.md" -[Agent Management]: "/docs/agent/ -> /docs/agent//static/configuration/agent-management.md" -[Agent Management]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/configuration/agent-management.md" -[env]: "/docs/agent/ -> /docs/agent//flow/reference/stdlib/env.md" -[env]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/stdlib/env.md" -[Prometheus Limitations]: "/docs/agent/ -> /docs/agent//flow/tasks/migrate/from-prometheus.md#limitations" -[Prometheus Limitations]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/migrate/from-prometheus.md#limitations" -[Promtail Limitations]: "/docs/agent/ -> /docs/agent//flow/tasks/migrate/from-promtail.md#limitations" -[Promtail Limitations]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/migrate/from-promtail.md#limitations" -[Metrics]: "/docs/agent/ -> /docs/agent//static/configuration/metrics-config.md" -[Metrics]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/configuration/metrics-config.md" -[Logs]: "/docs/agent/ -> /docs/agent//static/configuration/logs-config.md" -[Logs]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/logs-config.md" -[UI]: "/docs/agent/ -> /docs/agent//flow/tasks/debug#grafana-agent-flow-ui" -[UI]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/debug#grafana-agent-flow-ui" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tasks/monitor/component_metrics.md b/docs/sources/flow/tasks/monitor/component_metrics.md index 5b3693a1f182..2d4e1cee0571 100644 --- a/docs/sources/flow/tasks/monitor/component_metrics.md +++ b/docs/sources/flow/tasks/monitor/component_metrics.md @@ -16,11 +16,27 @@ canonical: https://grafana.com/docs/agent/latest/flow/monitoring/component_metri description: Learn how to monitor component metrics title: Monitor components weight: 200 +refs: + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ + reference-documentation: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/ + grafana-agent-run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ --- # How to monitor components -{{< param "PRODUCT_NAME" >}} [components][] may optionally expose Prometheus metrics which can be used to investigate the behavior of that component. +{{< param "PRODUCT_NAME" >}} [components](ref:components) may optionally expose Prometheus metrics which can be used to investigate the behavior of that component. These component-specific metrics are only generated when an instance of that component is running. > Component-specific metrics are different than any metrics being processed by the component. @@ -33,14 +49,6 @@ Component-specific metrics are exposed at the `/metrics` HTTP endpoint of the {{ Component-specific metrics have a `component_id` label matching the component ID generating those metrics. For example, component-specific metrics for a `prometheus.remote_write` component labeled `production` will have a `component_id` label with the value `prometheus.remote_write.production`. -The [reference documentation][] for each component described the list of component-specific metrics that the component exposes. +The [reference documentation](ref:reference-documentation) for each component described the list of component-specific metrics that the component exposes. Not all components expose metrics. -{{% docs/reference %}} -[components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -[components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components.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" -[reference documentation]: "/docs/agent/ -> /docs/agent//flow/reference/components" -[reference documentation]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components" -{{% /docs/reference %}} \ No newline at end of file diff --git a/docs/sources/flow/tasks/monitor/controller_metrics.md b/docs/sources/flow/tasks/monitor/controller_metrics.md index 0ba7617032aa..27b0e37b6728 100644 --- a/docs/sources/flow/tasks/monitor/controller_metrics.md +++ b/docs/sources/flow/tasks/monitor/controller_metrics.md @@ -16,11 +16,22 @@ canonical: https://grafana.com/docs/agent/latest/flow/monitoring/controller_metr description: Learn how to monitor controller metrics title: Monitor controller weight: 100 +refs: + grafana-agent-run: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/cli/run/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/cli/run/ + component-controller: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/component_controller/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/component_controller/ --- # How to monitor controller -The {{< param "PRODUCT_NAME" >}} [component controller][] exposes Prometheus metrics which you can use to investigate the controller state. +The {{< param "PRODUCT_NAME" >}} [component controller](ref:component-controller) exposes Prometheus metrics which you can use to investigate the controller state. Metrics for the controller are exposed at the `/metrics` HTTP endpoint of the {{< param "PRODUCT_NAME" >}} HTTP server, which defaults to listening on `http://localhost:12345`. @@ -36,9 +47,3 @@ The controller exposes the following metrics: * `agent_component_dependencies_wait_seconds` (Histogram): Time spent by components waiting to be evaluated after one of their dependencies is updated. * `agent_component_evaluation_queue_size` (Gauge): The current number of component evaluations waiting to be performed. -{{% docs/reference %}} -[component controller]: "/docs/agent/ -> /docs/agent//flow/concepts/component_controller.md" -[component controller]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/component_controller.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/tasks/opentelemetry-to-lgtm-stack.md b/docs/sources/flow/tasks/opentelemetry-to-lgtm-stack.md index 2da979078336..031690fa1e95 100644 --- a/docs/sources/flow/tasks/opentelemetry-to-lgtm-stack.md +++ b/docs/sources/flow/tasks/opentelemetry-to-lgtm-stack.md @@ -15,6 +15,57 @@ description: Learn how to collect OpenTelemetry data and forward it to the Grafa stack title: OpenTelemetry to Grafana stack weight: 350 +refs: + otelcol.auth.basic: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.auth.basic/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.auth.basic/ + otelcol.exporter.otlp: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.exporter.otlp/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.otlp/ + collect-open-telemetry-data: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tasks/collect-opentelemetry-data/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tasks/collect-opentelemetry-data/ + components: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ + otelcol.processor.batch: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.processor.batch/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.processor.batch/ + prometheus.remote_write: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.remote_write/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write/ + otelcol.exporter.prometheus: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.exporter.prometheus/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.prometheus/ + otelcol.exporter.loki: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.exporter.loki/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.loki/ + loki.write: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/loki.write/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.write/ + otelcol.receiver.otlp: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/otelcol.receiver.otlp/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.receiver.otlp/ --- # OpenTelemetry to Grafana stack @@ -29,26 +80,26 @@ This topic describes how to: ## Components used in this topic -* [loki.write][] -* [otelcol.auth.basic][] -* [otelcol.exporter.loki][] -* [otelcol.exporter.otlp][] -* [otelcol.exporter.prometheus][] -* [otelcol.processor.batch][] -* [otelcol.receiver.otlp][] -* [prometheus.remote_write][] +* [loki.write](ref:loki.write) +* [otelcol.auth.basic](ref:otelcol.auth.basic) +* [otelcol.exporter.loki](ref:otelcol.exporter.loki) +* [otelcol.exporter.otlp](ref:otelcol.exporter.otlp) +* [otelcol.exporter.prometheus](ref:otelcol.exporter.prometheus) +* [otelcol.processor.batch](ref:otelcol.processor.batch) +* [otelcol.receiver.otlp](ref:otelcol.receiver.otlp) +* [prometheus.remote_write](ref:prometheus.remote_write) ## Before you begin * Ensure that you have basic familiarity with instrumenting applications with OpenTelemetry. * 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" >}}. -* Complete the [Collect open telemetry data][] task. You will pick up from where that guide ended. +* Be familiar with the concept of [Components](ref:components) in {{< param "PRODUCT_NAME" >}}. +* Complete the [Collect open telemetry data](ref:collect-open-telemetry-data) task. You will pick up from where that guide ended. ## The pipeline -You can start with the {{< param "PRODUCT_NAME" >}} configuration you created in the [Collect open telemetry data][] task. +You can start with the {{< param "PRODUCT_NAME" >}} configuration you created in the [Collect open telemetry data](ref:collect-open-telemetry-data) task. ```river otelcol.receiver.otlp "example" { @@ -98,7 +149,7 @@ Traces: OTel → batch processor → OTel exporter ## Grafana Loki [Grafana Loki][] is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus. -Similar to Prometheus, to send from OTLP to Loki, you can do a passthrough from the [otelcol.exporter.loki] component to [loki.write] component. +Similar to Prometheus, to send from OTLP to Loki, you can do a passthrough from the[otelcol.exporter.loki](ref:otelcol.exporter.loki) component to[loki.write](ref:loki.write) component. ```river otelcol.exporter.loki "default" { @@ -111,7 +162,7 @@ loki.write "default" { } ``` -To use Loki with basic-auth, which is required with Grafana Cloud Loki, you must configure the [loki.write][] component. +To use Loki with basic-auth, which is required with Grafana Cloud Loki, you must configure the [loki.write](ref:loki.write) component. You can get the Loki configuration from the Loki **Details** page in the [Grafana Cloud Portal][]: ![](../../../assets/tasks/loki-config.png) @@ -146,7 +197,7 @@ otelcol.exporter.otlp "default" { } ``` -To use Tempo with basic-auth, which is required with Grafana Cloud Tempo, you must use the [otelcol.auth.basic][] component. +To use Tempo with basic-auth, which is required with Grafana Cloud Tempo, you must use the [otelcol.auth.basic](ref:otelcol.auth.basic) component. You can get the Tempo configuration from the Tempo **Details** page in the [Grafana Cloud Portal][]: ![](../../../assets/tasks/tempo-config.png) @@ -168,7 +219,7 @@ otelcol.auth.basic "grafana_cloud_tempo" { ## Grafana Mimir or Prometheus Remote Write [Prometheus Remote Write][] is a popular metrics transmission protocol supported by most metrics systems, including [Grafana Mimir][] and Grafana Cloud. -To send from OTLP to Prometheus, you can do a passthrough from the [otelcol.exporter.prometheus][] to the [prometheus.remote_write][] component. +To send from OTLP to Prometheus, you can do a passthrough from the [otelcol.exporter.prometheus](ref:otelcol.exporter.prometheus) to the [prometheus.remote_write](ref:prometheus.remote_write) component. The Prometheus remote write component in {{< param "PRODUCT_NAME" >}} is a robust protocol implementation, including a Write Ahead Log (WAL) for resiliency. ```river @@ -183,7 +234,7 @@ prometheus.remote_write "default" { } ``` -To use Prometheus with basic-auth, which is required with Grafana Cloud Prometheus, you must configure the [prometheus.remote_write][] component. +To use Prometheus with basic-auth, which is required with Grafana Cloud Prometheus, you must configure the [prometheus.remote_write](ref:prometheus.remote_write) component. You can get the Prometheus configuration from the Prometheus **Details** page in the [Grafana Cloud Portal][]: ![](../../../assets/tasks/prometheus-config.png) @@ -321,25 +372,3 @@ You can now check the pipeline graphically by visiting http://localhost:12345/gr [Prometheus Remote Write]: https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage [Grafana Mimir]: https://grafana.com/oss/mimir/ -{{% docs/reference %}} -[Collect open telemetry data]: "/docs/agent/ -> /docs/agent//flow/tasks/collect-opentelemetry-data.md" -[Collect open telemetry data]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tasks/collect-opentelemetry-data.md" -[Components]: "/docs/agent/ -> /docs/agent//flow/concepts/components.md" -[Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components.md" -[loki.write]: "/docs/agent/ -> /docs/agent//flow/reference/components/loki.write.md" -[loki.write]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/loki.write.md" -[otelcol.auth.basic]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.auth.basic.md" -[otelcol.auth.basic]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.auth.basic.md" -[otelcol.exporter.loki]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.exporter.loki.md" -[otelcol.exporter.loki]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.loki.md" -[otelcol.exporter.otlp]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.exporter.otlp.md" -[otelcol.exporter.otlp]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.otlp.md" -[otelcol.exporter.prometheus]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.exporter.prometheus.md" -[otelcol.exporter.prometheus]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.prometheus.md" -[otelcol.processor.batch]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.processor.batch.md" -[otelcol.processor.batch]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.processor.batch.md" -[otelcol.receiver.otlp]: "/docs/agent/ -> /docs/agent//flow/reference/components/otelcol.receiver.otlp.md" -[otelcol.receiver.otlp]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.receiver.otlp.md" -[prometheus.remote_write]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.remote_write.md" -[prometheus.remote_write]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tutorials/chaining.md b/docs/sources/flow/tutorials/chaining.md index 9be20dbc3ade..c46987ace127 100644 --- a/docs/sources/flow/tutorials/chaining.md +++ b/docs/sources/flow/tutorials/chaining.md @@ -10,11 +10,17 @@ description: Learn how to chain Prometheus components menuTitle: Chain Prometheus components title: Chain Prometheus components weight: 400 +refs: + filtering-metrics: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tutorials/filtering-metrics/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tutorials/filtering-metrics/ --- # Chain Prometheus components -This tutorial shows how to use [multiple-inputs.river][] to send data to several different locations. This tutorial uses the same base as [Filtering metrics][]. +This tutorial shows how to use [multiple-inputs.river][] to send data to several different locations. This tutorial uses the same base as [Filtering metrics](ref:filtering-metrics). A new concept introduced in Flow is chaining components together in a composable pipeline. This promotes the reusability of components while offering flexibility. @@ -86,7 +92,3 @@ In `multiple-input.river` add a new `prometheus.relabel` component that adds a ` [Grafana]: http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Mimir%22,%7B%22refId%22:%22A%22,%22instant%22:true,%22range%22:true,%22exemplar%22:true,%22expr%22:%22agent_build_info%7B%7D%22%7D%5D [node_exporter]: http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Mimir%22,%7B%22refId%22:%22A%22,%22instant%22:true,%22range%22:true,%22exemplar%22:true,%22expr%22:%22node_cpu_seconds_total%22%7D%5D -{{% docs/reference %}} -[Filtering metrics]: "/docs/agent/ -> /docs/agent//flow/tutorials/filtering-metrics.md" -[Filtering metrics]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tutorials/filtering-metrics.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tutorials/collecting-prometheus-metrics.md b/docs/sources/flow/tutorials/collecting-prometheus-metrics.md index a66547419064..ad158ff98dd7 100644 --- a/docs/sources/flow/tutorials/collecting-prometheus-metrics.md +++ b/docs/sources/flow/tutorials/collecting-prometheus-metrics.md @@ -10,6 +10,32 @@ description: Learn how to collect Prometheus metrics menuTitle: Collect Prometheus metrics title: Collect Prometheus metrics weight: 200 +refs: + prometheus.scrape: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.scrape/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.scrape/ + argument: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ + export: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/components/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/components/ + prometheus.remote_write: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.remote_write/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write/ + attribute: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/config-language/#attributes + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/concepts/config-language/#attributes --- # Collect Prometheus metrics @@ -51,7 +77,7 @@ Click the nodes to navigate to the associated component page. There, you can vie ## Scraping component -The [`prometheus.scrape`][prometheus.scrape] component is responsible for scraping the metrics of a particular endpoint and passing them on to another component. +The [`prometheus.scrape`](ref:prometheus.scrape) component is responsible for scraping the metrics of a particular endpoint and passing them on to another component. ```river // prometheus.scrape is the name of the component and "default" is its label. @@ -69,13 +95,13 @@ prometheus.scrape "default" { The `prometheus.scrape "default"` annotation indicates the name of the component, `prometheus.scrape`, and its label, `default`. All components must have a unique combination of name and if applicable label. -The `targets` [attribute][] is an [argument][]. `targets` is a list of labels that specify the target via the special key `__address__`. The scraper is targeting the {{< param "PRODUCT_NAME" >}} `/metrics` endpoint. Both `http` and `/metrics` are implied but can be overridden. +The `targets` [attribute](ref:attribute) is an [argument](ref:argument). `targets` is a list of labels that specify the target via the special key `__address__`. The scraper is targeting the {{< param "PRODUCT_NAME" >}} `/metrics` endpoint. Both `http` and `/metrics` are implied but can be overridden. -The `forward_to` attribute is an argument that references the [export][] of the `prometheus.remote_write.prom` component. This is where the scraper will send the metrics for further processing. +The `forward_to` attribute is an argument that references the [export](ref:export) of the `prometheus.remote_write.prom` component. This is where the scraper will send the metrics for further processing. ## Remote Write component -The [`prometheus.remote_write`][prometheus.remote_write] component is responsible for writing the metrics to a Prometheus-compatible endpoint (Mimir). +The [`prometheus.remote_write`](ref:prometheus.remote_write) component is responsible for writing the metrics to a Prometheus-compatible endpoint (Mimir). ```river prometheus.remote_write "prom" { @@ -96,15 +122,3 @@ To try out {{< param "PRODUCT_ROOT_NAME" >}} without using Docker: [Docker]: https://www.docker.com/products/docker-desktop [Grafana]: http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Mimir%22,%7B%22refId%22:%22A%22,%22instant%22:true,%22range%22:true,%22exemplar%22:true,%22expr%22:%22agent_build_info%7B%7D%22%7D%5D -{{% 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/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" -[export]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components" -[prometheus.remote_write]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.remote_write.md" -[prometheus.remote_write]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.remote_write.md" -{{% /docs/reference %}} diff --git a/docs/sources/flow/tutorials/filtering-metrics.md b/docs/sources/flow/tutorials/filtering-metrics.md index ec942124ec91..391997e4969f 100644 --- a/docs/sources/flow/tutorials/filtering-metrics.md +++ b/docs/sources/flow/tutorials/filtering-metrics.md @@ -10,11 +10,22 @@ description: Learn how to filter Prometheus metrics menuTitle: Filter Prometheus metrics title: Filter Prometheus metrics weight: 300 +refs: + prometheus.relabel: + - pattern: /docs/agent/ + destination: /docs/agent//flow/reference/components/prometheus.relabel/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.relabel/ + collecting-prometheus-metrics: + - pattern: /docs/agent/ + destination: /docs/agent//flow/tutorials/collecting-prometheus-metrics/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/flow/tutorials/collecting-prometheus-metrics/ --- # Filter Prometheus metrics -In this tutorial, you'll add a new component [prometheus.relabel][] using [relabel.river][] to filter metrics. This tutorial uses the same base as [Collecting Prometheus metrics][]. +In this tutorial, you'll add a new component [prometheus.relabel](ref:prometheus.relabel) using [relabel.river][] to filter metrics. This tutorial uses the same base as [Collecting Prometheus metrics](ref:collecting-prometheus-metrics). ## Prerequisites @@ -58,9 +69,3 @@ Open the `relabel.river` file that was downloaded and change the name of the ser [Grafana]: http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Mimir%22,%7B%22refId%22:%22A%22,%22instant%22:true,%22range%22:true,%22exemplar%22:true,%22expr%22:%22agent_build_info%7B%7D%22%7D%5D [relabel.river]: https://grafana.com/docs/agent//flow/tutorials/assets/flow_configs/relabel.river -{{% docs/reference %}} -[prometheus.relabel]: "/docs/agent/ -> /docs/agent//flow/reference/components/prometheus.relabel.md" -[prometheus.relabel]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/reference/components/prometheus.relabel.md" -[Collecting Prometheus metrics]: "/docs/agent/ -> /docs/agent//flow/tutorials/collecting-prometheus-metrics.md" -[Collecting Prometheus metrics]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tutorials/collecting-prometheus-metrics.md" -{{% /docs/reference %}} diff --git a/docs/sources/operator/release-notes.md b/docs/sources/operator/release-notes.md index ec96084cd992..c8f3812dbc24 100644 --- a/docs/sources/operator/release-notes.md +++ b/docs/sources/operator/release-notes.md @@ -10,6 +10,17 @@ description: Release notes for Grafana Agent Operator menuTitle: Release notes title: Release notes for Grafana Agent Operator weight: 999 +refs: + release-notes-static: + - pattern: /docs/agent/ + destination: /docs/agent//static/release-notes/ + - pattern: /docs/agent/ + destination: /docs/grafana-cloud/send-data/agent/static/release-notes/ + release-notes-flow: + - pattern: /docs/agent/ + destination: /docs/agent//flow/release-notes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/release-notes/ --- # Release notes for Grafana Agent Operator @@ -21,16 +32,9 @@ For a complete list of changes to Grafana Agent, with links to pull requests and > **Note:** These release notes are specific to the Static mode Kubernetes Operator. > Other release notes for the different Grafana Agent variants are contained on separate pages: > -> - [Static mode release notes][release-notes-static] -> - [Flow mode release notes][release-notes-flow] +> - [Static mode release notes](ref:release-notes-static) +> - [Flow mode release notes](ref:release-notes-flow) -{{% docs/reference %}} -[release-notes-static]: "/docs/agent/ -> /docs/agent//static/release-notes" -[release-notes-static]: "/docs/agent/ -> /docs/grafana-cloud/send-data/agent/static/release-notes" - -[release-notes-flow]: "/docs/agent/ -> /docs/agent//flow/release-notes" -[release-notes-flow]: "/docs/grafana-cloud/ -> /docs/agent//flow/release-notes" -{{% /docs/reference %}} ## v0.33 diff --git a/docs/sources/static/_index.md b/docs/sources/static/_index.md index 4ce1f420367a..b73ece282e03 100644 --- a/docs/sources/static/_index.md +++ b/docs/sources/static/_index.md @@ -6,6 +6,22 @@ canonical: https://grafana.com/docs/agent/latest/static/ description: Learn about Grafana Agent in static mode title: Static mode weight: 200 +refs: + install: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/install/ + - pattern: /docs/grafana-cloud/ + destination: ./set-up/install/ + configure: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/ + - pattern: /docs/grafana-cloud/ + destination: ./configuration/ + set-up: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/ + - pattern: /docs/grafana-cloud/ + destination: ./set-up/ --- # Static mode @@ -23,7 +39,7 @@ Static mode is composed of different _subsystems_: traces and forwarding them to Grafana Tempo or any OpenTelemetry-compatible endpoint. -Static mode is [configured][configure] with a YAML file. +Static mode is [configured](ref:configure) with a YAML file. Static mode works with: @@ -34,7 +50,7 @@ Static mode works with: This topic helps you to think about what you're trying to accomplish and how to use Grafana Agent to meet your goals. -You can [set up][] and [configure][] Grafana Agent in static mode manually, or +You can [set up](ref:set-up) and [configure](ref:configure) Grafana Agent in static mode manually, or you can follow the common workflows described in this topic. ## Topics @@ -67,7 +83,7 @@ Grafana Cloud integration workflows and the Kubernetes Monitoring solution are t | Topic | Description | |---|---| -| [Install or uninstall Grafana Agent][install] | Install or uninstall Grafana Agent. | +| [Install or uninstall Grafana Agent](ref:install) | Install or uninstall Grafana Agent. | | [Troubleshoot Cloud Integrations installation on Linux](/docs/grafana-cloud/monitor-infrastructure/integrations/install-troubleshoot-linux/) | Troubleshoot common errors when executing the Grafana Agent installation script on Linux. | | [Troubleshoot Cloud Integrations installation on Mac](/docs/grafana-cloud/monitor-infrastructure/integrations/install-troubleshoot-mac/) | Troubleshoot common errors when executing the Grafana Agent installation script on Mac. | | [Troubleshoot Cloud Integrations installation on Windows](/docs/grafana-cloud/monitor-infrastructure/integrations/install-troubleshooting-windows/) | Troubleshoot common errors when executing the Grafana Agent installation script on Windows. | @@ -87,11 +103,3 @@ Logs are included when you [set up a Cloud integration](/docs/grafana-cloud/data | [Set up and use tracing](/docs/grafana-cloud/data-configuration/traces/set-up-and-use-tempo/) | Install Grafana Agent to collect traces for use with Grafana Tempo, included with your [Grafana Cloud account](/docs/grafana-cloud/account-management/cloud-portal/). | | [Use Grafana Agent as a tracing pipeline](/docs/tempo/latest/configuration/grafana-agent/) | Grafana Agent can be configured to run a set of tracing pipelines to collect data from your applications and write it to Grafana Tempo. Pipelines are built using OpenTelemetry, and consist of receivers, processors, and exporters. | -{{% docs/reference %}} -[set up]: "/docs/agent/ -> /docs/agent//static/set-up" -[set up]: "/docs/grafana-cloud/ -> ./set-up" -[configure]: "/docs/agent/ -> /docs/agent//static/configuration" -[configure]: "/docs/grafana-cloud/ -> ./configuration" -[install]: "/docs/agent/ -> /docs/agent//static/set-up/install" -[install]: "/docs/grafana-cloud/ -> ./set-up/install" -{{% /docs/reference %}} diff --git a/docs/sources/static/api/_index.md b/docs/sources/static/api/_index.md index 708df3f83ecb..564bdb140aaf 100644 --- a/docs/sources/static/api/_index.md +++ b/docs/sources/static/api/_index.md @@ -8,6 +8,20 @@ description: Learn about the Grafana Agent static mode API menuTitle: Static mode API title: Static mode APIs (Stable) weight: 400 +refs: + metrics: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/metrics-config/ + - pattern: /docs/grafana-cloud/ + destination: ../configuration/metrics-config/ + integrations: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/integrations/integrations-next/ + - pattern: /docs/grafana-cloud/ + destination: ../configuration/integrations/integrations-next/ + scrape: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/scraping-service/ --- # Static mode APIs (Stable) @@ -23,7 +37,7 @@ API endpoints are stable unless otherwise noted. ## Config management API (Beta) -Grafana Agent exposes a configuration management REST API for managing instance configurations when it's running in [scraping service mode][scrape]. +Grafana Agent exposes a configuration management REST API for managing instance configurations when it's running in [scraping service mode](ref:scrape). {{< admonition type="note" >}} The scraping service mode is a requirement for the configuration management @@ -130,7 +144,7 @@ with the same name already exists, then it will be completely overwritten. URL-encoded names are stored in decoded form. e.g., `hello%2Fworld` will represent the config named `hello/world`. -The request body passed to this endpoint must match the format of [metrics_instance_config][metrics] +The request body passed to this endpoint must match the format of [metrics_instance_config](ref:metrics) defined in the Configuration Reference. The name field of the configuration is ignored and the name in the URL takes precedence. The request body must be formatted as YAML. @@ -417,7 +431,7 @@ A support bundle contains the following data: ## Integrations API (Experimental) > **WARNING**: This API is currently only available when the experimental -> [integrations revamp][integrations] +> [integrations revamp](ref:integrations) > is enabled. Both the revamp and this API are subject to change while they > are still experimental. @@ -529,11 +543,3 @@ Response: Agent is Healthy. ``` -{{% docs/reference %}} -[scrape]: "/docs/agent/ -> /docs/agent//static/configuration/scraping-service" -[scrape]: "/docs/grafana-cloud/ -> ../configuration/scraping-service -[metrics]: "/docs/agent/ -> /docs/agent//static/configuration/metrics-config" -[metrics]: "/docs/grafana-cloud/ -> ../configuration/metrics-config" -[integrations]: "/docs/agent/ -> /docs/agent//static/configuration/integrations/integrations-next" -[integrations]: "/docs/grafana-cloud/ -> ../configuration/integrations/integrations-next" -{{% /docs/reference %}} diff --git a/docs/sources/static/configuration/_index.md b/docs/sources/static/configuration/_index.md index fa1a195bd638..b3176a3e18af 100644 --- a/docs/sources/static/configuration/_index.md +++ b/docs/sources/static/configuration/_index.md @@ -7,6 +7,42 @@ canonical: https://grafana.com/docs/agent/latest/static/configuration/ description: Learn how to configure Grafana Agent in static mode title: Configure static mode weight: 300 +refs: + logs: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/logs-config/ + - pattern: /docs/grafana-cloud/ + destination: ./logs-config/ + traces: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/traces-config/ + - pattern: /docs/grafana-cloud/ + destination: ./traces-config/ + server: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/server-config/ + - pattern: /docs/grafana-cloud/ + destination: ./server-config/ + flags: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/flags/ + - pattern: /docs/grafana-cloud/ + destination: ./flags/ + api: + - pattern: /docs/agent/ + destination: /docs/agent//static/api/#reload-configuration-file-beta + - pattern: /docs/grafana-cloud/ + destination: ../api/#reload-configuration-file-beta + integrations: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/integrations/ + - pattern: /docs/grafana-cloud/ + destination: ./integrations/ + metrics: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/metrics-config/ + - pattern: /docs/grafana-cloud/ + destination: ./metrics-config/ --- # Configure static mode @@ -14,7 +50,7 @@ weight: 300 The configuration of static mode is split across two places: * A YAML file -* [Command-line flags][flags] +* [Command-line flags](ref:flags) The YAML file is used to configure settings which are dynamic and can be changed at runtime. The command-line flags then configure things which cannot @@ -22,11 +58,11 @@ change at runtime, such as the listen port for the HTTP server. This file describes the YAML configuration, which is usually in a file named `config.yaml`. -- [server_config][server] -- [metrics_config][metrics] -- [logs_config][logs] -- [traces_config][traces] -- [integrations_config][integrations] +- [server_config](ref:server) +- [metrics_config](ref:metrics) +- [logs_config](ref:logs) +- [traces_config](ref:traces) +- [integrations_config](ref:integrations) The configuration of Grafana Agent is "stable," but subject to breaking changes as individual features change. Breaking changes to configuration will be @@ -79,7 +115,7 @@ which may be slightly unexpected. ## Reloading (beta) -The configuration file can be reloaded at runtime. Read the [API documentation][api] for more information. +The configuration file can be reloaded at runtime. Read the [API documentation](ref:api) for more information. This functionality is in beta, and may have issues. Please open GitHub issues for any problems you encounter. @@ -141,19 +177,3 @@ The following flags will configure basic auth for requests made to HTTP/S remote This beta feature is subject to change in future releases. {{< /admonition >}} -{{% docs/reference %}} -[flags]: "/docs/agent/ -> /docs/agent//static/configuration/flags" -[flags]: "/docs/grafana-cloud/ -> ./flags" -[server]: "/docs/agent/ -> /docs/agent//static/configuration/server-config" -[server]: "/docs/grafana-cloud/ -> ./server-config" -[metrics]: "/docs/agent/ -> /docs/agent//static/configuration/metrics-config" -[metrics]: "/docs/grafana-cloud/ -> ./metrics-config" -[logs]: "/docs/agent/ -> /docs/agent//static/configuration/logs-config" -[logs]: "/docs/grafana-cloud/ -> ./logs-config" -[traces]: "/docs/agent/ -> /docs/agent//static/configuration/traces-config" -[traces]: "/docs/grafana-cloud/ -> ./traces-config" -[integrations]: "/docs/agent/ -> /docs/agent//static/configuration/integrations" -[integrations]: "/docs/grafana-cloud/ -> ./integrations" -[api]: "/docs/agent/ -> /docs/agent//static/api#reload-configuration-file-beta" -[api]: "/docs/grafana-cloud/ -> ../api#reload-configuration-file-beta" -{{% /docs/reference %}} diff --git a/docs/sources/static/configuration/create-config-file.md b/docs/sources/static/configuration/create-config-file.md index e4d77a3386b9..0711e9071962 100644 --- a/docs/sources/static/configuration/create-config-file.md +++ b/docs/sources/static/configuration/create-config-file.md @@ -8,6 +8,12 @@ canonical: https://grafana.com/docs/agent/latest/static/configuration/create-con description: Learn how to create a configuration file title: Create a configuration file weight: 50 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/configuration/ --- # Create a configuration file @@ -64,7 +70,7 @@ the Grafana Agent is running on. This label helps to uniquely identify the source of metrics if you are running multiple Grafana Agents across multiple machines. -Full configuration options can be found in the [configuration reference][configure]. +Full configuration options can be found in the [configuration reference](ref:configure). ## Prometheus config/migrating from Prometheus @@ -109,7 +115,7 @@ metrics: ``` Like with integrations, full configuration options can be found in the -[configuration][configure]. +[configuration](ref:configure). ## Loki Config/Migrating from Promtail @@ -186,7 +192,3 @@ integrations: enabled: true ``` -{{% docs/reference %}} -[configure]: "/docs/agent/ -> /docs/agent//static/configuration" -[configure]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/configuration" -{{% /docs/reference %}} diff --git a/docs/sources/static/configuration/flags.md b/docs/sources/static/configuration/flags.md index 42dc3fb12c60..272e39194955 100644 --- a/docs/sources/static/configuration/flags.md +++ b/docs/sources/static/configuration/flags.md @@ -7,6 +7,22 @@ canonical: https://grafana.com/docs/agent/latest/static/configuration/flags/ description: Learn about command-line flags title: Command-line flags weight: 100 +refs: + revamp: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/integrations/integrations-next/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/configuration/integrations/integrations-next/ + management: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/agent-management/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/configuration/agent-management/ + retrieving: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/#remote-configuration-experimental + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/static/configuration/#remote-configuration-experimental --- # Command-line flags @@ -33,10 +49,10 @@ names to enable. Valid feature names are: -* `remote-configs`: Enable [retrieving][retrieving] config files over HTTP/HTTPS -* `integrations-next`: Enable [revamp][revamp] of the integrations subsystem +* `remote-configs`: Enable [retrieving](ref:retrieving) config files over HTTP/HTTPS +* `integrations-next`: Enable [revamp](ref:revamp) of the integrations subsystem * `extra-scrape-metrics`: When enabled, additional time series are exposed for each metrics instance scrape. See [Extra scrape metrics](https://prometheus.io/docs/prometheus/2.45/feature_flags/#extra-scrape-metrics). -* `agent-management`: Enable support for [agent management][management]. +* `agent-management`: Enable support for [agent management](ref:management). ## Report information usage @@ -146,13 +162,3 @@ YAML configuration when the `-server.http.tls-enabled` flag is used. * `-metrics.wal-directory`: Directory to store the metrics Write-Ahead Log in -{{% docs/reference %}} -[retrieving]: "/docs/agent/ -> /docs/agent//static/configuration#remote-configuration-experimental" -[retrieving]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/configuration#remote-configuration-experimental" - -[revamp]: "/docs/agent/ -> /docs/agent//static/configuration/integrations/integrations-next/" -[revamp]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/configuration/integrations/integrations-next" - -[management]: "/docs/agent/ -> /docs/agent//static/configuration/agent-management" -[management]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/static/configuration/agent-management" -{{% /docs/reference %}} diff --git a/docs/sources/static/configuration/metrics-config.md b/docs/sources/static/configuration/metrics-config.md index 296d3700b084..f41fbad768b6 100644 --- a/docs/sources/static/configuration/metrics-config.md +++ b/docs/sources/static/configuration/metrics-config.md @@ -8,6 +8,12 @@ canonical: https://grafana.com/docs/agent/latest/static/configuration/metrics-co description: Learn about metrics_config title: metrics_config weight: 200 +refs: + scrape: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/scraping-service/ + - pattern: /docs/grafana-cloud/ + destination: ./scraping-service/ --- # metrics_config @@ -68,7 +74,7 @@ configs: ## scraping_service_config -The `scraping_service` block configures the [scraping service][scrape], an operational +The `scraping_service` block configures the [scraping service](ref:scrape), an operational mode where configurations are stored centrally in a KV store and a cluster of agents distributes discovery and scrape load between nodes. @@ -346,7 +352,3 @@ remote_write: {{< docs/shared source="agent" lookup="/wal-data-retention.md" version="" >}} -{{% docs/reference %}} -[scrape]: "/docs/agent/ -> /docs/agent//static/configuration/scraping-service" -[scrape]: "/docs/grafana-cloud/ -> ./scraping-service" -{{% /docs/reference %}} diff --git a/docs/sources/static/configuration/scraping-service.md b/docs/sources/static/configuration/scraping-service.md index ccfb2c67c6bf..847d43912caf 100644 --- a/docs/sources/static/configuration/scraping-service.md +++ b/docs/sources/static/configuration/scraping-service.md @@ -9,6 +9,17 @@ description: Learn about the scraping service menuTitle: Scraping service title: Scraping service (Beta) weight: 600 +refs: + api: + - pattern: /docs/agent/ + destination: /docs/agent//static/api/ + - pattern: /docs/grafana-cloud/ + destination: ../api/ + metrics: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/metrics-config/ + - pattern: /docs/grafana-cloud/ + destination: ./metrics-config/ --- # Scraping service (Beta) @@ -16,7 +27,7 @@ weight: 600 The Grafana Agent scraping service allows you to cluster a set of Agent processes and distribute the scrape load. Determining what to scrape is done by writing instance configuration files to an -[API][api], which then stores the configuration files in a KV store backend. +[API](ref:api), which then stores the configuration files in a KV store backend. All agents in the cluster **must** use the same KV store to see the same set of configuration files. @@ -46,7 +57,7 @@ remote_write: The full set of supported options for an instance configuration file is available in the -[`metrics-config.md` file][metrics]. +[`metrics-config.md` file](ref:metrics). Multiple instance configuration files are necessary for sharding. Each config file is distributed to a particular agent on the cluster based on the @@ -185,9 +196,3 @@ Information returned by the `/debug/ring` endpoint includes: The exact details of the instance ID generation might be specific to the implementation of the Grafana Agent. - The time of the "Last Heartbeat" of each instance. The Last Heartbeat is the last time the instance was active in the ring. -{{% docs/reference %}} -[api]: "/docs/agent/ -> /docs/agent//static/api" -[api]: "/docs/grafana-cloud/ -> ../api" -[metrics]: "/docs/agent/ -> /docs/agent//static/configuration/metrics-config" -[metrics]: "/docs/grafana-cloud/ -> ./metrics-config" -{{% /docs/reference %}} diff --git a/docs/sources/static/operation-guide/_index.md b/docs/sources/static/operation-guide/_index.md index f50c33557479..1225c2151146 100644 --- a/docs/sources/static/operation-guide/_index.md +++ b/docs/sources/static/operation-guide/_index.md @@ -7,6 +7,27 @@ canonical: https://grafana.com/docs/agent/latest/static/operation-guide/ description: Learn how to operate Grafana Agent title: Operation guide weight: 700 +refs: + targets: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/scraping-service/#best-practices + - pattern: /docs/grafana-cloud/ + destination: ../configuration/scraping-service/#best-practices + scrape: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/scraping-service/ + - pattern: /docs/grafana-cloud/ + destination: ../configuration/scraping-service/ + api: + - pattern: /docs/agent/ + destination: /docs/agent//static/api/#agent-api + - pattern: /docs/grafana-cloud/ + destination: ../api/#agent-api + metrics: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/metrics-config/ + - pattern: /docs/grafana-cloud/ + destination: ../configuration/metrics-config/ --- # Operation guide @@ -22,7 +43,7 @@ There are three options to horizontally scale your deployment of Grafana Agents: from the machines they run on. - [Hashmod sharding](#hashmod-sharding-stable) allows you to roughly shard the discovered set of targets by using hashmod/keep relabel rules. -- The [scraping service][scrape] allows you to cluster Grafana +- The [scraping service](ref:scrape) allows you to cluster Grafana Agents and have them distribute per-tenant configs throughout the cluster. Each has their own set of tradeoffs: @@ -57,7 +78,7 @@ Each has their own set of tradeoffs: - Smallest load on SD compared to host filtering, as only one Agent is responsible for a config. - Cons - - Centralized configs must discover a [minimal set of targets][targets] + - Centralized configs must discover a [minimal set of targets](ref:targets) to distribute evenly. - Requires running a separate KV store to store the centralized configs. - Managing centralized configs adds operational burden over managing a config @@ -82,7 +103,7 @@ for scraping other targets that are not running on a cluster node, such as the Kubernetes control plane API. If you want to scale your scrape load without host filtering, you can use the -[scraping service][scrape] instead. +[scraping service](ref:scrape) instead. The host name of the Agent is determined by reading `$HOSTNAME`. If `$HOSTNAME` isn't defined, the Agent will use Go's [os.Hostname](https://golang.org/pkg/os/#Hostname) @@ -113,7 +134,7 @@ logic; only `host_filter_relabel_configs` will work. If the determined hostname matches any of the meta labels, the discovered target is allowed. Otherwise, the target is ignored, and will not show up in the -[targets API][api]. +[targets API](ref:api). ## Hashmod sharding (Stable) @@ -158,7 +179,7 @@ Instances allow for fine grained control of what data gets scraped and where it gets sent. Users can easily define two Instances that scrape different subsets of metrics and send them to two completely different remote_write systems. -Instances are especially relevant to the [scraping service mode][scrape], +Instances are especially relevant to the [scraping service mode](ref:scrape), where breaking up your scrape configs into multiple Instances is required for sharding and balancing scrape load across a cluster of Agents. @@ -178,7 +199,7 @@ from that `remote_write` config separated by a `-`. The shared instances mode is the new default, and the previous behavior is deprecated. If you wish to restore the old behavior, set `instance_mode: distinct` -in the [`metrics_config`][metrics] block of your config file. +in the [`metrics_config`](ref:metrics) block of your config file. Shared instances are completely transparent to the user with the exception of exposed metrics. With `instance_mode: shared`, metrics for Prometheus components @@ -190,16 +211,6 @@ individual Instance config. It is recommended to use the default of `instance_mode: shared` unless you don't mind the performance hit and really need granular metrics. -Users can use the [targets API][api] to see all scraped targets, and the name +Users can use the [targets API](ref:api) to see all scraped targets, and the name of the shared instance they were assigned to. -{{% docs/reference %}} -[scrape]: "/docs/agent/ -> /docs/agent//static/configuration/scraping-service" -[scrape]: "/docs/grafana-cloud/ -> ../configuration/scraping-service" -[targets]: "/docs/agent/ -> /docs/agent//static/configuration/scraping-service#best-practices" -[targets]: "/docs/grafana-cloud/ -> ../configuration/scraping-service#best-practices" -[api]: "/docs/agent/ -> /docs/agent//static/api#agent-api" -[api]: "/docs/grafana-cloud/ -> ../api#agent-api" -[metrics]: "/docs/agent/ -> /docs/agent//static/configuration/metrics-config" -[metrics]: "/docs/grafana-cloud/ -> ../configuration/metrics-config" -{{% /docs/reference %}} diff --git a/docs/sources/static/release-notes.md b/docs/sources/static/release-notes.md index 90afd41dfc42..c6f7b82f3fbb 100644 --- a/docs/sources/static/release-notes.md +++ b/docs/sources/static/release-notes.md @@ -9,6 +9,22 @@ description: Release notes for Grafana Agent static mode menuTitle: Release notes title: Release notes weight: 999 +refs: + modules: + - pattern: /docs/agent/ + destination: /docs/agent//flow/concepts/modules/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/concepts/modules/ + release-notes-operator: + - pattern: /docs/agent/ + destination: /docs/agent//operator/release-notes/ + - pattern: /docs/grafana-cloud/ + destination: ../operator/release-notes/ + release-notes-flow: + - pattern: /docs/agent/ + destination: /docs/agent//flow/release-notes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/agent//flow/release-notes/ --- # Release notes @@ -20,19 +36,9 @@ For a complete list of changes to Grafana Agent, with links to pull requests and > **Note:** These release notes are specific to Grafana Agent static mode. > Other release notes for the different Grafana Agent variants are contained on separate pages: > -> * [Static mode Kubernetes operator release notes][release-notes-operator] -> * [Flow mode release notes][release-notes-flow] +> * [Static mode Kubernetes operator release notes](ref:release-notes-operator) +> * [Flow mode release notes](ref:release-notes-flow) -{{% docs/reference %}} -[release-notes-operator]: "/docs/agent/ -> /docs/agent//operator/release-notes" -[release-notes-operator]: "/docs/grafana-cloud/ -> ../operator/release-notes" - -[release-notes-flow]: "/docs/agent/ -> /docs/agent//flow/release-notes" -[release-notes-flow]: "/docs/grafana-cloud/ -> /docs/agent//flow/release-notes" - -[Modules]: "/docs/agent/ -> /docs/agent//flow/concepts/modules" -[Modules]: "/docs/grafana-cloud/ -> /docs/agent//flow/concepts/modules" -{{% /docs/reference %}} ## v0.38 @@ -154,7 +160,7 @@ See [Module and Auth Split Migration](https://github.com/prometheus/snmp_exporte ### Removal of Dynamic Configuration The experimental feature Dynamic Configuration has been removed. The use case of dynamic configuration will be replaced -with [Modules][] in Grafana Agent Flow. +with [Modules](ref:modules) in Grafana Agent Flow. ### Breaking change: Removed and renamed tracing metrics diff --git a/docs/sources/static/set-up/install/_index.md b/docs/sources/static/set-up/install/_index.md index 3e62fdbdf80d..6f9513270889 100644 --- a/docs/sources/static/set-up/install/_index.md +++ b/docs/sources/static/set-up/install/_index.md @@ -9,6 +9,12 @@ description: Learn how to install GRafana Agent in static mode menuTitle: Install static mode title: Install Grafana Agent in static mode weight: 100 +refs: + data-collection: + - pattern: /docs/agent/ + destination: /docs/agent//data-collection/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/send-data/agent/data-collection/ --- # Install Grafana Agent in static mode @@ -38,10 +44,6 @@ Use the Grafana Agent [Kubernetes configuration](/docs/grafana-cloud/monitor-inf ## Data collection -By default, Grafana Agent sends anonymous usage information to Grafana Labs. Refer to [data collection][] for more information +By default, Grafana Agent sends anonymous usage information to Grafana Labs. Refer to [data collection](ref:data-collection) for more information about what data is collected and how you can opt-out. -{{% docs/reference %}} -[data collection]: "/docs/agent/ -> /docs/agent//data-collection.md" -[data collection]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/data-collection.md" -{{% /docs/reference %}} \ No newline at end of file diff --git a/docs/sources/static/set-up/install/install-agent-binary.md b/docs/sources/static/set-up/install/install-agent-binary.md index 8d53d8376821..c5d3be3ccbef 100644 --- a/docs/sources/static/set-up/install/install-agent-binary.md +++ b/docs/sources/static/set-up/install/install-agent-binary.md @@ -9,6 +9,32 @@ description: Learn how to install Grafana Agent in static mode as a standalone b menuTitle: Standalone title: Install Grafana Agent in static mode as a standalone binary weight: 700 +refs: + windows: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/install/install-agent-on-windows/ + - pattern: /docs/grafana-cloud/ + destination: ./install-agent-on-windows/ + start: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/start-agent/#standalone-binary + - pattern: /docs/grafana-cloud/ + destination: ../start-agent/#standalone-binary + linux: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/install/install-agent-linux/ + - pattern: /docs/grafana-cloud/ + destination: ./install-agent-linux/ + macos: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/install/install-agent-macos/ + - pattern: /docs/grafana-cloud/ + destination: ./install-agent-macos/ + configure: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/ + - pattern: /docs/grafana-cloud/ + destination: ../../configuration/ --- # Install Grafana Agent in static mode as a standalone binary @@ -25,9 +51,9 @@ ppc64le builds are considered secondary release targets and do not have the same The binary executable will run Grafana Agent in standalone mode. If you want to run Grafana Agent as a service, refer to the installation instructions for: -* [Linux][linux] -* [macOS][macos] -* [Windows][windows] +* [Linux](ref:linux) +* [macOS](ref:macos) +* [Windows](ref:windows) ## Download Grafana Agent @@ -49,18 +75,6 @@ To download the Grafana Agent as a standalone binary, perform the following step ## Next steps -* [Start Grafana Agent][start] -* [Configure Grafana Agent][configure] - -{{% docs/reference %}} -[linux]: "/docs/agent/ -> /docs/agent//static/set-up/install/install-agent-linux" -[linux]: "/docs/grafana-cloud/ -> ./install-agent-linux" -[macos]: "/docs/agent/ -> /docs/agent//static/set-up/install/install-agent-macos" -[macos]: "/docs/grafana-cloud/ -> ./install-agent-macos" -[windows]: "/docs/agent/ -> /docs/agent//static/set-up/install/install-agent-on-windows" -[windows]: "/docs/grafana-cloud/ -> ./install-agent-on-windows" -[start]: "/docs/agent/ -> /docs/agent//static/set-up/start-agent#standalone-binary" -[start]: "/docs/grafana-cloud/ -> ../start-agent#standalone-binary" -[configure]: "/docs/agent/ -> /docs/agent//static/configuration" -[configure]: "/docs/grafana-cloud/ -> ../../configuration" -{{% /docs/reference %}} +* [Start Grafana Agent](ref:start) +* [Configure Grafana Agent](ref:configure) + diff --git a/docs/sources/static/set-up/install/install-agent-docker.md b/docs/sources/static/set-up/install/install-agent-docker.md index bece55596635..0a8389a913b7 100644 --- a/docs/sources/static/set-up/install/install-agent-docker.md +++ b/docs/sources/static/set-up/install/install-agent-docker.md @@ -9,6 +9,17 @@ description: Learn how to run Grafana Agent in static mode in a Docker container menuTitle: Docker title: Run Grafana Agent in static mode in a Docker container weight: 200 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/create-config-file/ + - pattern: /docs/grafana-cloud/ + destination: ../../configuration/create-config-file/ + start: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/start-agent/ + - pattern: /docs/grafana-cloud/ + destination: ../start-agent/ --- # Run Grafana Agent in static mode in a Docker container @@ -24,7 +35,7 @@ Grafana Agent is available as a Docker container image on the following platform ## Before you begin * Install [Docker][] on your computer. -* Create and save a Grafana Agent YAML [configuration file][configure] on your computer. +* Create and save a Grafana Agent YAML [configuration file](ref:configure) on your computer. [Docker]: https://docker.io @@ -67,12 +78,6 @@ For the flags to work correctly, you must expose the paths on your Windows host ## Next steps -- [Start Grafana Agent][start] -- [Configure Grafana Agent][configure] +- [Start Grafana Agent](ref:start) +- [Configure Grafana Agent](ref:configure) -{{% docs/reference %}} -[start]: "/docs/agent/ -> /docs/agent//static/set-up/start-agent" -[start]: "/docs/grafana-cloud/ -> ../start-agent" -[configure]: "/docs/agent/ -> /docs/agent//static/configuration/create-config-file" -[configure]: "/docs/grafana-cloud/ -> ../../configuration/create-config-file" -{{% /docs/reference %}} diff --git a/docs/sources/static/set-up/install/install-agent-linux.md b/docs/sources/static/set-up/install/install-agent-linux.md index 716a48df2a2a..de4af2e3f6df 100644 --- a/docs/sources/static/set-up/install/install-agent-linux.md +++ b/docs/sources/static/set-up/install/install-agent-linux.md @@ -9,6 +9,17 @@ description: Learn how to install Grafana Agent in static mode on Linux menuTitle: Linux title: Install Grafana Agent in static mode on Linux weight: 400 +refs: + start: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/start-agent/ + - pattern: /docs/grafana-cloud/ + destination: ../start-agent/ + configure: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/create-config-file/ + - pattern: /docs/grafana-cloud/ + destination: ../../configuration/create-config-file/ --- # Install Grafana Agent in static mode on Linux @@ -214,12 +225,6 @@ Logs of Grafana Agent can be found by running the following command in a termina ## Next steps -- [Start Grafana Agent][start] -- [Configure Grafana Agent][configure] +- [Start Grafana Agent](ref:start) +- [Configure Grafana Agent](ref:configure) -{{% docs/reference %}} -[start]: "/docs/agent/ -> /docs/agent//static/set-up/start-agent" -[start]: "/docs/grafana-cloud/ -> ../start-agent" -[configure]: "/docs/agent/ -> /docs/agent//static/configuration/create-config-file" -[configure]: "/docs/grafana-cloud/ -> ../../configuration/create-config-file" -{{% /docs/reference %}} diff --git a/docs/sources/static/set-up/install/install-agent-macos.md b/docs/sources/static/set-up/install/install-agent-macos.md index c23bd59ec52b..b4c255d89854 100644 --- a/docs/sources/static/set-up/install/install-agent-macos.md +++ b/docs/sources/static/set-up/install/install-agent-macos.md @@ -9,6 +9,17 @@ description: Learn how to install Grafana Agent in static mode on macOS menuTitle: macOS title: Install Grafana Agent in static mode on macOS weight: 500 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/create-config-file/ + - pattern: /docs/grafana-cloud/ + destination: ../../configuration/create-config-file/ + start: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/start-agent/ + - pattern: /docs/grafana-cloud/ + destination: ../start-agent/ --- # Install Grafana Agent in static mode on macOS @@ -74,7 +85,7 @@ brew uninstall grafana-agent touch $(brew --prefix)/etc/grafana-agent/config.yml ``` -1. Edit `$(brew --prefix)/etc/grafana-agent/config.yml` and add the configuration blocks for your specific telemetry needs. Refer to [Configure Grafana Agent][configure] for more information. +1. Edit `$(brew --prefix)/etc/grafana-agent/config.yml` and add the configuration blocks for your specific telemetry needs. Refer to [Configure Grafana Agent](ref:configure) for more information. {{< admonition type="note" >}} To send your data to Grafana Cloud, set up Grafana Agent using the Grafana Cloud integration. Refer to [how to install an integration](/docs/grafana-cloud/data-configuration/integrations/install-and-manage-integrations/) and [macOS integration](/docs/grafana-cloud/data-configuration/integrations/integration-reference/integration-macos-node/). @@ -82,12 +93,6 @@ To send your data to Grafana Cloud, set up Grafana Agent using the Grafana Cloud ## Next steps -- [Start Grafana Agent][start] -- [Configure Grafana Agent][configure] +- [Start Grafana Agent](ref:start) +- [Configure Grafana Agent](ref:configure) -{{% docs/reference %}} -[start]: "/docs/agent/ -> /docs/agent//static/set-up/start-agent" -[start]: "/docs/grafana-cloud/ -> ../start-agent" -[configure]: "/docs/agent/ -> /docs/agent//static/configuration/create-config-file" -[configure]: "/docs/grafana-cloud/ -> ../../configuration/create-config-file" -{{% /docs/reference %}} diff --git a/docs/sources/static/set-up/install/install-agent-on-windows.md b/docs/sources/static/set-up/install/install-agent-on-windows.md index ddda581a5355..81bf1e414827 100644 --- a/docs/sources/static/set-up/install/install-agent-on-windows.md +++ b/docs/sources/static/set-up/install/install-agent-on-windows.md @@ -9,6 +9,23 @@ description: Learn how to install Grafana Agent in static mode on Windows menuTitle: Windows title: Install Grafana Agent in static mode on Windows weight: 600 +refs: + start: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/start-agent/ + - pattern: /docs/grafana-cloud/ + destination: ../start-agent/ + flags: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/flags/ + configure: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/create-config-file/ + - pattern: /docs/grafana-cloud/ + destination: ../../configuration/create-config-file/ + windows_exporter_config: + - pattern: /docs/agent/ + destination: /docs/agent//static/configuration/integrations/windows-exporter-config/ --- # Install Grafana Agent in static mode on Windows @@ -33,8 +50,8 @@ To do a standard graphical install of Grafana Agent on Windows, perform the foll The following options are available: - - The [windows_exporter integration][windows_exporter_config] can be enabled with all default windows_exporter options. - - The [-config.expand-env][flags] command line flag can be enabled. + - The [windows_exporter integration](ref:windows_exporter_config) can be enabled with all default windows_exporter options. + - The [-config.expand-env](ref:flags) command line flag can be enabled. ## Silent install @@ -84,7 +101,7 @@ If you are using `remote_write` you must enable Windows Exporter and set the glo ## Silent install with `-config.expand_env` -You can enable [-config.expand-env][flags] during a silent install. +You can enable [-config.expand-env](ref:flags) during a silent install. 1. Navigate to the [latest release](https://github.com/grafana/agent/releases) on GitHub. @@ -164,14 +181,6 @@ Refer to [windows_events](/docs/loki/latest/clients/promtail/configuration/#wind ## Next steps -- [Start Grafana Agent][start] -- [Configure Grafana Agent][configure] - -{{% docs/reference %}} -[flags]: "/docs/agent/ -> /docs/agent//static/configuration/flags" -[windows_exporter_config]: "/docs/agent/ -> /docs/agent//static/configuration/integrations/windows-exporter-config" -[start]: "/docs/agent/ -> /docs/agent//static/set-up/start-agent" -[start]: "/docs/grafana-cloud/ -> ../start-agent" -[configure]: "/docs/agent/ -> /docs/agent//static/configuration/create-config-file" -[configure]: "/docs/grafana-cloud/ -> ../../configuration/create-config-file" -{{% /docs/reference %}} +- [Start Grafana Agent](ref:start) +- [Configure Grafana Agent](ref:configure) + diff --git a/docs/sources/static/set-up/start-agent.md b/docs/sources/static/set-up/start-agent.md index dfbb9b0117e9..9f83e229cc1f 100644 --- a/docs/sources/static/set-up/start-agent.md +++ b/docs/sources/static/set-up/start-agent.md @@ -7,6 +7,12 @@ description: Learn how to start, restart, and stop Grafana Agent in static mode menuTitle: Start static mode title: Start, restart, and stop Grafana Agent in static mode weight: 200 +refs: + configure: + - pattern: /docs/agent/ + destination: /docs/agent//static/set-up/install/install-agent-macos/#configure + - pattern: /docs/grafana-cloud/ + destination: ./install/install-agent-macos/#configure --- # Start, restart, and stop Grafana Agent in static mode @@ -106,7 +112,7 @@ brew services stop grafana-agent By default, logs are written to `$(brew --prefix)/var/log/grafana-agent.log` and `$(brew --prefix)/var/log/grafana-agent.err.log`. -If you followed [Configure][configure] steps in the macOS install instructions and changed the path where logs are written, refer to your current copy of the Grafana Agent formula to locate your log files. +If you followed [Configure](ref:configure) steps in the macOS install instructions and changed the path where logs are written, refer to your current copy of the Grafana Agent formula to locate your log files. ## Windows @@ -156,7 +162,3 @@ Replace the following: * `BINARY_PATH`: The path to the Grafana Agent binary file * `CONFIG_FILE`: The path to the Grafana Agent configuration file. -{{% docs/reference %}} -[configure]: "/docs/agent/ -> /docs/agent//static/set-up/install/install-agent-macos#configure" -[configure]: "/docs/grafana-cloud/ -> ./install/install-agent-macos/#configure" -{{% /docs/reference %}}