Implement instance monitoring.

Fixes #29