Skip to content

Latest commit

 

History

History

node_js

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Node.js Monitoring Template

Provided by: bonitoo.io

This template provides a dashboard for simple monitoring of a Node.js application. The dashboard charts basic process metrics and the response time of http requests and their response status code. The process metrics are generated from process.memoryUsage())), process.cpuUsage() and process.resourceUsage() functions.

Dashboard example

Screenshot

Quick Install

InfluxDB UI

In the InfluxDB UI, go to Settings->Templates and enter this URL: https://github.com/influxdata/community-templates/tree/master/Node.js/Node.js.yml

Influx CLI

If you have your InfluxDB credentials configured in the CLI, you can install this template with:

influx apply https://github.com/influxdata/community-templates/tree/master/Node.js/Node.js.yml

Included Resources

This template includes the following:

  • 1 Bucket: iot_center
  • 1 Label: Node.js
  • 1 Dashboards: Node.js Application Monitoring
  • 2 Variables: Node_Service, and Node_Host

Setup Instructions

  1. Load the dashboard according to the the paragraph above
  2. Copy monitor.js and env.js files
  3. Update InfluxDB credentials in env.js
  4. Register monitor.js code - see the following example
const onboardInfluxDB = require('./influxdb/onboarding')
const {logEnvironment, INFLUX_URL} = require('./env')
const monitor = require('./monitor')

async function startApplication() {
  const app = express()

  // monitor application
  monitor(app)

  ...
}

Contact

Author: Miroslav Malecha, https://www.bonitoo.io