安装步骤:
Prometheus Server(普罗米修斯监控主服务器 )
Node Exporter (收集Host硬件和操作系统信息)
cAdvisor (负责收集Host上运行的容器信息)
Grafana (展示普罗米修斯监控界面)

安装

docker run -d -p 9100:9100 \
-v "/proc:/host/proc" \
-v "/sys:/host/sys" \
-v "/:/rootfs" \
-v "/etc/localtime:/etc/localtime" \
prom/node-exporter \
--path.procfs /host/proc \
--path.sysfs /host/sys \
--collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)"

查看运行状态

docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ea6db78c4cfd prom/node-exporter "/bin/node_exporter …" 12 seconds ago Up 9 seconds 0.0.0.0:9100->9100/tcp gracious_babbage
06912e5628c9 synology/docviewer:1.3.0.0125 "sh -c 'while true; …" 7 months ago Up 8 days synology_docviewer_2
76bfdfdefc04 synology/docviewer:1.3.0.0125 "sh -c 'while true; …" 7 months ago Up 8 days synology_docviewer_1

访问查看统计信息

192.168.0.8:9100/metrics

增加到Prometheus配置文件中