NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
177 stars 95 forks source link

[Windows] Some mounted volumes/disks are not reported #904

Closed btrnka63 closed 1 year ago

btrnka63 commented 1 year ago

Hello, I'd like to ask for a support to troubleshoot and fix a bit weird issue. I created few VHD (virtual hard disks) - all the same way, all the same size. I named them "E", "F", "L", "DATA1", and "DATA1Log". Once created I mounted them as:

Now, checking the API/disk/logical I see only "E:/", "E:/DATA1/", "E:/DATA1Log/", "F:/" and "L:/". Any clue why the "DATA1" and "DATA1Log" are not reported under "F:/" and/or "L:/"?!

disk_management ncpa_report

Using newest NCPA version 2.4.0 for Windows OS.

Thanks a lot!

btrnka63 commented 1 year ago

I did few more tests and found:

It seems the sub-mounts are reported only for the first drive/occurrence and only these mounted under same drive; ignoring all others sub-mounts for other drives.

ericloyd commented 1 year ago

This isn't really a support channel, but if you're looking to help figure out a bug, you've come to the right place. What version Windows?

btrnka63 commented 1 year ago

Hi, yes, I'm aware this is not a "support channel" ... My intention was to report a bug, but was not sure if it's really a bug and what exactly is the bug. Request for support was meant more as a request for help to identify the bug. Based on my previous comment I'm quite sure there is some bug in the data processing logic skipping the next occurrences of mounted volumes/disks.

I've done my tests at Windows 10 Pro (Version 21H2), but the issue was reported also for Windows Server 2016 Standard OS.

Pls, let me know if further details are needed. Thanks.

ericloyd commented 1 year ago

Cool. Let me see if I can duplicate it on similar (but different) Windows version.

ccztux commented 1 year ago

Maybe its the following, already fixed psutil bug?: https://github.com/giampaolo/psutil/pull/1961

There is also this thread #844 with some similar issues.

If its the above mentioned psutil issue a new ncpa build with an up2date psutil version would be very welcome.

ericloyd commented 1 year ago

Ha! I was just starting to type something out, but yes, I think @ccztux nailed it. PSUTIL bug seems like 100% fit to me. I can at least concur that I can recreate the problem on Windows 2018

ccztux commented 1 year ago

@ericloyd Thanks for testing!

btrnka63 commented 1 year ago

Hi, thanks a lot for prompt effort. The "psutil/#1961" issue really looks like the relevant one. I'm looking forward for the new NCPA release.

btrnka63 commented 1 year ago

Hello, I just noted there is a new version 2.4.1 ... could anyone confirm it was build with the new psutil version fixing these kind of issues? Thanks.

btrnka63 commented 1 year ago

Hi, just tested actual version 2.4.1 and can confirm the issues is fixed in it.