Skip to content

Cub0n/Grafana-Prometheus-cAdvisor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Grafana and Prometheus with cAdvisor on Docker ARM (armv7 / RaspberryPi)

Forewords

Google does provide ARM Images for RaspberryPi now and since v0.49.1 it has also Podman support in it.

Configuration

Please check the published ports or docker container names if something was changed. The network has to be the same for all containers!

Prometheus

Prometheus scrapping file should be defined beforehand:

-v /path/to/file/prometheus.yml:/etc/prometheus/prometheus.yml:ro

For making prometheus data persistent, add:

-v /path/to/prometheus:/prometheus:Z

Grafana

For making grafana data persistent, add:

-v /path/to/grafana:/var/lib/grafana:Z

Installation

Run docker stack deploy --compose-file docker-compose.yml prometheus or podman-compose -f docker-compose.yml (podman-compose has to be installed beforehand https://github.com/containers/podman-compose or https://linuxhandbook.com/podman-compose/)

All containers show up and a new (dedicated) network was build (e.g. prometheus_default). Make sure that Docker has some IP Ranges left, otherwise there will be an error concerning overlapping networks.

(Rootless) Podman

Podman is also supported and should be configured like:

podman run -d --name cadvisor \
        --volume=/:/rootfs:ro \
        --volume=/var/run/podman:/var/run/podman:ro \
        --volume=/sys:/sys:ro \
        --volume=/dev/disk:/dev/disk:ro \
        --device=/dev/kmesg \
        --privileged \
        --restart=always \
        --network=host \
        gcr.io/cadvisor/cadvisor-arm:v0.49.1 --podman="unix:///var/run/podman/podman.sock" --housekeeping_interval=10s --docker_only=true

The rootless podman configuration differs only in the location of podman.sock

...
 --volume=/run/user/$(id -u)/podman:/var/run/podman:ro # _podman.sock_ runs under a specific user

Finish and Run

Documentation

Pitfalls

Releases

No releases published

Packages

No packages published