scalingo / acadock-monitoring Goto Github PK
View Code? Open in Web Editor NEWThis project forked from soulou/acadock-monitoring
Monitor docker containers to get real time CPU/Memory
License: MIT License
This project forked from soulou/acadock-monitoring
Monitor docker containers to get real time CPU/Memory
License: MIT License
github.com/facebookarchive/grace is deprecated. It should be replaced. From what I remember, this is the same as github.com/cloudflare/tableflip used in git-repository-core, but this is yet to be confirmed.
Latest Docker image available is 0.4.0 whereas the latest version is 0.5.1. This image version is used in the docker-compose.yml
from appsdeck-node
With Docker Compose 1.29.2, running this service leads to the error:
docker.errors.InvalidArgument: "host" network_mode is incompatible with port_bindings
This is not the case with Docker Compose 1.25.0.
Do not send first data and use it only to compute next values
When using cgroupv2 on our workstation, metrics are not fetched correctly. We should fix that to have the compatibility with cgroupv1 and cgroupv2
https://docs.docker.com/config/containers/runmetrics/#find-the-cgroup-for-a-given-container
Discussion about that issue: https://scalingo.slack.com/archives/C01L24C2Y2W/p1681916119303509
Add an endpoint to fetch those informations about the node:
Hi people, nice work here! I have been playing with your API, but i'm unable to obtain data for my containers CPU usage. Memory and network usage returns correct data, but cpu is just always at 0 (while docker stats and cAdvisor show the real usage correctly).
My set up:
docker run -v /sys/fs/cgroup:/host/cgroup:ro -e CGROUP_DIR=/host/cgroup \
-v /proc:/host/proc:ro -e PROC_DIR=/host/proc \
-v /var/run/docker.sock:/host/docker.sock -e DOCKER_URL=unix:///host/docker.sock \
-p 4244:4244 --privileged --pid=host \
--name acadock -d scalingo/acadock-monitoring
$ docker --version
Docker version 1.5.0, build a8a31ef
An example of the issue:
$ docker ps | grep redis
396e7635c892 redis:3 "/entrypoint.sh redi 28 hours ago Up 28 hours 0.0.0.0:6379->6379/tcp redis
$ docker stats 396e7635c892
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O
396e7635c892 0.14% 3.301 MiB/3.756 GiB 0.09% 31.46 MiB/26.62 MiB
$ curl -L http://localhost:4244/containers/396e7635c892/mem
3465216
$ curl -L http://localhost:4244/containers/396e7635c892/net
{"Interface":"eth0","Received":{"Bytes":33051932,"Packets":163174,"Drop":0,"Errs":0,"Fifo":0,"Frame":0,"Compressed":0,"Multicast":0},"Transmit":{"Bytes":27964385,"Packets":169496,"Drop":0,"Errs":0,"Fifo":0,"Frame":0,"Compressed":0,"Multicast":0},"RxBps":706,"TxBps":669}
$ curl -L http://localhost:4244/containers/396e7635c892/cpu
0
And the result is always the same, 0. Even with other containers. Any hint?
ERRO[13610006] Fail to get CPU usage of '69257e307bdcd9c077fa17d7beed38049df82ca4406fa53a2b5d6fc02edeba37' error="fail to expand ID '': fail to expand id from cgroup source docker: id not found"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.