node-js-logo

Node.js Monitoring Template

Template built by

Included Resources:

  • 0 Buckets:
  • 1 Label: Node.js
  • 0 Telegraf Configurations:
  • 0 Checks:
  • 1 Dashboard: Node.js Application Monitoring
  • 2 Variables: Node_Service, and Node_Host

Quick Install

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

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

Node.js Application Monitoring Dashboard

Node.js is an open-source, event-driven JavaScript runtime designed to build scalable network applications. Node.js lets developers use JavaScript to write command line tools and for server-side scripting — running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.

Why monitor Node.js

When monitoring Node.js, you are able to track your applications performance and availability by finding bottlenecks and fixing errors. You can identify issues by specifically looking at metrics like Process memory usage, Average response time. CPU usage, and more. If you add monitoring of the other components of your entire stack, you will gain a comprehensive view of what could be impacting the performance of your applications. With over 200+ Telegraf plugins, you are easily able to collect key metrics to help you get that view into your application.

How to use Node.js Monitoring Template

This template provides a simple monitoring of Node.js application. Dashboard is showing basic process metrics and response time of http requests including response code. The process metrics are generated from process.memoryUsage(), process.cpuUsage() and process.resourceUsage() functions.

Once your InfluxDB credentials have been properly configured in the CLI, you can install the Node.js monitoring template using the Quick Install command. Once installed, copy monitor.js and env.js files, update InfluxDB credentials in env.js and 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)

  ...
}

Key node.js application metrics to monitor

Some of the most important Node.js monitoring metrics that you should proactively monitor include:

  • Process memory usage
  • Average response time
  • CPU usage
  • Maximum response time
  • Current heap usage
  • Array buffers
  • File System IO

Related Resources

Apache Zipkin Telegraf Plugin

The Apache Zipkin Telegraf plugin collects traces and time-stamped data essential for troubleshooting latency problems in microservice architectures.

Application Performance Monitoring (APM)

APM can be performed using InfluxDB to help optimization of end-user experience.

Microsoft SQL Server Monitoring Template

Use this template to proactively monitor your SQL Server to ensure the health of your applications.

Scroll to Top