Factor out the API of the monitoring daemon