Controls for sampling and drainage of drainage water