monitoring-plugins
monitoring-plugins copied to clipboard
disk-usage: FileNotFoundError on Windows Server
This issue respects the following points:
- [X] This is a bug, not a question or a setup/configuration issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] I use the latest release of the Monitoring Plugins (https://github.com/Linuxfabrik/monitoring-plugins/releases).
- [X] I agree to follow Monitoring Plugins's Code of Conduct.
Which variant of the Monitoring Plugins do you use?
- [ ] .rpm/.deb package from repo.linuxfabrik.ch
- [ ] Compiled for Linux (.tar/.zip from download.linuxfabrik.ch)
- [X] Compiled for Windows (from download.linuxfabrik.ch)
- [ ] Source Code from GitHub
Bug description
Running the disk-usage.exe plugin on two virtual machines running Windows Server 2019 I get this error:
PS C:\Program Files\ICINGA2\linuxfabrik> .\disk-usage.exe
Traceback (most recent call last):
File "C:\PROGRA~1\ICINGA2\LINUXF~1\disk-usage", line 337, in 'module'
File "C:\PROGRA~1\ICINGA2\LINUXF~1\disk-usage", line 206, in main
File "C:\PROGRA~1\ICINGA2\LINUXF~1\psutil\__init__.py", line 2005, in disk_usage
File "C:\PROGRA~1\ICINGA2\LINUXF~1\psutil\_pswindows.py", line 280, in disk_usage
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C'
This error is happening on two virtual machines running RDS Terminal Services and does not happen on all other similar virtual machines running the same operating system.
Steps to reproduce - Plugin call
.\disk-usage.exe
Steps to reproduce - Data
No response
Environment
Windows Server 2019
Plugin Version
disk-usage.exe: v2023051201 by Linuxfabrik GmbH, Zurich/Switzerland
Python version
No response
List of Python modules
No response
Additional Information
No response
I installed "RDS Terminal Services" in Windows like so:
- Server Manager > "Add roles and features" > "Role-based or feature-based" > "Remote Desktop Services" > "Remote Desktop Session Host"
After a reboot, in "Services", I now have "Remote Desktop Services" (C:\Windows\System32\svchost.exe -k termsvcs) up and running, and disk-usage.exe still runs perfectly fine in Command Window (not tested in PowerShell).
So I can't reproduce this issue. Anything that I am missing @mmartinello?
So I can't reproduce this issue. Anything that I am missing @mmartinello?
These two servers are two full RDS environments installed with this feature:
I really don't know if there is a feature which interferes with your plugin, maybe a special configuration on the RDS environment?
What I can tell you for sure is that these two VMs are completely like the same and they were installed in the same way (but not cloned).
Do you want to have a remote session with me so that we could debug the plugin on that specific machines?
I tried to install the RDS as you did, but even after a Windows update, my Windows Srv 2019 fails to install RDS this way.
Debugging on your site requires installing the Python interpreter including some other 3rd party libraries via pip on one of these machines, and we can't do that for free. Would you mind sending your contact information to info at linuxfabrik dot ch to discuss some options?
I have the same issue, but no RDS installed. The plugin was working fine for more than a year. And today stopped working. Same error message, however I am using Windows Server 2022 Datacenter (21H2 Build 20348.2031).
Only updated the Microsoft Defender Antivirus yesterday to 1.399.1217.0. Checked for any blocked/removed file actions, but there are none.
I am unable to reproduce this issue.
- Installed Windows Server 2019 Standard (Vagrant).
- Installed our plugins for Windows from download.linuxfabrik.ch, latest release.
- disk-usage.exe is working fine.
- Applied all Windows Updates (and was once again reminded of how nice it is under Linux).
- Reboot.
- disk-usage.exe is still working fine.
Any ideas?
Did another installation of windows updates. No errors now. No idea what caused or solved it, but it seems to be related to windows updates. (I agree about updates under Linux ;-) , but sadly we do not always have the choice.)
Ok, good to know. Thanks for your feedback.
Not sure how, but after a reboot, the problem is back.
Today the problem has resolved itself. As far as I can see, nothing changed on the server. No updates, no scans, no crashed or restarted services. It is a mystery.
I am guessing it will be back after a reboot.
Would be nice to know...