Skip to content

Commit 621551f

Browse files
committed
nit updates
1 parent 1e3a959 commit 621551f

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

content/en/containers/guide/container-discovery-management.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ By default, the Datadog Agent automatically discovers all containers available.
1919

2020
## Container discovery patterns
2121

22-
In a containerized environment, you should deploy the Datadog Agent once per host. Each Datadog Agent deployed automatically discovers and monitors all containers on its respective host.
22+
In a containerized environment, you should deploy the Datadog Agent once per host. Each Datadog Agent deployed automatically discovers and monitors all containers on its respective host. When the logs [`containerCollectAll` option][1] is enabled, the Agent collects logs from all discovered containers.
2323

2424
You can adjust the discovery rules for the Agent to restrict metric and log collection. Any containers restricted from metric collection are also restricted for any [Autodiscovery][2]-based Agent integrations.
2525

26-
When the logs [`containerCollectAll` option][1] is enabled, the Agent collects logs from all discovered containers. These filtering options do not affect log collection if `containerCollectAll` is not enabled.
27-
2826
You can set exceptions in two ways:
2927

3028
- Provide environment variables to the Datadog Agent container as an allowlist/blocklist of containers. Recommended if you have a list of container names, images, or namespaces to exclude for the entire cluster.
@@ -267,15 +265,18 @@ Use the defined parameters for the container representation in the table below t
267265

268266
### Configuration structure
269267

270-
The `cel_workload_exclude` configuration is structured as a list of rule sets joined by logical **ORs**. Each rule set defines the `products` to exclude and the corresponding CEL `rules` to match against containers.
268+
The `cel_workload_exclude` configuration option is structured as a list of rule sets joined by logical **ORs**. Each rule set defines the `products` to exclude and the corresponding CEL `rules` to match against containers.
271269

272270
The `products` field accepts `metrics`, `logs`, and `global` (exclude container from all listed products).
273271

274-
If the configuration contains typos or structural errors, the Agent process gracefully crashes to prevent collecting unintended telemetry which could impact billing. Additionally, the CEL compiler performs basic type checking to ensure valid operations on the container attributes.
272+
<div class="alert alert-danger">
273+
If the configuration contains structural errors or CEL syntax issues, the Agent exits with an error to prevent collecting unintended telemetry which could impact billing.
274+
</div>
275275

276-
In the example below, metrics and logs are excluded for any `nginx` container running in the `staging` namespace. Additionally, logs are excluded for any container running the `redis` image, **or** any container within a pod that has the annotation `low_priority: "true"`.
276+
In the example below, metrics and logs are excluded for any container with `nginx` in its name running in the `staging` namespace. Additionally, logs are excluded for any container running the `redis` image, **or** any container within a pod that has the annotation `low_priority: "true"`. This can be done by defining the configuration option directly on the [agent's configuration file][4].
277277
278278
```yaml
279+
# datadog.yaml
279280
cel_workload_exclude:
280281
- products: [metrics, logs]
281282
rules:
@@ -288,7 +289,7 @@ cel_workload_exclude:
288289
- container.pod.annotations["low_priority"] == "true"
289290
```
290291
291-
The CEL-backed workload exclusion can also be configured by providing a JSON-formatted environment value to `DD_CEL_WORKLOAD_EXCLUDE`.
292+
The CEL-backed workload exclusion can also be configured by providing a **JSON**-formatted environment value to `DD_CEL_WORKLOAD_EXCLUDE`.
292293

293294
{{% collapse-content title="Setting environment variables" level="h4" expanded=false id="setting-environment-variables" %}}
294295

@@ -312,7 +313,8 @@ spec:
312313
nodeAgent:
313314
env:
314315
- name: DD_CEL_WORKLOAD_EXCLUDE
315-
value: '[{"products":["global"],"rules":{"containers":["container.name == \"redis\""]}}]'
316+
value: >
317+
[{"products":["global"],"rules":{"containers":["container.name == \"redis\""]}}]
316318
```
317319

318320
{{% /tab %}}
@@ -478,4 +480,5 @@ In environments where you are not using Helm or the Operator, the following envi
478480

479481
[1]: /containers/kubernetes/log/?tab=helm#log-collection
480482
[2]: /getting_started/containers/autodiscovery
481-
[3]: https://github.com/google/cel-spec/blob/master/doc/langdef.md
483+
[3]: https://github.com/google/cel-spec/blob/master/doc/langdef.md
484+
[4]: /agent/configuration/agent-configuration-files/#agent-main-configuration-file

0 commit comments

Comments
 (0)