i6-historian
Version:
Historian plugins for i6
25 lines (19 loc) • 696 B
JavaScript
var collector = require(__dirname + '/collector.js');
var historian = i6.historian;
historian.collectors = {};
module.exports.init = function(callback){
sails.log.info('[i6-historian] Initialize historian...');
Historian.find().exec((err,rows)=>{
if(err){
sails.log.error('[i6-historian] Something wrong when try to get historian configuration');
return;
}
if(rows.length<1) sails.log.warn('[i6-historian] No configuration available');
rows.forEach(row=>{
historian.collectors[row.name] = new collector(row);
});
callback();
});
};
module.exports.get = function(collector,query, cb){
};