Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/hostmetrics] Filesystem scraper doesn't respect env var when set #35043

Closed
atoulme opened this issue Sep 6, 2024 · 3 comments · Fixed by #35045
Closed

[receiver/hostmetrics] Filesystem scraper doesn't respect env var when set #35043

atoulme opened this issue Sep 6, 2024 · 3 comments · Fixed by #35045
Labels
bug Something isn't working receiver/hostmetrics

Comments

@atoulme
Copy link
Contributor

atoulme commented Sep 6, 2024

Component(s)

No response

What happened?

When setting the environment variable HOST_PROC_MOUNTINFO, the filesystem scraper will read mount points from the proper location, but will still apply the root_path prefix to each mount point to read its information.

Instead, when the env var HOST_PROC_MOUNTINFO is set, we should not prefix the mount point with the root_path prefix.

Collector version

v0.108.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@atoulme atoulme added bug Something isn't working needs triage New item requiring triage labels Sep 6, 2024
Copy link
Contributor

github-actions bot commented Sep 6, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@rogercoll
Copy link
Contributor

Is there any documentation about the HOST_PROC_MOUNTINFO env variable? I couldn't find any in the scraper's README https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/documentation.md but on the internal gopsutil package

Should we create a followup documentation issue?

@atoulme atoulme removed the needs triage New item requiring triage label Sep 10, 2024
@atoulme
Copy link
Contributor Author

atoulme commented Sep 10, 2024

I have opened shirou/gopsutil#1707 to make this env var official in gopsutil. Once merged and adopted, we can document in the scraper.

dmitryax pushed a commit that referenced this issue Sep 10, 2024
)

**Description:** 
In filesystem scraper, do not prefix partitions when using the
environment variable HOST_PROC_MOUNTINFO

**Link to tracking Issue:**
Fixes #35043
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this issue Oct 4, 2024
…n-telemetry#35045)

**Description:** 
In filesystem scraper, do not prefix partitions when using the
environment variable HOST_PROC_MOUNTINFO

**Link to tracking Issue:**
Fixes open-telemetry#35043
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/hostmetrics
Projects
None yet
2 participants