TOWERBY CETMIX
← Hangar / jet_template_cadvisor

cAdvisor for Docker Container Metrics

Deploy cAdvisor as a Cetmix Tower Jet to expose Docker container metrics for Prometheus.

↓ Download↓ 0 downloads

Summary

Category
Jet Templates
Tags
Monitoring
Authors
Cetmix OÜ
License
AGPL-3
Version
1.0.0
Call sign
jet_template_cadvisor

This snippet imports a cAdvisor Jet Template that runs ghcr.io/google/cadvisor:v0.60.5 as a privileged Docker container. It uses read-only host mounts and access to /dev/kmsg to collect container metrics such as CPU, memory, filesystem and network usage. The template allows one Jet per server and maps cadvisor_port (typically 9101) to container port 8080 without Traefik.

Deploy and scrape

  1. Import the YAML, install the cAdvisor template on the monitored host, set cadvisor_port and create a Jet targeting Running. The snippet includes the Docker, Fail2ban and Tower Core dependency templates. Tower Core checks SSH, records the host key and updates host packages. Docker sets up the shared Tower network.
  2. Allow the Prometheus server to reach the configured TCP port. Restrict access to the monitoring server and check the effective filtering of Docker-published ports.
  3. Run Refresh targets on the Prometheus Jet. Check the cadvisor job on Prometheus's Targets page and select the Tower server name as the instance in Grafana.

Operate

Use Restart to restart the current container or Rebuild to apply changes to the image or port. Stop and Remove take the container out of service. Destroy cleans up the Jet's deployment resources. Run Refresh targets after removing a monitored Jet. If a target is down, check the container and the network path from Prometheus to the host's /metrics endpoint.