Just wanted to put this out there as when I searched it didn't come back with anything. The error 'Cannot retrieve data from '127.0.0.1' at namespace 'root\CIMV2''.
This was happening when using an agent on a Windows server.
Resolved by using the below guidance: https://solarwindscore.my.site.com/SuccessCenter/s/article/Windows-Service-Monitor-returns-Invalid-Query?language=en_US