Hello,
I am having trouble with the check_disk.exe on some windows agents. It works fine on 10 other windows machines. But on three of those it returns:
Failed to access drive at D:\
These three machines where the command failes have in common that drive D is larger than on the machines where it works. The drive size is 8.7 TB.
Additionally they run un Windows Server 2019, all other machines have older versions of windows server.
Icinga version info of a machine where the command fails:
PS C:\Program Files\ICINGA2\sbin> .\icinga2.exe --version
icinga2.exe - The Icinga 2 network monitoring daemon (version: v2.13.3)
Copyright (c) 2012-2022 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
System information:
Platform: Windows
Platform version: 8 (Server)
Kernel: Windows
Kernel version: 6.2
Architecture: x86_64
Build information:
Compiler: MSVC 19.29.30141.0
Build host: WINBUILD2
OpenSSL version: OpenSSL 1.1.1n 15 Mar 2022
This is the debug output on the icinga master:
ICINGA2_API_PASSWORD=xxx icinga2 console --connect 'https://root@localhost:5665/' --eval 'get_service("host.xy.zz", "disk").last_check_result' | python3 -m json.tool
{
"active": true,
"check_source": "host.xy.zz",
"command": [
"C:\\Program Files\\ICINGA2\\/sbin/check_disk",
"-c",
"5%",
"-w",
"10%",
"-X",
"none",
"-X",
"tmpfs",
"-X",
"sysfs",
"-X",
"proc",
"-X",
"configfs",
"-X",
"devtmpfs",
"-X",
"devfs",
"-X",
"mtmfs",
"-X",
"tracefs",
"-X",
"cgroup",
"-X",
"fuse.gvfsd-fuse",
"-X",
"fuse.gvfs-fuse-daemon",
"-X",
"fdescfs",
"-X",
"overlay",
"-X",
"nsfs",
"-X",
"squashfs",
"-m"
],
"execution_end": 1658326571.784,
"execution_start": 1658326571.776,
"exit_status": 3,
"output": "Failed to access drive at D:\\",
"performance_data": [],
"schedule_end": 1658326571.784,
"schedule_start": 1658326571.784,
"scheduling_source": "icinga-master",
"state": 3,
"ttl": 0,
"type": "CheckResult",
"vars_after": {
"attempt": 1,
"reachable": true,
"state": 3,
"state_type": 1
},
"vars_before": {
"attempt": 1,
"reachable": true,
"state": 3,
"state_type": 1
}
}
The debug log on the windows machines shows:
[2022-07-20 14:22:03 -0000] notice/Process: Running command '"C:\Program Files\ICINGA2\/sbin/check_disk" -c 5% -w 10% -X none -X tmpfs -X sysfs -X proc -X configfs -X devtmpfs -X devfs -X mtmfs -X tracefs -X cgroup -X fuse.gvfsd-fuse -X fuse.gvfs-fuse-daemon -X fdescfs -X overlay -X nsfs -X squashfs -m': PID 8164
[2022-07-20 14:22:03 -0000] notice/Process: PID 8164 ('"C:\Program Files\ICINGA2\/sbin/check_disk" -c 5% -w 10% -X none -X tmpfs -X sysfs -X proc -X configfs -X devtmpfs -X devfs -X mtmfs -X tracefs -X cgroup -X fuse.gvfsd-fuse -X fuse.gvfs-fuse-daemon -X fdescfs -X overlay -X nsfs -X squashfs -m') terminated with exit code 3
If I run the command from the log of the windows machine in the powershell or cmd it works and I can see the stats of all disk just fine:
PS C:\Program Files\ICINGA2\sbin> .\check_disk.exe -c 5% -w 10% -X none -X tmpfs -X sysfs -X proc -X configfs -X devtmpfs -X devfs -X mtmfs -X tracefs -X cgroup -X fuse.gvfsd-fuse -X fuse.gvfs-fuse-daemon -X fdescfs -X overlay -X nsfs -X squashfs -m
DISK OK - free space:C:\ 389449 MB (85%); D:\ 6874110 MB (75%); E:\ 1830230 MB (100%); F:\ 1373380 MB (75%); | 'C:\'=389449MB;45718.300000000003;22859.150000000001;0;457183 'D:\'=6874110MB;915454.20000000007;457727.10000000003;0;9154542 'E:\'=1830230MB;183076.60000000001;91538.300000000003;0;1830766 'F:\'=1373380MB;183076.60000000001;91538.300000000003;0;1830766
For some reason the command execuded by Icinga yields a different result than manual execution. Is there a way to debug this further?
Any help is very welcome!
Thanks!