Water/flood sensor?

+1 for a float switch.

Hermetically closed; usually based on a fixed reed tube with magnet attached to a float. Water level rises, float is pushed up, magnet closes the switch (or opens it, depending on the design).