Application of Riemannian geometry to the thermodynamics of a simple fluctuating magnetic system