
That’s it for now! You can share your thoughts about Nodejs application monitoring using PM2, with us via the feedback form below. To remove pm2-server-monit from your server, run the following command: # pm2 uninstall pm2-server-monit Monitor Server Resources from PM2 Dashboard Now you can monitor your server resources from the web dashboard as shown in the following image. If PM2 is linked to, pm2-server-monit should automatically appear in the list of monitored processes. To install it, run the following command: # pm2 install pm2-server-monit Pm2-server-monit is a PM2 module to automatically monitor key aspects of your server such as CPU average usage, free and used drive space, free and used memory space, all processes running, TTY/SSH opened, the total number of open files, as well as network speed (input and output). pm2 monit Once it running, use the left/right arrows to switchboards or sections.

You can launch the dashboard by running the following command.

Monitoring Your Server Resources Using pm2-server-monit Monitoring Nodejs Application Using PM2 Terminal PM2 provides a terminal-based dashboard that helps you monitor the resource (memory and CPU) usage of your application. Unlink Nodejs Server from PM2 Web DashboardĪfter running the above command, you can delete the server from the dashboard. Nodejs monitoring in production server is very important and critical part in overall Nodejs application development. To unlink a server from the monitoring dashboard, run the following command on the server to unlink: # pm2 unlink Monitor Nodejs Applications from PM2.io Dashboard If you are using version control, it also shows the branch and last merge details. It also shows the version of Nodejs and PM2 currently installed.įor each process, you will see the percentage of CPU and the amount of memory it is consuming, and much more. For each server connected, the dashboard shows you server hardware components such as the amount of RAM and CPU type. Now on the PM2.io main interface, you should have one server connected, showing a list of all your Nodejs processes in expanded mode. Then run the above command on the Nodejs application server. Next, link PM2 to PM2.io and copy the command provided as highlighted in the following interface. In this example, we have called our bucket TECMINT-APIs. PM2 SignupĪfter a successful login, create a bucket to group your Nodejs servers/applications. By default, Sentry error events will not get trace context unless you configure. To start testing PM2 plus, go to, then sign up as shown in the following screenshot. Home Platforms Node.js Performance Monitoring. The free plan allows you to connect up to 4 servers/applications. It features issues and exception tracking, deployment reporting, real-time logs, email and slack notification, custom metrics monitoring, and custom actions center. It provides features for both hardening your current PM2 and monitoring applications in production across servers. PM2 Plus ( PM2 Web Based Dashboard) is an advanced and real-time monitoring and diagnostics tool. Monitoring Nodejs Application Using PM2 Web-Based Dashboard To monitor and diagnose cross-server applications, use the PM2 web-based dashboard.

The terminal-based monitoring only works well for applications running on a single server. To view logs of an app, first select it (use up/down arrows) from the process list. Once it running, use the left/right arrows to switchboards or sections. In the file, write the following code for starting the server - const http = require('http') Ĭonst server = http.PM2 provides a terminal-based dashboard that helps you monitor the resource (memory and CPU) usage of your application.

It can be installed on the system by the following command - npm install -g pm2Īfter installing, create a file and name it app.js.
