mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
Update str [ci skip]
This commit is contained in:
parent
c326c7cbe5
commit
0f693c69ed
32
README.md
32
README.md
@ -15,6 +15,7 @@ pm2 is perfect when you need to spread your stateless Node.js code accross all C
|
||||
- Pause unstable process (avoid infinite loop)
|
||||
- Restart on file change with `--watch`
|
||||
- Monitoring in console
|
||||
- [Free server/pm2 monitoring by ping strategy](#builtin-remote-monitoring)
|
||||
|
||||
Tested with Node v0.11, v0.10 (https://travis-ci.org/Unitech/pm2).
|
||||
|
||||
@ -57,6 +58,7 @@ Thanks in advance and we hope that you like pm2!
|
||||
- [Examples](#a3)
|
||||
- [Differents ways to launch a process](#a667)
|
||||
- [Options](#a987)
|
||||
- [Builtin remote monitoring](#builtin-remote-monitoring)
|
||||
|
||||
### Features
|
||||
|
||||
@ -144,6 +146,11 @@ $ pm2 describe 0 # Display all informations about a specific process
|
||||
|
||||
$ pm2 monit # Monitor all processes
|
||||
|
||||
# Builtin monitoring via PING strategy
|
||||
|
||||
$ pm2 subscribe my@email.com # Send an email if your server or pm2 is down
|
||||
$ pm2 unsubscribe # Unable the remote monitoring
|
||||
|
||||
# Logs
|
||||
|
||||
$ pm2 logs # Display all processes logs in streaming
|
||||
@ -238,6 +245,31 @@ Options:
|
||||
--run-as-group <run_as_group> The group or gid to run a managed process as
|
||||
```
|
||||
|
||||
|
||||
<a name="builtin-remote-monitoring"/>
|
||||
## Builtin remote monitoring
|
||||
|
||||
On installation, you're asked if you want to enable the remote monitoring for your server or pm2.
|
||||
If accepted and if you set the right email, you will receive an email if something hangs (offline).
|
||||
|
||||
This monitoring strategy **only do a ping** at a regular interval to pm2.io servers.
|
||||
|
||||
If you want to enable it after installation just do :
|
||||
|
||||
```bash
|
||||
$ pm2 subscribe my@email.com
|
||||
# Once the monitoring enabled, you have to restart pm2 :
|
||||
$ pm2 dump
|
||||
$ pm2 kill
|
||||
$ pm2 resurrect
|
||||
```
|
||||
|
||||
If you want to stop the monitoring do :
|
||||
|
||||
```bash
|
||||
$ pm2 unsubscribe
|
||||
```
|
||||
|
||||
# Features
|
||||
|
||||
<a name="a4"/>
|
||||
|
||||
@ -817,7 +817,8 @@ CLI.subscribe = function(email) {
|
||||
printOut('Subscribing...');
|
||||
|
||||
WatchDog.createConfFile(email, function() {
|
||||
printOut('PM2 is now monitored');
|
||||
printOut('PM2 is now ready for monitoring via PING strategy. To enable it, please restart pm2');
|
||||
printOut('For more informations : https://github.com/Unitech/pm2#builtin-remote-monitoring');
|
||||
exitCli(cst.SUCCESS_EXIT);
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user