add infrastructure monitoring
Add Clickstack (HyperDX) as the aggregation platform. Configure Otel Collector to collect host metrics.
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
---
|
||||
- name: HYPERDX | Verzeichnisse erstellen
|
||||
ansible.builtin.file:
|
||||
path: "{{ data_dir }}/{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ item.uid }}"
|
||||
group: "{{ item.gid }}"
|
||||
mode: '0755'
|
||||
recurse: no
|
||||
loop:
|
||||
- { path: 'mongo', uid: 999, gid: 999 } # MongoDB Standard
|
||||
- { path: 'clickhouse/data', uid: 101, gid: 101 } # ClickHouse Standard
|
||||
- { path: 'clickhouse/logs', uid: 101, gid: 101 }
|
||||
- { path: 'clickhouse/config', uid: 101, gid: 101 }
|
||||
run_once: true
|
||||
delegate_to: "{{ groups['managers'][0] }}"
|
||||
|
||||
- name: HYPERDX | ClickHouse Konfiguration kopieren
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item }}"
|
||||
dest: "/mnt/cephfs/hyperdx/clickhouse/config/"
|
||||
owner: 101
|
||||
group: 101
|
||||
mode: '0644'
|
||||
loop:
|
||||
- files/config.xml # Lokal in deinem Ansible Repo
|
||||
- files/users.xml
|
||||
run_once: true
|
||||
delegate_to: "{{ groups['managers'][0] }}"
|
||||
|
||||
- name: HYPERDX | shared-observability Netzwerk erstellen
|
||||
community.docker.docker_network:
|
||||
name: shared-observability
|
||||
driver: overlay
|
||||
state: present
|
||||
attachable: yes
|
||||
ipam_config:
|
||||
- subnet: '172.16.116.0/24'
|
||||
gateway: '172.16.116.1'
|
||||
run_once: true
|
||||
delegate_to: "{{ groups['managers'][0] }}"
|
||||
|
||||
- name: HYPERDX | OTel Collector Config generieren
|
||||
ansible.builtin.template:
|
||||
src: otel-collector-config.yaml.j2
|
||||
dest: "{{ data_dir }}/data/otel-collector-config.yaml"
|
||||
mode: '0644'
|
||||
run_once: true
|
||||
delegate_to: "{{ groups['managers'][0] }}"
|
||||
|
||||
- name: HYPERDX | Generate Compose file
|
||||
ansible.builtin.template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: '{{ data_dir }}/hyperdx.yml'
|
||||
mode: 0644
|
||||
run_once: true
|
||||
delegate_to: "{{ groups['managers'][0] }}"
|
||||
|
||||
- name: HYPERDX | Deploy stack
|
||||
community.docker.docker_stack:
|
||||
state: present
|
||||
name: hyperdx
|
||||
compose:
|
||||
- '{{ data_dir }}/hyperdx.yml'
|
||||
delegate_to: "{{ groups['managers'][0] }}"
|
||||
run_once: true
|
||||
Reference in New Issue
Block a user