serverautopsy
v1.0.1
Published
Gives the information of the system in which server is deployed and sends the mail to the developer if the system runs out of memory or cpu load gets very high
Maintainers
Readme
serverautopsy
serverautopsy is your daily server monitoring middleware.
It is difficult to monitor how your current server in which your favourite apps are deployed. If you are lazy like me then this is all you need. It checks your server's usage , memory and disk space and send mails to the admin via Sendgrid to inform about the server if it's low on memory or disk or high cpu usage.
Learn what is Sendgrid and how it works.
Installation
$ npm install serverautopsyAPI
var serverAutopsy = require("serverautopsy");
app.use(
serverAutopsy({
"apiKey": SENDGRID_API_KEY,
from: "[email protected]",
to: "[email protected]",
})
);serverAutopsy.json({object})
Server Autopsy is used as an middleware that takes an object to perform its task , we will now see inside the object
apiKey - We will use sendgrid to send and recieve mails. We have to pass Sendgrid's api key here
from - This would be admin's email of the sender
to - Who would be recieving mails about our server's information
Errors
If the devloper does not sent any of the required parameters it will throw "Api key or from mail or to mail not provided"
