To monitor Node JS Applications we need to configure Node JS and Single agents. These two agents should run in the same machine.
- Single Agent
- Node JS Agent
Communication is Bidirectional
Applicare controller <---> SingleAgent
Applicare controller <--> Node JS Agent SingleAagent <--> Node JS Agent
Adding Node JS Agent:
Step 1: Go to the single agent's installation folder (<StandaloneAgentHomeDir>/agent/nodejs/) and copy the applicare-agent folder and its contents.
[Screenshot 1 is not available on this page.]
Step 2: Paste this folder and its contents inside the node_modules folder of your node js application. (Employee directory contains the node js application)
[Screenshot 2 is not available on this page.]
Step 3: Go into the applicare-agent folder (<live-server>/node_modules/applicare-agent) and execute the below command in the terminal:
npm install
[Screenshot 3 is not available on this page.]
After the successful completion of the install process "node_modules" folder will be created inside the "applicare_agent" folder.
[Screenshot 4 is not available on this page.]
Step 4: Move the agent.config.js and agent-injector.js file from the "applicare_agent" folder to the root directory of the application.
[Screenshot 5 is not available on this page.]
[Screenshot 6 is not available on this page.] Step 6: Update the Node.js applicare agent configuration, especially the Node.js agent server name, Applicare Server IP, and port in the agent.config.js file.
Step 7: If your Applicare server uses SSL, change the applicareServerSSL value into true and serverPort value into 8443 in the agent.config.js file.
Step 8: If the Applicare server is using self signed certificate for SSL feature, we need change the applicare_SSL_self_signed_cert value into true, otherwise false.
[Screenshot 7 is not available on this page.]
Step 9: Start Node JS Server with the blow command.
Syntax:
node --require ./agent-injector.js your-app.js
Example:
My app is server.js thn the above command will be
node --require ./agent-injector.js server.js
Note:
1. For every Node JS agent, the servername should be unique.
2. We should set the same Server-name in both the Node JS (agent_config.js) file and Singleagent (catalina.bat/sh) file.
Assigning Standalone agent server name
Scenario 1:
One Node JS agent and one SingleAgent:
Node JS servername : NodeServer,
SingleAgent servername : NodeServer,
[Screenshot 8 is not available on this page.]
Scenario 2:
Multiple Node JS agent and Standalone Agent:
Second Node JS servername : NodeD,
Second SingleAgent servername : NodeD,
[Screenshot 9 is not available on this page.]
[Screenshot 10 is not available on this page.]
Step 9: Restart the " Node JS" server.
Adding the Node JS Agent in Applicare server
Step 10: The Node JS agent will automatically add to Applicare controller.
**Step 11:**Login into Controller and see the Node JS agent is added in the Overview screen.
[Screenshot 11 is not available on this page.]
Step 12 : Edit the Agent and add the application name for the agent.
Step 13 : Add the App name to the Agent and save.
[Screenshot 12 is not available on this page.]
Step 14: Finally Start the Standalone Agent.
Node JS Monitoring in Applicare
Dashboard
[Screenshot 13 is not available on this page.]
Server Analyzer
App Server
[Screenshot 14 is not available on this page.]
OS
[Screenshot 15 is not available on this page.]
CPU Cores
[Screenshot 16 is not available on this page.]
Processes
[Screenshot 17 is not available on this page.]
Disk
[Screenshot 18 is not available on this page.]
Network Connections
[Screenshot 19 is not available on this page.]
HTTP
[Screenshot 20 is not available on this page.]
Business Transactions
Top Business Transactions
[Screenshot 21 is not available on this page.]
Adding Key Business Transactions
[Screenshot 22 is not available on this page.]
[Screenshot 23 is not available on this page.]
The success Message
[Screenshot 24 is not available on this page.]
We can get the individual transaction details for the URL's added as KBT in a minute or so.
Key Business Transaction Load
[Screenshot 25 is not available on this page.]
Key Business Transactions Load Distribution
[Screenshot 26 is not available on this page.]
Viewing the individual transaction details
Transactions
[Screenshot 27 is not available on this page.]
By clicking the zoom icon it will display the url and query parameters and invocation time and count for that url.
[Screenshot 28 is not available on this page.]
[Screenshot 29 is not available on this page.]
Enabling the "Http Error" and "Webservices" aspects.
Go to Menu --> Configure Dynamic Instrumentation
[Screenshot 30 is not available on this page.]
[Screenshot 31 is not available on this page.]
[Screenshot 32 is not available on this page.]
Select the "Http Error Code Profiling" and "External Webservices" from the left and add it to the right hand side.
[Screenshot 33 is not available on this page.]
The selected aspects will be moved to the right hand side. Now click the tick button to save the changes.
[Screenshot 34 is not available on this page.]
Click "OK" in the popup.
[Screenshot 35 is not available on this page.]
The aspects are added successfully. Now click the "Home" button at the top to go to home screen.
[Screenshot 36 is not available on this page.]
Go to Server Analyzer
Errors
[Screenshot 37 is not available on this page.]
External Webservices
[Screenshot 38 is not available on this page.]
Enabling the "SQL" aspect.
Go to Menu --> Configure Dynamic Instrumentation
[Screenshot 39 is not available on this page.]
[Screenshot 40 is not available on this page.]
[Screenshot 41 is not available on this page.]
[Screenshot 42 is not available on this page.]
Select "OK" in the Popup.
[Screenshot 43 is not available on this page.]
[Screenshot 44 is not available on this page.]
Go to Server Analyzer
SQL
[Screenshot 45 is not available on this page.]
Enabling the "User Experience" aspect.
Go to Menu --> Configure Dynamic Instrumentation
[Screenshot 46 is not available on this page.]
[Screenshot 47 is not available on this page.]
[Screenshot 48 is not available on this page.]
[Screenshot 49 is not available on this page.]
Click "OK" in the popup.
[Screenshot 50 is not available on this page.]
[Screenshot 51 is not available on this page.]
Go to User Experience
Overview
[Screenshot 52 is not available on this page.]
Transactions summary
[Screenshot 53 is not available on this page.]
Real Time Transactions
Please select the row
[Screenshot 54 is not available on this page.]
Browsers
[Screenshot 55 is not available on this page.]
**Server
[Screenshot 56 is not available on this page.]**
OS
[Screenshot 57 is not available on this page.]
Analytics
[Screenshot 58 is not available on this page.]
Configuration for adding more than one Node JS agent from the same machine to a single Standalone agent.
1. Please make sure that, one Node JS agent is already added to applicare and stand alone agent is running for that agent. If not please install the node js agent and standalone agent using the above steps and start the agents.
2. To add one more node js agent to applicare please follow step 1 to 13. After the successful completion of all the 13 steps we would have successfully added one more node js agent to applicare.
3. Now Stop the 'Standalone agent".
4. Go to the path <ApplicareStandaloneHomeDir>****/server/bin/catalina.bat/sh
5. Edit Catalina.bat/sh and go to JAVA_OPTS.
6. At the end of the JAVA_OPTS value leave one space and add the
jvm argument -DcommonSAForNodeJS=true
For Windows edit Catalina.bat file and save
[Screenshot 59 is not available on this page.]
For Linux edit**, Catalina.sh** file and save
[Screenshot 60 is not available on this page.]
- Start the Standalone agent.
Note:
1. If we would like to add few more Node JS agent from the same machine, follow step 1 to 13 to add the agents.
2. After adding all the agents restart the standalone agent only once.
3. For adding multiple node js agent from the same machine then running one standalone agent on that machine is enough.
4. If we are going to add node js agent from different machines then we need to make sure separate standalone agents are running for their respective machines.
5. In all the above cases only node js agent should be added to applicare and standalone agent will be running in background for that agent.
6. For MongoDB - SQL Profiling will be supported from 2.2.36 and above versions.
7.3.5 version onwards:
Go to the Node.js agent's installation folder where you have installed Applicare itself (<Applicare>/agent/nodejs/) and copy the applicare-agent folder and its contents.
Paste this folder and its contents in the node_modules folder of your application.
Go into the applicare-agent node-module folder (<live-server>/node_modules/applicare-agent) and execute the below command in the terminal:
npm installMove the agent.config.js file in this folder to the root directory of the application.
Paste the below code in the first line of main file (usually called server.js or app.js) of the application
var applicareConfig = require('./agent.config.js'); var applicare = require('applicare-agent')(applicareConfig);Update the Node.js applicare agent configuration, especially the Node.js agent server name, Applicare Server IP, and port.
If your Applicare server uses SSL, change the applicareServerSSL value into true and serverPort value into 8443 in the agent.config.js file.
If the Applicare server is using self signed certificate for SSL feature, we need change the applicare_SSL_self_signed_cert value into true, otherwise false.
Restart the Node.js server.
Up to 7.3.4 version:
Go to the Node.js agent's installation folder where you have installed Applicare itself (<Applicare>/agent/nodejs/) and copy the applicare-agent folder and its contents.
Paste this folder and its contents in the node-modules folder of your application.
Go into the live server's root directory and execute the below command in the terminal:
npm installGo into the applicare-agent node-module folder (<live-server>/node_modules/applicare-agent), and move the agent.config.js file to the root directory of the application.
Paste the below code in the first line of main file (usually called index.js or app.js) of the application:
var applicare = require('applicare-agent');Restart the Node.js server.