Add monitoring part (cpu, mem) and refactored using promises