Monitor Dashboard is a live dashboard that shows an aggregated view of your services' health from sources like New Relic. Configured with a simple JSON file, deployable to CF and has features like basic authentication security, Monitor Dashboard is easy and ready to use!
Suggested use: Put in on a big TV screen!
- Golang
https://golang.org/dl/
- NPM
https://www.npmjs.com/get-npm
- Glide
brew install glide
- Bower
npm install -g bower
- Clone the repository
glide install -v
(cd public && bower install)
go build
- Run Service Monitor!
CONFIG_FILE=config_example.json \
NEW_RELIC_12345_KEY=somekey \
PASSWORD=thisiscool \
./monitor-dashboard
- Visit
localhost:3000
and login withadmin
andthisiscool
What you should see after the login page is the words Production and Dev along with two gray boxes below them. The boxes are gray because the monitor does not know the statuses of the services from New Relic. Also because the New Relic account and key are just demo, the gray will not change. So how do you get your own New Relic monitors hooked up? Next section!
Customizing Service Monitor is fairly easy and is done through a JSON file. An example JSON file is config_example.json
Steps are as follows when creating a config.json
:
- Configure a probe which defines where status will come from (only New Relic at this point)
- Create a heirarchy of statuses to be displayed on the dashboard
- Hook up the probe to the status by referencing your defined probe in the status
The basic structure of config.json
is the following:
{
"dashboardName": "Example Dashboard",
"probes": [{
"id": "probe-id",
"type": "NewRelic",
"data": {
"accountNumber": "12345",
"interval": "1m",
"apiKeyEnvVar": "NEW_RELIC_12345_KEY"
}
}],
"statuses": [{
"id": "env",
"fullName": "Production",
"children": [{
"id": "service",
"fullName": "Service Name",
"abbrevName": "SN",
"children": [],
"url": "https://serivce.com",
"probe": {
"probeRefId": "probe-id",
"data": {
"monitorName": "new-relic-service-monitor-name"
}
}
}]
}]
}
dashboardName
defines the title that is shown at the top of the monitor
probes
define sources to get updates for status.
# Probe fields
id: ID referenced in statuses
type: Type of probe created
data: Additional information map required by probe to function
Currently the only probe type support is NewRelic
.
Probe | Description | Type | Probe definition data fields |
Probe reference data fields |
---|---|---|---|---|
New Relic | Polls New Relic for new synthetic statuses | NewRelic |
|
|
statuses
define the structure of which the status are shown on the dashboard. A status
can have children of statuses
which gives the hierarchy. If a status
is a parent, it will represent the main categories shown on the dashboard. Usually this is based on deployment environments. The children of a status
are the colored boxes representing the status of a service which is update by a probe
. At this time, none of the children beyond depth 2 are shown and they don't do anything.
# Status fields
id: ID referenced when updating status
fullName: Name used in title (if parent)
children: Array of children which will be shown as boxes (if parent)
abbrevName: The main letters shown to identify the box (if child)
subText: The sub-text shown to differentiate visually if multiple box have same `abbrevName` (if child)
url: URL to open if box clicked on (if child)
probe: The probe which will update the status (if child)
probeRefId: Identifies which probe to use
data: Additional information map required by probe to function
Let's make your monitor avialible for others to see!
- Run steps 1-3 from the
Running Locally
steps above - Add
PASSWORD
env tomanifest_example.yml
cf push -f manifest_example.yml
- Visit the route given at the end of the push and you should see the same dashboard you run locally!
Maybe in the future I'll have an example Jenkinsfile too ...
Generally the service monitor is only used for display, but there are a couple simple APIs that could be useful. Note: The API is basic auth protected with the same credentials used to login
Method | Route | Description |
---|---|---|
GET |
/status |
Gives the current status of all the monitors in a format similar to the config.json |
GET |
/update/{id}/{status} |
This is the only push method of updating a status. {id} is the concatenation of the id's with - as the delimiter from parent to target child. {status} can be good , bad , degraded , or unknown |
If you would like to contribute, simply make a PR! Always looking for new contributers and ideas!