Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus.exporter.cadvisor: Add Podman Support #2499

Open
dmennecke1 opened this issue Jan 23, 2025 · 0 comments
Open

prometheus.exporter.cadvisor: Add Podman Support #2499

dmennecke1 opened this issue Jan 23, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@dmennecke1
Copy link

dmennecke1 commented Jan 23, 2025

Request

Currently, there appears to be no official support for Podman within the prometheus.exporter.cadvisor component. While a docker_host flag is available, there is no equivalent podman_host option. However, it is possible to retrieve Podman container metrics directly using cAdvisor.

podman run \
  --name=cadvisor \
  -v /:/rootfs:ro \
  -v /etc/machine-id:/etc/machine-id:ro \
  -v /var/run:/var/run:ro \
  -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
  -v /dev/disk/:/dev/disk:ro \
  -v /var/lib/containers:/var/lib/containers:ro \
  -v /var/lib/dbus/machine-id:/var/lib/dbus/machine-id:ro \
  --privileged=true \
  --device=/dev/kmsg \
  -d \
  gcr.io/cadvisor/cadvisor:v0.50.0 \
  --podman=unix:///var/run/user/1001/podman/podman.sock \
  -docker_only \
  --store_container_labels=true

Use case

Currently, I need both cAdvisor (metrics) and Alloy (to process and push my file-based container logs). However, since Alloy includes a cAdvisor component, I would prefer to use Alloy alone.

@dmennecke1 dmennecke1 added the enhancement New feature or request label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant