nagios-plugins-linux icon indicating copy to clipboard operation
nagios-plugins-linux copied to clipboard

[Feature Request] Podman 3.0+ API support

Open madrisan opened this issue 3 years ago • 1 comments

🚀 Feature Request

Is your feature request related to a problem? Please describe.

Switch to the new Podman 3.0 API (varlink support has been deprecated in Podman 2 and removed in version 3): http://docs.podman.io/en/latest/_static/api.html#tag/containers

madrisan avatar Apr 16 '21 21:04 madrisan

How to test

Create the podman.socket

systemctl --user start podman.socket
systemctl --user enable podman.socket

Create a container for test

podman run --rm -it docker.io/nginx:1.21.5-alpine

Test API

curl --unix-socket /run/user/1000/podman/podman.sock http://d/v3.0.0/libpod/info | jq
curl --unix-socket /run/user/1000/podman/podman.sock -v 'http://d/v3.0.0/libpod/images/json' | jq
curl --unix-socket /run/user/1000/podman/podman.sock http://v1.18/containers/ecstatic_agnesi/stats
curl --unix-socket /run/docker.sock http://v1.18/containers/docker-compose-traefik-1/stats

Podman API Reference: https://docs.podman.io/en/latest/Reference.html

madrisan avatar Apr 16 '21 21:04 madrisan