From e8a9935a8cdb81e8a7ed27c177e611b2684e65c7 Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:54:44 -0400 Subject: [PATCH] Add docs for agent 'otel' mode (#1250) * 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 <35154725+karenzone@users.noreply.github.com> --------- Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com> (cherry picked from commit c4918da476c18f7e618d9c3f60b5234c19c40008) --- docs/en/ingest-management/commands.asciidoc | 61 +++++++++++++++++++ .../elastic-agent/otel-agent.asciidoc | 10 +++ docs/en/ingest-management/index.asciidoc | 2 + 3 files changed, 73 insertions(+) create mode 100644 docs/en/ingest-management/elastic-agent/otel-agent.asciidoc diff --git a/docs/en/ingest-management/commands.asciidoc b/docs/en/ingest-management/commands.asciidoc index 04994d337..c0a4c27cc 100644 --- a/docs/en/ingest-management/commands.asciidoc +++ b/docs/en/ingest-management/commands.asciidoc @@ -28,6 +28,7 @@ invoking the wrong binary. * <> * <> * <> +* <> [technical preview] * <> [technical preview] * <> * <> @@ -886,6 +887,66 @@ elastic-agent install --url=https://fleet-server:8220 \
++++ +[discrete] +[[elastic-agent-otel-command]] +== elastic-agent otel + +preview::[] + +Run {agent} as an <>. + +[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" +---- + +++++ +
+++++ + [discrete] [[elastic-agent-restart-command]] == elastic-agent restart diff --git a/docs/en/ingest-management/elastic-agent/otel-agent.asciidoc b/docs/en/ingest-management/elastic-agent/otel-agent.asciidoc new file mode 100644 index 000000000..4defa6edd --- /dev/null +++ b/docs/en/ingest-management/elastic-agent/otel-agent.asciidoc @@ -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 <> in the {fleet} and {agent} Command reference. diff --git a/docs/en/ingest-management/index.asciidoc b/docs/en/ingest-management/index.asciidoc index a35ed02bf..e6f76e69b 100644 --- a/docs/en/ingest-management/index.asciidoc +++ b/docs/en/ingest-management/index.asciidoc @@ -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]