grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.34k stars 187 forks source link

prometheus.exporter.windows in alloy > 1.3.3 not collecting windows_process_* and several logical_disk_* metrics anymore #1860

Closed Nachtfalkeaw closed 15 hours ago

Nachtfalkeaw commented 2 days ago

What's wrong?

I was using grafana alloy v1.3.3 with component "prometheus.exporter.windows". With this version it was possible to collect metrics such these below:

windowsprocess windows_logicaldisk windows_physicaldisk*

Since upgrade to alloy 1.4.0.rc2 / rc3 / 1.4.1 / 1.4.2 these metrics cannot be collected anymore.

These are my enabled collectors: enabled_collectors
["cache", "cpu", "cpu_info", "cs", "logical_disk", "logon", "memory", "netframework_clrexceptions", "netframework_clrinterop", "netframework_clrjit", "netframework_clrloading", "netframework_clrlocksandthreads", "netframework_clrmemory", "netframework_clrremoting", "netframework_clrsecurity", "net", "os", "physical_disk", "process", "system", "tcp", "time"]

Mayby other metrics are missing which I am not aware of.

Steps to reproduce

Try to collect some of these metrics with alloy 1.4.x

windowsprocess windows_logicaldisk windows_physicaldisk*

System information

Windows 11, Windows Server 2022

Software version

Alloy 1.4.2

Configuration

//======================================================================================= // BEGINN: Windows Exporter //======================================================================================= // windows_exporter verweist dann auf die .windows. Komponente. prometheus.scrape "windows_exporter" { job_name = "windows_exporter" // sonst heißt der job "prometheus.scrape.windows_exporter" scrape_interval = "15s" scrape_timeout = "14s" // metrics_path = "/metrics" // scheme = "http" extra_metrics = true

targets = prometheus.exporter.windows.windows_exporter.targets

// ersetzt die 127.0.0.1 im relabel Prozess durch das Ergebnis von constants.hostname forward_to = [prometheus.relabel.windows_exporter.receiver]

}

//======================================================================================= // windows_exporter

prometheus.exporter.windows "windows_exporter" {

// enabled_collectors definiert exakt welche Metriken erhoben werden sollen. enabled_collectors = ["cache","cpu","cpu_info","cs","logical_disk","logon","memory","netframework_clrexceptions","netframework_clrinterop","netframework_clrjit","netframework_clrloading","netframework_clrlocksandthreads","netframework_clrmemory","netframework_clrremoting","netframework_clrsecurity","net","os","physical_disk","process","system","tcp","time"]

// disabled // "thermalzone","iis","mssql","textfile","scheduled_task","service","ad","adcs","adfs","container","dfsr","dhcp","dns","exchange","fsrmquota","hyperv","mscluster_cluster","mscluster_network","mscluster_node","mscluster_resource","mscluster_resourcegroup","msmq","teradici_pcoip","vmware_blast","vmware","remote_fx","smtp","terminal_services"

// "process" muss bei "enabled_collectors" aktiviert sein process { include = ".*" exclude = "" }

// "scheduled_task" muss bei "enabled_collectors" aktiviert sein // scheduled_task { // include = "" // exclude = ".+" // }

// "service" muss bei "enabled_collectors" aktiviert sein service { where_clause = ".alloy." } }

//======================================================================================= // Setzt als "job" den Name "windows_exporter" weil es oben mit "job_name" in "prometheus.scrape.windows" nicht funktioniert. // ersetzt den Wert des labels "job" mit "windows_exporter"

prometheus.relabel "windows_exporter" {

// relabel Funktion rule { action = "replace" replacement = "windows_exporter" target_label = "job" }

// Anschließend die Metriken an die remote_write config senden forward_to = [prometheus.relabel.localhost.receiver] } //======================================================================================= // ENDE: Windows Exporter //=======================================================================================

Logs

No response

Nachtfalkeaw commented 1 day ago

Looks like the same issue here: https://github.com/grafana/alloy/issues/1845

Adding something to the "exclude" will solves the issue. At least I tested this for "process" metrics.

So maybe this one here can be closed or merged.

ptodev commented 15 hours ago

Hi, thank you for reporting this problem, and apologies for the inconvenience :/ We can indeed close this issue since it's duplicate of #1845. We will fix this issue in Alloy 1.4.3, which will be released at some point next week.