Skip to content

Wrong values for disk usage on windows #14

@w00dst0ck

Description

@w00dst0ck

I've compiled your exporter on windows with go build and it compiled without any error.
Also it's possible to execute the resulting binary disk_usage_exporter.exe.

E:\disk_usage_exporter-0.4.0>disk_usage_exporter.exe -m file -p z:\
time="2023-09-13T10:48:10+02:00" level=info msg="Disk Usage Prometheus Exporter <<< filled in by build >>>\tbuild date: <<< filled in by build >>>\tsha1: <<< filled in by build >>>\tGo: go1.21.1\tGOOS: windows\tGOARCH: amd64"
time="2023-09-13T10:48:18+02:00" level=info msg="Analysis done"
time="2023-09-13T10:48:19+02:00" level=info msg="Stored stats in file ./disk-usage-exporter.prom"
time="2023-09-13T10:48:19+02:00" level=info msg="Done - exiting."

However, the directory and file sizes in the output do not match the real sizes in the file system.

# TYPE node_disk_usage_level_1_bytes gauge
node_disk_usage_level_1_bytes{path="e:\\Install"} 12288
node_disk_usage_level_1_bytes{path="e:\\temp"} 1.3725696e+07

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions