From b3e437ae9b57fd7d7dbfca117026de172d32ccd9 Mon Sep 17 00:00:00 2001 From: David Kilfoyle Date: Fri, 9 Aug 2024 16:48:54 -0400 Subject: [PATCH 1/3] Add docs for agent 'otel' mode --- docs/en/ingest-management/commands.asciidoc | 62 +++++++++++++++++++ .../elastic-agent/otel-agent.asciidoc | 10 +++ docs/en/ingest-management/index.asciidoc | 2 + 3 files changed, 74 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 cc61dc0f2..488582758 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] * <> * <> * <> @@ -884,6 +885,67 @@ 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] +kilfoyle marked this conversation as resolved. +---- + +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..7cd5a31b3 --- /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] From 0c2b82d6397f1e4f082cb842c368d50594974ca3 Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:48:53 -0400 Subject: [PATCH 2/3] Update docs/en/ingest-management/elastic-agent/otel-agent.asciidoc --- docs/en/ingest-management/elastic-agent/otel-agent.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/otel-agent.asciidoc b/docs/en/ingest-management/elastic-agent/otel-agent.asciidoc index 7cd5a31b3..4defa6edd 100644 --- a/docs/en/ingest-management/elastic-agent/otel-agent.asciidoc +++ b/docs/en/ingest-management/elastic-agent/otel-agent.asciidoc @@ -7,4 +7,4 @@ The link:https://opentelemetry.io/docs/collector/[OpenTelemetry Collector] is a 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. +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. From 41ce54866dec8671595a74e9023bfa71340acd52 Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:05:19 -0400 Subject: [PATCH 3/3] Update docs/en/ingest-management/commands.asciidoc Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com> --- docs/en/ingest-management/commands.asciidoc | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/en/ingest-management/commands.asciidoc b/docs/en/ingest-management/commands.asciidoc index f6024e5dd..c0a4c27cc 100644 --- a/docs/en/ingest-management/commands.asciidoc +++ b/docs/en/ingest-management/commands.asciidoc @@ -902,7 +902,6 @@ Run {agent} as an <>. ---- elastic-agent otel [flags] elastic-agent otel [command] -kilfoyle marked this conversation as resolved. ---- NOTE: You can also run the `./otelcol` command, which calls `./elastic-agent otel` and passes any arguments to it.