From ab0984633e6d459edc77a17841051c95b633bde2 Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Wed, 12 Nov 2025 17:24:08 +0100 Subject: [PATCH 1/7] Move the Providers docs out of the standalone Elastic Agent docs --- reference/fleet/agent-provider.md | 2 + reference/fleet/docker-provider.md | 2 + reference/fleet/env-provider.md | 2 + reference/fleet/filesource-provider.md | 8 ++++ reference/fleet/host-provider.md | 2 + reference/fleet/kubernetes-provider.md | 2 + .../kubernetes_leaderelection-provider.md | 2 + .../fleet/kubernetes_secrets-provider.md | 2 + reference/fleet/local-dynamic-provider.md | 2 + reference/fleet/local-provider.md | 2 + reference/fleet/providers.md | 47 +++++++++++-------- reference/fleet/toc.yml | 24 +++++----- 12 files changed, 66 insertions(+), 31 deletions(-) diff --git a/reference/fleet/agent-provider.md b/reference/fleet/agent-provider.md index 0407ad4ff1..40be749991 100644 --- a/reference/fleet/agent-provider.md +++ b/reference/fleet/agent-provider.md @@ -1,6 +1,8 @@ --- mapped_pages: - https://www.elastic.co/guide/en/fleet/current/agent-provider.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent diff --git a/reference/fleet/docker-provider.md b/reference/fleet/docker-provider.md index 7edca62677..ab44d06ec9 100644 --- a/reference/fleet/docker-provider.md +++ b/reference/fleet/docker-provider.md @@ -1,6 +1,8 @@ --- mapped_pages: - https://www.elastic.co/guide/en/fleet/current/docker-provider.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent diff --git a/reference/fleet/env-provider.md b/reference/fleet/env-provider.md index c050b36098..355b70319b 100644 --- a/reference/fleet/env-provider.md +++ b/reference/fleet/env-provider.md @@ -1,6 +1,8 @@ --- mapped_pages: - https://www.elastic.co/guide/en/fleet/current/env-provider.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent diff --git a/reference/fleet/filesource-provider.md b/reference/fleet/filesource-provider.md index 34bd268a0b..be197f506e 100644 --- a/reference/fleet/filesource-provider.md +++ b/reference/fleet/filesource-provider.md @@ -1,3 +1,11 @@ +--- +applies_to: + stack: ga +products: + - id: fleet + - id: elastic-agent +--- + # Filesource provider [filesource-provider] Watches for changes of specified files and updates the values of the variables when the content of the files changes. diff --git a/reference/fleet/host-provider.md b/reference/fleet/host-provider.md index a16240a2a6..5d60269596 100644 --- a/reference/fleet/host-provider.md +++ b/reference/fleet/host-provider.md @@ -1,6 +1,8 @@ --- mapped_pages: - https://www.elastic.co/guide/en/fleet/current/host-provider.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent diff --git a/reference/fleet/kubernetes-provider.md b/reference/fleet/kubernetes-provider.md index c5737b0fed..80f62ddb04 100644 --- a/reference/fleet/kubernetes-provider.md +++ b/reference/fleet/kubernetes-provider.md @@ -1,6 +1,8 @@ --- mapped_pages: - https://www.elastic.co/guide/en/fleet/current/kubernetes-provider.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent diff --git a/reference/fleet/kubernetes_leaderelection-provider.md b/reference/fleet/kubernetes_leaderelection-provider.md index b55731c718..4ac3a9ab49 100644 --- a/reference/fleet/kubernetes_leaderelection-provider.md +++ b/reference/fleet/kubernetes_leaderelection-provider.md @@ -1,6 +1,8 @@ --- mapped_pages: - https://www.elastic.co/guide/en/fleet/current/kubernetes_leaderelection-provider.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent diff --git a/reference/fleet/kubernetes_secrets-provider.md b/reference/fleet/kubernetes_secrets-provider.md index ec3b9ff65d..615532cc2d 100644 --- a/reference/fleet/kubernetes_secrets-provider.md +++ b/reference/fleet/kubernetes_secrets-provider.md @@ -1,6 +1,8 @@ --- mapped_pages: - https://www.elastic.co/guide/en/fleet/current/kubernetes_secrets-provider.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent diff --git a/reference/fleet/local-dynamic-provider.md b/reference/fleet/local-dynamic-provider.md index 32e1d0997a..78593c6c7b 100644 --- a/reference/fleet/local-dynamic-provider.md +++ b/reference/fleet/local-dynamic-provider.md @@ -1,6 +1,8 @@ --- mapped_pages: - https://www.elastic.co/guide/en/fleet/current/local-dynamic-provider.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent diff --git a/reference/fleet/local-provider.md b/reference/fleet/local-provider.md index 2f4ecf8d56..386f0833a1 100644 --- a/reference/fleet/local-provider.md +++ b/reference/fleet/local-provider.md @@ -1,6 +1,8 @@ --- mapped_pages: - https://www.elastic.co/guide/en/fleet/current/local-provider.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent diff --git a/reference/fleet/providers.md b/reference/fleet/providers.md index 1703243110..2bedc750ab 100644 --- a/reference/fleet/providers.md +++ b/reference/fleet/providers.md @@ -1,25 +1,42 @@ --- -navigation_title: Providers +navigation_title: Agent providers mapped_pages: - https://www.elastic.co/guide/en/fleet/current/providers.html +applies_to: + stack: ga products: - id: fleet - id: elastic-agent --- -# Configure providers for standalone {{agent}}s [providers] +# {{agent}} providers [providers] -Providers supply the key-value pairs that are used for variable substitution and conditionals. Each provider’s keys are automatically prefixed with the name of the provider in the context of the {{agent}}. +Providers supply the key-value pairs that are used for variable substitution and conditionals. Each provider's keys are automatically prefixed with the name of the provider in the context of the {{agent}}. -For example, a provider named `foo` provides `{"key1": "value1", "key2": "value2"}`, the key-value pairs are placed in `{"foo" : {"key1": "value1", "key2": "value2"}}`. To reference the keys, use `{{foo.key1}}` and `{{foo.key2}}`. +For example, if a provider named `foo` provides `{"key1": "value1", "key2": "value2"}`, the key-value pairs are placed in `{"foo" : {"key1": "value1", "key2": "value2"}}`. To reference the keys, use the variables `${foo.key1}` and `${foo.key2}`. -## Provider configuration [_provider_configuration] +## Provider usage by deployment model [provider_usage_by_deployment_model] -The provider configuration is specified under the top-level `providers` key in the `elastic-agent.yml` configuration. All registered providers are enabled by default. If a provider cannot connect, no mappings are produced. +How you use providers depends on whether you're running a standalone or a {{fleet}}-managed {{agent}}. -The following example shows two providers (`local` and `local_dynamic`) that supply custom keys: +### Standalone {{agent}} + +On standalone {{agent}}, providers can be configured through the `providers` key in the `elastic-agent.yml` configuration file. You can enable, disable, and configure provider settings as needed. For more details, refer to [Provider configuration](#provider_configuration). + +### {{fleet}}-managed {{agent}} + +On {{fleet}}-managed {{agent}}, you can use provider variables in integration policy settings (for example, `${host.name}`, `${env.foo}`, `${agent.id}`), but you cannot add a `providers` configuration block directly through the {{fleet}} UI. + +Some providers can be configured on {{k8s}} deployments using ConfigMaps. For more details, refer to [Advanced {{agent}} configuration managed by {{fleet}}](/reference/fleet/advanced-kubernetes-managed-by-fleet.md). + + +## Provider configuration [provider_configuration] + +On standalone {{agent}}, provider configuration is specified under the top-level `providers` key in the `elastic-agent.yml` configuration. All registered providers are enabled by default. If a provider cannot connect, no mappings are produced. + +The following example shows two providers (`local` and `local_dynamic`) that supply custom keys on a standalone {{agent}}: ```yaml providers: @@ -38,6 +55,8 @@ providers: Providers are enabled automatically if a provider is referenced in an {{agent}} policy. All providers are prefixed without name collisions. The name of the provider is in the key in the configuration. +For example, to disable the Docker provider in a standalone {{agent}}: + ```yaml providers: docker: @@ -53,7 +72,7 @@ Context providers give the current context of the running {{agent}}, for example They can only provide a single key-value mapping. Think of them as singletons; an update of a key-value mapping results in a re-evaluation of the entire configuration. These providers are normally very static, but not required. A value can change which results in re-evaluation. -Context providers use the Elastic Common Schema (ECS) naming to ensure consistency and understanding throughout documentation and projects. +Context providers use the {{product.ecs}} naming to ensure consistency and understanding throughout documentation and projects. {{agent}} supports the following context providers: @@ -80,7 +99,7 @@ Dynamic providers give an array of multiple key-value mappings. Each key-value m All registered providers are disabled by default until they are referenced in a policy. -You can disable all providers even if they are referenced in a policy by setting `agent.providers.initial_default: false`. +On standalone {{agent}}, you can disable all providers even if they are referenced in a policy by setting `agent.providers.initial_default: false`. The following configuration disables all providers from running except for the docker provider, if it becomes referenced in the policy: @@ -90,13 +109,3 @@ providers: docker: enabled: true ``` - - - - - - - - - - diff --git a/reference/fleet/toc.yml b/reference/fleet/toc.yml index a98cfac671..313b18176f 100644 --- a/reference/fleet/toc.yml +++ b/reference/fleet/toc.yml @@ -102,18 +102,6 @@ toc: - file: elastic-agent-simplified-input-configuration.md - file: elastic-agent-inputs-list.md - file: dynamic-input-configuration.md - - file: providers.md - children: - - file: local-provider.md - - file: agent-provider.md - - file: host-provider.md - - file: env-provider.md - - file: filesource-provider.md - - file: kubernetes_secrets-provider.md - - file: kubernetes_leaderelection-provider.md - - file: local-dynamic-provider.md - - file: docker-provider.md - - file: kubernetes-provider.md - file: elastic-agent-output-configuration.md children: - file: elasticsearch-output.md @@ -162,6 +150,18 @@ toc: - file: data-streams-advanced-features.md - file: alert-templates.md - file: agent-command-reference.md + - file: providers.md + children: + - file: local-provider.md + - file: agent-provider.md + - file: host-provider.md + - file: env-provider.md + - file: filesource-provider.md + - file: kubernetes_secrets-provider.md + - file: kubernetes_leaderelection-provider.md + - file: local-dynamic-provider.md + - file: docker-provider.md + - file: kubernetes-provider.md - file: agent-processors.md children: - file: processor-syntax.md From f3c495e461e6ae21c0584abda7bc4334cea55e5d Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Wed, 12 Nov 2025 18:18:42 +0100 Subject: [PATCH 2/7] Fix capitalization in provider doc titlesand refs --- reference/fleet/docker-provider.md | 2 +- reference/fleet/env-provider.md | 2 +- reference/fleet/kubernetes-provider.md | 2 +- reference/fleet/kubernetes_secrets-provider.md | 2 +- reference/fleet/local-provider.md | 2 +- reference/fleet/providers.md | 18 +++++++++--------- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/reference/fleet/docker-provider.md b/reference/fleet/docker-provider.md index ab44d06ec9..28e0655181 100644 --- a/reference/fleet/docker-provider.md +++ b/reference/fleet/docker-provider.md @@ -8,7 +8,7 @@ products: - id: elastic-agent --- -# Docker Provider [docker-provider] +# Docker provider [docker-provider] Provides inventory information from Docker. The available dynamic variables are: diff --git a/reference/fleet/env-provider.md b/reference/fleet/env-provider.md index 355b70319b..a7c67f6b0e 100644 --- a/reference/fleet/env-provider.md +++ b/reference/fleet/env-provider.md @@ -8,7 +8,7 @@ products: - id: elastic-agent --- -# Env Provider [env-provider] +# Env provider [env-provider] Provides access to the environment variables as key-value pairs. diff --git a/reference/fleet/kubernetes-provider.md b/reference/fleet/kubernetes-provider.md index 80f62ddb04..43a9318615 100644 --- a/reference/fleet/kubernetes-provider.md +++ b/reference/fleet/kubernetes-provider.md @@ -8,7 +8,7 @@ products: - id: elastic-agent --- -# Kubernetes Provider [kubernetes-provider] +# Kubernetes provider [kubernetes-provider] Provides inventory information from Kubernetes. diff --git a/reference/fleet/kubernetes_secrets-provider.md b/reference/fleet/kubernetes_secrets-provider.md index 615532cc2d..dfba13b6b7 100644 --- a/reference/fleet/kubernetes_secrets-provider.md +++ b/reference/fleet/kubernetes_secrets-provider.md @@ -8,7 +8,7 @@ products: - id: elastic-agent --- -# Kubernetes Secrets Provider [kubernetes_secrets-provider] +# Kubernetes Secrets provider [kubernetes_secrets-provider] Provides access to the Kubernetes Secrets API. diff --git a/reference/fleet/local-provider.md b/reference/fleet/local-provider.md index 386f0833a1..a057703036 100644 --- a/reference/fleet/local-provider.md +++ b/reference/fleet/local-provider.md @@ -8,7 +8,7 @@ products: - id: elastic-agent --- -# Local [local-provider] +# Local provider [local-provider] Provides custom keys to use as variables. For example: diff --git a/reference/fleet/providers.md b/reference/fleet/providers.md index 2bedc750ab..084bd5dcd1 100644 --- a/reference/fleet/providers.md +++ b/reference/fleet/providers.md @@ -76,12 +76,12 @@ Context providers use the {{product.ecs}} naming to ensure consistency and under {{agent}} supports the following context providers: -* [Local](/reference/fleet/local-provider.md) -* [Agent Provider](/reference/fleet/agent-provider.md) -* [Host Provider](/reference/fleet/host-provider.md) -* [Env Provider](/reference/fleet/env-provider.md) -* [Kubernetes Secrets Provider](/reference/fleet/kubernetes_secrets-provider.md) -* [Kubernetes Leader Election Provider](/reference/fleet/kubernetes_leaderelection-provider.md) +* [Local provider](/reference/fleet/local-provider.md) +* [Agent provider](/reference/fleet/agent-provider.md) +* [Host provider](/reference/fleet/host-provider.md) +* [Env provider](/reference/fleet/env-provider.md) +* [Kubernetes Secrets provider](/reference/fleet/kubernetes_secrets-provider.md) +* [Kubernetes LeaderElection provider](/reference/fleet/kubernetes_leaderelection-provider.md) ### Dynamic Providers [dynamic-providers] @@ -90,9 +90,9 @@ Dynamic providers give an array of multiple key-value mappings. Each key-value m {{agent}} supports the following context providers: -* [Local Dynamic Provider](/reference/fleet/local-dynamic-provider.md) -* [Docker Provider](/reference/fleet/docker-provider.md) -* [Kubernetes Provider](/reference/fleet/kubernetes-provider.md) +* [Local dynamic provider](/reference/fleet/local-dynamic-provider.md) +* [Docker provider](/reference/fleet/docker-provider.md) +* [Kubernetes provider](/reference/fleet/kubernetes-provider.md) ### Disabling Providers By Default [disable-providers-by-default] From a1a3d0e05d25cf9c1e71401bc5ca143717976604 Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Thu, 13 Nov 2025 12:17:31 +0100 Subject: [PATCH 3/7] Update headings and add explicit anchors --- reference/fleet/providers.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/fleet/providers.md b/reference/fleet/providers.md index 084bd5dcd1..332cafa569 100644 --- a/reference/fleet/providers.md +++ b/reference/fleet/providers.md @@ -21,11 +21,11 @@ For example, if a provider named `foo` provides `{"key1": "value1", "key2": "val How you use providers depends on whether you're running a standalone or a {{fleet}}-managed {{agent}}. -### Standalone {{agent}} +### Using providers on standalone {{agent}} [using-providers-standalone-agent] On standalone {{agent}}, providers can be configured through the `providers` key in the `elastic-agent.yml` configuration file. You can enable, disable, and configure provider settings as needed. For more details, refer to [Provider configuration](#provider_configuration). -### {{fleet}}-managed {{agent}} +### Using providers on {{fleet}}-managed {{agent}} [using-providers-fleet-managed-agent] On {{fleet}}-managed {{agent}}, you can use provider variables in integration policy settings (for example, `${host.name}`, `${env.foo}`, `${agent.id}`), but you cannot add a `providers` configuration block directly through the {{fleet}} UI. @@ -84,7 +84,7 @@ Context providers use the {{product.ecs}} naming to ensure consistency and under * [Kubernetes LeaderElection provider](/reference/fleet/kubernetes_leaderelection-provider.md) -### Dynamic Providers [dynamic-providers] +### Dynamic providers [dynamic-providers] Dynamic providers give an array of multiple key-value mappings. Each key-value mapping is combined with the previous context provider’s key and value mapping which provides a new unique mapping that is used to generate a configuration. @@ -95,7 +95,7 @@ Dynamic providers give an array of multiple key-value mappings. Each key-value m * [Kubernetes provider](/reference/fleet/kubernetes-provider.md) -### Disabling Providers By Default [disable-providers-by-default] +### Disabling providers by default [disable-providers-by-default] All registered providers are disabled by default until they are referenced in a policy. From 3e77779ec4106d055da026f620d43827cdf74ba9 Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Mon, 17 Nov 2025 12:18:35 +0100 Subject: [PATCH 4/7] Address review comments --- reference/fleet/providers.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/reference/fleet/providers.md b/reference/fleet/providers.md index 332cafa569..a1d5a27ae0 100644 --- a/reference/fleet/providers.md +++ b/reference/fleet/providers.md @@ -23,7 +23,9 @@ How you use providers depends on whether you're running a standalone or a {{flee ### Using providers on standalone {{agent}} [using-providers-standalone-agent] -On standalone {{agent}}, providers can be configured through the `providers` key in the `elastic-agent.yml` configuration file. You can enable, disable, and configure provider settings as needed. For more details, refer to [Provider configuration](#provider_configuration). +On standalone {{agent}}, providers can be configured through the `providers` key in the `elastic-agent.yml` configuration file. By default, all providers are enabled, but {{agent}} runs them only if they are referenced in the configuration file or in an {{agent}} policy. Disabled providers are not run even if they are referenced. + +You can enable, disable, and configure provider settings as needed. For more details, refer to [Provider configuration](#provider_configuration). ### Using providers on {{fleet}}-managed {{agent}} [using-providers-fleet-managed-agent] @@ -34,7 +36,9 @@ Some providers can be configured on {{k8s}} deployments using ConfigMaps. For mo ## Provider configuration [provider_configuration] -On standalone {{agent}}, provider configuration is specified under the top-level `providers` key in the `elastic-agent.yml` configuration. All registered providers are enabled by default. If a provider cannot connect, no mappings are produced. +On standalone {{agent}}, provider configuration is specified under the top-level `providers` key in the `elastic-agent.yml` configuration file. All registered providers are enabled by default but they are run by {{agent}} only if they are referenced. If a provider cannot connect, no mappings are produced. + +All providers are prefixed without name collisions. The name of the provider is in the key in the configuration. The following example shows two providers (`local` and `local_dynamic`) that supply custom keys on a standalone {{agent}}: @@ -53,9 +57,7 @@ providers: item: key3 ``` -Providers are enabled automatically if a provider is referenced in an {{agent}} policy. All providers are prefixed without name collisions. The name of the provider is in the key in the configuration. - -For example, to disable the Docker provider in a standalone {{agent}}: +If a provider is referenced in an {{agent}} policy, it is turned on automatically unless it's explicitly disabled in the `elastic-agent.yml` configuration file. For example, to disable the Docker provider in a standalone {{agent}}, set: ```yaml providers: @@ -63,6 +65,8 @@ providers: enabled: false ``` +With this setting, {{agent}} will not run the Docker provider even if it's referenced in an {{agent}} policy. + {{agent}} supports two broad types of providers: [context](#context-providers) and [dynamic](#dynamic-providers). @@ -97,11 +101,11 @@ Dynamic providers give an array of multiple key-value mappings. Each key-value m ### Disabling providers by default [disable-providers-by-default] -All registered providers are disabled by default until they are referenced in a policy. +Registered providers are run by {{agent}} if they are referenced in the {{agent}} configuration or in a policy. -On standalone {{agent}}, you can disable all providers even if they are referenced in a policy by setting `agent.providers.initial_default: false`. +On standalone {{agent}}, you can disable all providers by setting `agent.providers.initial_default: false`, preventing them from running even if they are referenced. -The following configuration disables all providers from running except for the docker provider, if it becomes referenced in the policy: +The following configuration disables all providers with the exception of the Docker provider, which is run when it's referenced in the policy: ```yaml agent.providers.initial_default: false From 93df482f4a44e6643bcade0cf6241689b5fac670 Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Thu, 20 Nov 2025 20:31:58 +0100 Subject: [PATCH 5/7] Update doc structure and other updates based on review --- reference/fleet/providers.md | 102 +++++++++++++++++------------------ 1 file changed, 49 insertions(+), 53 deletions(-) diff --git a/reference/fleet/providers.md b/reference/fleet/providers.md index a1d5a27ae0..716a09c4cf 100644 --- a/reference/fleet/providers.md +++ b/reference/fleet/providers.md @@ -11,34 +11,56 @@ products: # {{agent}} providers [providers] +Providers supply key-value pairs for variable substitution and conditional logic. In other words, they define dynamic values {{agent}} can use when building configurations. -Providers supply the key-value pairs that are used for variable substitution and conditionals. Each provider's keys are automatically prefixed with the name of the provider in the context of the {{agent}}. +Each provider’s keys are automatically grouped under the provider name within the {{agent}} context. For example, if the `foo` provider supplies `{"key1": "value1", "key2": "value2"}`, {{agent}} stores these key-value pairs as `{"foo": {"key1": "value1", "key2": "value2"}}`. +You can then reference the values using the `${foo.key1}` and `${foo.key2}` variables. -For example, if a provider named `foo` provides `{"key1": "value1", "key2": "value2"}`, the key-value pairs are placed in `{"foo" : {"key1": "value1", "key2": "value2"}}`. To reference the keys, use the variables `${foo.key1}` and `${foo.key2}`. +How you can configure and use {{agent}} providers depends on whether you're running a standalone or a {{fleet}}-managed {{agent}}. For more information, refer to: +* [Configure providers on standalone {{agent}}](#configure-providers-standalone-agent) +* [Using providers on {{fleet}}-managed {{agent}}](#using-providers-fleet-managed-agent) -## Provider usage by deployment model [provider_usage_by_deployment_model] -How you use providers depends on whether you're running a standalone or a {{fleet}}-managed {{agent}}. +## Provider types -### Using providers on standalone {{agent}} [using-providers-standalone-agent] +{{agent}} supports two types of providers: [context](#context-providers) and [dynamic](#dynamic-providers). -On standalone {{agent}}, providers can be configured through the `providers` key in the `elastic-agent.yml` configuration file. By default, all providers are enabled, but {{agent}} runs them only if they are referenced in the configuration file or in an {{agent}} policy. Disabled providers are not run even if they are referenced. -You can enable, disable, and configure provider settings as needed. For more details, refer to [Provider configuration](#provider_configuration). +### Context providers [context-providers] -### Using providers on {{fleet}}-managed {{agent}} [using-providers-fleet-managed-agent] +Context providers supply the current context of the running {{agent}} such as agent information (ID, version), host information (hostname, IP address), and environment information (environment variables). -On {{fleet}}-managed {{agent}}, you can use provider variables in integration policy settings (for example, `${host.name}`, `${env.foo}`, `${agent.id}`), but you cannot add a `providers` configuration block directly through the {{fleet}} UI. +These providers supply only a single key-value mapping. They are generally static, although this is not required. If the key's value changes, the entire configuration is re-evaluated. -Some providers can be configured on {{k8s}} deployments using ConfigMaps. For more details, refer to [Advanced {{agent}} configuration managed by {{fleet}}](/reference/fleet/advanced-kubernetes-managed-by-fleet.md). +To ensure consistency and clarity across documentation and projects, context providers use the {{product.ecs}} naming conventions. +{{agent}} supports the following context providers: -## Provider configuration [provider_configuration] +* [Local provider](/reference/fleet/local-provider.md) +* [Agent provider](/reference/fleet/agent-provider.md) +* [Host provider](/reference/fleet/host-provider.md) +* [Env provider](/reference/fleet/env-provider.md) +* [Kubernetes Secrets provider](/reference/fleet/kubernetes_secrets-provider.md) +* [Kubernetes LeaderElection provider](/reference/fleet/kubernetes_leaderelection-provider.md) + + +### Dynamic providers [dynamic-providers] -On standalone {{agent}}, provider configuration is specified under the top-level `providers` key in the `elastic-agent.yml` configuration file. All registered providers are enabled by default but they are run by {{agent}} only if they are referenced. If a provider cannot connect, no mappings are produced. +Dynamic providers supply an array of multiple key-value mappings. Each key-value mapping is combined with the previous context provider’s key and value mapping which provides a new unique mapping that is used to generate a configuration. -All providers are prefixed without name collisions. The name of the provider is in the key in the configuration. +{{agent}} supports the following dynamic providers: + +* [Local dynamic provider](/reference/fleet/local-dynamic-provider.md) +* [Docker provider](/reference/fleet/docker-provider.md) +* [Kubernetes provider](/reference/fleet/kubernetes-provider.md) + + +## Configure providers on standalone {{agent}} [configure-providers-standalone-agent] + +On standalone {{agent}}, providers can be configured through the top-level `providers` key in the `elastic-agent.yml` configuration file. By default, all providers are enabled, but {{agent}} runs them only if they are referenced in the configuration file or in an {{agent}} policy. Disabled providers are not run even if they are referenced. If a provider cannot connect, no mappings are produced. + +You can enable, disable, and configure provider settings as needed. All providers are prefixed without name collisions. In the configuration, the name of the provider is in the key. The following example shows two providers (`local` and `local_dynamic`) that supply custom keys on a standalone {{agent}}: @@ -57,7 +79,12 @@ providers: item: key3 ``` -If a provider is referenced in an {{agent}} policy, it is turned on automatically unless it's explicitly disabled in the `elastic-agent.yml` configuration file. For example, to disable the Docker provider in a standalone {{agent}}, set: +If a provider is referenced in an {{agent}} policy, it is turned on automatically unless it's explicitly disabled in the `elastic-agent.yml` configuration file. + + +### Disable providers [disable-providers-by-default] + +On standalone {{agent}}, you can disable a specific provider, so it cannot be run even if it is referenced. For example, to disable the Docker provider on a standalone {{agent}}, set: ```yaml providers: @@ -67,45 +94,7 @@ providers: With this setting, {{agent}} will not run the Docker provider even if it's referenced in an {{agent}} policy. -{{agent}} supports two broad types of providers: [context](#context-providers) and [dynamic](#dynamic-providers). - - -### Context providers [context-providers] - -Context providers give the current context of the running {{agent}}, for example, agent information (ID, version), host information (hostname, IP addresses), and environment information (environment variables). - -They can only provide a single key-value mapping. Think of them as singletons; an update of a key-value mapping results in a re-evaluation of the entire configuration. These providers are normally very static, but not required. A value can change which results in re-evaluation. - -Context providers use the {{product.ecs}} naming to ensure consistency and understanding throughout documentation and projects. - -{{agent}} supports the following context providers: - -* [Local provider](/reference/fleet/local-provider.md) -* [Agent provider](/reference/fleet/agent-provider.md) -* [Host provider](/reference/fleet/host-provider.md) -* [Env provider](/reference/fleet/env-provider.md) -* [Kubernetes Secrets provider](/reference/fleet/kubernetes_secrets-provider.md) -* [Kubernetes LeaderElection provider](/reference/fleet/kubernetes_leaderelection-provider.md) - - -### Dynamic providers [dynamic-providers] - -Dynamic providers give an array of multiple key-value mappings. Each key-value mapping is combined with the previous context provider’s key and value mapping which provides a new unique mapping that is used to generate a configuration. - -{{agent}} supports the following context providers: - -* [Local dynamic provider](/reference/fleet/local-dynamic-provider.md) -* [Docker provider](/reference/fleet/docker-provider.md) -* [Kubernetes provider](/reference/fleet/kubernetes-provider.md) - - -### Disabling providers by default [disable-providers-by-default] - -Registered providers are run by {{agent}} if they are referenced in the {{agent}} configuration or in a policy. - -On standalone {{agent}}, you can disable all providers by setting `agent.providers.initial_default: false`, preventing them from running even if they are referenced. - -The following configuration disables all providers with the exception of the Docker provider, which is run when it's referenced in the policy: +You can also disable all providers by setting `agent.providers.initial_default: false`. The following configuration disables all providers with the exception of the Docker provider, which is run when it's referenced in the policy: ```yaml agent.providers.initial_default: false @@ -113,3 +102,10 @@ providers: docker: enabled: true ``` + + +## Using providers on {{fleet}}-managed {{agent}} [using-providers-fleet-managed-agent] + +On {{fleet}}-managed {{agent}}, you can use provider variables in integration policy settings (for example, `${host.name}`, `${env.foo}`, `${agent.id}`), but you cannot add a `providers` configuration block directly through the {{fleet}} UI. + +Some providers can be configured on {{k8s}} deployments using ConfigMaps. For more details, refer to [Advanced {{agent}} configuration managed by {{fleet}}](/reference/fleet/advanced-kubernetes-managed-by-fleet.md). \ No newline at end of file From afbfe8f85a4a5705a221ab28bb410767a5311673 Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Thu, 20 Nov 2025 21:29:57 +0100 Subject: [PATCH 6/7] Add a short description for each provider --- reference/fleet/providers.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/reference/fleet/providers.md b/reference/fleet/providers.md index 716a09c4cf..e36d46606e 100644 --- a/reference/fleet/providers.md +++ b/reference/fleet/providers.md @@ -29,7 +29,7 @@ How you can configure and use {{agent}} providers depends on whether you're runn ### Context providers [context-providers] -Context providers supply the current context of the running {{agent}} such as agent information (ID, version), host information (hostname, IP address), and environment information (environment variables). +Context providers supply the current context of the running {{agent}} such as agent information (ID, version), host information (hostname, IP addresses), and environment information (environment variables). These providers supply only a single key-value mapping. They are generally static, although this is not required. If the key's value changes, the entire configuration is re-evaluated. @@ -37,12 +37,12 @@ To ensure consistency and clarity across documentation and projects, context pro {{agent}} supports the following context providers: -* [Local provider](/reference/fleet/local-provider.md) -* [Agent provider](/reference/fleet/agent-provider.md) -* [Host provider](/reference/fleet/host-provider.md) -* [Env provider](/reference/fleet/env-provider.md) -* [Kubernetes Secrets provider](/reference/fleet/kubernetes_secrets-provider.md) -* [Kubernetes LeaderElection provider](/reference/fleet/kubernetes_leaderelection-provider.md) +* [Local provider](/reference/fleet/local-provider.md) - Provides custom keys to use as variables. +* [Agent provider](/reference/fleet/agent-provider.md) - Provides information about the {{agent}} such as ID, version, and build details. +* [Host provider](/reference/fleet/host-provider.md) - Provides information about the current host such as hostname, IP addresses, platform, and architecture. +* [Env provider](/reference/fleet/env-provider.md) - Provides access to environment variables as key-value pairs. +* [{{k8s}} Secrets provider](/reference/fleet/kubernetes_secrets-provider.md) - Provides access to the {{k8s}} Secrets API. +* [{{k8s}} LeaderElection provider](/reference/fleet/kubernetes_leaderelection-provider.md) - Enables leader election between {{agent}} instances running on {{k8s}} to ensure only one agent holds the leader lock. ### Dynamic providers [dynamic-providers] @@ -51,9 +51,9 @@ Dynamic providers supply an array of multiple key-value mappings. Each key-value {{agent}} supports the following dynamic providers: -* [Local dynamic provider](/reference/fleet/local-dynamic-provider.md) -* [Docker provider](/reference/fleet/docker-provider.md) -* [Kubernetes provider](/reference/fleet/kubernetes-provider.md) +* [Local dynamic provider](/reference/fleet/local-dynamic-provider.md) - Defines multiple key-value pairs to generate multiple configurations. +* [Docker provider](/reference/fleet/docker-provider.md) - Provides Docker container metadata such as ID, name, image, and labels. +* [{{k8s}} provider](/reference/fleet/kubernetes-provider.md) - Provides metadata from {{k8s}} resources such as pods, nodes, and services. ## Configure providers on standalone {{agent}} [configure-providers-standalone-agent] From 016e30e8236ef099ad5accd51157e0f1740af760 Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Fri, 21 Nov 2025 11:30:46 +0100 Subject: [PATCH 7/7] Update description of dynamic and static providers and other small fixes --- reference/fleet/providers.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/reference/fleet/providers.md b/reference/fleet/providers.md index e36d46606e..f88074ce09 100644 --- a/reference/fleet/providers.md +++ b/reference/fleet/providers.md @@ -11,10 +11,9 @@ products: # {{agent}} providers [providers] -Providers supply key-value pairs for variable substitution and conditional logic. In other words, they define dynamic values {{agent}} can use when building configurations. +Providers supply key-value pairs for variable substitution and conditional logic. They define dynamic values that {{agent}} uses when building configurations. -Each provider’s keys are automatically grouped under the provider name within the {{agent}} context. For example, if the `foo` provider supplies `{"key1": "value1", "key2": "value2"}`, {{agent}} stores these key-value pairs as `{"foo": {"key1": "value1", "key2": "value2"}}`. -You can then reference the values using the `${foo.key1}` and `${foo.key2}` variables. +{{agent}} uses two kinds of providers: [context providers](#context-providers) and [dynamic providers](#dynamic-providers). Each provider’s keys are automatically grouped under the provider name in the {{agent}} context. For example, if the `foo` provider supplies `{"key1": "value1", "key2": "value2"}`, {{agent}} stores these key-value pairs as `{"foo": {"key1": "value1", "key2": "value2"}}`. You can then reference the values using the `${foo.key1}` and `${foo.key2}` variables. How you can configure and use {{agent}} providers depends on whether you're running a standalone or a {{fleet}}-managed {{agent}}. For more information, refer to: @@ -24,14 +23,12 @@ How you can configure and use {{agent}} providers depends on whether you're runn ## Provider types -{{agent}} supports two types of providers: [context](#context-providers) and [dynamic](#dynamic-providers). +{{agent}} supports two types of providers: [context providers](#context-providers) and [dynamic providers](#dynamic-providers). ### Context providers [context-providers] -Context providers supply the current context of the running {{agent}} such as agent information (ID, version), host information (hostname, IP addresses), and environment information (environment variables). - -These providers supply only a single key-value mapping. They are generally static, although this is not required. If the key's value changes, the entire configuration is re-evaluated. +Context providers supply a single key-value mapping that describes the current environment where {{agent}} is running, such as agent information (ID, version), host information (hostname, IP addresses), and environment information (environment variables). When the underlying context changes, {{agent}} updates this mapping and re-evaluates the configuration. To ensure consistency and clarity across documentation and projects, context providers use the {{product.ecs}} naming conventions. @@ -47,7 +44,7 @@ To ensure consistency and clarity across documentation and projects, context pro ### Dynamic providers [dynamic-providers] -Dynamic providers supply an array of multiple key-value mappings. Each key-value mapping is combined with the previous context provider’s key and value mapping which provides a new unique mapping that is used to generate a configuration. +Dynamic providers supply multiple key-value mappings where each mapping represents a separate item or resource (such as a container or pod). When rendering configurations, {{agent}} combines each mapping with the values from context providers, and for every mapping that matches a configuration template or condition, it creates a separate configuration instance and substitutes any dynamic variables (for example, `${docker.container.id}` or `${kubernetes.pod.ip}`) with values from that mapping. This allows {{agent}} to automatically add, update, or remove inputs as your environment changes. {{agent}} supports the following dynamic providers: @@ -58,7 +55,7 @@ Dynamic providers supply an array of multiple key-value mappings. Each key-value ## Configure providers on standalone {{agent}} [configure-providers-standalone-agent] -On standalone {{agent}}, providers can be configured through the top-level `providers` key in the `elastic-agent.yml` configuration file. By default, all providers are enabled, but {{agent}} runs them only if they are referenced in the configuration file or in an {{agent}} policy. Disabled providers are not run even if they are referenced. If a provider cannot connect, no mappings are produced. +On standalone {{agent}}, providers can be configured through the top-level `providers` key in the `elastic-agent.yml` configuration file. All registered providers are enabled by default, but {{agent}} runs them only if they are referenced in the configuration file or in an {{agent}} policy. Disabled providers are not run even if they are referenced. If a provider cannot connect, no mappings are produced. You can enable, disable, and configure provider settings as needed. All providers are prefixed without name collisions. In the configuration, the name of the provider is in the key.