Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dogstatsd operator docs #15328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DaniCalifornia
Copy link
Contributor

this updates the dogstatsd setup docs with a new tab on for Operator config

dogstatsd doc: https://docs.datadoghq.com/developers/dogstatsd/?tab=kubernetes#pagetitle operator config: https://docs.datadoghq.com/containers/kubernetes/operator_configuration/#all-configuration-options

from customer request on this ticket: https://datadog.zendesk.com/agent/tickets/925042

@DaniCalifornia DaniCalifornia requested a review from a team as a code owner September 20, 2022 21:03
@github-actions github-actions bot added the developers Content changed in the developers folder label Sep 20, 2022
@github-actions
Copy link
Contributor

Preview links (active after the build_preview check completes)

Modified Files

hostPort: 8125
```

This enables your applications to send metrics with DogStatsD on port `8125` on whichever node they happen to be running. More operator configuration options here: https://docs.datadoghq.com/containers/kubernetes/operator_configuration/#all-configuration-options
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
This enables your applications to send metrics with DogStatsD on port `8125` on whichever node they happen to be running. More operator configuration options here: https://docs.datadoghq.com/containers/kubernetes/operator_configuration/#all-configuration-options
This enables your applications to send metrics with DogStatsD on port `8125` on whichever node they happen to be running. For more operator configuration options, see [Operator Configuration][7].

[3]: https://kubernetes.io/docs/setup/independent/troubleshooting-kubeadm/#hostport-services-do-not-work
[4]: /developers/dogstatsd/unix_socket/#using-origin-detection-for-container-tagging
[5]: /getting_started/tagging/assigning_tags/#environment-variables
[6]: /metrics/custom_metrics/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
[6]: /metrics/custom_metrics/
[6]: /metrics/custom_metrics/
[7]: /containers/kubernetes/operator_configuration/#all-configuration-options
[8]: /getting_started/tagging/unified_service_tagging/


This enables your applications to send metrics with DogStatsD on port `8125` on whichever node they happen to be running. More operator configuration options here: https://docs.datadoghq.com/containers/kubernetes/operator_configuration/#all-configuration-options

**Note**: `hostPort` functionality requires a networking provider that adheres to the [CNI specification][2], such as Calico, Canal, or Flannel. For more information, including a workaround for non-CNI network providers, see the Kubernetes documentation: [HostPort services do not work][3].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**Note**: `hostPort` functionality requires a networking provider that adheres to the [CNI specification][2], such as Calico, Canal, or Flannel. For more information, including a workaround for non-CNI network providers, see the Kubernetes documentation: [HostPort services do not work][3].
**Note**: `hostPort` functionality requires a networking provider that adheres to the [CNI specification][2], such as Calico, Canal, or Flannel. For more information, including a workaround for non-CNI network providers, see the [Kubernetes troubleshooting documentation: HostPort services do not work][3].


**Note**: `hostPort` functionality requires a networking provider that adheres to the [CNI specification][2], such as Calico, Canal, or Flannel. For more information, including a workaround for non-CNI network providers, see the Kubernetes documentation: [HostPort services do not work][3].

2. Enable DogStatsD non local traffic to allow StatsD data collection, set `DD_DOGSTATSD_NON_LOCAL_TRAFFIC` to `true` in your `datadog-agent.yaml` manifest:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
2. Enable DogStatsD non local traffic to allow StatsD data collection, set `DD_DOGSTATSD_NON_LOCAL_TRAFFIC` to `true` in your `datadog-agent.yaml` manifest:
2. Enable DogStatsD non-local traffic to allow StatsD data collection by setting `DD_DOGSTATSD_NON_LOCAL_TRAFFIC` to `true` in your `datadog-agent.yaml` manifest:

value: 'true'
```

This allows collecting StatsD data from other containers than the one running the Agent.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
This allows collecting StatsD data from other containers than the one running the Agent.
This allows collecting StatsD data from containers other than the one running the Agent.

kubectl apply -f datadog-agent.yaml
```

**Warning**: The `hostPort` parameter opens a port on your host. Make sure your firewall only allows access from your applications or trusted sources. If your network plugin doesn't support `hostPorts`, so add `hostNetwork: true` in your Agent pod specifications. This shares the network namespace of your host with the Datadog Agent. It also means that all ports opened on the container are opened on the host. If a port is used both on the host and in your container, they conflict (since they share the same network namespace) and the pod does not start. Some Kubernetes installations do not allow this.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**Warning**: The `hostPort` parameter opens a port on your host. Make sure your firewall only allows access from your applications or trusted sources. If your network plugin doesn't support `hostPorts`, so add `hostNetwork: true` in your Agent pod specifications. This shares the network namespace of your host with the Datadog Agent. It also means that all ports opened on the container are opened on the host. If a port is used both on the host and in your container, they conflict (since they share the same network namespace) and the pod does not start. Some Kubernetes installations do not allow this.
**Warning**: The `hostPort` parameter opens a port on your host. Make sure your firewall allows access only from your applications or trusted sources. If your network plugin doesn't support `hostPorts`, add `hostNetwork: true` in your Agent pod specifications. This shares the network namespace of your host with the Datadog Agent. It also means that all ports opened on the container are opened on the host. If a port is used both on the host and in your container, they conflict (since they share the same network namespace) and the pod does not start. Some Kubernetes installations do not allow this.


### Send StatsD metrics to the Agent

Your application needs a reliable way to determine the IP address of its host. This is made simple in Kubernetes 1.7, which expands the set of attributes you can pass to your pods as environment variables. In versions 1.7 and above, you can pass the host IP to any pod by adding an environment variable to the PodSpec. For instance, your application manifest might look like this:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Your application needs a reliable way to determine the IP address of its host. This is made simple in Kubernetes 1.7, which expands the set of attributes you can pass to your pods as environment variables. In versions 1.7 and above, you can pass the host IP to any pod by adding an environment variable to the PodSpec. For instance, your application manifest might look like this:
Your application needs a reliable way to determine the IP address of its host. Kubernetes 1.7 expands the set of attributes you can pass to your pods as environment variables. In versions 1.7 and above, you can pass the host IP to any pod by adding an environment variable to the PodSpec. For example, your application manifest might look like this:


With this, any pod running your application is able to send DogStatsD metrics with port `8125` on `$DD_AGENT_HOST`.

**Note**: As a best practice, Datadog recommends using unified service tagging when assigning attributes. Unified service tagging ties Datadog telemetry together through the use of three standard tags: `env`, `service`, and `version`. To learn how to unify your environment, see [unified service tagging][8].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**Note**: As a best practice, Datadog recommends using unified service tagging when assigning attributes. Unified service tagging ties Datadog telemetry together through the use of three standard tags: `env`, `service`, and `version`. To learn how to unify your environment, see [unified service tagging][8].
**Note**: Use unified service tagging when assigning attributes. Unified service tagging ties Datadog telemetry together through the use of three standard tags: `env`, `service`, and `version`. To learn how to unify your environment data with tags, see [Unified Service Tagging][8].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developers Content changed in the developers folder salmon_curry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants