Update 3 files
- /roles/cadvisor/tasks/main.yml - /roles/cadvisor/templates/docker-compose.yml.j2 - /group_vars/all.yml
This commit is contained in:
parent
4b42b4ef5f
commit
92aad7f090
@ -95,7 +95,7 @@ pve_exporter_token_value: "ae683c34-c539-4b08-b539-6c9b7e570411"
|
|||||||
cadvisor_enabled: true
|
cadvisor_enabled: true
|
||||||
cadvisor_base_dir: "/opt/cadvisor"
|
cadvisor_base_dir: "/opt/cadvisor"
|
||||||
cadvisor_config_dir: "{{ cadvisor_base_dir }}/config"
|
cadvisor_config_dir: "{{ cadvisor_base_dir }}/config"
|
||||||
cadvisor_internal_port: 8080
|
cadvisor_port: 8080
|
||||||
|
|
||||||
# VictoriaMetrics & Grafana
|
# VictoriaMetrics & Grafana
|
||||||
victoriametrics_retention_months: 2
|
victoriametrics_retention_months: 2
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose_v2:
|
||||||
project_src: "{{ cadvisor_base_dir | default('/opt/cadvisor') }}"
|
project_src: "{{ cadvisor_base_dir | default('/opt/cadvisor') }}"
|
||||||
state: present
|
state: present
|
||||||
recreate: yes # ЗАМЕНИЛ restarted на recreate
|
recreate: always # ИСПРАВЛЕНО: always вместо yes
|
||||||
become: yes
|
become: yes
|
||||||
register: cadvisor_start
|
register: cadvisor_start
|
||||||
|
|
||||||
@ -65,7 +65,7 @@
|
|||||||
become: no
|
become: no
|
||||||
|
|
||||||
- name: Check cAdvisor container status
|
- name: Check cAdvisor container status
|
||||||
shell: docker ps -f name=cadvisor --format "table {{.Names}}\\t{{.Status}}"
|
shell: docker ps -f name=cadvisor --format "table {{.Names}}\t{{.Status}}"
|
||||||
register: container_info
|
register: container_info
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ services:
|
|||||||
- /dev/disk/:/dev/disk:ro
|
- /dev/disk/:/dev/disk:ro
|
||||||
- /cgroup:/cgroup:ro
|
- /cgroup:/cgroup:ro
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "{{ cadvisor_port }}:8080"
|
||||||
command:
|
command:
|
||||||
- --housekeeping_interval=30s
|
- --housekeeping_interval=30s
|
||||||
- --docker_only=true
|
- --docker_only=true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user