A simple status dashboard for oam-catalog
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public/assets
views
.dockerignore
.gitignore
.nvmrc
.travis.yml
Dockerfile
LICENSE
README.md
docker-compose.yml
index.js
newrelic.js
package.json
sample.local.env

README.md

Status Page

The status page shows the status of the OAM Catalog and a log of the images indexed.

Installation and Usage

The steps below will walk you through setting up your own instance of the oam-status.

Install Project Dependencies

To set up the development environment for this website, you'll need to install the following on your system:

  • Node v4 (To manage multiple node versions we recommend nvm)

Install Application Dependencies

If you use nvm, activate the desired Node version:

nvm install

Install Node modules:

npm install

Usage

Config

Configuration for this app is done through environment variables:

  • NEW_RELIC_APP_ID - Newrelic's ID of app to be monitored.
  • NEW_RELIC_API_KEY - Newrelic's api key (with access to app).
  • NEW_RELIC_LICENSE_KEY - Newrelic's license key (for monitoring the app).
  • CATALOG_URL - The OAM catalog url (no trailing slash) (defaults to https://oam-catalog.herokuapp.com)
  • PORT - Port on which the app should run (defaults to 3000).

Newrelic Newrelic is specially important in oam-status because it's used to monitor the status of the catalog. The credentials used here need to be the same as the ones for the OAM Catalog. Visit Newrelic if you need to create an account.

Starting the app

npm start

Endpoints

/ (root)

Renders the status page as html.

/healthcheck

Returns the status of the system using a color coding format. Example:

{
    "health": "green", // can be `green`, `yellow`, `red` or `unknown`
    "lastCheck": "2017-01-25T10:53:17+00:00"
}

/ping

Replies with pong.

Deployment

This app can be run on any server with Node.js 4.7 The deployment instructions are the same as listed above.

Docker

Docker allows for a quick packaging of the app for production.

To setup the environment variables for docker copy sample.local.env to local.env and fill in the values. Check the section Config on how to configure the variables. Please note that for the docker container the PORT has to be changed in the docker-compose.yml file.

Run the docker container with:

docker-compose up -d

To stop the container run

docker-compose stop

License

Oam Status is licensed under BSD 3-Clause License, see the LICENSE file for more details.