How to install the Site24x7 APM Insight Node.js agent

How to install the Site24x7 APM Insight Node.js agent

Feb 3, 2023

This video will walk you through the process of installing the Site24x7 APM Insight Node.js agent. The APM Insight Node.js agent automatically instruments supported frameworks (like Express, Koa, and Hapi) and records interesting events, like HTTP requests, database queries, errors, exceptions, web API calls, and remote calls.

This installation method works in both Linux and Windows environments.

Related notes and links

Step 3
Note: You can open your application project in any editor or simply run the given commands in the system terminal.

Step 4
The command to access Node Package Manager (NPM):
npm --version

Step 5
The command to install an APM Insight Node.js agent from NPM:
npm i apminsight --save

Step 8
{"licenseKey" : "[license-key]",
"appName" : "[application-name]",
"port" : [application-port] }

If you are using proxy:
{"licenseKey" : "[license-key]",
"appName" : "[application-name]",
"port" : [application-port],
"proxyServerHost" : "[proxy-server]",
"proxyServerPort" : [proxy-port],
"proxyAuthUser" : "[proxy-user-name]",
"proxyAuthPassword" : "[proxy-password]"}

Step 10
If you are using common JavaScript (JS):
require('apminsight')()

If you are using ECMAScript (ES):
import apminsight from 'apminsight';
apminsight.config()

Step 11
The command to restart the application:
node index.js

Installing the Node.js agent:
https://www.site24x7.com/help/apm/nodejs-agent/Install-Node.js-Agent.html