an ionizer for treating swimming pool water including an enclosure and an electrode housing . the electrode housing is removably secured to a wall of the enclosure and integrally includes a mounting bracket , a hollow cylindrical body , a sensor well , and a projection . the projection sealingly receives a pair of ion - producing electrodes . a vibration sensor is attached to an interior surface of the housing , and is operable to sense when water is flowing through the electrode housing . a method for determining and indicating when the electrodes need replacement is also disclosed .