prometheus-podman-exporter is using go v1.17 or above.
-
Clone the repo
-
Install dependencies
$ sudo dnf -y install btrfs-progs-devel device-mapper-devel gpgme-devel libassuan-devel
-
Build and run the executable
$ make binary $ ./bin/prometheus-podman-exporter
-
Using unix socket (rootless):
$ systemctl start --user podman.socket $ podman run -e CONTAINER_HOST=unix:///run/podman/podman.sock -v $XDG_RUNTIME_DIR/podman/podman.sock:/run/podman/podman.sock -p 9882:9882 --userns=keep-id:uid=65534 --security-opt label=disable quay.io/navidys/prometheus-podman-exporter
-
Using unix socket (root):
# systemctl start podman.socket # podman run -e CONTAINER_HOST=unix:///run/podman/podman.sock -v /run/podman/podman.sock:/run/podman/podman.sock -u root -p 9882:9882 --security-opt label=disable quay.io/navidys/prometheus-podman-exporter
-
Using TCP:
$ podman system service --time=0 tcp://<ip>:<port> $ podman run -e CONTAINER_HOST=tcp://<ip>:<port> --network=host -p 9882:9882 quay.io/navidys/prometheus-podman-exporter:latest
Enable EPEL repository (Rocky Linux >= 9 and AlmaLinux >= 9) and then run:
$ sudo dnf -y install prometheus-podman-exporter
$ yay -S prometheus-podman-exporter
Enable EPEL repository (CentOS >= 9) and then run:
$ sudo dnf -y install prometheus-podman-exporter
$ sudo dnf -y install prometheus-podman-exporter
Enable EPEL repository (RHEL >= 9) and then run:
$ sudo dnf -y install prometheus-podman-exporter
$ sudo emerge app-metrics/prometheus-podman-exporter