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

Listening on ip 0.0.0.0 #149

Closed
guyisra opened this issue Aug 6, 2018 · 2 comments
Closed

Listening on ip 0.0.0.0 #149

guyisra opened this issue Aug 6, 2018 · 2 comments
Assignees

Comments

@guyisra
Copy link

guyisra commented Aug 6, 2018

Currently when using the role, (and then using netstat -uln) it seems that 127.0.0.1 is listening to 8125

is there a configuration to change it so the agent will listen on 0.0.0.0 instead?

@hush-hush
Copy link
Member

hush-hush commented Aug 6, 2018

Hi @guyisra,

The port 8125 is used by DogStatsD to receive custom metrics from external sources: https://docs.datadoghq.com/developers/dogstatsd/

Typically DogStatsD receives metrics from other local software. If you want to send them from other box beware that it uses UDP and this might increase your packet drop at high throughput.
If you install the agent on the same box as the software sending DogStatsD metrics, you can also use a Unix socket with the agent version 6.

To bind 8125 on all interfaces (ie: 0.0.0.0) you can use the non_local_traffic option in agent5 and dogstatsd_non_local_traffic with agent6

example of playbook:

- hosts: servers
  roles:
    - { role: Datadog.datadog, become: yes } 
  vars:
    datadog_api_key: "123456"
    datadog_config:
      tags: "mytag0, mytag1"
      log_level: INFO
      non_local_traffic: true           # agent version 5
      dogstatsd_non_local_traffic: true # agent version 6

If you want to bind a specific interface (for example a non-loopback interface), you can use instead the bind_host option:

example of playbook:

- hosts: servers
  roles:
    - { role: Datadog.datadog, become: yes } 
  vars:
    datadog_api_key: "123456"
    datadog_config:
      tags: "mytag0, mytag1"
      log_level: INFO
      bind_host: 0.0.0.0 # agent version 5 and 6

Hope this answer your question.

@guyisra
Copy link
Author

guyisra commented Aug 6, 2018

Thanks!

@guyisra guyisra closed this as completed Aug 6, 2018
@hush-hush hush-hush self-assigned this Aug 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants