npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

check_node_pm2

v0.0.17

Published

Nagios plugin to monitor apllications in pm2

Downloads

50

Readme

check_node_pm2

Nagios/Icinga Plugin to check PM2 Applications

Installation

npm install check_node_pm2 -g

Usage

Monitor pm2 applications

Usage: check_node_pm2 [options]

Options:
  -A, --all                Check all processes
  -I, --ignore             Ignore process (may be repeated)
  -C, --mon_cpu            Monitor CPU usage
  -M, --mon_mem            Monitor MEM usage
  -E, --mon_err            Monitor error logs
  -R, --mon_restart        Monitor Restart Count
  -P, --process            Process to check (may be repeated)
  -S, --stop_error         Report an error if process is stopped
  --rwarn, --restart_warn  Warning threshold for restart count
  --rcrit, --restart_crit  Critical threshold for restart count
  --cwarn, --cpu_warn      Warning threshold for cpu usage (percentage value)
  --ccrit, --cpu_crit      Critical threshold for cpu usage (percentage value)
  --mwarn, --mem_warn      Warning threshold for memory usage (in MB)
  --mcrit, --mem_crit      Critical threshold for memory usage (in MB)
  --ewarn, --err_warn      Warning interval for new error log (in minutes). Will
                           be warned only after critical interval
  --ecrit, --err_crit      Critical interval for new error log (in minutes)
  --version, -v            Show version number                         [boolean]
  --help, -h               Show help                                   [boolean]

Examples:
  index.js -A -R --rwarn 5 --rcrit 10  Warn if any apps restarted more then 5
                                       times and critical if restarted more than
                                       10 times

Acknowledge error for pm2 applicatons

Usage: check_node_pm2 ack [options]

Options:
  --pm-all, --pm_all        To acknowledge all pm2 applications
  --pm-id, --pm_id          pm2 id of the application to acknowledge (may be
                            repeated)
  --pm-ignore, --pm_ignore  pm2 id for an application to ignore (may be
                            repeated)
  --help                    Show help                                  [boolean]
  --version                 Show version number                        [boolean]

Examples:
  index.js ack --pm-all  Acknowledge all error logs

Mind that check_node_pm2 has to be run under the same user that started the PM2 daemon.