Measuring two DC power sources (Solar Panel + Battery)

jofu:
Yes I assume they do not have a common earth,

Perhaps so, but don't assume - find out!

Your circuit below connect the two earths together, so if they are at different potentials this could cause very high current and potentially damage things. You need to know the design of the circuit you're connecting in to before you can safely connect in to it.