2023-09-26 16:09:27 +00:00
|
|
|
# 2023-09-26
|
2023-09-25 08:40:20 +00:00
|
|
|
# Stack: monitoring_vm
|
|
|
|
---
|
|
|
|
|
|
|
|
monitoring_vm:
|
|
|
|
name: "monitoring-vm"
|
|
|
|
stack: "monitoring"
|
|
|
|
ipv6: true
|
|
|
|
|
|
|
|
directories: []
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
2023-09-26 09:29:37 +00:00
|
|
|
- name: "exporter-cadvisor"
|
2023-09-25 08:40:20 +00:00
|
|
|
image: "gcr.io/cadvisor/cadvisor:v0.47.2"
|
|
|
|
uid: "0"
|
|
|
|
gid: "0"
|
|
|
|
privileged: true
|
|
|
|
capabilities:
|
|
|
|
- SYS_PTRACE
|
|
|
|
restart: "always"
|
|
|
|
ports:
|
|
|
|
- { exposed: "${VM_PORT_EXPORTER_CADVISOR}", container: "8080" }
|
|
|
|
commands:
|
|
|
|
- "--storage_duration=1m0s"
|
|
|
|
- "--event_storage_age_limit=default=0"
|
|
|
|
- "--event_storage_event_limit=default=0"
|
|
|
|
healthcheck: 'wget --no-verbose --tries=1 --spider http://0.0.0.0:8080/ || exit 1'
|
|
|
|
ressources:
|
2023-09-26 16:09:27 +00:00
|
|
|
cpu: "{{ vm_os_cpu_half }}"
|
|
|
|
memory: "{{ 2.0 if 2.0 <= vm_os_memory_max|float else vm_os_memory_max|float }}G"
|
2023-09-25 08:40:20 +00:00
|
|
|
volumes:
|
|
|
|
- { local: '/', container: '/rootfs', mode: 'ro' }
|
|
|
|
- { local: '/etc/machine-id', container: '/etc/machine-id', mode: 'ro' }
|
|
|
|
- { local: '/sys', container: '/sys', mode: 'ro' }
|
|
|
|
- { local: '/dev/disk/', container: '/dev/disk/', mode: 'ro' }
|
|
|
|
- { local: '/var/lib/docker/', container: '/var/lib/docker/', mode: 'ro' }
|
|
|
|
- { local: '/var/lib/dbus/machine-id', container: '/var/lib/dbus/machine-id', mode: 'ro' }
|
|
|
|
- { local: '/var/run', container: '/var/run', mode: 'ro' }
|
|
|
|
|
2023-09-26 16:09:27 +00:00
|
|
|
- name: "exporter-node"
|
2023-09-25 08:40:20 +00:00
|
|
|
image: "prom/node-exporter:latest"
|
|
|
|
uid: "0"
|
|
|
|
gid: "0"
|
|
|
|
privileged: true
|
|
|
|
capabilities:
|
|
|
|
- SYS_ADMIN
|
|
|
|
restart: "always"
|
|
|
|
ports:
|
|
|
|
- { exposed: "${VM_PORT_EXPORTER_NODE}", container: "9100" }
|
|
|
|
commands:
|
|
|
|
- "--collector.arp"
|
|
|
|
- "--collector.bcache"
|
|
|
|
- "--collector.bonding"
|
|
|
|
- "--collector.btrfs"
|
|
|
|
- "--collector.conntrack"
|
|
|
|
- "--collector.cpu"
|
|
|
|
- "--collector.cpufreq"
|
|
|
|
- "--collector.diskstats"
|
|
|
|
- "--collector.dmi"
|
|
|
|
- "--collector.edac"
|
|
|
|
- "--collector.entropy"
|
|
|
|
- "--collector.fibrechannel"
|
|
|
|
- "--collector.filefd"
|
|
|
|
- "--collector.filesystem"
|
|
|
|
- "--collector.hwmon"
|
|
|
|
- "--collector.infiniband"
|
|
|
|
- "--collector.ipvs"
|
|
|
|
- "--collector.loadavg"
|
|
|
|
- "--collector.mdadm"
|
|
|
|
- "--collector.meminfo"
|
|
|
|
- "--collector.netclass"
|
|
|
|
- "--collector.netdev"
|
|
|
|
- "--collector.netstat"
|
|
|
|
- "--collector.nfs"
|
|
|
|
- "--collector.nfsd"
|
|
|
|
- "--collector.nvme"
|
|
|
|
- "--collector.os"
|
|
|
|
- "--collector.powersupplyclass"
|
|
|
|
- "--collector.pressure"
|
|
|
|
- "--collector.rapl"
|
|
|
|
- "--collector.schedstat"
|
|
|
|
- "--collector.selinux"
|
|
|
|
- "--collector.sockstat"
|
|
|
|
- "--collector.softnet"
|
|
|
|
- "--collector.stat"
|
|
|
|
- "--collector.tapestats"
|
|
|
|
- "--collector.textfile"
|
|
|
|
- "--collector.thermal_zone"
|
|
|
|
- "--collector.time"
|
|
|
|
- "--collector.timex"
|
|
|
|
- "--collector.udp_queues"
|
|
|
|
- "--collector.uname"
|
|
|
|
- "--collector.vmstat"
|
|
|
|
- "--collector.xfs"
|
|
|
|
- "--collector.zfs"
|
|
|
|
- "--collector.buddyinfo"
|
|
|
|
- "--collector.cgroups"
|
|
|
|
- "--collector.drbd"
|
|
|
|
- "--collector.ethtool"
|
|
|
|
- "--collector.interrupts"
|
|
|
|
- "--collector.ksmd"
|
|
|
|
- "--collector.lnstat"
|
|
|
|
- "--collector.logind"
|
|
|
|
- "--collector.meminfo_numa"
|
|
|
|
- "--collector.mountstats"
|
|
|
|
- "--collector.network_route"
|
|
|
|
- "--collector.perf"
|
|
|
|
- "--collector.processes"
|
|
|
|
- "--collector.qdisc"
|
|
|
|
- "--collector.sysctl"
|
|
|
|
- "--collector.systemd"
|
|
|
|
- "--collector.tcpstat"
|
|
|
|
- "--collector.wifi"
|
|
|
|
- "--collector.zoneinfo"
|
|
|
|
- "--path.rootfs=/host"
|
|
|
|
- "--path.procfs=/host/proc"
|
|
|
|
- "--path.sysfs=/host/sys"
|
|
|
|
- "--collector.filesystem.mount-points-exclude='^(/rootfs|/host|)/(sys|proc|dev|host|etc)($$|/)'"
|
|
|
|
- "--collector.filesystem.fs-types-exclude='^(sys|proc|auto|cgroup|devpts|ns|au|fuse\\\\.lxc|mqueue)(fs|)$$'"
|
|
|
|
- "--collector.netdev.device-exclude='^(lo|veth.*)$'"
|
|
|
|
- "--collector.ethtool.device-include='^(eth*|ens*)$'"
|
|
|
|
healthcheck: 'wget --no-verbose --tries=1 --spider http://0.0.0.0:9100/ || exit 1'
|
|
|
|
ressources:
|
2023-09-26 16:09:27 +00:00
|
|
|
cpu: "{{ vm_os_cpu_half }}"
|
|
|
|
memory: "{{ 2.0 if 2.0 <= vm_os_memory_max|float else vm_os_memory_max|float }}G"
|
2023-09-25 08:40:20 +00:00
|
|
|
volumes:
|
|
|
|
- { local: '/', container: '/rootfs', mode: 'ro' }
|
|
|
|
- { local: '/sys', container: '/host/sys', mode: 'ro' }
|
|
|
|
- { local: '/proc', container: '/host/proc', mode: 'ro' }
|
|
|
|
- { local: '/run/udev/data', container: '/run/udev/data', mode: 'ro' }
|
|
|
|
- { local: '/var/run/dbus/system_bus_socket', container: '/var/run/dbus/system_bus_socket', mode: 'ro' }
|
|
|
|
- { local: '/etc/service', container: '/etc/service', mode: 'ro' }
|