use a proximity sensor ![]()
These sensors will often use in industrial PLC (SPS) controls.
You can adjust the sensitivity level by a small crew. We did use this sensors in a galvanic tool for detection of water and acids in plastic pumplines to prevent pums to run dry. It's easy, to place the sensor outside of pipe.
A other solution is a calorimetric sensor. Use a PTC or NTC heat it up per current, measure the voltage over the resistor. If the sensor will cool down by liquid, the voltage will be different ![]()