-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from istresearch/dd_agent
Add datadog role
- Loading branch information
Showing
16 changed files
with
136 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
$ANSIBLE_VAULT;1.1;AES256 | ||
38383233633833303633626534333435336339663534316534646262633039376435663531393332 | ||
6166383764356639396438323439623139333930386463640a313166346335643630326664336664 | ||
36363932616632366433303833666362636637316265386466633931626633313632646533346564 | ||
3765383731393231350a636539343866363130313136646564326461383032373238373035393031 | ||
33623935376139653763363735326130376663306636316262646362343065353639633664346263 | ||
66346230633439616464653535653063643733373566386463626366393631613534386630336430 | ||
66356332636238643438333332386261363364613761616233353533653335653836333565333736 | ||
33323961666564386433363961326330346230636162346566643336386666333436643232393333 | ||
30396334616238393037323865656437356336353263633762386533306238626661666637306463 | ||
35356238323834326439653037666632643139663739343661396666363561666530303139626433 | ||
62373461623035623065386438636234663766396431373333653865613533353632333536666531 | ||
36396162646139363031363837653336333733623365303965333361616239393662313536356539 | ||
35373636633930653030613463363965396261353066353462633039333338373138613630333432 | ||
3130613836636639316266323230383037643738353739626361 | ||
62373630323933386334356366386230663337343766336466316138636636373937383932336434 | ||
3131653734626235333637653932326632633633636334650a386437666535376432333935313564 | ||
39316433643734616666303538313437613534663432373764376334363839323633323364623539 | ||
6236663538383864660a393936386561313633303037366439616432623730643665336362653931 | ||
62616563353931323538323161316535656262643534366437376364633737366637653332623437 | ||
33363265613162363239343139326530626339623333613336386638333932643330313062306339 | ||
61653836373237383736303861323465613335313065313733616535316365633834333132393263 | ||
30326366636532306161383131613930323330333862313663613435396362393464393062313862 | ||
65613235303163386663346137326432346662373864333338666332623932306161656465356230 | ||
34323561643937616166653333643264663435303131333139623962343937366566643161626230 | ||
36373061643334643862346134396232353465646339326531333062363537653637396333363131 | ||
62336430613364386136643038303033303639316238613764646537646332323064646438663730 | ||
37383236343338396336333938366235363437653862363761396230333563333832616165643234 | ||
66656636323530373964376266633534653266653034343837396162303035633963313632666136 | ||
66313131613031373636363131343764623235633463376365306362383466363238386639663130 | ||
36643361626265633166303530616363623464623036316130373061306436663239346661383531 | ||
31303734653933373564383930336261653664306535653662386432626364393436 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
datadog_api_key: "{{ vault_datadog_api_key }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
ddagent_install_dir: /usr/bin | ||
ddagent_conf_path: /etc/dd-agent/datadog.conf | ||
additional_checksd_dir: /etc/dd-agent/checks-enabled/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: restart dd-agent | ||
supervisorctl: | ||
name=dd-agent | ||
state=restarted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dependencies: | ||
- { role: supervisord, when: "supervisord_has_run is not defined"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
# file: roles/dd-agent/tasks/main.yml | ||
# dd-agent install: https://app.datadoghq.com/account/settings#agent/ubuntu | ||
|
||
- name: Install dependencies for dd-agent | ||
apt: | ||
name: apt-transport-https | ||
state: present | ||
update_cache: yes | ||
|
||
- name: Add dd-agent repository to source list | ||
apt_repository: | ||
repo: 'deb http://apt.datadoghq.com/ stable main' | ||
state: present | ||
|
||
- name: Import dd-agent apt key | ||
apt_key: | ||
keyserver: keyserver.ubuntu.com | ||
id: C7A7DA52 | ||
|
||
- name: Install dd-agent | ||
apt: | ||
name: datadog-agent | ||
state: present | ||
update_cache: yes | ||
|
||
# dd-agent was previously just run as a service before being run under | ||
# supervisor. | ||
- name: Stop service based dd-agent | ||
service: | ||
name: datadog-agent | ||
state: stopped | ||
enabled: no | ||
|
||
- name: Copy dd-agent supervisord config | ||
template: | ||
src=dd-agent-supervisord.conf.j2 | ||
dest="{{ supervisord_programs_dir }}/dd-agent-supervisord.conf" | ||
mode=0644 | ||
notify: | ||
- reread supervisord | ||
- restart dd-agent | ||
|
||
- name: Create additional_checksd directory | ||
file: | ||
path: "{{ additional_checksd_dir }}" | ||
state: directory | ||
|
||
- name: Copy dd-agent datadog config | ||
template: | ||
src=datadog.conf.j2 | ||
dest="{{ ddagent_conf_path }}" | ||
mode=0644 | ||
notify: | ||
- restart dd-agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
########################## | ||
# Managed by Ansible | ||
########################## | ||
|
||
[Main] | ||
|
||
dd_url: https://app.datadoghq.com | ||
api_key: {{ datadog_api_key }} | ||
use_mount: no | ||
|
||
# Additional directory to look for Datadog checks | ||
additional_checksd: {{ additional_checksd_dir }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[program:dd-agent] | ||
command={{ ddagent_install_dir }}/dd-agent foreground | ||
autostart=true | ||
autorestart=true | ||
redirect_stderr=true | ||
startsecs=5 | ||
stopsignal=KILL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters