Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions content/en/containers/kubernetes/tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ spec:
baz: qux
```

For Agent v7.24.0+, use the following environment variable configuration to add all resource labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, pod tag names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all resource labels as tags to your metrics. In this example, pod tag names are prefixed with `<PREFIX>_`:

```yaml
apiVersion: datadoghq.com/v2alpha1
Expand All @@ -174,7 +174,7 @@ spec:
global:
kubernetesResourcesLabelsAsTags:
pods:
"*": <PREFIX>_%%label%%
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```

{{% /tab %}}
Expand Down Expand Up @@ -206,13 +206,13 @@ datadog:
baz: qux
```

For Agent v7.24.0+, use the following environment variable configuration to add all resource labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, pod tag names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all resource labels as tags to your metrics. In this example, pod tag names are prefixed with `<PREFIX>_`:

```yaml
datadog:
kubernetesResourcesLabelsAsTags:
pods:
"*": <PREFIX>_%%label%%
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```

{{% /tab %}}
Expand All @@ -235,10 +235,10 @@ For example, you could set up:
DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS='{"nodes":{"kubernetes.io/arch": "arch"},"pods":{"baz":"qux"}}'
```

For Agent v7.24.0+, use the following environment variable configuration to add all resource labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, pod tag names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all resource labels as tags to your metrics. In this example, pod tag names are prefixed with `<PREFIX>_`:

```bash
DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%label%%"}}'
DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%label%%"}}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%label%%"}}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%label%%"}}' # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```

{{% /tab %}}
Expand Down Expand Up @@ -337,7 +337,7 @@ spec:
global:
kubernetesResourcesAnnotationsAsTags:
pods:
"*": <PREFIX>_%%annotation%% #
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%annotation%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```

{{% /tab %}}
Expand Down Expand Up @@ -369,13 +369,13 @@ datadog:
baz: qux
```

For Agent v7.24.0+, use the following environment variable configuration to add all resource annotations as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, pod tag names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all resource annotations as tags to your metrics. In this example, pod tag names are prefixed with `<PREFIX>_`:

```yaml
datadog:
kubernetesResourcesAnnotationsAsTags:
pods:
"*": <PREFIX>_%%annotation%%
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%annotation%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```

{{% /tab %}}
Expand All @@ -398,10 +398,10 @@ For example, you could set up:
DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS='{"nodes":{"kubernetes.io/arch": "arch"},"pods":{"baz":"qux"}}'
```

For Agent v7.24.0+, use the following environment variable configuration to add all resource annotations as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, pod tag names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all resource annotations as tags to your metrics. In this example, pod tag names are prefixed with `<PREFIX>_`:

```bash
DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%annotation%%"}}'
DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%annotation%%"}}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%annotation%%"}}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%annotation%%"}}' # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```

{{% /tab %}}
Expand Down Expand Up @@ -486,7 +486,7 @@ metadata:
spec:
global:
nodeLabelsAsTags:
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics before version 7.73
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}

Expand All @@ -512,7 +512,7 @@ For Agent v7.24.0+, use the following environment variable configuration to add
```yaml
datadog:
nodeLabelsAsTags:
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics before version 7.73
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}

Expand All @@ -532,7 +532,7 @@ DD_KUBERNETES_NODE_LABELS_AS_TAGS='{"kubernetes.io/arch":"arch"}'
For Agent v7.24.0+, use the following environment variable configuration to add all node labels as tags to your metrics. In this example, the tags' tag names are prefixed with `<PREFIX>_`:

```bash
DD_KUBERNETES_NODE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM metrics before version 7.73
DD_KUBERNETES_NODE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DD_KUBERNETES_NODE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
DD_KUBERNETES_NODE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}
{{< /tabs >}}
Expand Down Expand Up @@ -586,7 +586,7 @@ metadata:
spec:
global:
podLabelsAsTags:
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics before version 7.73
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}

Expand All @@ -606,12 +606,12 @@ datadog:
app: kube_app
```

For Agent v7.24.0+, use the following environment variable configuration to add all pod labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all pod labels as tags to your metrics. In this example, the tags' names are prefixed with `<PREFIX>_`:

```yaml
datadog:
podLabelsAsTags:
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}

Expand All @@ -628,10 +628,10 @@ For example, you could set up:
DD_KUBERNETES_POD_LABELS_AS_TAGS='{"app":"kube_app"}'
```

For Agent v7.24.0+, use the following environment variable configuration to add all pod labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all pod labels as tags to your metrics. In this example, the tags' names are prefixed with `<PREFIX>_`:

```bash
DD_KUBERNETES_POD_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}'
DD_KUBERNETES_POD_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DD_KUBERNETES_POD_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
DD_KUBERNETES_POD_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}
{{< /tabs >}}
Expand Down Expand Up @@ -675,7 +675,7 @@ spec:
app: kube_app
```

For Agent v7.24.0+, use the following environment variable configuration to add all pod annotations as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all pod annotations as tags to your metrics. In this example, the tags' names are prefixed with `<PREFIX>_`:

```yaml
apiVersion: datadoghq.com/v2alpha1
Expand All @@ -685,7 +685,7 @@ metadata:
spec:
global:
podAnnotationsAsTags:
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM metrics
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%annotation%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}

Expand All @@ -705,12 +705,12 @@ datadog:
app: kube_app
```

For Agent v7.24.0+, use the following environment variable configuration to add all pod annotation as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all pod annotation as tags to your metrics. In this example, the tags' names are prefixed with `<PREFIX>_`:

```yaml
datadog:
podAnnotationsAsTags:
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM metrics
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%annotation%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}

Expand All @@ -727,10 +727,10 @@ For example, you could set up:
DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"app":"kube_app"}'
```

For Agent v7.24.0+, use the following environment variable configuration to add all pod annotations as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all pod annotations as tags to your metrics. In this example, the tags' names are prefixed with `<PREFIX>_`:

```bash
DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"*":"<PREFIX>_%%annotation%%"}'
DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"*":"<PREFIX>_%%annotation%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"*":"<PREFIX>_%%annotation%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"*":"<PREFIX>_%%annotation%%"}' # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}
{{< /tabs >}}
Expand Down Expand Up @@ -774,7 +774,7 @@ spec:
app: kube_app
```

For Agent v7.24.0+, use the following environment variable configuration to add all namespace labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all namespace labels as tags to your metrics. In this example, the tags' names are prefixed with `<PREFIX>_`:

```yaml
apiVersion: datadoghq.com/v2alpha1
Expand All @@ -784,7 +784,7 @@ metadata:
spec:
global:
namespaceLabelsAsTags:
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}

Expand All @@ -804,12 +804,12 @@ datadog:
app: kube_app
```

For Agent v7.24.0+, use the following environment variable configuration to add all namespace labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all namespace labels as tags to your metrics. In this example, the tags' names are prefixed with `<PREFIX>_`:

```yaml
datadog:
namespaceLabelsAsTags:
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}

Expand All @@ -826,10 +826,10 @@ For example, you could set up:
DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"app":"kube_app"}'
```

For Agent v7.24.0+, use the following environment variable configuration to add all namespace labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
For Agent v7.24.0+, use the following environment variable configuration to add all namespace labels as tags to your metrics. In this example, the tags' names are prefixed with `<PREFIX>_`:

```bash
DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}'
DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

```
{{% /tab %}}
{{< /tabs >}}
Expand Down
Loading