windows_exporter icon indicating copy to clipboard operation
windows_exporter copied to clipboard

cannot scrape metrics on network drive

Open genzo0101 opened this issue 8 years ago • 9 comments

I would like to scrape metrics on usage of a network drive. I tried wmi_exporter but it only exposes local drives. In my understandings, Win32_LogicalDisk, Win32_MappedLogicalDisk are required to scrape network drives but wmi_exporter does not currently support these.

I also thought of using helper script but wmi_exporter also does not support a function like textfile-collector from node_exporter. I might be able to use mtail on windows but it would take time and effort.

I would like you to support wmi classes above and/or a function like textfile-colllector.

genzo0101 avatar Jul 20 '17 13:07 genzo0101

This seems simple enough, the class Win32_MappedLogicalDisk doesn't appear to have anything unexpected in it.

I'm a bit surprised that you do not see the disk already, though. On my machines mapped disks are returned by the existing logical disk query. What version of Windows are you running?

carlpett avatar Jul 20 '17 13:07 carlpett

I am using Win Server 2012 R2. Do you mean you can see the disk that is mounted via network mapped to a drive letter with wmi exporter in a default configuration?

genzo0101 avatar Jul 22 '17 13:07 genzo0101

Sorry, turns out I checked the wrong thing. Win32_LogicalDisk does contain mapped drives, but we actually use the underlying Win32_PerfRawData_PerfDisk_LogicalDisk class, which does not.

Sadly it looks like there is no "PerfRaw" class for the mapped logical disk, either. We prefer to use those classes, since they often contain less manipulated data. We'll have to consider using the mapped disk class directly, then.

carlpett avatar Jul 22 '17 17:07 carlpett

Hi guys,

I've just wanted to ask if above is resolved or maybe there is any workaround to obtain network mapped drive metrics ? Thanks in advance !

Ged

GedPL avatar Nov 18 '21 12:11 GedPL

@GedPL not yet, but I'll see if I can write up a collector or sub-collector for this class.

breed808 avatar Nov 20 '21 06:11 breed808

Hi @breed808 , Actually I've created such a separate collector (logical_mapped_disk) based on your logical_disk code and Win32_MappedLogicalDisk class (as I haven't found corresponding perfmon counters). I can share this one if you want :)

Thanks ! Ged

GedPL avatar Nov 20 '21 08:11 GedPL

Yes please, we'd be happy to receive a pull request for this :+1:

breed808 avatar Nov 20 '21 09:11 breed808

Will do once completed. Thanks !

GedPL avatar Nov 22 '21 09:11 GedPL

Greatly need this. Please advise about pull request

cleroyer avatar Dec 13 '21 07:12 cleroyer

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

github-actions[bot] avatar Dec 24 '23 02:12 github-actions[bot]