windows_exporter icon indicating copy to clipboard operation
windows_exporter copied to clipboard

Lots of warnings: No Network Stats for container

Open bip7686 opened this issue 3 years ago • 3 comments

I'm running the windows exporter through wins for my kubernetes cluster. The windows exporter is printing a lot of messages like:

time="2021-06-15T18:28:29+02:00" level=info msg="No Network Stats for container: 52026722c95ef2d36d3bc894dfe4ee1e910277c315e4878fa43b3dddc533e5e2" source="container.go:231"

WMI Setup:

time="2021-06-15T14:26:06+02:00" level=info msg="Enabled collectors: cache, system, os, cpu, memory, logical_disk, cs, container, service, net" source="exporter.go:347"
time="2021-06-15T14:26:06+02:00" level=info msg="Starting windows_exporter (version=0.16.0, branch=master, revision=f316d81d50738eb0410b0748c5dcdc6874afe95a)" source="exporter.go:399"
time="2021-06-15T14:26:06+02:00" level=info msg="Build context (go=go1.15.6, user=appveyor-vm\\appveyor@appveyor-vm, date=20210225-10:52:19)" source="exporter.go:400"
time="2021-06-15T14:26:06+02:00" level=info msg="Starting server on 0.0.0.0:9100" source="exporter.go:403"
time="2021-06-15T14:26:06+02:00" level=info msg="TLS is disabled." source="gokit_adapter.go:38"
time="2021-06-15T14:26:06+02:00" level=error msg="Failed to start service: The service process could not connect to the service controller." source="exporter.go:337"

Windows Node: BuildNumber: 17763 Version: 10.0.17763

bip7686 avatar Jun 15 '21 17:06 bip7686

Just to be clear, is this about missing data that should be there, or about excessive logging? Does the containers actually have network interfaces attached to them?

carlpett avatar Jun 16 '21 18:06 carlpett

The data seems to be there. How would I check if the containers have network interfaces attached to them?

bip7686 avatar Jun 17 '21 08:06 bip7686

checkout how this can be done with hostprocess containers. There are also examples on wiring all this up with the rest of the Prometheus stack in https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/windows.md

jsturtevant avatar Jun 16 '22 21:06 jsturtevant

This is still an issue even when exporter is running as hostprocess. I have deployed the exporter using hostprocess to few AKS clusters integrated with kube-prometheus.

https://github.com/prometheus-operator/kube-prometheus/pull/2048

I can see cpu and memory metrics for containers in Windows dashboards but nothing for network.

time="2023-03-21T14:01:48Z" level=info msg="No Network Stats for container: fc7bcf92522b968ccc1f4cde542c37360a9cbbb1bec9ef2e85be29f2bc6435b0" source="container.go:262" time="2023-03-21T14:01:48Z" level=info msg="No Network Stats for container: fd803dea296ebb94722e95691696bb056d6b2aec18779d3a55bd33121487bd3b" source="container.go:262" time="2023-03-21T14:01:48Z" level=info msg="No Network Stats for container: febe4ed5b0a9e67f717f230c15e70f70f29ffefb815b3db17ebef06d09abd5fa" source="container.go:262"

dineshsharmads avatar Mar 21 '23 14:03 dineshsharmads

@dineshsharmads See https://github.com/prometheus-community/windows_exporter/issues/1129 which .

Are you using contianerd? The issue for networking is related to how stats are queried in HCS v1/v2. Let's continue the conversation in #1129

jsturtevant avatar Mar 22 '23 16:03 jsturtevant