nr-dash is a NewRelic dashboard by SurveyMonkey that can be installed, configured and running in under 2 minutes.
- NewRelic account with 'Integrations' enabled
nr-dash can be installed from node/npm, or by cloning this repository.
- Type
npm install nr-dash
- Edit
config.json
and set your API key inkey
- Create a symlink to the app:
ln -s node_modules/nr-dash/app.js app.js
- Type
node app.js
(stdout
&stderr
are supported)
- Clone this repository
- Edit
config.json
and set your API key inkey
- Configure your webserver to use the
/dist
folder - Configure a route at
/config
to respond withconfig.json
- Optional (if you have node.js installed): skip the step above & type
npm install
followed bynode app.js
- Edit
config.json
and populate eitherApplications.metrics.instances[]
orServers.metrics.instances[]
with names, e.g. "MyServer-01" Servers.metrics.names[]
comes pre-populated, butApplications
requires you to fill in metric names; use the NewRelic API explorer to get the metric names
- The static files are found in
/dist
; css & javascript files are generated! - Install node.js & grunt-cli (globally):
sudo npm install grunt-cli -g
- Install ruby sass gem:
gem install sass
- Install development dependencies:
npm install
- Edit
/sass/style.scss
or any file in/src
, save your changes and typegrunt
to build new assets in/dist
- Optional: type
grunt watch
for automatic building upon saving changes to any file used to generate assets
- The UI is generated entirely from
config.json
- You can create new dashboard 'pills' by duplicating the
Applications
orTransactions
objects
nr-dash has a RWD which allows it to run on practically any device, such as:
- tablets
- smartphones
- laptops / desktops
- TVs
NewRelic API key
Array of chart legend colors
Cycles dashboard pills
Default pill to load (defaults to first pill if null)
DataStore expiration in seconds
Hostname for the app.js
server
Page size for DataGrids, null
to disable pagination
Pause between cycles (do not use the same value as expire)
Port for the app.js
server
Parsed metric names that should be formatted as SI, this is used to generate a RegExp
Seconds to animate chart redraw
X axis tick format, via moment.js
Pills are the name of the dashboard "views", it's just a data abstraction of the interface. nr-dash comes with three predefined pills, but those might not suit your needs, so we made it very easy for you to generate the UI from the data!
To generate a new "pill", follow this template:
{
"name": "Name in UI",
"slug": "Slug/Route",
"source": "Data source in NewRelic API response, usually matches 'name'",
"uri": "NewRelic API end point",
"fields": ["keys in API response to display in DataGrid"],
"order": "SQL like ORDER BY statement of keys in DataGrid",
"chartGrid": true/false (will generate charts for columns in the DataGrid)
}
If you want charts, add a metrics
Object to the pill:
"metrics": {
"uri": "NewRelic API end point",
"instances": ["Name of instances to chart"],
"names": ["Names of metrics to chart"]
}
Copyright (c) 2015 SurveyMonkey Licensed under the MIT license.