gonitor-websocket

command module
v0.0.0-...-2712606 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2018 License: MIT Imports: 6 Imported by: 0

README

Gonitor with WebSocket in Go

Build Status codecov Go Report Card GoDoc License

Gonitor is fast server monitor service that make monitoring servers easy and simple. Gonitor provides many cool features for monitoring server CPU, Memory, GPU, Disk, Load, Network, etc. If you like or use Gonitor, please star or share it !

Features

  • Provides server CPU, Memory, GPU, Disk, Load, Network, Host and Runtime information
  • Supports REST API and Swagger UI
  • Supports real-time monitoring with Stream or WebSocket
  • Supports mutiple-platform build (darwin, windows and linux)
  • Supports Docker build and Travis CI

Installation

Get the gonitor repository

go get github.com/gonitor/gonitor-websocket

cd echo $GOPATH/src/github.com/gonitor/gonitor-websocket

And install dependencies

go get -u github.com/golang/dep/cmd/dep

dep ensure

Running the tests

Run all tests

go test ./...

Or run all tests with coverage

bash coverage.sh

Build and Run

Run main.go

go run main.go
# serve at localhost:9000
# serve WebSocket API at localhost:9000/websocket/v1

Build and run native binary

bash Build.sh

./gonitorWebsocket

Build native binary for multiple platforms (darwin, windows and linux)

bash BuildMulti.sh

Environment variables

    # enable production mode, default is false
    env GONI_PRODMODE=true
    
    # disable REST API, default is true
    env GONI_REST=false

    # disable Stream API, default is true
    env GONI_STREAM=false

    # combine three environment variables
    env GONI_PRODMODE=true GONI_REST=false GONI_STREAM=false

    # enable compression, default is true
    env GONI_COMPRESS=false

    # set read buffer size, default equals to 1024
    env GONI_RBSIZE=2048

    # set write buffer size, default equals to 1024
    env GONI_WBSIZE=2048

Docker support

Build docker image

bash Dockerbuild.sh

Run docker container

docker run -d --name gonitor-websocket -p 9000:9000 gonitor/gonitor-websocket

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE file for details

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
service
cpu
gpu

Jump to

Keyboard shortcuts

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