diff --git a/lib/God/ActionMethods.js b/lib/God/ActionMethods.js index 102fc419f..3d38c48af 100644 --- a/lib/God/ActionMethods.js +++ b/lib/God/ActionMethods.js @@ -63,6 +63,26 @@ module.exports = function(God) { if (err) { console.error('Error caught while calling pidusage'); console.error(err); + + return cb(null, processes.map(function(pro) { + pro['monit'] = { + memory : 0, + cpu : 0 + }; + return pro + })) + } + + if (!statistics) { + console.error('Statistics is not defined!') + + return cb(null, processes.map(function(pro) { + pro['monit'] = { + memory : 0, + cpu : 0 + }; + return pro + })) } processes = processes.map(function(pro) {