Skip to content

Commit

Permalink
Replace relrefs with docrefs in Agent concepts and Agent monitoring t…
Browse files Browse the repository at this point in the history
…opics (#5603)

* Update relrefs in component metrics topic

* Update relrefs in controller metrics topic

* Update relrefs in debugging topic

* Update relrefs in modules topic

* Update relrefs in clustering topic

* Update relrefs in component controller topic

* Update relrefs in config-language topic
  • Loading branch information
clayton-cornell authored Oct 26, 2023
1 parent 561aa90 commit 5960333
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 48 deletions.
29 changes: 18 additions & 11 deletions docs/sources/flow/concepts/clustering.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ single-node cluster.
You configure clustering by passing `cluster` command-line flags to the [run][]
command.

[run]: {{< relref "../reference/cli/run.md#clustering-beta" >}}

## Use cases

### Target auto-distribution
Expand Down Expand Up @@ -57,10 +55,10 @@ A cluster state change is detected when a new node joins or an existing node goe
recalculate target ownership and rebalance the number of targets they’re
scraping without explicitly communicating ownership over the network.

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

The agent uses a fully-local consistent hashing algorithm to distribute
Grafana Agent uses a fully-local consistent hashing algorithm to distribute
targets, meaning that, on average, only ~1/N of the targets are redistributed.

Refer to component reference documentation to discover whether it supports
Expand All @@ -71,16 +69,25 @@ clustering, such as:
- [prometheus.operator.podmonitors][]
- [prometheus.operator.servicemonitors][]

[prometheus.scrape]: {{< relref "../reference/components/prometheus.scrape.md#clustering-beta" >}}
[pyroscope.scrape]: {{< relref "../reference/components/pyroscope.scrape.md#clustering-beta" >}}
[prometheus.operator.podmonitors]: {{< relref "../reference/components/prometheus.operator.podmonitors.md#clustering-beta" >}}
[prometheus.operator.servicemonitors]: {{< relref "../reference/components/prometheus.operator.servicemonitors.md#clustering-beta" >}}

## Cluster monitoring and troubleshooting

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

[clustering page]: {{< relref "../monitoring/debugging.md#clustering-page" >}}
[debugging]: {{< relref "../monitoring/debugging.md#debugging-clustering-issues" >}}
{{% docs/reference %}}
[run]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/cli/run.md#clustering-beta"
[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/cli/run.md#clustering-beta"
[prometheus.scrape]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/components/prometheus.scrape.md#clustering-beta"
[prometheus.scrape]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/components/prometheus.scrape.md#clustering-beta"
[pyroscope.scrape]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/components/pyroscope.scrape.md#clustering-beta"
[pyroscope.scrape]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/components/pyroscope.scrape.md#clustering-beta"
[prometheus.operator.podmonitors]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/components/prometheus.operator.podmonitors.md#clustering-beta"
[prometheus.operator.podmonitors]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/components/prometheus.operator.podmonitors.md#clustering-beta"
[prometheus.operator.servicemonitors]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/components/prometheus.operator.servicemonitors.md#clustering-beta"
[prometheus.operator.servicemonitors]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/components/prometheus.operator.servicemonitors.md#clustering-beta"
[clustering page]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/monitoring/debugging.md#clustering-page"
[clustering page]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/monitoring/debugging.md#clustering-page"
[debugging]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/monitoring/debugging.md#debugging-clustering-issues"
[debugging]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/monitoring/debugging.md#debugging-clustering-issues"
{{% /docs/reference %}}
21 changes: 13 additions & 8 deletions docs/sources/flow/concepts/component_controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ weight: 200
The _component controller_ is the core part of Grafana Agent Flow which manages
components at runtime.

It is responsible for:
The component controller is responsible for:

* Reading and validating the configuration file.
* Managing the lifecycle of defined components.
Expand Down Expand Up @@ -60,7 +60,7 @@ behavior. The component controller is finished loading once all components are
evaluated, configured, and running.

The component controller only evaluates a given component after evaluating all
of that component's dependencies. Component that do not depend on other
of that component's dependencies. Components that do not depend on other
components can be evaluated at any time during the evaluation process.

## Component reevaluation
Expand Down Expand Up @@ -123,13 +123,10 @@ 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.

Components must opt-in to using in-memory traffic; see the individual
Components must opt-in to using in-memory traffic. See the individual
documentation for components to learn if in-memory traffic is supported.

[prometheus.exporter.unix]: {{< relref "../reference/components/prometheus.exporter.unix.md" >}}
[run]: {{< relref "../reference/cli/run.md" >}}

## Updating the config file
## Updating the configuration file

Both the `/-/reload` HTTP endpoint and the `SIGHUP` signal can be used to
inform the component controller to reload the configuration file. When this happens,
Expand All @@ -139,5 +136,13 @@ the configuration file and creating new components which were added to the confi
file. All components managed by the controller will be reevaluated after
reloading.

[Components]: {{< relref "./components.md" >}}
[DAG]: https://en.wikipedia.org/wiki/Directed_acyclic_graph

{{% docs/reference %}}
[prometheus.exporter.unix]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/components/prometheus.exporter.unix.md"
[prometheus.exporter.unix]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/components/prometheus.exporter.unix.md"
[run]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/cli/run.md"
[run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/cli/run.md"
[Components]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/concepts/components.md"
[Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/components.md"
{{% /docs/reference %}}
7 changes: 5 additions & 2 deletions docs/sources/flow/concepts/configuration_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ River was designed with the following requirements in mind:
* _Simple_: The configuration language must be easy to read and write to
minimize the learning curve.
* _Debuggable_: The configuration language must give detailed information when
there's a mistake in the config file.
there's a mistake in the configuration file.

## Attributes

Expand Down Expand Up @@ -100,4 +100,7 @@ This file has two blocks:
River is documented in detail in [Configuration language][config-docs] section
of the Grafana Agent Flow docs.

[config-docs]: {{< relref "../config-language" >}}
{{% docs/reference %}}
[config-docs]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/config-language"
[config-docs]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language"
{{% /docs/reference %}}
23 changes: 14 additions & 9 deletions docs/sources/flow/concepts/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ loader](#module-loaders).
Refer to the documentation for the [argument block][] and [export block][] to
learn how to define arguments and exports for a module.

[argument block]: {{< relref "../reference/config-blocks/argument.md" >}}
[export block]: {{< relref "../reference/config-blocks/export.md" >}}

## Module loaders

A _Module loader_ is a Grafana Agent Flow component which retrieves a module
Expand All @@ -47,13 +44,10 @@ Module loaders typically are called `module.LOADER_NAME`. The list of module
loader components can be found in the list of Grafana Agent Flow
[Components][].

Some module loaders may not support running modules with arguments or exports;
refer to the documentation for the module loader you are using for more
Some module loaders may not support running modules with arguments or exports.
Refer to the documentation for the module loader you are using for more
information.

[Component controller]: {{< relref "./component_controller.md" >}}
[Components]: {{< relref "../reference/components/" >}}

## Module sources

Modules are designed to be flexible, and can have their configuration retrieved
Expand Down Expand Up @@ -119,7 +113,7 @@ export "filter_input" {
}
```

The module above can be saved to a file and then used as a processing step
The module above can be saved to a file and then used as a processing step
before writing logs to Loki:

```river
Expand All @@ -145,3 +139,14 @@ loki.write "default" {
}
}
```

{{% docs/reference %}}
[argument block]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/config-blocks/argument.md"
[argument block]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/config-blocks/argument.md"
[export block]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/config-blocks/export.md"
[export block]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/config-blocks/export.md"
[Component controller]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/concepts/component_controller.md"
[Component controller]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/component_controller.md"
[Components]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/components"
[Components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/components"
{{% /docs/reference %}}
11 changes: 8 additions & 3 deletions docs/sources/flow/monitoring/component_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ The [reference documentation][] for each component will describe the list of
component-specific metrics that component exposes. Not all components will
expose metrics.

[components]: {{< relref "../concepts/components.md" >}}
[grafana-agent run]: {{< relref "../reference/cli/run.md" >}}
[reference documentation]: {{< relref "../reference/components/_index.md" >}}
{{% docs/reference %}}
[components]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/concepts/components.md"
[components]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/components.md"
[grafana-agent run]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/cli/run.md"
[grafana-agent run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/cli/run.md"
[reference documentation]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/components"
[reference documentation]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/components"
{{% /docs/reference %}}
12 changes: 8 additions & 4 deletions docs/sources/flow/monitoring/controller_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ The controller exposes the following metrics:
* `agent_component_controller_running_components` (Gauge): The current
number of running components by health. The health is represented in the
`health_type` label.
* `agent_component_evaluation_seconds` (Histogram): The time it takes to
* `agent_component_evaluation_seconds` (Histogram): The time it takes to
evaluate components after one of their dependencies is updated.
* `agent_component_dependencies_wait_seconds` (Histogram): Time spent by
* `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.

[component controller]: {{< relref "../concepts/component_controller.md" >}}
[grafana-agent run]: {{< relref "../reference/cli/run.md" >}}
{{% docs/reference %}}
[component controller]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/concepts/component_controller.md"
[component controller]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/component_controller.md"
[grafana-agent run]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/cli/run.md"
[grafana-agent run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/cli/run.md"
{{% /docs/reference %}}
27 changes: 16 additions & 11 deletions docs/sources/flow/monitoring/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,12 @@ server, which defaults to listening at `http://localhost:12345`.
> documentation for [the `grafana-agent run` command][grafana-agent run] to
> learn how to change the HTTP listen address, and pass the appropriate flag
> when running Grafana Agent Flow.
>
> [install]: {{< relref "../setup/install" >}}
[grafana-agent run]: {{< relref "../reference/cli/run" >}}
### Home page

![](../../../assets/ui_home_page.png)

The home page shows a table of components defined in the config file along with
The home page shows a table of components defined in the configuration file along with
their health.

Click **View** on a row in the table to navigate to the [Component detail page](#component-detail-page)
Expand All @@ -55,7 +51,7 @@ Click the Grafana Agent logo to navigate back to the home page.

![](../../../assets/ui_graph_page.png)

The **Graph** page shows a graph view of components defined in the config file
The **Graph** page shows a graph view of components defined in the configuration file
along with their health. Clicking a component in the graph navigates to the
[Component detail page](#component-detail-page) for that component.

Expand All @@ -73,8 +69,6 @@ The component detail page shows the following information for each component:
> Values marked as a [secret][] are obfuscated and will display as the text
> `(secret)`.
[secret]: {{< relref "../config-language/expressions/types_and_values.md#secrets" >}}

### Clustering page

![](../../../assets/ui_clustering_page.png)
Expand Down Expand Up @@ -126,10 +120,21 @@ changes have been applied.
nodes with conflicting names are rejected and will not join the cluster. Look
at the clustering UI page for the list of current peers with their names, and
check the logs for any reported name conflict events.
- **Node stuck in terminating state**: The node attempted to gracefully shut
- **Node stuck in terminating state**: The node attempted to gracefully shut
down and set its state to Terminating, but it has not completely gone away. Check
the clustering page to view the state of the peers and verify that the
terminating Agent has been shut down.

[logging]: {{< relref "../reference/config-blocks/logging" >}}
[clustering]: {{< relref "../concepts/clustering" >}}
{{% docs/reference %}}
[logging]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/config-blocks/logging.md"
[logging]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/config-blocks/logging.md"
[clustering]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/concepts/clustering.md"
[clustering]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/concepts/clustering.md"
[install]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/setup/install"
[install]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/setup/install"
[secret]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/config-language/expressions/types_and_values.md#secrets.md"
[secret]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/config-language/expressions/types_and_values.md#secrets.md"
[grafana-agent run]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/reference/cli/run.md"
[grafana-agent run]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/cli/run.md"
{{% /docs/reference %}}

0 comments on commit 5960333

Please sign in to comment.