I am using pm2-health to trigger when a process was managed by pm2 died. But every time a process died, pm2-health send 11 emails about exception threw and 11 more emails about process has stopped. And when I manual stopped the process, pm2 health send 2 emails about process has stopped.How can I configure pm2-health to send only one email each time. Thank you!
Here is my module_conf.json file:
{
"pm2-health": {
"smtp": {
"host": "smtp.gmail.com",
"port": 587,
"user": "sender@gmail.com",
"password": "pass",
"disabled": false
},
"mailTo": "receiver@gmail.com",
"replyTo": "",
"batchPeriodM": 1,
"batchMaxMessages": 20,
"events": [
"exit"
],
"exceptions": true,
"messages": true,
"messageExcludeExps": [],
"metric": {},
"metricIntervalS": 60,
"aliveTimeoutS": 300,
"addLogs": true,
"appsExcluded": [],
"snapshot": {
"url": "",
"token": "",
"auth": {
"user": "",
"password": ""
},
"disabled": false
}
},
"module-db-v2": {
"pm2-health": {}
}
}