Articles in this section
Category / Section

How to Monitor Performances with Prometheus and WMI Exporter on Grafana Dashboard in Windows

Published:
Updated:

Monitoring Performance with Prometheus and WMI Exporter on Grafana Dashboard

Required Tools for Performance Monitoring:

To monitor performance effectively, we need to install the following tools:

  • WMI Exporter: WMI Exporter provides system metrics from Windows machines
  • Prometheus: Prometheus handles data collection
  • Grafana: Grafana creates customizable dashboards for visual analysis

These tools will allow us to collect, export, and visualize real-time performance metrics. This setup enables us to monitor, analyze, and troubleshoot system performance issues effectively.

Installing WMI Installer:
  1. Download the MSI file from the GitHub repository linked below and proceed with the installation:
    Windows Exporter Releases on GitHub
    Download Link: windows_exporter-0.28.1-amd64.msi

  2. Open Windows PowerShell in administrator mode at the file location and run the following command to install the service.

    windows_exporter.exe --collectors.enabled="cpu,cs,iis,logical_disk,net,os,service,system,textfile" --web.listen-address=":9182"
    

    install-service.png

  3. Open the Services management console and confirm that the WMI Exporter service is running on the machine.

    services-page.png

  4. Open your browser and navigate to the WMI Exporter URL:
    http://localhost:9182/metrics

    wmi-export-url.png

Installing Prometheus:

  1. Download the latest version of Prometheus using the link below:
    Prometheus Downloads
    Download Link: prometheus-2.53.2.windows-amd64.zip

    download-prometheus.png

  2. Extract the zip file, then open Windows PowerShell in the extracted directory to proceed with the setup.

    extract-zip-file.png

  3. Edit the prometheus.yml file to include the WMI Exporter URL for proper monitoring configuration:

    - targets: ["localhost:9090", "localhost:9182"]
    

    prometheus-file.png

  4. Run the following command to execute the application and start its processes:

    .\prometheus.exe --config.file=prometheus.yml
    

    execute-application.png

  5. In your browser, navigate to the URL below. Click on Status and then Targets to verify that all endpoints are up and running:
    http://localhost:9090/

    check-status.png

    select-target.png

Installing Grafana:

  1. Download the Grafana installer from the link below and run it to complete the setup:
    Grafana Download Page
    Direct Download Link: grafana-enterprise-11.2.0.windows-amd64.msi

    download-grafana.png

  2. Install the application and verify that the service is running correctly.

    grafana-service.png

  3. Open your browser and go to the following URL to access Grafana:
    http://localhost:3000
    The default credentials for Grafana are username: admin and password: admin

    grafana-login-page.png

  4. Click on Data Sources under Connections, then select Add New Data Source.

    add-new-datasource.png

  5. Locate Prometheus in the list and click on it to select the data source.

    select-datasource.png

  6. Enter http://localhost:9090 in the Prometheus server URL field, then click Save & Test to verify the connection.

    prometheus-server-url-field.png

    prometeus-save.png

  7. Click on Home and then select Import Dashboard to add a new dashboard.

    import-dashaboard.png

  8. Select Add Visualization to perform a query to get the performance metrics of the sites in IIS.

    add-visualisation.png

  9. Select Prometheus in the data source section.

    select-prometheus.png

  10. Now you can run the query in code mode to get the performance metrics of the sites hosted in IIS.
    Example Query: windows_iis_current_connections{site=“BoldReports_EnterpriseReporting”}

    site-performance.png

  11. You can save the dashboard by providing a name for it.

    click-save.png

    name-for-the-dashboard.png

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied