I'm trying to deploy a exporter container image which including node_exporter/mysqld_exporter/redis_exporter, cadvisor and so on. the base image is rockylinux 9.1. if this setup is work, I can upload the images to any nodes which I need monitor.
All this exporter I use "yum install xxx -y " to install it.
Now, all the other exporter is working as expected but cadvisor not. I think it's due to there is no docker pid and other neccessary docker info for cadvisor to collect. from the doc the following directory was needed by cadvisor.
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:ro \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/dev/disk/:/dev/disk:ro \
but as you know, the /var/run,/sys/ and /dev/disk three directories are already there in container base image. so can not mapping them from host. I can only mapping / and /var/lib/docker.
my question is: does cadvisor has a "--path.rootfs" option like node_exporter, node_exporter can running as "/usr/bin/node_exporter --path.rootfs=/rootfs" , it means ask the exporter to find everying in /rootfs. if cadvisor can do this. I think every information it need can find there.
or in this scenario. how can I make cadvisor work as expected.
many thanks.
I'm trying to deploy a exporter container image which including node_exporter/mysqld_exporter/redis_exporter, cadvisor and so on. the base image is rockylinux 9.1. if this setup is work, I can upload the images to any nodes which I need monitor.
All this exporter I use "yum install xxx -y " to install it.
Now, all the other exporter is working as expected but cadvisor not. I think it's due to there is no docker pid and other neccessary docker info for cadvisor to collect. from the doc the following directory was needed by cadvisor. --volume=/:/rootfs:ro \ --volume=/var/run:/var/run:ro \ --volume=/sys:/sys:ro \ --volume=/var/lib/docker/:/var/lib/docker:ro \ --volume=/dev/disk/:/dev/disk:ro \ but as you know, the /var/run,/sys/ and /dev/disk three directories are already there in container base image. so can not mapping them from host. I can only mapping / and /var/lib/docker.
my question is: does cadvisor has a "--path.rootfs" option like node_exporter, node_exporter can running as "/usr/bin/node_exporter --path.rootfs=/rootfs" , it means ask the exporter to find everying in /rootfs. if cadvisor can do this. I think every information it need can find there.
or in this scenario. how can I make cadvisor work as expected. many thanks.