Netdata: add monitoring for postgresql databases
This commit is contained in:
@@ -42,21 +42,34 @@
|
||||
group: "{{ app_user }}"
|
||||
mode: "0640"
|
||||
|
||||
- name: "Copy prometheus plugin config file"
|
||||
ansible.builtin.copy:
|
||||
src: "files/{{ app_name }}/go.d/prometheus.conf"
|
||||
dest: "{{ config_go_d_dir }}/prometheus.conf"
|
||||
owner: "{{ app_user }}"
|
||||
group: "{{ app_user }}"
|
||||
mode: "0640"
|
||||
- name: "Find all go.d plugin config files"
|
||||
ansible.builtin.find:
|
||||
paths: "files/{{ app_name }}/go.d"
|
||||
file_type: file
|
||||
delegate_to: localhost
|
||||
register: go_d_source_files
|
||||
|
||||
- name: "Copy fail2ban plugin config file"
|
||||
ansible.builtin.copy:
|
||||
src: "files/{{ app_name }}/go.d/fail2ban.conf"
|
||||
dest: "{{ config_go_d_dir }}/fail2ban.conf"
|
||||
- name: "Template all go.d plugin config files"
|
||||
ansible.builtin.template:
|
||||
src: "{{ item.path }}"
|
||||
dest: "{{ config_go_d_dir }}/{{ item.path | basename }}"
|
||||
owner: "{{ app_user }}"
|
||||
group: "{{ app_user }}"
|
||||
mode: "0640"
|
||||
loop: "{{ go_d_source_files.files }}"
|
||||
|
||||
- name: "Find existing go.d config files on server"
|
||||
ansible.builtin.find:
|
||||
paths: "{{ config_go_d_dir }}"
|
||||
file_type: file
|
||||
register: go_d_existing_files
|
||||
|
||||
- name: "Remove go.d config files that don't exist in source"
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
loop: "{{ go_d_existing_files.files }}"
|
||||
when: (item.path | basename) not in (go_d_source_files.files | map(attribute='path') | map('basename') | list)
|
||||
|
||||
- name: "Grab docker group id."
|
||||
ansible.builtin.shell:
|
||||
|
Reference in New Issue
Block a user