gostat

command module
v0.0.0-...-3e02db8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 22 Imported by: 0

README

gostat

Informations

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.

Building...

gostats binary

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
Docker image

gostats is available in a Docker image. To build the image:

$ docker build . -t cyd01/gostats -f Dockerfile

Running...

The "old" way

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 way

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
The easiest

Much more easy, a compose file:

$ docker-compose up -d
Creating gostats_gostats_1 ... done
Behind a reverse proxy

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
Demonstration

Here is an online demonstration website.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL