feat: add CPU/RAM graph per process

This commit is contained in:
VC
2024-07-05 11:53:37 +02:00
parent 42c243da7c
commit 4a831cf7b3
2 changed files with 34 additions and 15 deletions

View File

@@ -0,0 +1,29 @@
---
# Useless junks for LXC
- name: Delete junks for LXC containers
ansible.builtin.file:
path: "/etc/munin/plugins/{{ item }}"
state: absent
notify:
- Restart munin-node
loop:
- acpi
- cpuspeed
- diskstats
- entropy
- irqstats
# Per process CPU/RAM
- name: Add per process CPU/RAM metrics
ansible.builtin.copy:
src: "files/{{ item }}"
dest: "/etc/munin/plugins/{{ item }}"
mode: "0755"
owner: root
group: root
notify:
- Restart munin-node
loop:
- cpu_by_process
- memory_by_process

View File

@@ -100,7 +100,7 @@
- Restart munin-node - Restart munin-node
when: munin_need_reconfigure when: munin_need_reconfigure
## Useless junks for everyone # Useless junks for everyone
- name: Delete useless junks for everyone - name: Delete useless junks for everyone
ansible.builtin.file: ansible.builtin.file:
path: "/etc/munin/plugins/{{ item }}" path: "/etc/munin/plugins/{{ item }}"
@@ -109,22 +109,12 @@
loop: loop:
- users - users
## Useless junks for LXC # Specific LXC commands
- name: Delete junks for LXC containers - name: Execute specific LXC commands
ansible.builtin.file: ansible.builtin.include_tasks: lxc.yml
path: "/etc/munin/plugins/{{ item }}"
state: absent
notify:
- Restart munin-node
when: ansible_facts['virtualization_type'] == "lxc" when: ansible_facts['virtualization_type'] == "lxc"
loop:
- acpi
- cpuspeed
- diskstats
- entropy
- irqstats
## Useless junks for hypervisors # Useless junks for hypervisors
- name: Execute delete states for hypervisors - name: Execute delete states for hypervisors
ansible.builtin.include_tasks: hypervisors.yml ansible.builtin.include_tasks: hypervisors.yml
when: "'hypervisors' in group_names" when: "'hypervisors' in group_names"