Status Dashboard is a highly configurable AngularJS application backed by a Go API to show information about multiple servers in a dasboard style way.
- Efficient
- Machines only send information when someone has opened the dashboard.
- No database or permanent file storage needed.
- Only update requested information.
- Dynamic
- Add and remove widgets.
- Reorder and resize widgets.
- Add and remove columns and rows.
- Can refresh as often as every second.
- Persistent
- Bookmark a layout in your browser.
- Linux Widgets
- Number of established TCP connections
- Memory usage
- Load average
- Uptime
- Network (up/down bandwidth)
- Client-less widgets
- Current date
- Current time
Binaries (assets included) are available in the release section, or can be built manually.
Releases include 32-bit and 64-bit binaries for:
- linux (client/server)
- darwin (server)
- windows (server)
See the systemd-scripts in the examples directory:
dashboard-server -c server_config.json
dashboard-client -c client_config.json
To get version information, run:
dashboard-server -version
dashboard-client -version
You can protect the dashboard using HTTP basic authentication by adding a dictionary of login, password pairs to the configuration file of the server.
{
"users" : {
"mylogin" : "supersecretpass"
}
}
You can protect the application with SSL by using a reverse proxy such as nginx. A sample configuration file can be found in Dockerfile.nginx and nginx.conf.
If you're using a self-signed certificate or CA, specify the -ca root_ca_certificate_file
option when starting the client. An example:
make docker # Docker that will run the dashboard
make nginx # Docker that will host the nginx proxy
make docker-run-server # Run the server in a docker
make nginx-run # Run nginx proxy
go client/main/*.go -c client/main/dev_ssl_config.json -ca examples/root_ca.pem
You can now browse to https://localhost:12443
You can automatically update the application using the -update
flag. It will update the executable to the latest GitHub release.
$ dashboard-server -checkupdate
$ dashboard-server -update
Building a binary for your platform is easiest using Docker on a Linux machine, or locally using the Makefile.
The Dockerfile for this repository contains everything to build the application binary. You can compile the binary for any platform supported by the Go cross compiler.
make docker # Create a Docker image named `status-dashboard`
make docker-build GOOS=yourplatform GOARCH=yourarchitecture # Create the binary
make docker-release # Make a release for some common platforms and architectures
Node, NPM and Gulp are needed to build the binary. The Makefile can be used to build the binaries.
npm install -g gulp
make
./dashboard-server
./dashboard-client
The following dependencies are needed to build and run the application.
- Node and NPM
- Bower
- Go with a working
GOPATH
Get the project: go get https://github.com/hverr/status-dashboard
Build and run the server
cd $GOPATH/src/github.com/hverr/status-dashboard/server
npm install
npm install -g bower
bower install
cd $GOPATH/src/github.com/hverr/status-dashboard/server/main
go run *.go -c dev_config.json -debug
Point your browser to http://localhost:8050/
Build and run the client(s)
cd $GOPATH/src/github.com/hverr/status-dashboard/client/main
go run *.go -c dev_config.json -debug
To add widgets, you must implement several class in the following locations:
- Go
- Add widget model in widgets/yourwidget.go (e.g. meminfo.go)
- Add widget to global widget list in widgets/widget.go
- Enable the widget in your client in dev_config.json
- AngularJS
- Add widget model, controller and directive in app/widgets/yourwidget/yourwidget.js (e.g. meminfo.js
- Add widget template in app/widgets/yourwidget/yourwidget.html (e.g. meminfo.html
- For text-based widgets you want to use the
<div text-widget>
directive and wrap the content in a<div class="text">
- For text-based widgets you want to use the
- Add widget to the
widgetFactory
- Load the new JavaScript file in the index.html