Hey, I wasn't sure if you were having issues with collisions or collision messages, so here's some information on how to do both.
For proper collisions:
Make sure that your fluid's collision type is set to "All" in the inspector. Your non-fluid object needs a collider as well.
If that's not working, make sure that your layer collision is set up correctly in Project Settings -> Physics, so that the fluid's layer and the object's layer both register collisions.
To detect collisions through a script (collision messages):
Your script will need to inherit from and implement FluidCollisionPlugin in order to receive collision messages. You can then use OnFluidCollisionEnter(FluidCollision other), etc in your script. You also need to enable collision messages for your fluid. Note that collision messages incur an additional performance cost. Check the API reference
here for more information.