Reacting to PM2 events

Viewed 13

Can I run a script when some event happens? For example, I want to be notified every time the process restart because it's caused by some reason I'd like to investigate.

I looked into both PM2 nodejs API and docs but didn't find info about it.

1 Answers

If i remember well, notification is only active on "PM2 plus". PM2 Plus is a priced plan.

https://pm2.io/docs/plus/guide/notifications/

Alternatively, you can integrate in your node.js application a third party service like Rollbar or Sentry.

Related