refactor heartbeat alert module