Added a collect-metrics hook.

The collect-metrics hook will be used to probe units to collect and send their metrics to state.