The case for AGN feedback in galaxy groups