Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications / triggers on auto restarts #536

Closed
celesteking opened this issue Jun 26, 2014 · 4 comments
Closed

Notifications / triggers on auto restarts #536

celesteking opened this issue Jun 26, 2014 · 4 comments

Comments

@celesteking
Copy link

We'd like to have notifications on process crashes. We can't modify 3rd party app that's controlled by pm2, thus we'd like to have some sort of notification possibility in pm2. Most process managers these days include that.

It would be wonderful if pm2 could invoke some sort of external script on crash with information passed via environment variables. This way, we could compose custom messages.

Thanks.

@rlidwka
Copy link
Collaborator

rlidwka commented Jun 26, 2014

@celesteking
Copy link
Author

For those, who don't know JavaScript. Thanks.

@soyuka
Copy link
Collaborator

soyuka commented Jun 26, 2014

?

It would be wonderful if pm2 could invoke some sort of external script on crash with information passed via environment variables. This way, we could compose custom messages.

pm2-interface is what you need and javascript isn't very complicated (learn it 🍻):

var ipm2 = require('pm2-interface')()

imp2.on('process:exception', function(d) { console.log(d) })
imp2.on('process:exit', function(d) { console.log(d) })

@soyuka
Copy link
Collaborator

soyuka commented Jun 30, 2014

#269 - maybe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants