Can not connect Prometheus to target server error: dial tcp xx.xx.xxx.x:9182: connectex: No connection could be made because the target machine actively refused it

My team and I are using Window for our Prometheus/Grafana setup. We installed the WMI exporter. We are able to connect to the host server but are not able to connect to the target servers, we are getting the following error: Get "http://xx.xx.xxx.x:9182/metrics": dial tcp xx.xx.xxx.x:9182: connectex: No connection could be made because the target machine actively refused it.

The target servers are Azure servers. We opened port 9182 for the WMI exporter between Prometheus and the target servers. We also opened port 9090 between Prometheus and the target servers. Are there any other ports we need to open between Prometheus and the target servers?

Do we need to install the WMI exporter on the target Azure server?

Also, we can not find the Azure exporter installer for Windows. We have found binaries but are not sure how or where to install these in the Prometheus server. Can you provide us with a working link? Or, can you provide with guidelines on how and where to install the Azure binaries on Prometheus?

Do we need to install the Azure exporter for Windows on the target Azure server? Also, how can we do this?

Please helps us to get the Prometheus to retrieve metrics from the target server???

I’m not fully clear about what you have setup.

You need to intall the Windows exporter on every machine that you want to monitor. They need to have any firewalls (both network and on the machine) adjusted to allow connections from your Prometheus server(s) to port 9182. How you install the exporter on each machine is up to you (as is how to configure any firewalls), but popular options include IAC tools such as Ansible, Terraform and PowerShell.

Port 9090 is needed to be able to connect to the Prometheus server from your machine to be able to access the Prometheus UI, or if you are wanting to run something like Grafana.

Thanks Stuart. Just replying to say we did figure out how to get this to work. And, we needed to add the WMI exporter to all the target destination servers using port 9182. The firewalls were opened. The majority are working now… We are troubleshooting the ones that are not…
And, we are using Grafana and the Windows Exporter Dashboard. The majority of the panels are retrieving information and it looks great.
Thanks, again!

@stuart

How to setup Windows server to monitor a Linux server '. I posted this question: Can help with this?

And, I posted this ’ Prometheus JMX Exporter for Peoplesoft monitoring’ - Can you help with this?