1.2.2 • Published 1 year ago

pm2-watcher v1.2.2

Weekly downloads
2
License
ISC
Repository
github
Last release
1 year ago

PM2 Watcher

The application watches PM2 Processes; if a process stops, errored, fails, or none thing starts, it will send out an email notification. Once an offline process comes back online, the application will send out a follow-up email notification.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

A step by step series of examples that tell you how to get a development env running

Install the app from NPM:

npm install pm2-watcher --save

examples

To start the app's provided settings management please use the following code.

const pm2Watcher = require('pm2-watcher');

pm2Watcher.startServer(port); // optional port, app will start
                              // on port you provide it or will
                              // default to 4000

To start the app without using the provided settings management use the following.

const pm2Watcher = require('pm2-watcher');

const mailSettings = {
   hostName : "string",             // "stmp.gmail.com"
   port : "number",                 // port number
   secure : "boolean",              // true or false
   user : "string",                 // "username for email address access"
   password : "string",             // "password or token for access to Email"
   from : "string",                 // "displayed in the email's from field"
   sender : "string"                // "To" field in email ("email1@mail.com,email2@mail.com")
}

const appSettings = {
   debugging : "boolean",           // true or false (default false)
   failedDelays : "number",         // delay(secs) between email notify for failed process (default 300)
   passedDelays : "number",         // delay(secs) between email notify of online process that failed (default 300)
   allowLogs : "boolean"            // true or false (default true)
}

pm2Watcher.setMail(mailSettings)    // Enters in mail settings for app to use

pm2Watcher.setApp(appSettings)      // Enters in app settings

pm2Watcher.startApp()               // Start the app using the provided settings

Videos

Authors

Acknowledgments

  • Spenser
1.2.2

1 year ago

1.2.1

1 year ago

1.0.9

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago