Rewrite keep-alive as monitor