     memory: memory
     date: date
     cpus: cpus
+    vifs: vifs
+    xvds: xvds
   }
 
 stats.params = {


  json = parseXml(body)
  # Find index of needed objects for getting their values after
  # CPU: fetch every CPUs!
  cpusIndexes = []
  index = 0
  while (pos = $findIndex(json.rrd.ds, 'name', 'cpu' + index++)) isnt -1
    cpusIndexes.push(pos)

  memoryFreeIndex = $findIndex(json.rrd.ds, 'name': 'memory_internal_free')
  memoryIndex = $findIndex(json.rrd.ds, 'name': 'memory')
  memoryFree = []
  memoryUsed = []
  memory = []
  cpus = []
  date = [] #TODO
  # TODO: fetch other info: network, IOPS etc.


  $forEach json.rrd.rra[0].database.row, (n, key) ->
    # WARNING! memoryFree is in Kb not in b, memory is in b

    memoryUsed.push(Math.round(parseInt(n.v[memoryIndex])-(n.v[memoryFreeIndex]*1024)))
    memory.push(parseInt(n.v[memoryIndex]))
    date.push(key)
    # build the multi dimensional arrays
    $forEach cpusIndexes, (value, key) ->
      cpus[key] ?= []
      cpus[key].push(n.v[value]*100)
      return
    $forEach vifsIndexes, (value, key) ->
      vifs[key] ?= []
      vifs[key].push(n.v[value]) # * (if key % 2 then -1 else 1))
      return
    $forEach xvdsIndexes, (value, key) ->
      xvds[key] ?= []
      xvds[key].push(n.v[value]) # * (if key % 2 then -1 else 1))
      return
    return


  # the final object
  return {
