Categorygithub.com/itglobal/dashboard
modulepackage
0.0.0-20220320150600-1ad3f1bbd9ab
Repository: https://github.com/itglobal/dashboard.git
Documentation: pkg.go.dev

# README

dashboard

Dashboard app for Raspberry Pi

How to configure, build and run

  1. Clone this repository somewhere (e.g. ~/dashboard)

  2. Create configuration file dashboard.json in config directory. See below to find out about config file's format

    Note that this config file will be ignored by git

  3. Make sure you have docker and docker-compose installed.

  4. Type a docker-compose command to build and run dashboard:

# for x64 machines
docker-compose up -d

#  - or -
# for ARM machines (like Raspberry Pi)

docker-compose -f docker-compose.arm.yml up -d

#  - or -
# to run manually on linux

chmod +x ./build.sh
./run.sh

#  - or -
# to run manually on windows

./run.cmd
  1. Open http://localhost:8000 to see dashboard page.

Configuration file format

Configuration file has the following format:

{
  "providers" : [
    // list of provider configurations
  ]
}

Each item in providers array represents one tile provider, while each tile provider may generate one or few tiles.

Common provider config has the following fields:

{
  "type" : "PROVIDER_TYPE",
  "enabled" : true
}

Parameter type is required and should contain a valid provider type (see below), while parameter enabled is optional and defaults to true.

Dashboard tile providers

sim provider

Simulated tile provider (for debugging purposes). Generated and updates N tiles.

ParameterTypeIs optionalDescription
countintegerYes, defaults to 10Amount of tiles to generate

check provider

Periodially checks specified HTTP/HTTPS URL and displays its status.

If the specified URL will respond to HTTP GET with any 2xx or 3xx HTTP status then the dashboard tile will be marked as SUCCESS. Otherwise, it will be marked as ERROR.

ParameterTypeIs optionalDescription
urlstringRequiredURL to check
namestringYes, defaults to host nameTile name
timerstringYes, defaults to 1mURL check interval

mongodb provider

A provider that checks MongoDB replica status.

If all replica set nodes are healthy then the dashboard tile will be marked as SUCCESS. Otherwise, it will be marked as ERROR.

ParameterTypeIs optionalDescription
namestringRequiredTile name
urlstringRequiredMongoDB replica set connection URL
timerstringYes, defaults to 20sMongoDB check interval

teamcity provider

A provider that displays statuses of TeamCity builds.

Provider will populate one dashboard item for each TeamCity project which will indicate current build status.

ParameterTypeIs optionalDescription
urlstringRequiredTeamCity URL
usernamestringOptionalUsername for TeamCity access
passwordstringOptionalPassword for TeamCity access
timerstringYes, defaults to 20sTeamCity build fetch interval

1cloud provider

A provider that checks 1Cloud payment status and displays a warning if remaining account balance drops below limit.

Provider uses 1Cloud's paid util estimation.

ParameterTypeIs optionalDescription
namestringRequiredTile name
tokenstringRequired1Cloud API access token
urlstringYes, defaults to https://api.1cloud.ru1Cloud API URL
timerstringYes, defaults to 60mBalance check interval

# Packages

No description provided by the author
No description provided by the author
No description provided by the author