Aggregate in separate process, make aggregation over nodes optional

Also fixed a bug where the wrong sample was used for aggregated gauges