0

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.

Sergei Basharov
  • 51,276
  • 73
  • 200
  • 335

1 Answers1

0

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.

Alaindeseine
  • 3,260
  • 1
  • 11
  • 21