Missing metrics from windows exporter

Hello,
we have installed Grafana Alloy on several Windows Servers where we have Azure Devops Agents. For scraping metrics from the servers we using windows.exporter.
Unfortunately in Grafana we have periodicaly missing metrics. Like every 15 min for 1-2 minutes.

The queries:
windows_cs_physical_memory_bytes{instance=~“$server”}
windows_os_physical_memory_free_bytes{instance=~“$server”}
windows_os_virtual_memory_bytes{instance=~“$server”}
and so no…

There is our Alloy config file:

logging {
    level = "info"
}
 
prometheus.exporter.windows "integrations_windows_exporter" {
    enabled_collectors = [
        "cpu",
        "cpu_info",
        "cs",
        "logical_disk",
        "system",
        "memory",
        "net",
        "os",
        "process",
        "service",
        ]
}  
discovery.relabel "integrations_windows_exporter" {
  targets = prometheus.exporter.windows.integrations_windows_exporter.targets
discovery.relabel "integrations_windows_exporter" {
  targets = prometheus.exporter.windows.integrations_windows_exporter.targets
 
  rule {
    target_label = "job"
    replacement  = "integrations/windows_exporter"
  }
 
  rule {
    target_label = "instance"
    replacement  = constants.hostname
  }
}
prometheus.scrape "integrations_windows_exporter" {
  targets    = discovery.relabel.integrations_windows_exporter.output
  forward_to = [prometheus.remote_write.default.receiver]
  job_name   = "integrations/windows_exporter"
}
prometheus.relabel "integrations_windows_exporter" {
  forward_to = [prometheus.remote_write.default.receiver]
 
  rule {
    source_labels = ["volume"]
    regex         = "HarddiskVolume.*"
    action        = "drop"
  }
}
 
 
prometheus.remote_write "default" {
    endpoint {
        url     = "https://domain.com/api/v1/push"
        headers = {
            "key" = "win-servers",
        }
 
        queue_config { }
 
        metadata_config { }
    }
}

For storage we use Mimir/azure storage accounts.
We use same configuration for monitoring windows servers where we have sonarqube running and there are no gaps in the graphs.
Also unix.exporter for monitoring linux servers works well.

Could you help please?
Simon

1 Like

Did you find the solution? I only get Prometheus and Loki metrics.