pankleks / pm2-health Goto Github PK
View Code? Open in Web Editor NEWApps health monitor and mail notification module for pm2
License: MIT License
Apps health monitor and mail notification module for pm2
License: MIT License
Add option to compress logs.
Add config option to filter apps to monitor
Hi,
Is there currently a way to disable internal logging for this module? By default it's written in .pm2/logs/pm2-health-out.log
Thanks
The module spawns multiple instances over time
, which is usually not desired as I will receive multiple e-mails with the same information.
Is there any way to prevent that? I noticed that what I do fresh install of the plugin, it spawns only one instance (as expected), but when other apps are deployed/created/updated it spawns next instance.
Thanks.
Basically an appsIncluded
option.
I plan to use this on a testing server, where most of the apps will be restarted a lot of times and I only want to monitor the status of a single worker which shouldn't restart
Add possibility for end-user to inject notification forward plugin (js file) -> for example slack
Add a config option to filter events using expressions just like with the custom messages filter.
Every since I upgraded pm2-health to v1.11.8 pm2-health-out.log is being filled with the message "app is inactive". The message is correct because the server is just waiting for requests, but I'm getting way too many messages. I'm getting that message 3 times (at the same time) every minute, which is odd because I only have 1 instance of my app and pm2 -health running. It's making pm2-health's output in pm2 logs
useless because it's just a bunch of copies of the same message.
Reading the documentation I don't see any obvious way to handle this problem. Thanks for any assistance you can provide.
I suggest Apache license 2.0
Push metric snapshot to 3'rd party tools via HTTP
Hi,
I can't make it to work, basically it everything installs, I added smtp.gmail.com and the rest of the stuff. When I trigger email test, it is not going out at all, not even hitting smtp.gmail.com..are there anything else needs to be done? I'm using node js 8.11.3, latest PM2 and everything is on Ubuntu.
It would be nice if it would be possible to alter the mail subject, all my scripts that send out mails have specific subjects based on the tool name, server name, location, ...
Add exclude by regexp.
It's useful when deployment via automated scripts
Hey Forum,
I've modified my /home/myuser/.pm2/module_conf.json
to the following:
{
"pm2-health": {
"smtp": {
"host": "mail.myserver.com",
"port": 465,
"user": "TOPSECRET",
"password": "TOPSECRET",
"from": "[email protected]",
"secure": "true",
"disabled": false
},
"mailTo": "[email protected]",
"replyTo": "",
"batchPeriodM": 0,
"batchMaxMessages": 0,
"events": [
"exit,restart"
],
"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": {}
}
}
However, I'm unable to get it to work because: 0|pm2-heal | 2020-06-24T08:26:48.294Z: can't send mail -> getaddrinfo ENOTFOUND your-smtp-host
Any obvious mistake I made?
Hello, I was wondering if pm2-health supports sparkpost integration. In order to use the sparkpost smtp server AUTH LOGIN authentication method is required. Is this currently supported? Thank you.
Action allowing to test SMTP configuration
Just like the title. I have problem with number of emails sent. But I did not find any solution to fix it. Already adjust batchPeriodM: 5 and batchMaxMessages:20 but nothing change.
Hello, I really appreciate the work that you have made on this library, it is exactly what I was looking for.
The main reason for me to use this package is to message me, once the server is not able to start up after some restarts. The problem is that my e-mail inbox receives tons of e-mails with the same information value -> The application cannot boot up.
The possible solution would be to allow set custom priority for exceptions or at least for events. At this time, the events has high
priority and thus bypasses the batchMaxMessages
and batchPeriodM
as mentioned in https://github.com/pankleks/pm2-health#message-batching.
Are you will to add this feature or at least can I do a PR for this?
Thanks.
apps: ["app 1", "app 2"]
if set, only these apps should be monitored.
If i running app 0,1,2
and I wish to monitor only id 0, what should I do?
And
I want to send email only when there is a specific error in the log, such as connection timed out
.
I try below But not useful.
Thankyou!
"metric": {
"tg.line": {
"target": 1,
"op": ">=",
"exclude": true
}
}
Find alternative configuration of Probes.js
file, as it's being overridden with each upgrade.
As no "from" field is included and user
field form
are not same for this SMTP gateway.
Can I submit the fix?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.