Infrastructure monitoring in the cloud: Optimizing performance and availability