diff options
Diffstat (limited to 'roles/install_monitoring/tasks/install_munin.yml')
-rw-r--r-- | roles/install_monitoring/tasks/install_munin.yml | 55 |
1 files changed, 7 insertions, 48 deletions
diff --git a/roles/install_monitoring/tasks/install_munin.yml b/roles/install_monitoring/tasks/install_munin.yml index ee81639..c843bfe 100644 --- a/roles/install_monitoring/tasks/install_munin.yml +++ b/roles/install_monitoring/tasks/install_munin.yml @@ -14,7 +14,6 @@ pacman: name: perl-json state: present - when: "'fastd' in group_names" - name: copy fastd peers plugin copy: @@ -22,7 +21,6 @@ dest: /usr/lib/munin/plugins/fastd_peers_ mode: 0755 notify: restart munin-node - when: "'fastd' in group_names" - name: copy fastd traffic plugin copy: @@ -30,7 +28,6 @@ dest: /usr/lib/munin/plugins/fastd_traffic_ mode: 0755 notify: restart munin-node - when: "'fastd' in group_names" - name: enable munin plugins for fastd peers file: @@ -39,7 +36,6 @@ state: link with_items: "{{ sites }}" notify: restart munin-node - when: "'fastd' in group_names" - name: enable munin plugins for fastd traffic file: @@ -48,14 +44,12 @@ state: link with_items: "{{ sites }}" notify: restart munin-node - when: "'fastd' in group_names" - name: copy fastd plugin config template: src: munin_fastd_conf.j2 dest: /etc/munin/plugin-conf.d/fastd notify: restart munin-node - when: "'fastd' in group_names" - name: copy wg peers plugin copy: @@ -63,7 +57,6 @@ dest: /usr/lib/munin/plugins/wg_peers_ mode: 0755 notify: restart munin-node - when: "'fastd' in group_names" - name: copy wg peers plugin config copy: @@ -71,7 +64,6 @@ dest: /etc/munin/plugin-conf.d/wg mode: 0644 notify: restart munin-node - when: "'fastd' in group_names" - name: enable munin plugins for wg peers file: @@ -80,7 +72,6 @@ state: link with_items: "{{ sites }}" notify: restart munin-node - when: "'fastd' in group_names" - name: copy dhcp-pool plugin copy: @@ -88,7 +79,6 @@ dest: /usr/lib/munin/plugins/dhcp-pool mode: 0755 notify: restart munin-node - when: "'fastd' in group_names" - name: enable munin plugins for dhcp file: @@ -96,7 +86,6 @@ src: /usr/lib/munin/plugins/dhcp-pool state: link notify: restart munin-node - when: "'fastd' in group_names" - name: copy fw_conntrack plugin copy: @@ -128,21 +117,21 @@ name: perl-lwp-protocol-https state: present -- name: enable munin plugins for network monitoring (1/9) +- name: enable munin plugins for network monitoring (1/6) file: path: /etc/munin/plugins/if_{{ ansible_default_ipv4.interface }} src: /usr/lib/munin/plugins/if_ state: link notify: restart munin-node -- name: enable munin plugins for network monitoring (2/9) +- name: enable munin plugins for network monitoring (2/6) file: path: /etc/munin/plugins/if_{{ ansible_default_ipv6.interface }} src: /usr/lib/munin/plugins/if_ state: link notify: restart munin-node -- name: enable munin plugins for network monitoring (3/9) +- name: enable munin plugins for network monitoring (3/6) file: path: /etc/munin/plugins/if_{{ item[0] }}{{ item[1].name }} src: /usr/lib/munin/plugins/if_ @@ -151,60 +140,30 @@ with_nested: - [ 'bat', 'vpn', 'wg', 'vx' ] - "{{ sites }}" - when: "'fastd' in group_names" -- name: enable munin plugins for network monitoring (4/9) - file: - path: /etc/munin/plugins/if_bb{{ hostvars[item]['wireguard_bb_name'] }} - src: /usr/lib/munin/plugins/if_ - state: link - notify: restart munin-node - with_items: "{{ groups['uplink'] }}" - when: "'fastd' in group_names" - -- name: enable munin plugins for network monitoring (5/9) - file: - path: /etc/munin/plugins/if_bb{{ hostvars[item]['wireguard_bb_name'] }} - src: /usr/lib/munin/plugins/if_ - state: link - notify: restart munin-node - with_items: "{{ groups['fastd'] }}" - when: "'uplink' in group_names" - -- name: enable munin plugins for network monitoring (6/9) +- name: enable munin plugins for network monitoring (4/6) file: path: /etc/munin/plugins/if_bb{{ item.name }} src: /usr/lib/munin/plugins/if_ state: link notify: restart munin-node with_items: "{{ wireguard_bb_peers|default([]) }}" - when: "'uplink' in group_names" -- name: enable munin plugins for network monitoring (7/9) +- name: enable munin plugins for network monitoring (5/6) file: path: /etc/munin/plugins/if_bb{{ hostvars[item]['wireguard_bb_name'] }} src: /usr/lib/munin/plugins/if_ state: link notify: restart munin-node - with_items: "{{ groups['uplink'] | difference([inventory_hostname]) }}" - when: "'uplink' in group_names" + with_items: "{{ groups['fastd'] | difference([inventory_hostname]) }}" -- name: enable munin plugins for network monitoring (8/9) +- name: enable munin plugins for network monitoring (6/6) file: path: /etc/munin/plugins/if_{{ item.name }} src: /usr/lib/munin/plugins/if_ state: link notify: restart munin-node with_items: "{{ ffrl_peers }}" - when: "'ffrl_uplink' in group_names" - -- name: enable munin plugins for network monitoring (9/9) - file: - path: /etc/munin/plugins/if_mullvad - src: /usr/lib/munin/plugins/if_ - state: link - notify: restart munin-node - when: "'mullvad_uplink' in group_names" - name: enable munin plugins file: |