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] (Filesystems Scraper) Folder mounted volumes under windows are not reported #27203

Open
dloucasfx opened this issue Sep 26, 2023 · 7 comments
Assignees
Labels
bug Something isn't working receiver/hostmetrics

Comments

@dloucasfx
Copy link
Contributor

dloucasfx commented Sep 26, 2023

Component(s)

receiver/hostmetrics

What happened?

Description

The filesystem scraper uses GoPsutil lib to get the windows partitions/volumes stats; However, it only fetches letter mounted volumes https://github.com/shirou/gopsutil/blame/v3.23.8/disk/disk_windows.go#L108
If user mounted a volume to a path, the scraper will not get any metrics for that volumes

Steps to Reproduce

  • Add a new disk to a windows VM
  • from Disk Management tool, right-click the new volume, and select Change drive letter and paths.
    From there, add “Mount in the following empty NTFS folder” and select an empty dir on the C:\ drive and make sure there is NO assigned drive letter

Run the collector with this simple config

extensions:
  health_check:
    endpoint: 0.0.0.0:13133
  
receivers:
  hostmetrics:
    collection_interval: 10s
    scrapers:
      filesystem:

             
processors:
  batch:

  resourcedetection:
    detectors: [azure, system]
    override: false
    
  resourcedetection/internal:
    detectors: [system]
    override: true
    system:
      hostname_sources: [dns]
    
exporters:
  logging:
    loglevel: debug
  file:
    path: C:\logs

service:
  telemetry:
    logs:
      level: "info"
  extensions: [health_check]
  pipelines:
    metrics:
      receivers: [hostmetrics]
      processors: [batch, resourcedetection]
      exporters: [file]

Expected Result

The folder mounted volume is not present in the metrics

Actual Result

The folder mounted volume should be present in the collected metrics

Proposed Solution

We ran into this issue in the Signalfx agent and we implemented this https://github.com/signalfx/signalfx-agent/blob/main/pkg/monitors/filesystems/partitions_windows.go to address the issue as GoPSutil has not addressed the issue shirou/gopsutil#1245

Happy to move the SA implementation to here while waiting on gopsutil to fix it.

Collector version

main

@dloucasfx dloucasfx added bug Something isn't working needs triage New item requiring triage labels Sep 26, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

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

@dmitryax
Copy link
Member

Sounds good to me. I think we should try to push the fix in gopsutil before porting the SA implementation

@dloucasfx
Copy link
Contributor Author

Pushed the fix to gopsutil shirou/gopsutil#1534

Copy link
Contributor

github-actions bot commented Dec 4, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Dec 4, 2023
@braydonk
Copy link
Contributor

braydonk commented Dec 4, 2023

Keeping open since there's a PR open for this in gopsutil.

@github-actions github-actions bot removed the Stale label Dec 5, 2023
Copy link
Contributor

github-actions bot commented Feb 5, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Feb 5, 2024
@crobert-1 crobert-1 removed the Stale label Feb 5, 2024
Copy link
Contributor

github-actions bot commented Apr 8, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Apr 8, 2024
@crobert-1 crobert-1 removed the Stale label Apr 8, 2024
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
Development

No branches or pull requests

4 participants