Skip to content

Commit 4b36ef7

Browse files
author
Christopher M. Neill
committed
first pass
1 parent 104e2ed commit 4b36ef7

8 files changed

Lines changed: 49 additions & 1 deletion

File tree

ansible/gamma-hosts/variables

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ vault_aws_region=us-east-1
5858
ansible_ssh_private_key_file=~/.ssh/gamma.pem
5959
datadog_host_address=10.4.6.251
6060
datadog_tags=env:gamma
61+
datadog_mongodb_user=datadog
62+
datadog_mongodb_pwd=sqa3WBgkCgZsFZuex0kBNahZ
6163
domain=runnable-gamma.com
6264
mongo_port=27017
6365
new_relic_license_key=338516e0826451c297d44dc60aeaf0a0ca4bfead

ansible/mongo.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
- { role: notify, tags: "notify" }
77
- { role: database }
88
- { role: container_kill_start, tags: "deploy" }
9+
- { role: datadog }

ansible/rabbitmq.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
- { role: database }
88
- { role: rabbitmq }
99
- { role: container_kill_start, tags: "deploy" }
10+
- { role: datadog }

ansible/redis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
- { role: notify, tags: "notify" }
77
- { role: database, tags: "deploy" }
88
- { role: container_kill_start, tags: "deploy" }
9+
- { role: datadog }

ansible/roles/datadog/tasks/main.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
---
2+
- name: install dd agent
3+
tags: ['datadog']
4+
sudo: yes
5+
apt:
6+
name=datadog-agent
7+
state=latest
8+
9+
- name: create dd configdir
10+
tags: ['datadog']
11+
sudo: yes
12+
file:
13+
path=/etc/dd-agent/conf.d
14+
owner=root
15+
mode=0555
16+
state=directory
17+
218
- name: add https transport
319
tags: ['datadog']
420
sudo: yes
@@ -39,8 +55,17 @@
3955
dest=/etc/dd-agent/conf.d/tcp_check.yaml
4056
notify: restart datadog-agent
4157

58+
# assumes a config for {{ app_name }} exists
59+
- name: install datadog integrations
60+
tags: ['datadog']
61+
sudo: yes
62+
template:
63+
src="{{ app_name }}.yaml.j2"
64+
dest="/etc/dd-agent/conf.d/{{ app_name }}.yaml.j2"
65+
notify: restart datadog-agent
66+
4267
- name: force restart
43-
tags: ['datadogg']
68+
tags: ['datadog']
4469
command: echo restart datadog
4570
when: force_restart is defined
4671
notify: restart datadog-agent
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
init_config:
2+
3+
instances:
4+
- server: mongodb://{{ datadog_mongodb_user }}:{{ datadog_mongodb_pwd }}@localhost:27017
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
init_config:
2+
3+
instances:
4+
- {{ app_name }}_api_url: http://localhost:15672/api/
5+
{{ app_name }}_user: username # defaults to 'guest'
6+
{{ app_name }}_pass: password # defaults to 'guest'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
init_config:
2+
3+
instances:
4+
- host: localhost
5+
port: {{ redis_port }}
6+
password:
7+
keys:
8+
- queue1

0 commit comments

Comments
 (0)