Add api for metrics

We expose just a couple of function one for container and one for
domain. The metric and the resource id are parameters.

Fixes #4