Antonio Mika
·
04 Aug 22
start-monitor.sh
1#!/bin/bash
2
3docker run -d --name node_exporter \
4 --net host \
5 --pid host \
6 --restart always \
7 -v /:/host:ro,rslave \
8 quay.io/prometheus/node-exporter --path.rootfs=/host
9
10docker run -d --name cadvisor \
11 --restart always \
12 -v /:/rootfs:ro \
13 -v /var/run:/var/run:ro \
14 -v /sys:/sys:ro \
15 -v /var/lib/docker/:/var/lib/docker:ro \
16 -v /dev/disk/:/dev/disk:ro \
17 --device /dev/kmsg:/dev/kmsg \
18 --privileged \
19 -p 9080:8080 \
20 gcr.io/cadvisor/cadvisor:v0.44.1-test