linuxAgent.js
function (metric) {
      var now = (new Date().getTime()).toFixed(0)
      var line = null
      if (metric.sct === 'OS' && /collectd/.test(metric.name)) {
        line = this.collectdFormatLine(metric)
      } else {
        if (metric.sct === 'OS') {
          // new OS metric format
          if (metric.filters instanceof Array) {
            line = util.format('%d\t%s\t%d\t%s\t%s', now, metric.name, metric.ts, formatArray(metric.filters), formatArray(metric.value))
          } else {
            line = util.format('%d\t%s\t%d\t%s', now, metric.name, metric.ts, formatArray(metric.value))
          }
          logger.log(line)
        } else {
          line = util.format('%d\t%s\t%d\t%s\t%s', now, (metric.type || this.defaultType) + '-' + metric.name, metric.ts, formatArray(metric.filters), formatArray(metric.value))
          logger.log(line)
        }
      }
      return line
    }
function (metric) {
      var now = (new Date().getTime()).toFixed(0)
      var line = null
      if (metric.sct === 'OS' && /collectd/.test(metric.name)) {
        line = this.collectdFormatLine(metric)
      } else {
        if (metric.sct === 'OS') {
          // new OS metric format
          if (metric.filters instanceof Array) {
            line = util.format('%d\t%s\t%d\t%s\t%s', now, metric.name, metric.ts, formatArray(metric.filters), formatArray(metric.value))
          } else {
            line = util.format('%d\t%s\t%d\t%s', now, metric.name, metric.ts, formatArray(metric.value))
          }
          logger.log(line)
        } else {
          line = util.format('%d\t%s\t%d\t%s\t%s', now, (metric.type || this.defaultType) + '-' + metric.name, metric.ts, formatArray(metric.filters), formatArray(metric.value))
          logger.log(line)
        }
      }
      return line
    }
function ( metric ) { var now = ( new Date ( ) . getTime ( ) ) . toFixed ( 0 ) var line = null if ( metric . sct === 'OS' && / collectd / . test ( metric . name ) ) { line = this . collectdFormatLine ( metric ) } else { if ( metric . sct === 'OS' ) { // new OS metric format if ( metric . filters instanceof Array ) { line = util . format ( '%d\t%s\t%d\t%s\t%s' , now , metric . name , metric . ts , formatArray ( metric . filters ) , formatArray ( metric . value ) ) } else { line = util . format ( '%d\t%s\t%d\t%s' , now , metric . name , metric . ts , formatArray ( metric . value ) ) } logger . log ( line ) } else { line = util . format ( '%d\t%s\t%d\t%s\t%s' , now , ( metric . type || this . defaultType ) + '-' + metric . name , metric . ts , formatArray ( metric . filters ) , formatArray ( metric . value ) ) logger . log ( line ) } } return line }
osnet    1457010656149    lo    0    0
osnet 1457010656149 lo 0 0