setup datadog agent on each host.

This commit is contained in:
2022-03-25 21:48:12 -04:00
parent f723e4ac2e
commit 31ed336880
6 changed files with 126 additions and 2 deletions

View File

@@ -0,0 +1,70 @@
---
# update the managed host machines
- name: updates
hosts: home
gather_facts: true
vars:
datadog_api_key: ca0faf176c4aedd4f547ed7cf85615eb
datadog_agent_major_version: 7
datadog_config:
apm_config:
enabled: true
process_config:
enabled: "true" # type: string
scrub_args: true
custom_sensitive_words: ['consul_token','dd_api_key']
system_probe_config:
sysprobe_socket: /opt/datadog-agent/run/sysprobe.sock
network_config:
enabled: true
datadog_disable_untracked_checks: false
datadog_checks:
reboot_required:
init_config:
instances:
-
oom_kill:
init_config:
instances:
-
systemd:
- unit_names:
- cron.service
- k3s.service
- named.service
- ssh.servce
- apt-daily-upgrade.timer
bind9:
init_config:
instances:
- url: "http://ns01:8053/"
- url: "http://ns02:8053/"
datadog_integration:
datadog-reboot_required:
action: install
version: 1.0.0
third_party: true
datadog-bind9:
action: install
version: 1.0.0
third_party: true
pre_tasks:
roles:
- role: datadog.datadog
become: true
# tasks:
# - name: enable datadog-agent-sysprobe
# systemd:
# name: datadog-agent-sysprobe.service
# state: started
# enabled: True
# when: ansible_architecture != 'armv7l'
# become: true
# notify: restart datadog-agent

View File

@@ -8,6 +8,17 @@
vars:
datadog_api_key: ca0faf176c4aedd4f547ed7cf85615eb
datadog_agent_major_version: 7
datadog_config:
apm_config:
enabled: true
process_config:
enabled: "true" # type: string
scrub_args: true
custom_sensitive_words: ['consul_token','dd_api_key']
system_probe_config:
sysprobe_socket: /opt/datadog-agent/run/sysprobe.sock
network_config:
enabled: true
pre_tasks:
@@ -19,9 +30,40 @@
- role: datadog.datadog
become: true
when: ansible_architecture != 'armv7l'
datadog_checks:
reboot_required:
init_config:
instances:
-
oom_kill:
init_config:
instances:
-
systemd:
- unit_names:
- cron.service
- k3s.service
- named.service
- ssh.servce
- apt-daily-upgrade.timer
bind9:
init_config:
instances:
- url: "http://ns01:8053/"
- url: "http://ns02:8053/"
datadog_integration:
datadog-reboot_required:
action: install
version: 1.0.0
third_party: true
datadog-bind9:
action: install
version: 1.0.0
third_party: true
- role: datadog.datadog
become: true
datadog_agent_flavor: datadog-iot-agent
when: ansible_architecture == 'armv7l'
tasks:

View File

@@ -9,4 +9,6 @@
with_items:
- htop
- attr
- python3-psutil
- acl
when: ansible_os_family == "Debian"

View File

@@ -27,6 +27,10 @@ acl "trusted" {
::1/128;
};
statistics-channels {
inet * port 8053 allow { trusted; };
};
options {
directory "/var/cache/bind";

View File

@@ -34,6 +34,7 @@ dkhost05 IN A 192.168.4.55
; dns servers
ns IN A 192.168.4.11
ns01 IN CNAME ns
ns02 IN CNAME cubox-i
; gluster servers