Skip to content

Commit 93df482

Browse files
committed
Update doc structure and other updates based on review
1 parent 3e77779 commit 93df482

File tree

1 file changed

+49
-53
lines changed

1 file changed

+49
-53
lines changed

reference/fleet/providers.md

Lines changed: 49 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,56 @@ products:
1111

1212
# {{agent}} providers [providers]
1313

14+
Providers supply key-value pairs for variable substitution and conditional logic. In other words, they define dynamic values {{agent}} can use when building configurations.
1415

15-
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}}.
16+
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"}}`.
17+
You can then reference the values using the `${foo.key1}` and `${foo.key2}` variables.
1618

17-
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}`.
19+
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:
1820

21+
* [Configure providers on standalone {{agent}}](#configure-providers-standalone-agent)
22+
* [Using providers on {{fleet}}-managed {{agent}}](#using-providers-fleet-managed-agent)
1923

20-
## Provider usage by deployment model [provider_usage_by_deployment_model]
2124

22-
How you use providers depends on whether you're running a standalone or a {{fleet}}-managed {{agent}}.
25+
## Provider types
2326

24-
### Using providers on standalone {{agent}} [using-providers-standalone-agent]
27+
{{agent}} supports two types of providers: [context](#context-providers) and [dynamic](#dynamic-providers).
2528

26-
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.
2729

28-
You can enable, disable, and configure provider settings as needed. For more details, refer to [Provider configuration](#provider_configuration).
30+
### Context providers [context-providers]
2931

30-
### Using providers on {{fleet}}-managed {{agent}} [using-providers-fleet-managed-agent]
32+
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).
3133

32-
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.
34+
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.
3335

34-
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).
36+
To ensure consistency and clarity across documentation and projects, context providers use the {{product.ecs}} naming conventions.
3537

38+
{{agent}} supports the following context providers:
3639

37-
## Provider configuration [provider_configuration]
40+
* [Local provider](/reference/fleet/local-provider.md)
41+
* [Agent provider](/reference/fleet/agent-provider.md)
42+
* [Host provider](/reference/fleet/host-provider.md)
43+
* [Env provider](/reference/fleet/env-provider.md)
44+
* [Kubernetes Secrets provider](/reference/fleet/kubernetes_secrets-provider.md)
45+
* [Kubernetes LeaderElection provider](/reference/fleet/kubernetes_leaderelection-provider.md)
46+
47+
48+
### Dynamic providers [dynamic-providers]
3849

39-
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.
50+
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.
4051

41-
All providers are prefixed without name collisions. The name of the provider is in the key in the configuration.
52+
{{agent}} supports the following dynamic providers:
53+
54+
* [Local dynamic provider](/reference/fleet/local-dynamic-provider.md)
55+
* [Docker provider](/reference/fleet/docker-provider.md)
56+
* [Kubernetes provider](/reference/fleet/kubernetes-provider.md)
57+
58+
59+
## Configure providers on standalone {{agent}} [configure-providers-standalone-agent]
60+
61+
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.
62+
63+
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.
4264

4365
The following example shows two providers (`local` and `local_dynamic`) that supply custom keys on a standalone {{agent}}:
4466

@@ -57,7 +79,12 @@ providers:
5779
item: key3
5880
```
5981
60-
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:
82+
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.
83+
84+
85+
### Disable providers [disable-providers-by-default]
86+
87+
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:
6188

6289
```yaml
6390
providers:
@@ -67,49 +94,18 @@ providers:
6794

6895
With this setting, {{agent}} will not run the Docker provider even if it's referenced in an {{agent}} policy.
6996

70-
{{agent}} supports two broad types of providers: [context](#context-providers) and [dynamic](#dynamic-providers).
71-
72-
73-
### Context providers [context-providers]
74-
75-
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).
76-
77-
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.
78-
79-
Context providers use the {{product.ecs}} naming to ensure consistency and understanding throughout documentation and projects.
80-
81-
{{agent}} supports the following context providers:
82-
83-
* [Local provider](/reference/fleet/local-provider.md)
84-
* [Agent provider](/reference/fleet/agent-provider.md)
85-
* [Host provider](/reference/fleet/host-provider.md)
86-
* [Env provider](/reference/fleet/env-provider.md)
87-
* [Kubernetes Secrets provider](/reference/fleet/kubernetes_secrets-provider.md)
88-
* [Kubernetes LeaderElection provider](/reference/fleet/kubernetes_leaderelection-provider.md)
89-
90-
91-
### Dynamic providers [dynamic-providers]
92-
93-
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.
94-
95-
{{agent}} supports the following context providers:
96-
97-
* [Local dynamic provider](/reference/fleet/local-dynamic-provider.md)
98-
* [Docker provider](/reference/fleet/docker-provider.md)
99-
* [Kubernetes provider](/reference/fleet/kubernetes-provider.md)
100-
101-
102-
### Disabling providers by default [disable-providers-by-default]
103-
104-
Registered providers are run by {{agent}} if they are referenced in the {{agent}} configuration or in a policy.
105-
106-
On standalone {{agent}}, you can disable all providers by setting `agent.providers.initial_default: false`, preventing them from running even if they are referenced.
107-
108-
The following configuration disables all providers with the exception of the Docker provider, which is run when it's referenced in the policy:
97+
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:
10998

11099
```yaml
111100
agent.providers.initial_default: false
112101
providers:
113102
docker:
114103
enabled: true
115104
```
105+
106+
107+
## Using providers on {{fleet}}-managed {{agent}} [using-providers-fleet-managed-agent]
108+
109+
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.
110+
111+
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).

0 commit comments

Comments
 (0)