serverautopsy v1.0.1
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 serverautopsy
API
var serverAutopsy = require("serverautopsy");
app.use(
serverAutopsy({
"apiKey": SENDGRID_API_KEY,
from: "test1@example.com",
to: "test2@example.com",
})
);
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"