DPS Monitoring
Monitoring for the DPS Services and Projects
The project is based on Smashing.
Installs
Packages needed
ruby
ruby-dev
build-essential
nodejs
(or equivalent for your platform)
e.g. For Ubuntu this was:
$ sudo apt-get install ruby ruby-dev build-essential nodejs
Build
$ sudo gem install bundler
$ sudo gem install smashing
$ cd dps-monitor/
$ rm Gemfile.lock (will not build on some platforms without this - Ubuntu)
$ bundle install
Run
smashing start
Local
- Overview - http://localhost:3030/ - shows overview of 'production' services & build info
- CI status - http://localhost:3030/circle - shows circle CI build status
- Server health - http://localhost:3030/health - shows health of all services, in all environments
- Activity - http://localhost:3030/stats - incomplete?
Deployment
All merges to main are built & deployed automatically to cloud platform
Further Reading on Smashing
Check out http://smashing.github.io/ for more information.
Deployment Configuration
Requires the following environment variables to be available locally when running: Get a Circle CI token from https://app.circleci.com/settings/user/tokens
- CIRCLE_CI_TOKEN - a valid circle API access token
Run
CIRCLE_CI_TOKEN=************ smashing start
Dashboard Configuration
- Edit dashboards/circle.erb to add projects to the build monitor
- Edit dashboards/health.erb to add grid items for health checks
- Edit the projects element in jobs/circle_ci.rb to match your changes to CI statuses shown in circle.erb
- Edit the projects element in jobs/health.rb
- Edit dashboards/overview.erb to add production service info
Running Locally
To test the application it is best to run using docker
Build first
docker build -t dps-monitor .
Run:
docker run -p3030:3030 --env CIRCLE_CI_TOKEN=******* --name dps-monitor -d -t dps-monitor:latest
Test in browser:
http://localhost:3030
Stop:
docker stop dps-monitor
docker rm -vf dps-monitor