Creating alerts based on metrics