Loop Monitoring is a libs for checking your service is up or down using cronjob and store the report to your MongoDB Database.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example first commit Dec 16, 2017
lib export package Dec 16, 2017
node_modules
package-lock.json . Dec 20, 2017
package.json . Dec 20, 2017
readme.md first commit Dec 16, 2017

readme.md

Loop Monitoring

Loop Monitoring is a libs for checking your service is up or down using cronjob and store the report to your MongoDB Database.

Installation

Make sure you have NODE and MONGODB.

npm install loop-monitoring

How EXAMPLE

var LoopMonitoring = require('loop-monitoring');

var listService = require('./exampleData.json');
var cronScheduler = "*/2 * * * * *";
var mongoUrl = 'mongodb://localhost/monitoring';


var monitoring = new LoopMonitoring(listService,cronScheduler,mongoUrl)

monitoring.Start();

console.log(`
  Monitoring Start
`)

Example list of services

Create a json with key serviceName and serviceUrl

[
	{
		"serviceName":"Service 1",
		"serviceUrl":"http://localhost:8080"
	},
	{
		"serviceName":"Service 2",
		"serviceUrl":"http://localhost:9807"
	},
	{
		"serviceName":"Service 3",
		"serviceUrl":"http://localhost:4500"
	},
	{
		"serviceName":"Service 4",
		"serviceUrl":"http://localhost:7787"
	},
	{
		"serviceName":"Service 5",
		"serviceUrl":"http://localhost:7966"
	}
]

Example Folder

You can try to run the code sample in example folder.

Contact

If you have any questions, feedback, idea or anything, please drop me a message at prima.yudantra@gmail.com

License

MIT Copyright © 2017 Prima Yudantra