diff options
Diffstat (limited to 'playbook.yaml')
| -rw-r--r-- | playbook.yaml | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/playbook.yaml b/playbook.yaml index 48262c2..91573fe 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -225,8 +225,10 @@ - name: Ensure required packages are installed ansible.builtin.apt: name: + - libdbi-perl # Used by munin postgres plugins - lua-dbi-postgresql # Prosody postgres connection - lua-unbound # Prosody DNS resolution + - munin-node # Graphs and monitoring - postgresql # Database - prosody # XMPP server - prosody-modules # Extra addons @@ -316,6 +318,7 @@ proto: tcp state: enabled loop: + - 4949 # Munin - 5000 # XEP-0065 - 5223 # XEP-0368 - 5270 # XEP-0368 @@ -366,6 +369,113 @@ notify: Restart nginx when: not is_transport_server + - name: Ensure munin is configured + ansible.builtin.template: + src: "{{ playbook_dir }}/files/munin-node.conf.j2" + dest: /etc/munin/munin-node.conf + owner: root + group: root + mode: "0644" + become: true + notify: Restart munin-node + + - name: Ensure munin plugins are configured + ansible.builtin.file: + src: "/usr/share/munin/plugins/{{ item.src }}" + dest: "/etc/munin/plugins/{{ item.dest }}" + owner: root + group: root + state: link + become: true + with_items: + - src: apt_all + dest: apt_all + - src: cpu + dest: cpu + - src: df + dest: df + - src: df_abs + dest: df_abs + - src: df_inode + dest: df_inode + - src: diskstats + dest: diskstats + - src: entropy + dest: entropy + - src: forks + dest: forks + - src: fw_conntrack + dest: fw_conntrack + - src: fw_forwarded_local + dest: fw_forwarded_local + - src: fw_packets + dest: fw_packets + - src: if_ + dest: if_enp1s0 + - src: if_err_ + dest: if_err_enp1s0 + - src: irqstats + dest: irqstats + - src: load + dest: load + - src: memory + dest: memory + - src: netstat + dest: netstat + - src: open_files + dest: open_files + - src: open_inodes + dest: open_inodes + - src: postgres_autovacuum + dest: postgres_autovacuum + - src: postgres_bgwriter + dest: postgres_bgwriter + - src: postgres_cache_ + dest: postgres_cache_prosody + - src: postgres_checkpoints + dest: postgres_checkpoints + - src: postgres_connections_ + dest: postgres_connections_prosody + - src: postgres_connections_db + dest: postgres_connections_db + - src: postgres_locks_ + dest: postgres_locks_prosody + - src: postgres_oldest_prepared_xact_ + dest: postgres_oldest_prepared_xact_prosody + - src: postgres_prepared_xacts_ + dest: postgres_prepared_xacts_prosody + - src: postgres_querylength_ + dest: postgres_querylength_prosody + - src: postgres_scans_ + dest: postgres_scans_prosody + - src: postgres_size_ + dest: postgres_size_prosody + - src: postgres_streaming_ + dest: postgres_streaming_prosody + - src: postgres_transactions_ + dest: postgres_transactions_prosody + - src: postgres_tuples_ + dest: postgres_tuples_prosody + - src: postgres_users + dest: postgres_users + - src: postgres_xlog + dest: postgres_xlog + - src: proc_pri + dest: proc_pri + - src: processes + dest: processes + - src: swap + dest: swap + - src: threads + dest: threads + - src: uptime + dest: uptime + - src: users + dest: users + - src: vmstat + dest: vmstat + notify: Restart munin-node + - name: Ensure turn is configured ansible.builtin.template: src: "{{ playbook_dir }}/files/turnserver.conf.j2" @@ -533,6 +643,12 @@ state: restarted become: true + - name: Restart munin-node + ansible.builtin.service: + name: munin-node + state: restarted + become: true + vars: env_prefix: >- |
