Service and Server Monitoring app - Will send an email alert if somethings goes wrong
- Install Node.js for your operating system.
- Create a folder for tingoDB in local system.
- Get a copy of code - https://github.com/bbytes/alertme.git to your local directory.
- Run the command - npm install -d - in Node command prompt after changing to your cloned directory. This should install the dependencies currently added in package.json file.
- Set path of your tingoDB folder to dbPath property in config/config.js.
- Set hostname and port on which you want to run your alertme in config/config.js.
- User credentials for the application in config.js file.
- From the command prompt run - node app.js . You should be able to see a Login page at http://localhost:3333/alertme.
- Login with Admin user credentials : Username : admin, Password : admin
- Add hosts to alertme and enable monitoring.
- Now you will able see the status and number of outages etc.
dbPath : 'C:/tingoDB/data',
app : {
name : 'alertme',
hostname : 'localhost',
port : 3333
},
credentials : {
username : "admin",
password : "admin"
},
mail : {
apiKey : 'key-xxxxxxt26ij',
from : '[email protected]',
subject : 'AlertMe'
}
Routes can be added or removed or updated using rest.
- Adding host
- method : POST,
- url : /routes/save,
- example route json : {"host" : "", "port" : "", "config" : {"enabled" : "false", "ping service" : "", "timeout" : "", "ping interval" : "", "alert to" : "", "warning if takes more than" : "", "method" : "", "url" : "", "expectedStatuscode" : "", "expectedData" : ""}, "state" : {}}
- Update host
- method : POST
- url : /hosts/update
- data : hosts json to be updated
- Delete host
- method : POST
- url : /hosts/deleteHost
- data : {"id" : "7"}
- Get all hosts
- method : GET,
- url : /hosts/allHosts