Skip to content

Commit

Permalink
Add docs for agent 'otel' mode (#1250) (#1263)
Browse files Browse the repository at this point in the history
* Add docs for agent 'otel' mode

* Update docs/en/ingest-management/elastic-agent/otel-agent.asciidoc

* Update docs/en/ingest-management/commands.asciidoc

Co-authored-by: Karen Metts <[email protected]>

---------

Co-authored-by: Karen Metts <[email protected]>
(cherry picked from commit c4918da)

Co-authored-by: David Kilfoyle <[email protected]>
  • Loading branch information
mergify[bot] and kilfoyle authored Aug 20, 2024
1 parent 659041c commit 127a2c0
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
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

0 comments on commit 127a2c0

Please sign in to comment.