Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(inputs.net): Skip checks in containerized environments #16580

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Mar 4, 2025

Summary

When running in containerized environments existing interface checks fail for cases where procfs is not mounted in /proc because the net.Interfaces() function will perform a syscall not taking the HOST_PROC environment variable into account. Therefore, this PR will disable the checks in cases where the HOST_PROC environment variable is set.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16564

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Mar 4, 2025
@srebhan srebhan self-assigned this Mar 4, 2025
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Mar 4, 2025

@DStrand1 DStrand1 merged commit ea2c361 into influxdata:master Mar 5, 2025
27 checks passed
@github-actions github-actions bot added this to the v1.34.0 milestone Mar 5, 2025
asaharn pushed a commit to asaharn/telegraf that referenced this pull request Mar 10, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Host Network Statistics in Docker Environment – inputs.net Collects Container Instead of Host
2 participants