ostent
collects and displays system metrics and optionally relays to Graphite and/or InfluxDB.
The displaying part (demo) is interactive and customizable.
The metrics:
- Collected and exported:
- RAM, swap usage
- Interfaces bytes, packets, errors ins and outs
- CPU usage
- Disk usage
- Load average
- On display only:
- System's OS, IP and uptime
- Processes top
- vagrant global-status
The exporting to Graphite and InfluxDB is kept on par with collectd
reporting to Graphite with StoreRates true
,
although the metrics naming is slightly different.
ostent a single executable without dependecies, no extra files required (everything is builtin). Drop it in and just run; being root is unnecesary. There're flags if you have to.
Run the code if you want to, otherwise grab a binary.
These binaries self-upgrade whenever there's new stable release and distributed by GitHub Releases.
Install & run with curl -sSL https://github.com/ostrost/ostent/raw/master/ostent.sh | sh
Platforms
FreeBSD (10 amd64 and i386 probably) is to be published with a new release. The master code is runnable already.
Usage of ostent:
-bind=:8050: Bind address
-update=1s: Collection interval
-sendto-graphite=: Graphite server address
-graphite-refresh=10s: Graphite refresh interval
-sendto-influxdb=: InfluxDB server URL
-influxdb-database="ostent": InfluxDB database
-influxdb-password="": InfluxDB password
-influxdb-refresh=10s: InfluxDB refresh interval
-influxdb-username="": InfluxDB username
Unless -bind
(-b
for short) is set, ostent binds to *:8050
.
The bind and Graphite addresses are specified like IP[:port]
(default ports being 8050 and 2003 respectively).
InfluxDB server must be specified as an URL http://ADDRESS
.
An interval is a number and a unit: s
for seconds, m
for minutes etc.
Here's how it goes:
$ ostent ________________
[ostent] ------------- < Spot the links >
[ostent] / server ostent \ ----------------
[ostent] +------------------------------+ \ ^__^
[ostent] | http://127.0.0.1:8050 | \ (oo)\_______
[ostent] |------------------------------| (__)\ )\/\
[ostent] | http://192.168.1.2:8050 | ||----w |
[ostent] +------------------------------+ || ||
Have your GOPATH environment set, gvm is a must.
go get github.com/ostrost/ostent
ostent
to run.
For rebuilding the code and assets:
- Find
src/github.com/ostrost/ostent
directory in GOPATH. - Run
make init
once and later for packages update (thinkgo get -u
) make
ormake al
whenrerun
does rebuilding.
Repeat 3. every time sources (esp. assets) change.
rerun does live-reloading run:
rerun github.com/ostrost/ostent
For a fork, to preserve import paths and packages namespace,
clone your fork as if it was github.com/ostrost/ostent
package for Go:
go get github.com/ostrost/ostent
- Find
src/github.com/ostrost/ostent
directory in GOPATH. - Replace it with you fork clone.
- Continue with rebuilding steps above.
make
rebuilds these commited to the repo files:
share/templates/bindata.*.go
share/assets/bindata.*.go
share/assets/js/src/milk/*.js
share/assets/js/src/gen/*.js
share/templates/*.html
share/assets/css/*.css
share/tmp/*.jsx
If you don't change source files, content re-generated should not differ from the commited. Whenever share/{ace.templates,style,coffee} modified, you have to re-make.
Additional tools required for assets rebuilding:
github.com/ostrost/ostent
has two main.go files:
rerun will find main.dev.go
; the other main.bin.go
(used when building with -tags bin
) is the init code for
the distributed binaries: also includes
goagain recovering and
self-upgrading via go-update.
The binaries, to be stand-alone, have the assets and templates embeded.
Unless you specifically build with -tags bin
(e.g with make),
the content is not embeded for the ease of development:
with rerun
, asset requests are served from the actual files.
Bin-built ostent restore-assets
can be used to copy (extract) assets on disk.