{"library":"pm2-server-monit","title":"PM2 Server Monitor","description":"pm2-server-monit is a PM2 module designed to automatically monitor crucial server vital signs, integrating seamlessly into the PM2 ecosystem for process management. It tracks key metrics such as CPU average usage, free and used memory, drive space, network speed (input/output), total opened files, running processes, and active TTY/SSH sessions. The current stable version is 3.0.0. While no explicit release cadence is documented, the jump from v2.0 to v3.0 suggests periodic updates incorporating significant feature enhancements or internal changes. Its primary differentiator is its deep integration with PM2, allowing server monitoring to be managed and viewed alongside application processes, making it particularly useful for environments already leveraging PM2 for their Node.js applications. Unlike standalone monitoring agents, pm2-server-monit leverages the PM2 daemon to collect and report system statistics.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install pm2-server-monit"],"cli":null},"imports":["pm2 install pm2-server-monit","pm2 set pm2-server-monit:drive /","pm2 logs pm2-server-monit"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# First, ensure PM2 is installed globally if you haven't already\nnpm install -g pm2\n\n# Install the pm2-server-monit module into PM2\npm2 install pm2-server-monit\n\n# Configure the module to monitor multiple drives and adjust a refresh rate\n# Example: monitoring root '/' and a '/data' partition\npm2 set pm2-server-monit:drive \"/,/data\"\npm2 set pm2-server-monit:network_refresh_rate 5\n\n# View the status and initial logs of the module to verify operation\necho \"Waiting a few seconds for initial metrics to be collected...\"\nsleep 5\npm2 logs pm2-server-monit --lines 50\n\n# To view the collected metrics in a dashboard, use PM2 Plus\n# or other PM2 monitoring tools, as this module feeds data into PM2's ecosystem.\n","lang":"bash","description":"This quickstart demonstrates how to install the pm2-server-monit module, configure its monitoring parameters, and check its operational logs via the PM2 command-line interface.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}