You could use the hydrostatic pressure of the fluid. Connect a pressure sensor to the tank below the level of the fluid. A typical sensor uses 24V supply and delivers 4-20mA as a data signal. 10m of water gives a pressure of 1 bar, so 1 mbar is 1 cm. The connection is typically ½" or ¼". The current signal you can then convert to 1-5V using a 250 ohm resistor. A link is
here. When using a different fluid than water, you will need to add a density factor.