An $$L^2$$-Index Formula for Monopoles with Dirac-Type Singularities