Skip to content

Commit

Permalink
Update tutorials with new prod name and structure
Browse files Browse the repository at this point in the history
  • Loading branch information
clayton-cornell committed Feb 28, 2024
1 parent 2d6a7f5 commit 4786954
Show file tree
Hide file tree
Showing 12 changed files with 215 additions and 186 deletions.
2 changes: 1 addition & 1 deletion docs/sources/data-collection.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
aliases:
- ./data-collection/
canonical: https://grafana.com/docs/latest/data-collection/
canonical: https://grafana.com/docs/alloy/latest/data-collection/
description: Grafana Alloy data collection
menuTitle: Data collection
title: Grafana Alloy data collection
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
aliases:
- ./release-notes/
canonical: https://grafana.com/docs/agent/latest/release-notes/
canonical: https://grafana.com/docs/alloy/latest/release-notes/
description: Release notes for Grafana Alloy
menuTitle: Release notes
title: Release notes for Grafana Alloy
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/stability.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
aliases:
- /stability/
- ./stability/
canonical: https://grafana.com/docs/alloy/latest/stability/
description: Grafana Alloy features fall into one of three stability categories, experimental, beta, or stable
title: Stability
Expand Down
9 changes: 3 additions & 6 deletions docs/sources/tutorials/_index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
aliases:
- /docs/grafana-cloud/agent/flow/tutorials/
- /docs/grafana-cloud/monitor-infrastructure/agent/flow/tutorials/
- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/tutorials/
- /docs/grafana-cloud/send-data/agent/flow/tutorials/
canonical: https://grafana.com/docs/agent/latest/flow/tutorials/
description: Learn how to use Grafana Agent Flow
- ./tutorials/
canonical: https://grafana.com/docs/alloy/latest/tutorials/
description: Learn how to use Grafana Alloy
title: Tutorials
weight: 300
---
Expand Down
29 changes: 12 additions & 17 deletions docs/sources/tutorials/chaining.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
---
aliases:
- ./chaining/
- /docs/grafana-cloud/agent/flow/tutorials/chaining/
- /docs/grafana-cloud/monitor-infrastructure/agent/flow/tutorials/chaining/
- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/tutorials/chaining/
- /docs/grafana-cloud/send-data/agent/flow/tutorials/chaining/
canonical: https://grafana.com/docs/agent/latest/flow/tutorials/chaining/
- ./tutorials/chaining/
canonical: https://grafana.com/docs/alloy/latest/tutorials/chaining/
description: Learn how to chain Prometheus components
menuTitle: Chain Prometheus components
title: Chain Prometheus components
Expand All @@ -16,7 +12,8 @@ weight: 400

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][].

A new concept introduced in Flow is chaining components together in a composable pipeline. This promotes the reusability of components while offering flexibility.
A new concept introduced in {{< param "PRODUCT_NAME" >}} is chaining components together in a composable pipeline.
This promotes the reusability of components while offering flexibility.

## Prerequisites

Expand All @@ -33,10 +30,11 @@ curl https://raw.githubusercontent.com/grafana/agent/main/docs/sources/flow/tuto
The `runt.sh` script does:

1. Downloads the configurations necessary for Mimir, Grafana, and {{< param "PRODUCT_ROOT_NAME" >}}.
2. Downloads the docker image for {{< param "PRODUCT_ROOT_NAME" >}} explicitly.
3. Runs the `docker-compose up` command to bring all the services up.
1. Downloads the docker image for {{< param "PRODUCT_ROOT_NAME" >}} explicitly.
1. Runs the `docker-compose up` command to bring all the services up.

Allow {{< param "PRODUCT_ROOT_NAME" >}} to run for two minutes, then navigate to [Grafana][] to see {{< param "PRODUCT_ROOT_NAME" >}} scrape metrics. The [node_exporter][] metrics also show up now.
Allow {{< param "PRODUCT_ROOT_NAME" >}} to run for two minutes, then navigate to [Grafana][] to see {{< param "PRODUCT_ROOT_NAME" >}} scrape metrics.
The [node_exporter][] metrics also show up now.

There are two scrapes each sending metrics to one filter. Note the `job` label lists the full name of the scrape component.

Expand Down Expand Up @@ -74,19 +72,16 @@ prometheus.remote_write "prom" {
}
```

In the Flow block, `prometheus.relabel.service` is being forwarded metrics from two sources `prometheus.scrape.agent` and `prometheus.exporter.unix.default`. This allows for a single relabel component to be used with any number of inputs.
In the {{< param "PRODUCT_ROOT_NAME" >}} block, `prometheus.relabel.service` is being forwarded metrics from two sources `prometheus.scrape.agent` and `prometheus.exporter.unix default`.
This allows for a single relabel component to be used with any number of inputs.

## Adding another relabel

In `multiple-input.river` add a new `prometheus.relabel` component that adds a `version` label with the value of `v2` to all metrics after the `prometheus.relabel.service`.

![Add a new label with the value v2](/media/docs/agent/screenshot-grafana-agent-chaining-scrape-v2.png)

[multiple-inputs.river]: https://grafana.com/docs/agent/<AGENT_VERSION>/flow/tutorials/assets/flow_configs/multiple-inputs.river
[multiple-inputs.river]: ../assets/flow_configs/multiple-inputs.river
[Filtering metrics]: ../filtering-metrics/
[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/<AGENT_VERSION>/flow/tutorials/filtering-metrics.md"
[Filtering metrics]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/tutorials/filtering-metrics.md"
{{% /docs/reference %}}
45 changes: 19 additions & 26 deletions docs/sources/tutorials/collecting-prometheus-metrics.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
---
aliases:
- ./collecting-prometheus-metrics/
- /docs/grafana-cloud/agent/flow/tutorials/collecting-prometheus-metrics/
- /docs/grafana-cloud/monitor-infrastructure/agent/flow/tutorials/collecting-prometheus-metrics/
- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/tutorials/collecting-prometheus-metrics/
- /docs/grafana-cloud/send-data/agent/flow/tutorials/collecting-prometheus-metrics/
canonical: https://grafana.com/docs/agent/latest/flow/tutorials/collecting-prometheus-metrics/
- ./tutorials/collecting-prometheus-metrics/
canonical: https://grafana.com/docs/alloy/latest/tutorials/collecting-prometheus-metrics/
description: Learn how to collect Prometheus metrics
menuTitle: Collect Prometheus metrics
title: Collect Prometheus metrics
Expand All @@ -14,7 +10,8 @@ weight: 200

# Collect Prometheus metrics

{{< param "PRODUCT_ROOT_NAME" >}} is a telemetry collector with the primary goal of moving telemetry data from one location to another. In this tutorial, you'll set up {{< param "PRODUCT_NAME" >}}.
{{< param "PRODUCT_ROOT_NAME" >}} is a telemetry collector with the primary goal of moving telemetry data from one location to another.
In this tutorial, you'll set up {{< param "PRODUCT_NAME" >}}.

## Prerequisites

Expand All @@ -31,8 +28,8 @@ curl https://raw.githubusercontent.com/grafana/agent/main/docs/sources/flow/tuto
The `runt.sh` script does:

1. Downloads the configurations necessary for Mimir, Grafana, and {{< param "PRODUCT_ROOT_NAME" >}}.
2. Downloads the docker image for {{< param "PRODUCT_ROOT_NAME" >}} explicitly.
3. Runs the docker-compose up command to bring all the services up.
1. Downloads the docker image for {{< param "PRODUCT_ROOT_NAME" >}} explicitly.
1. Runs the docker-compose up command to bring all the services up.

Allow {{< param "PRODUCT_ROOT_NAME" >}} to run for two minutes, then navigate to [Grafana][].

Expand All @@ -44,7 +41,8 @@ Navigate to `http://localhost:12345/graph` to view the {{< param "PRODUCT_NAME"

![The User Interface](/media/docs/agent/screenshot-grafana-agent-collect-metrics-graph.png)

{{< param "PRODUCT_ROOT_NAME" >}} displays the component pipeline in a dependency graph. See [Scraping component](#scraping-component) and [Remote Write component](#remote-write-component) for details about the components used in this configuration.
{{< param "PRODUCT_ROOT_NAME" >}} displays the component pipeline in a dependency graph.
See [Scraping component](#scraping-component) and [Remote Write component](#remote-write-component) for details about the components used in this configuration.
Click the nodes to navigate to the associated component page. There, you can view the state, health information, and, if applicable, the debug information.

![Component information](/media/docs/agent/screenshot-grafana-agent-collect-metrics-comp-info.png)
Expand All @@ -67,11 +65,14 @@ 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 `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][] 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 `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][] of the `prometheus.remote_write.prom` component.
This is where the scraper will send the metrics for further processing.

## Remote Write component

Expand All @@ -95,16 +96,8 @@ 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/<AGENT_VERSION>/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/<AGENT_VERSION>/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/<AGENT_VERSION>/flow/concepts/components"
[argument]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components"
[export]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/concepts/components"
[export]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/send-data/agent/flow/concepts/components"
[prometheus.remote_write]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/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 %}}
[prometheus.scrape]: ../../reference/components/prometheus.scrape/
[attribute]: ../../concepts/config-language/#attributes
[argument]: ../../concepts/components/
[export]: ../../concepts/components/
[prometheus.remote_write]: ../../reference/components/prometheus.remote_write/
23 changes: 7 additions & 16 deletions docs/sources/tutorials/filtering-metrics.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
---
aliases:
- ./filtering-metrics/
- /docs/grafana-cloud/agent/flow/tutorials/filtering-metrics/
- /docs/grafana-cloud/monitor-infrastructure/agent/flow/tutorials/filtering-metrics/
- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/tutorials/filtering-metrics/
- /docs/grafana-cloud/send-data/agent/flow/tutorials/filtering-metrics/
canonical: https://grafana.com/docs/agent/latest/flow/tutorials/filtering-metrics/
- ./tutorials/filtering-metrics/
canonical: https://grafana.com/docs/alloy/latest/tutorials/filtering-metrics/
description: Learn how to filter Prometheus metrics
menuTitle: Filter Prometheus metrics
title: Filter Prometheus metrics
Expand All @@ -14,7 +10,8 @@ weight: 300

# 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][] using [relabel.river][] to filter metrics.
This tutorial uses the same base as [Collect Prometheus metrics][].

## Prerequisites

Expand Down Expand Up @@ -53,14 +50,8 @@ Open the `relabel.river` file that was downloaded and change the name of the ser

![Updated dashboard showing api_server_v2](/media/docs/agent/screenshot-grafana-agent-filtering-metrics-transition.png)


[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
[relabel.river]: https://grafana.com/docs/agent/<AGENT_VERSION>/flow/tutorials/assets/flow_configs/relabel.river

{{% docs/reference %}}
[prometheus.relabel]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/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/<AGENT_VERSION>/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 %}}
[relabel.river]: ../assets/flow_configs/relabel.river/
[prometheus.relabel]: ../../reference/components/prometheus.relabel/
[Collect Prometheus metrics]: ../collecting-prometheus-metrics
9 changes: 3 additions & 6 deletions docs/sources/tutorials/flow-by-example/_index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
aliases:
- /docs/grafana-cloud/agent/flow/tutorials/flow-by-example/
- /docs/grafana-cloud/monitor-infrastructure/agent/flow/tutorials/flow-by-example/
- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/tutorials/flow-by-example/
- /docs/grafana-cloud/send-data/agent/flow/tutorials/flow-by-example/
canonical: https://grafana.com/docs/agent/latest/flow/tutorials/flow-by-example/
description: Learn how to use Grafana Agent Flow
- ./tutorials/flow-by-example/
canonical: https://grafana.com/docs/alloy/latest/tutorials/flow-by-example/
description: Learn how to use Grafana Alloy
title: Flow by example
weight: 100
---
Expand Down
Loading

0 comments on commit 4786954

Please sign in to comment.