gostats is a real-time Linux monitoring tool
It can be used to monitor
- cpu
- memory
- networks
- disks
- process
and very soon, Docker containers.
The tool is based on famous gopsutil front shirou.
It is available on Github.
gostats developped in Go. In order to compile it after cloning the repository, just run
$ go get
$ CGO_ENABLED=0 go build -a -installsuffix cgo
gostats is available in a Docker image. To build the image:
$ docker build . -t cyd01/gostats -f Dockerfile
Simply run the process:
$ PORT=80 ./startup.sh
Start gostats...
2020/06/22 19:09:14 Starting webserver on port 80 to directory /home/public/wwwroot
The easy is the the Docker way:
$ docker run --rm -t --privileged -p 80:80 \
-e PORT=80 \
-v /proc:/data/proc:ro \
-v /sys:/data/sys:ro \
-v /etc:/data/etc:ro \
-v /var:/data/var:ro \
-v /run:/data/run:ro \
-v /dev:/data/dev:ro \
cyd01/gostats
Much more easy, a compose file:
$ docker-compose up -d
Creating gostats_gostats_1 ... done
Add GOSTATS_BASE
environment variable to run gostats
behind a reverse proxy.
$ docker run --rm -t --privileged -p 80:80 \
-e GOSTATS_BASE=/gostats \
-e PORT=80 \
-v /proc:/data/proc:ro \
-v /sys:/data/sys:ro \
-v /etc:/data/etc:ro \
-v /var:/data/var:ro \
-v /run:/data/run:ro \
-v /dev:/data/dev:ro \
cyd01/gostats
Here is an online demonstration website.