nr-dash

1.2.0 • Public • Published

nr-dash

Introduction

nr-dash is a NewRelic dashboard by Fluidware that can be installed, configured and running in under 2 minutes.

Requirements

  • NewRelic account with 'Integrations' enabled

Installation

nr-dash can be installed from node/npm, or by cloning this repository.

npm

  • Type npm install nr-dash
  • Edit config.json and set your API key in key
  • Create a symlink to the app: ln -s node_modules/nr-dash/app.js app.js
  • Type node app.js (stdout & stderr are supported)

git

  • Clone this repository
  • Edit config.json and set your API key in key
  • Configure your webserver to use the /dist folder
  • Configure a route at /config to respond with config.json
  • Optional (if you have node.js installed): skip the step above & type npm install followed by node app.js

How do I get charts?

  • Edit config.json and populate either Applications.metrics.instances[] or Servers.metrics.instances[] with names, e.g. "MyServer-01"
  • Servers.metrics.names[] comes pre-populated, but Applications requires you to fill in metric names; use the NewRelic API explorer to get the metric names

How can I customize the "look & feel"?

  • 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 type grunt to build new assets in /dist
  • Optional: type grunt watch for automatic building upon saving changes to any file used to generate assets

How do I change (name it)?

  • The UI is generated entirely from config.json
  • You can create new dashboard 'pills' by duplicating the Applications or Transactions objects

What can I run this on?

nr-dash has a RWD which allows it to run on practically any device, such as:

  • tablets
  • smartphones
  • laptops / desktops
  • TVs

Configuration

api (string) null

NewRelic API key

colors (array)

Array of chart legend colors

cycle (boolean) false

Cycles dashboard pills

default (string) null

Default pill to load (defaults to first pill if null)

expire (number) 30

DataStore expiration in seconds

hostname (string) localhost

Hostname for the app.js server

pageSize (number) 15

Page size for DataGrids, null to disable pagination

pause (number) 21

Pause between cycles (do not use the same value as expire)

port (number) 8000

Port for the app.js server

si (string) Disk|Memory|Network

Parsed metric names that should be formatted as SI, this is used to generate a RegExp

transition (number) 2

Seconds to animate chart redraw

xformat (string) hh:mm A

X axis tick format, via moment.js

How to make a "pill"

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"]
}

License

Copyright (c) 2014 Fluidware Licensed under the MIT license.

Package Sidebar

Install

npm i nr-dash

Weekly Downloads

1

Version

1.2.0

License

none

Last publish

Collaborators

  • fluidware