servstat
v1.0.4
Published
easily check the status of selected services
Downloads
3
Maintainers
Readme
servstat
Monitor the status (offline/online) of selected services
Get the response of the services while you're working on them.
example usage:
var Servstat = require('servstat').Servstat;
var config_online = { service: "http://www.google.com", debug: false };
var config_offline = { service: "http://www.not_online.com", debug: true };
var servstat_online = new Servstat(config_online);
var servstat_offline = new Servstat(config_offline);
servstat_online.isAlive = servstat_offline.isAlive = function(reason) {
// console.log("is alive, just got resp, %s", reason);
};
servstat_online.isDead = servstat_offline.isDead = function(reason) {
// console.log("seems to be dead .., %s", reason);
};
//stop after 10seconds
setTimeout(function() {
servstat_online.stop();
servstat_offline.stop();
}, 10000);
generate docs
grunt