Skip to content

Commit bf68484

Browse files
committed
Merge pull request #272 from CodeNow/SAN-3356-datadog-all-the-things
ansiblize host-based datadog install
2 parents 479c60f + 3f3bb8f commit bf68484

6 files changed

Lines changed: 10 additions & 8 deletions

File tree

ansible/delta-hosts/variables

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ vault_aws_region=us-east-1
6060
[delta:vars]
6161
ansible_ssh_private_key_file=~/.ssh/delta.pem
6262
api_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af
63-
datadog_host_address=10.8.5.63
6463
datadog_tags=env:delta
64+
datadog_mongodb_user=datadog
65+
datadog_mongodb_pwd=sqa3WBgkCgZsFZuex0kBNahZ
6566
domain=runnable.io
6667
mongo_port=27017
6768
new_relic_license_key=338516e0826451c297d44dc60aeaf0a0ca4bfead

ansible/gamma-hosts/variables

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ vault_aws_region=us-east-1
5959

6060
[gamma:vars]
6161
ansible_ssh_private_key_file=~/.ssh/gamma.pem
62-
datadog_host_address=10.4.6.251
6362
datadog_tags=env:gamma
6463
datadog_mongodb_user=datadog
6564
datadog_mongodb_pwd=sqa3WBgkCgZsFZuex0kBNahZ
@@ -75,7 +74,6 @@ registry_host=10.4.4.82
7574
swarm_token=d363b783f03a845a2c82b081bfe8443e
7675
user_content_domain=runnable.ninja
7776
api_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af
78-
no_dd_monitoring=false
7977

8078
[ec2:vars]
8179
env=gamma

ansible/group_vars/alpha-mongo.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ container_run_opts: "-d --name mongodb -p 27017:27017 -v {{ db_path }}:/data/db:
1010

1111
# do not monitor docker-daemon for mongo, as there is none
1212
no_dd_monitoring: true
13+
has_dd_integration: true

ansible/group_vars/alpha-rabbitmq.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ container_tag: "3.5.3-management"
1010
container_run_opts: "-d --name prod-rabbit -v {{ db_path }}:/var/lib/rabbitmq:rw -v {{ config_path }}/rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro -p 54320:15672 -p 54321:5672"
1111

1212
hosted_ports: [ 5672, 15672 ]
13-
# monitor the docker-daemon
14-
no_dd_monitoring: false
13+
# DD integration for RabbitMQ
14+
has_dd_integration: true

ansible/roles/datadog/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
- name: add docker to dd-agent group
2929
sudo: yes
30-
when: no_dd_monitoring != true
30+
when: no_dd_monitoring is defined
3131
user:
3232
name=dd-agent
3333
groups=docker
@@ -57,7 +57,7 @@
5757

5858
- name: install docker integration
5959
sudo: yes
60-
when: no_dd_monitoring != true
60+
when: no_dd_monitoring is defined
6161
template:
6262
src=docker_daemon.yaml.j2
6363
dest=/etc/dd-agent/conf.d/docker_daemon.yaml
@@ -66,7 +66,7 @@
6666
# assumes a config for {{ name }} exists
6767
- name: install datadog integrations
6868
sudo: yes
69-
when: docker_config != "docks"
69+
when: has_dd_integration is defined
7070
template:
7171
src="{{ name }}.yaml.j2"
7272
dest="/etc/dd-agent/conf.d/{{ name }}.yaml"

ansible/roles/datadog/templates/datadog.conf.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ dd_url: https://app.datadoghq.com
66
api_key: {{ datadog_api_key }}
77

88
use_mount: no
9+
10+
bind_host: 0.0.0.0

0 commit comments

Comments
 (0)