using a product designed for residential use - fresh water in a salt water environment. If it is a couple of metal strips or discs and the alarm responds to resistance changes it may die quickly in the corrosive salt environment. A float switch intended for marine use is a better choice.
The one I use for the alarm uses a plastic float, a magnet and a reed switch. Very common but for low current use only.