Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[8.15] Add docs for agent 'otel' mode (backport #1250) #1263

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions docs/en/ingest-management/commands.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ invoking the wrong binary.
* <<elastic-agent-help-command,help>>
* <<elastic-agent-inspect-command,inspect>>
* <<elastic-agent-install-command,install>>
* <<elastic-agent-otel-command,otel>> [technical preview]
* <<elastic-agent-privileged-command,privileged>> [technical preview]
* <<elastic-agent-restart-command,restart>>
* <<elastic-agent-run-command,run>>
Expand Down Expand Up @@ -886,6 +887,66 @@ elastic-agent install --url=https://fleet-server:8220 \
<hr>
++++

[discrete]
[[elastic-agent-otel-command]]
== elastic-agent otel

preview::[]

Run {agent} as an <<otel-agent,OpenTelemetry Collector>>.

[discrete]
=== Synopsis

[source,shell]
----
elastic-agent otel [flags]
elastic-agent otel [command]
----

NOTE: You can also run the `./otelcol` command, which calls `./elastic-agent otel` and passes any arguments to it.

[discrete]
=== Available commands

`validate`::
Validates the OpenTelemetry collector configuration without running the collector.

[discrete]
=== Flags

`--config=file:/path/to/first --config=file:path/to/second`::
Locations to the config file(s). Note that only a single location can be set per flag entry, for example `--config=file:/path/to/first --config=file:path/to/second`.

`--feature-gates flag`::
Comma-delimited list of feature gate identifiers. Prefix with `-` to disable the feature. Prefixing with `+` or no prefix will enable the feature.

`-h, --help`::
Get help for the `otel` sub-command. Use `elastic-agent otel [command] --help` for more information about a command.

`--set string`::
Set an arbitrary component config property. The component has to be defined in the configuration file and the flag has a higher precedence. Array configuration properties are overridden and maps are joined. For example, `--set=processors::batch::timeout=2s`.

[discrete]
=== Examples

Run {agent} as on OTel Collector using the supplied `otel.yml` configuration file.
[source,shell]
----
./elastic-agent otel --config otel.yml
----

Change the default verbosity setting in the {agent} OTel configuration from `detailed` to `normal`.

[source,shell]
----
./elastic-agent otel --config otel.yml --set "exporters::debug::verbosity=normal"
----

++++
<hr>
++++

[discrete]
[[elastic-agent-restart-command]]
== elastic-agent restart
Expand Down
10 changes: 10 additions & 0 deletions docs/en/ingest-management/elastic-agent/otel-agent.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[otel-agent]]
= Run {agent} as an OTel Collector

preview::[]

The link:https://opentelemetry.io/docs/collector/[OpenTelemetry Collector] is a vendor-neutral way to receive, process, and export telemetry data. {agent} includes an embedded OTel Collector, enabling you to instrument your applications and infrastructure once, and send data to multiple vendors and backends.

When you run {agent} in `otel` mode it supports the standard OTel Collector configuration format that defines a set of receivers, processors, exporters, and connectors. Logs, metrics, and traces can be ingested using OpenTelemetry data formats.

For a full overview and steps to configure {agent} in `otel` mode, including a guided onboarding, refer to the link:https://github.com/elastic/opentelemetry/tree/main[Elastic Distributions for OpenTelemetry] repository in GitHub. You can also check the <<elastic-agent-otel-command,`elastic-agent otel` command>> in the {fleet} and {agent} Command reference.
2 changes: 2 additions & 0 deletions docs/en/ingest-management/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ include::elastic-agent/ingest-pipeline-kubernetes.asciidoc[leveloffset=+3]

include::elastic-agent/configuration/env/container-envs.asciidoc[leveloffset=+3]

include::elastic-agent/otel-agent.asciidoc[leveloffset=+2]

include::elastic-agent/elastic-agent-unprivileged-mode.asciidoc[leveloffset=+2]

include::elastic-agent/install-agent-msi.asciidoc[leveloffset=+2]
Expand Down