Skip to content

Commit

Permalink
Add metrics buffer documentation (elastic#1627)
Browse files Browse the repository at this point in the history
* Add metrics buffer documentation

* Apply suggestions from code review

Co-authored-by: DeDe Morton <dede.morton@elastic.co>

Co-authored-by: DeDe Morton <dede.morton@elastic.co>
  • Loading branch information
michel-laterman and dedemorton authored Mar 4, 2022
1 parent 8bbb99b commit 0d8f942
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion commands.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gather diagnostics information from the {agent} and applications it's running.

If no options are specified, this command displays version numbers and application metadata.

If `collect` is specified, it produces an archive containing application metadata, configuration information, the policy, and any local logs.
If `collect` is specified, it produces an archive containing application metadata, configuration information, the policy, local logs, and metics data (if the buffer is enabled).

Note that *credentials are not redacted* in the archive; they may appear in plain text in the configuration or policy files inside the archive.

Expand Down
9 changes: 9 additions & 0 deletions elastic-agent/configuration/elastic-agent-monitoring.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ agent.monitoring:
pprof.enabled: false
# specifies output to be used
use_output: monitoring
http:
# exposes a /buffer endpoint that holds a history of recent metrics
buffer.enabled: false
----

To turn off monitoring, set `agent.monitoring.enabled` to `false`. When set to
Expand All @@ -42,3 +45,9 @@ The `agent.monitoring.pprof.enabled` option controls whether the {agent} and {be
by default. Data produced by these endpoints can be useful for debugging but present a
security risk. It is recommended that this option remains `false` if the monitoring endpoint
is accessible over a network.

The `agent.monitoring.http.buffer.enabled` option controls whether the {agent} and {beats}
collect metrics into an in-memory buffer and expose these through a `/buffer` endpoint.
It is set to `false` by default. This data can be useful for debugging or if the {agent}
has issues communicating with {es}. Enabling this option may slightly increase process
memory usage.
2 changes: 2 additions & 0 deletions troubleshooting/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ These will need to be manually redacted before the archive is shared.

The diagnostics command is also able to collect `pprof` data in the archive if the `--pprof` flag is passed:

If `agent.monitoring.http.buffer.enabled` is set to `true`, the archive will also contain recent metrics from the {agent} and {beats} processes.

[source,shell]
----
elastic-agent diagnostics collect --pprof
Expand Down

0 comments on commit 0d8f942

Please sign in to comment.