Closed liurui-1 closed 1 year ago
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
This is expected behavior. If you run the receiver from a container -> container is a host. If you need to collect host metrics from a container, see https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver#collecting-host-metrics-from-inside-a-container-linux-only
Closing the issue as answered, feel free to reopen otherwise
Component(s)
receiver/hostmetrics
What happened?
Description
Some of the metrics got by
receiver/hostmetrics
are the metrics of the container itself. While we need the metrics for the host who owns the container. One typical example issystem.filesystem.usage
metric fromfilesystem
ResourceMetrics. Here is the example, you can see it is the metric for the container not for the host. In the host, we do not have that file system with mount point to/etc/resolv.conf
.Steps to Reproduce
Start the container and enable any exporter, you can find that metric
system.filesystem.usage
Expected Result
I expect the metric
system.filesystem.usage
for the host instead of the container.Actual Result
The metric
system.filesystem.usage
is for the container instead of the host.Collector version
0.63.1
Environment information
Environment
Ubuntu 18.04
OpenTelemetry Collector configuration
Log output
Additional context
No response