-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
base: master
Are you sure you want to change the base?
Conversation
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
Preview links (active after the
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**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]. |
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