Added support for a metrics collections

insert a batch of metrics instead of one at a time

only allow metrics to be added if the unit is alive