neko-rooms
neko-rooms copied to clipboard
[Improvement] Return container stats with the stats response
Hi, planning to return container stats with the "stats" request. What about using https://github.com/KyleBanks/dockerstats ? Do you know better way? Thanks
Or maybe I should add to neko https://github.com/m1k1o/neko/blob/373dcb4f329177cae36576306a5e77508dc0eaae/server/internal/websocket/websocket.go#L337
Neko itself is not aware aobut the container that is living in. So i would prefer to keep it separate, and have stats about neko itself in neko and status about the container from neko-roooms, since neko rooms has access to the docker socket and can get easily stats from it.
dockerstats looks interesting, but seems like is not maintained. They also call docker CLI and parse data from it. We can get all those information directly from docker socket in a much nicer way.
Basically just parsing docker stats --no-stream --format json <container>
respone.