Managing Node.js applications using PM2 Process Manager
Follow the instructions below to configure PM2 to manage Node.js applications.
Steps to configure PM2
- Configure the processManagerEnabled key in the already created apminsightnode.json file.
- Pass the value as true.
Example:
{
"licenseKey" : "xxxxxxxxxxxxxxxxxxxx",
"appName" : "appName",
"port" : 3000,
"processManagerEnabled" : "true"
}
- Restart your Node.js application.
- The above configuration is only available for Node.js agents (v2.5.1 and above).
- In general, the process manager PM2 (version 2.0) is compatible with the APM Insight Node.js agent.
How Site24x7 handles the processes started by PM2
- Each process started by PM2 is treated as a separate instance in Site24x7.
- The instance's name is displayed as hostname:PM2_ID rather than hostname:port_number.
For example: In the below screenshot, the three processes that are started using PM2 are displayed as zylker-0193:1, zylker-0193:2, and zylker-0193:3, where zylker-0193 is the hostname, and 1, 2, and 3 are the corresponding PM2_IDs.
- Port number is the same for all instances. Hence, PM2_ID is used to differentiate them.
- Each instance started by PM2 is treated as a separate APM instance and requires its own advanced monitor license.
If you're deploying your PM2 based Node.js application in a Kubernetes environment, refer to this
KB article.
Related Articles
How to identify and resolve conflicts between other APM products and the APM Insight .NET agent
Problem statement: You are experiencing either of the below issues and suspect that another APM product is interfering with the Site24x7 .NET agent. 1. The .NET monitor is not created under APM > APM Insight > Applications, even after the .NET agent ...
APM Insight integration for Next.js in Kubernetes
To integrate the Site24x7 APM Insight Next.js agent into your Kubernetes application using initContainers with the prebuilt agent image, follow the steps below: Prerequisites A Next.js application container image The Site24x7 APM Insight license key ...
No data for service and process in Windows server monitor
If you see "No Data" for process and service metrics (such as CPU or memory usage of monitored services) in the Site24x7 Windows server monitor user interface, follow the troubleshooting steps below. Run PowerShell Commands Open PowerShell as ...
Validating sender email using DKIM authentication
What is DKIM? DomainKeys Identified Mail (DKIM) is an advanced authentication method used widely by email service providers to verify the email from the point of its origin by validating the email sender. It allows the email senders to authenticate ...
Release deployment process in Site24x7
To ensure smooth and stable deployments in sensitive environments, Site24x7 follows a phased rollout approach, deploying the release to smaller batches of customers first before rolling it out to all users. Release process The release follows a ...