If you need to determine the level of fluid you might think of some type of float switch system like what is typically used in a sump pit or a toilet tank. This Capacitive Fluid Level Sensor by dragonator uses a capacitive effect of the fluid to determine the level.
“The advantage of capacitive level sensors is that they can be used for basically any solid and liquid. They have no moving parts and scales incredibly easy. They make no contact to the liquid or solid being measured, and so can also be used for more corrosive liquids. The disadvantage is that they need to be calibrated for the liquid being measured. The capacitive level sensor has the 2 conducting plates in the form of 2 electrically isolated aluminium tubes, a smaller tube in a larger tube. The space between the tubes is the dielectric. When the tube is empty, the space is occupied by air. when the tube starts to fill, more and more of the space will be occupied by water. Water holds more charge than air and thus the capacitance will rise (mostly) linearly with the water level. “