Table of Contents
In this article we will monitor windows server with prometheus wmi_exporter. With linux server, you can read my following article.
Recommended Reading: Monitor linux server with Prometheus node exporter
Install wmi_exporter on windows server
First, you need to check the version to install at this link. The current version is v0.13.0.
Log in to the windows server you need to monitor, download the msi installation package with the link below.
https://github.com/prometheus-community/windows_exporter/releases/download/v0.13.0/windows_exporter-0.13.0-amd64.msiAfter downloading, install the software like you install other software. Double click on the installation file and next until finished.
Then, open Task Manager and go to the Processes tab, find the windows_exporter process and see if it is running. If the process is running, it is ok.

Now the windows exporter will run on port 9182. You need to open the firewall on the windows server to allow access to port 9182.
Set up prometheus configuration
And now, we will set up prometheus to call the windows exporter on the windows server.
You open the configuration file.
nano /etc/prometheus/prometheus.ymlYou add the content below at the end of the file.
- job_name: 'wmi_exporter'
metrics_path: /metrics
scrape_interval: 5s
static_configs:
- targets:
- hostname-winserver:9182Next, find the paragraph below and declare the rule alert file path for the windows server.
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
- "/etc/prometheus/rules/windows.yml"After editing, save the file but do not reload or restart the prometheus service.
Set up the alert server windows rule file
As you can see above, we set up prometheus to call a file containing alert rules for the windows server.
Now you create the file as below.
nano /etc/prometheus/rules/windows.ymlThen you use the rule structure as below to add it to the file.
groups:
- name: Windows Server
rules:
- alert: Server Windows Down
expr: up{job="wmi_exporter"} == 0
for: 10s
labels:
severity: "Critical"
annotations:
Summary: 'Server "{{ $labels.instance }}" down.'You can download the full rule file for windows server at my gitlab link.
Now you have reloaded the prometheus service.
systemctl reload prometheusSet up the Grafana monitor server windows dashboard
You can import and use the dashboard with ID 10467. However, this dashboard is displayed in Chinese.
If you want to use English, you can download the json file from my gitlab and import it.
Conclusion
Very fast and simple, isn’t it? You can now set up monitor server windows easily. Grafana provides you with a complete interface to view resources on the server. Alertmanager will ensure to send you notifications when the server has resource problems.
Em thử import json của anh nhưng không hiện thị metrics trên Grafana, anh hỗ trợ e với