Preference: https://github.com/prometheus-community/windows_exporter
pls take a note: windows_exporter supports Windows Server versions 2008R2 and later, and desktop Windows version 7 and later.
Download exporter: windows_exporter-0.16.0-amd64.msi
Step 1: On your windows server run cmd with administrator
Step 2: Parameters are sent to the installer via msiexec. Example invocations from github:
msiexec /i <path-to-msi-file> ENABLED_COLLECTORS=os,iis LISTEN_PORT=5000
Defaults port: 9182
i used default so my command look like bellow:
msiexec /i C:\Users\admin\Downloads\windows_exporter-0.16.0-amd64.msi ENABLED_COLLECTORS="ad,cpu,cs,dns,logon,iis,memory,logical_disk,net,os,service,system,process,tcp,textfile,thermalzone,terminal_services,vmware"
ok, now you can see windows_exporter is running on windows services
Check windows_exporter by open internet browser then try: http://localhost:9182
Step3: add job name on prometheus.yml
vi /etc/pormetheus/prometheus.yml
Add new job_name to this file
- job_name: 'windows_DHV'
static_configs:
- targets: ['X.X.X.X:9182']
labels:
hostname: YourWindowsHostName
type: windows
company: DVH
Then restart prometheus services:
systemctl restart prometheus
Check on Promethus http://X.X.X.X:9090/targets , status is UP
Step 4: Import Dashboard on Grafana
I've download JSON dashboard at https://grafana.com/grafana/dashboards/10467 then try to translate from CN to English, you should prepare JSON before you import dashboard on your Grafana.
On Grafana select Import > then choose Upload JSON file > Navigate to your JSON local file then Import him
No comments:
Post a Comment