This is a simple server that uses libpod from podman to scrape data from podman-stats(1) and exports them via HTTP for Prometheus consumption.
Note: This exporter makes all podman requests through the podman unix socket which requires that the podman systemd service is started to create that socket:
systemctl enable --now podman.socket
To run it:
./podman_exporter [flags]
Help on flags:
./podman_exporter --help
sudo podman run \
--detach \
--volume /var/run/podman/podman.sock:/var/run/podman/podman.sock:ro \
--privileged \
--publish 9101:9101 \
--name podman-exporter \
omnibrian/podman-exporter
make build
make test
The Podman Exporter supports TLS and basic authentication through prometheus/exporter-toolkit.
To use TLS and/or basic authentication, you need to pass a configuration file using the --web.config.file
parameter. The format of the file is described in the exporter-toolkit repository.
Apache License 2.0, see LICENSE.