# Metricbeat/statsd server not forwarding data from statsd client

**URL:** <https://discuss.elastic.co/t/metricbeat-statsd-server-not-forwarding-data-from-statsd-client/361806>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 20, 2024, 8:15pm UTC](https://discuss.elastic.co/t/metricbeat-statsd-server-not-forwarding-data-from-statsd-client/361806 "2024-06-20T20:15:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![technomage](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/technomage/32/135435_2.png) [@technomage](https://discuss.elastic.co/u/technomage)\
**Post date:** [June 20, 2024, 8:15pm UTC](https://discuss.elastic.co/t/metricbeat-statsd-server-not-forwarding-data-from-statsd-client/361806/1 "2024-06-20T20:15:21Z")

</div>

I'm running an ELK container and a separate metricbeats container on the same host, using a bridge network.

The default metricbeats config successfully delivers "system" module metrics, so I know the containers are working as expected.

I am unable to get metricbeats to report any statsd metrics. The following command (and variations) produces no metrics sent to ELK, whether invoked from the host or within the metricbeats container.

`echo "my_counter:10|c" | nc -w 1 -u localhost 8125`

I've tried other ports to rule that out as an issue. Unfortunately the underlying statsd code doesn't have any relevant logging, so enabling debug doesn't show anything useful. The log indicates the port is bound and the statsd server is running (there is a statsd failure message if it fails to start up).

I've gone over the setup instructions many times, but I can't find any statsd.\* information in the Kibana UI.

Relevant config:

```auto
logging.level: debug
logging.selectors: ["*"]
#logging.metrics.enabled: true
#logging.metrics.period: 10s

output.elasticsearch:

  hosts: ["elk:9200"]

setup.kibana:

  host: "elk:5601"

metricbeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.period: 10s
  reload.enabled: true

metricbeat.modules:

- module: statsd
  host: localhost
  port: 8125
  metricsets:
    - server
  enabled: true
  period: 1s

```

---

<div class="post-metadata">

**Author:** ![technomage](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/technomage/32/135435_2.png) [@technomage](https://discuss.elastic.co/u/technomage)\
**Post date:** [June 20, 2024, 8:35pm UTC](https://discuss.elastic.co/t/metricbeat-statsd-server-not-forwarding-data-from-statsd-client/361806/2 "2024-06-20T20:35:25Z")

</div>

Turns out that the container was not properly resolving "localhost". Changing the `nc` command to use 127.0.0.1 instead resolved the issue for transmitting from within the container.

---

<div class="post-metadata">

**Author:** ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)\
**Post date:** [June 21, 2024, 8:02pm UTC](https://discuss.elastic.co/t/metricbeat-statsd-server-not-forwarding-data-from-statsd-client/361806/3 "2024-06-21T20:02:35Z")

</div>

Thanks for sharing your solution, @technomage. Let us know if you need any further help here.
