How to get the docker containers information with Ruby and monitor it -
i want containers' stats. eg: cpu, memory
i know command docker stats <container name>, when type command, blocking in foreground(like typed top command)
but want information ruby.
then decide action information, such restart container or else.
thanks ~

you should access docker remote api not docker cli
so if want container stats, can through get /containers/(id)/stats api , parse response ruby.
also, found ruby repo might helpful.
Comments
Post a Comment