build statistics and alerts