Apply EBS metrics gather change to master branch

As requested in pull request 93, here is the patch applied to master.