diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-02-05 02:02:12 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-02-05 02:02:12 +0200 |
commit | cac53fd155c250599871b12ebc1e7f83e1616777 (patch) | |
tree | e6c9a2ffe4ac588fb2b7da72f387d8437288e4e8 /plugins.d | |
parent | ccb789708de8b8126ddd17cfaf8e2c3623e4c073 (diff) |
added SNMP node.js data collector; node.d.plugin now supports multiple processors (http, snmp at the ones currently implemented)
Diffstat (limited to 'plugins.d')
-rwxr-xr-x | plugins.d/node.d.plugin | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins.d/node.d.plugin b/plugins.d/node.d.plugin index 13ac7aa882..96e00694e4 100755 --- a/plugins.d/node.d.plugin +++ b/plugins.d/node.d.plugin @@ -9,7 +9,6 @@ var NETDATA_PLUGINS_DIR = process.env.NETDATA_PLUGINS_DIR || __dirname; var NETDATA_CONFIG_DIR = process.env.NETDATA_CONFIG_DIR || '/etc/netdata'; var NETDATA_UPDATE_EVERY = process.env.NETDATA_UPDATE_EVERY || 1; var NODE_D_DIR = NETDATA_PLUGINS_DIR + '/../node.d'; -NETDATA_UPDATE_EVERY = NETDATA_UPDATE_EVERY * 1000; // make sure the modules are found process.mainModule.paths.unshift(NODE_D_DIR + '/node_modules'); @@ -133,14 +132,14 @@ function dumpError(err) { try { var x = parseInt(val); if(x > 0) { - netdata.options.update_every = x * 1000; + netdata.options.update_every = x; if(netdata.options.update_every < NETDATA_UPDATE_EVERY) { netdata.options.update_every = NETDATA_UPDATE_EVERY; netdata.debug('Update frequency ' + x + 's is too low'); } found_number = true; - netdata.debug('Update frequency set to ' + netdata.options.update_every + ' ms'); + netdata.debug('Update frequency set to ' + netdata.options.update_every + ' seconds'); } else netdata.error('Ignoring parameter: ' + val); } @@ -155,9 +154,9 @@ function dumpError(err) { }); } -if(netdata.options.update_every < 1000) { +if(netdata.options.update_every < 1) { netdata.debug('Adjusting update frequency to 1 second'); - netdata.options.update_every = 1000; + netdata.options.update_every = 1; } // -------------------------------------------------------------------------------------------------------------------- @@ -174,7 +173,7 @@ function findModules() { var n = files[len].substring(0, m.index); if(typeof(netdata.options.modules[n]) === 'undefined') - netdata.options.modules[n] = { enabled: netdata.options.modules_enable_all }; + netdata.options.modules[n] = { name: n, enabled: netdata.options.modules_enable_all }; if(netdata.options.modules[n].enabled === true) { netdata.options.modules[n].name = n; @@ -201,7 +200,7 @@ function findModules() { // load its configuration var c = { enable_autodetect: netdata.options.modules_enable_autodetect, - update_every: Math.round(netdata.options.update_every / 1000) + update_every: netdata.options.update_every }; try { netdata.debug('loading module\'s ' + netdata.options.modules[n].name + ' config ' + netdata.options.modules[n].config_filename); @@ -239,6 +238,7 @@ function findModules() { } } + // netdata.debug(netdata.options.modules); return found; } |