You would like to monitor your windows resources consumptions. Run your machines having WMI exporter installed which collects metrics such as Disk ,Memory and CPU usage. This further can be visualized by Grafana using Prometheus [ It collects data from configured targets at given interval]

Monitoring Windows Resources Using WMI Exporter and Prometheus :

To get your windows stats, you need to install these 3 softwares.

    1. WMI Exporter - Used for Windows machines to collect their resource consumptions.
    2. Prometheus - Scrapes the data to the configured targets.
    3. Grafana - Collected Data is visualised here.
  1. Wmi Exporter - You can download the updated version from the link

https://github.com/prometheus-community/windows_exporter/releases

      • Its an .exe file. Download it in your windows machine and double click the file.
      • Answer the general questions and install it.
      • Verify it whether exporter is running fine, go to your task manager. Click on Processes and search wmi_exporter.exe. If you have installed it correctly, should be able to see.
      • Go to your browser and hit - https://localhost:9182/metrics. You should be able to see all the metrics

2.Prometheus - You can download the latest version from the below link

https://prometheus.io/download/

      • Its a complete package which includes few folders and files in it.
      • Extract the ZIP file and notice 2 files which includes prometheus.yml and prometheus.exe
      • Open this file in any text editor. Replace the target options as per your machines wmi exporter HOST which is localhost:9182
      • Run the .exe file from the downloaded folder prometheus.exe. Install the prometheus as per any installation procedure of .exe softwares on Windows.
      • Go to your browser and hit - https://localhost:9090/targets. You should be able to see the defined target in the endpoint column.

3. Its time to setup your Grafana now.

  • You can download the updated version from the link

https://grafana.com/grafana/download?platform=windows

  • Its a complete package which includes few folders and files in it.
  • Extract the ZIP file and notice 2 files which includes bin folder.
  • Go to bin folder and run the grafana-server.
  • Verify it whether grafana-server is running fine, go to your task manager. Click on Processes and search grafana. If you have installed it correctly, should be able to see.
  • Go to your browser and hit - https://localhost:3000. You should be able to see the grafana home page.
  • Click on Add data source and select Prometheus and enter the details as per below pictures.
  • Click on Save and Test. You should be seeing the message as below - Data source is working.
  • Its time to visualise the metrics data of your windows machine. There are several ways you can write query to achieve this. But, Grafana already provides lot more dashboards available for us to use it.
  • We will see the easiest one where we can import the dashboard.
  • Click on Import.