8000 GitHub - ostrost/ostent at v0.1.9
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ostrost/ostent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status Sourcegraph GoDoc

ostent displays current system metrics. Demo here

Screenshot

Install & run with curl -sSL https://github.com/ostrost/ostent/raw/master/ostent.sh | sh

It's a single executable without dependecies. Once installed, it will self-upgrade whenever there's new release.

Platforms

Binaries distributed by GitHub Releases

Usage

ostent accepts optional -bind argument to set specific IP and/or port to bind to, otherwise any machine IP and port 8050 by default.

  • ostent -bind 127.1 # http://127.0.0.1:8050/
  • ostent -bind 192.168.1.10:8051 # port 8051
  • ostent -bind 8052 # any IP, port 8052

-update sets collection interval (1 second by default), append s for seconds, m for minutes: 5s, 1m etc.

Run it, it'll give the link(s) to open in a browser.

Running the code

  1. git clone https://github.com/ostrost/ostent.git

    If you've cloned (or forked) the repo while it was github.com/rzab/ostent please check the output of git remote -v. For any remote names (e.g. origin or upstream) pointing to the old location set it to the new: git remote set-url origin https://github.com/ostrost/ostent.git for the origin etc.

  2. cd ostent

  3. export GOPATH=${GOPATH:-$PWD}:$PWD PATH=$PATH:$PWD/bin

    Adds ./ to GOPATH and ./bin to PATH.

  4. make bootstrap

    • installs required Go packages
    • generates src/share/{assets,templates}/bindata.devel.go These files will contain absolute local paths.
  5. Either make to build or rerun ostent for live-reloading run.

Go packages

[src/]ostent is the main (as in Go Program execution) package: rerun will find main.devel.go file; the other main.production.go (used when building with -tags production) is the init code for the distributed binaries: also includes goagain recovering and self-upgrading via go-update.

[src/]amberp/amberpp is templates compiler, used with make.

Make

GNU make to rebuild the assets and build the program.

Additional required tools here:

make rebuilds these commited to the repo files:

  • src/share/templates/bindata.production.go
  • src/share/assets/bindata.production.go
  • src/share/assets/js/devel/milk/*.js
  • src/share/assets/js/devel/gen/*.js
  • src/share/templates/*.html
  • src/share/assets/css/*.css
  • src/share/tmp/jsassets.d
  • src/share/tmp/*.jsx

If you don't change source files, content re-generated should not differ from the commited. Whenever src/share/{amber.templates,style,coffee} modified, you have to re-run make.

make compiles everything and produces final binary.

The assets

The binaries, to be stand-alone, have the assets and templates embeded. Unless you specifically go build with -tags production (e.g with make), the content is not embeded for the ease of development: with rerun ostent, asset requests are served from the actual files.

About

Ostent is a server tool to collect, display and report system metrics.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0