Hello,
I have a Debian server and a Windows client.
I installed Grafana, Prometheus and Prometheus Node Exporter on Debian, then installed windows_exporter on Windows.
I configured the Debian server for monitoring as follows:
- job_name: "Local_Linux"
scrape_interval: 10s
static_configs:
- targets: ["localhost:9100"]
It works fine and now I want to add the Windows client for monitoring. The service is running correctly on port 9182 from Windows OS:
C:\Users\Grafana>netstat -nat
Active Connections
Proto Local Address Foreign Address State Offload State
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:5040 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:9182 0.0.0.0:0 LISTENING InHost
TCP [::]:135 [::]:0 LISTENING InHost
TCP [::]:445 [::]:0 LISTENING InHost
TCP [::]:9182 [::]:0 LISTENING InHost
I added the following lines to the Prometheus configuration file on Debian server:
- job_name: "Windows_10"
scrape_interval: 10s
static_configs:
- targets: ["Windows_IP:9182"]
Then I checked the targets
on Debian server and Windows was added:
Now in the Datasource
section of my dashboard I only see Local Linux which is my Debian server:
What is wrong? How to add Windows client?
Thank you.
Hi,
Do you have the metrics from the windows server in Explore metrics (you can execute a query like up{job="Windows_10"}
and {job="Windows_10"}
? Can you also share the variables definitions?
1 Like
Hi,
Thank you so much for your reply.
I’m a beginner. Can you tell me where I should perform this query?
When I go to http://localhost:9182/metrics
in Windows, I see some information like the following:
# HELP go_build_info Build information about the main Go module.
# TYPE go_build_info gauge
go_build_info{checksum="",path="github.com/prometheus-community/windows_exporter",version="(devel)"} 1
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0.000613
go_gc_duration_seconds{quantile="1"} 0.0026829
go_gc_duration_seconds_sum 0.6339002
go_gc_duration_seconds_count 2069
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent
# TYPE go_gc_gogc_percent gauge
go_gc_gogc_percent 100
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes
# TYPE go_gc_gomemlimit_bytes gauge
go_gc_gomemlimit_bytes 2e+08
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 21
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.23.4"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 3.125704e+06
...
The Explore section in Grafana at /explore path (http(s)://your-domain/explore).
There will be a screen with query builder / code and in there type the quieries.
As for variables, go to dashboard settings (gear icon), Variables tab and screen the settings of those.
1 Like
Thanks again.
Variables tab?
Hello,
I think I need to use the Windows Exporter Node
dashboard to display Windows clients. I added this dashboard, but information from many critical client areas such as CPU load, Memory, Network, etc. is not displayed:
Why?
I will need two things from you:
- To confirm that the metrics from the Windows server are in Grafana. You can do that by going to the explore page that should look like this:
and execute the queries I’ve typed recently.
- To show the definitions of the variables used in the dashboard from this screen:
You can access them by entering the dashboard (the same page you did the screenshot from) and go into settings of the dashboard (above the time picker that shows Last 24 hours
on the screen there should be a gear icon - I have old Grafana version so I have a bit different layout). In there go to the Variables
tab
and for Job and Instance variables click on it and screen the settings of the variable - I want to check how they are composed, so that they are not visible (if the metrics are accessible).
As for the another dashboard - that would probably be needed, I think the metrics from Windows Server might differ from the metrics of Linux VMs.
2 Likes
Thanks again.
I ran the query:
The variables are as follows:
The query should be up{job="Windows_10"}
, not job{up="windows_10"}
Can you also run query windows_cs_hostname{}
?
Sure.
up{job="Windows_10"}
:
windows_cs_hostname{}
:
Ok, so the metrics are in Grafana. Can you link the dashboards you have downloaded? Can you also confirm that the metrics the panels are using are also visible in Explore mode (without variables in queries starting from $
sign)?
1 Like
Hi,
Thanks again.
I downloaded this dashboard.
Do you mean I should run the query in explore mode without the $
sign?
Is that what you mean?
Hello,
The problem was resolved by installing the Windows Exporter Dashboard 2024
with ID 10467
. In my opinion, having so many different dashboards, some of which have problems, is a weakness for Grafana.
Thank you.
Adding a new client is always an exciting step! Depending on the platform or system you’re using, the process can vary, but usually, you’ll need to input essential details like the client’s name, contact information, and any specific preferences or needs they might have. Is there a specific platform you’re using for client management? I’d be happy to guide you further!
Closing this one as it is solved and also keep the other one in it’s own thread
1 Like