neko-rooms icon indicating copy to clipboard operation
neko-rooms copied to clipboard

[Improvement] Return container stats with the stats response

Open gbrian opened this issue 2 years ago • 3 comments

Hi, planning to return container stats with the "stats" request. What about using https://github.com/KyleBanks/dockerstats ? Do you know better way? Thanks

gbrian avatar Feb 18 '23 07:02 gbrian

Or maybe I should add to neko https://github.com/m1k1o/neko/blob/373dcb4f329177cae36576306a5e77508dc0eaae/server/internal/websocket/websocket.go#L337

gbrian avatar Feb 18 '23 07:02 gbrian

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.

m1k1o avatar Feb 18 '23 09:02 m1k1o

Basically just parsing docker stats --no-stream --format json <container> respone.

m1k1o avatar Nov 04 '23 14:11 m1k1o