Reputation: 131
I am running the datadog agent using docker
DOCKER_CONTENT_TRUST=1 \
docker run -d -v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-e DD_API_KEY=<my_api_key> \
-e DD_DOGSTATD_NON_LOCAL_TRAFFIC=true \
-e DD_LOG_LEVEL=debug \
-p 127.0.0.1:8125:8125/udp \
datadog/agent:latest
I want to send custom metrics using dogstatsd. When I run
echo -n "custom_metric:60|g|#shell" | nc -4u -w0 127.0.0.1 8125
I can see in wireshark that the udp packet was successful from the source to the destination but this metric is not being submitted to datadog. Am I missing some configuration?
Upvotes: 0
Views: 4090
Reputation: 5155
Seems like there is a typo in your command. DD_DOGSTATD_NON_LOCAL_TRAFFIC
is used instead of DD_DOGSTATSD_NON_LOCAL_TRAFFIC
I usually used the below command for testing with Datadog:
DOCKER_CONTENT_TRUST=1 docker run -d \
--name dd-agent \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-e DD_API_KEY=<api-key> \
-e DD_DOGSTATSD_NON_LOCAL_TRAFFIC="true" \
-p 8125:8125/udp \
-p 8126:8126/tcp \
datadog/agent:latest
Upvotes: 2