New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disk-windows incorrect plugin output #5414
Comments
The plugin output looks broken, after the percentage there should be a |
@Crunsher are you sure that the output is broken? To me the output looks ok. Also I tried to reproduce this issue but I did not make it. Output of the check_disk.exe directly from CLI Icinga 2 Master:
Icinga 2 Windows Agent:
|
I'm using nscp-local-disk for remote agent disk status and didn't look any further because that worked fine. I tried using check_disk.exe but the threshold seems to be only for the total free space on the machine or something weird like that, if you have a 100T partition and your 50GB C:\ is full you will get no alert or for whatever reason it decides to give CRITICAL on everything. edit: Going to test this plugin on hosts where all disks can use the same thresholds but it seems to work fine here. DISK OK - free space:Total 94378MB (62%): C:\ 10104 MB (20%): D:\ 3852 MB (38%): E:\ 10175 MB (99%): F:\ 10058 MB (98%): G:\ 49364 MB (96%): H:\ 10825 MB (53%): I think your next action is set logging a level higher and try and fetch a log message from the agent pushing the output and check if it gets mangled before it enters the API or after. ..."output":"DISK OK - free space:Total 75289MB (74%); C:\ 25619 MB (50%); D:\ 49670 MB (97%); ","performance_data":["C:\=25619MB;5084.8000000000002;2542.4000000000001;0;50848","D:\=49670MB;5119.7000000000007;2559.8500000000004;0;51197"],... |
I'm not sure if it's bug or a configuration issue. I'm pretty sure it used to work with these same versions of Icinga2 and Icingaweb2, so I'd say it's a configuration issue. |
@mcktr I failed to parse the output correctly myself 🤕 I'm going to close this for now, since it seems not reproducible/a temporary config error. If you run into this issue again, open a new ticket and reference this one. |
On this Windows server there are only one native drive: C:, S: and B: are network drives, maybe that has something to do with it, because on another Windows server where there are more than one native drive, the output is correct and lists all the native drives. I just deinstalled Icinga2, deleted Ok. So, if I wanted to add the S: and B: shares then, I could paste the output of > .\check_disks.exe (see that PowerShell image in my initial post) into a txt file (a PowerShell script run by Administrator and independently of Icinga2) and read that by Icinga2' PowerShell object CheckCommand. That's a workaround but would work (I tested it already: since the output string is the same and it comes from Closing this ticket is ok. |
I doubt that the Also I don't know if the function An other solution to yours is to use the Linux check |
I changed Icinga2 service to run as AFAIK |
Network drives should™️ work, if you run it with a user that has the appropriate permissions. Windows permissions being an issue is a known problem (ie check_update) |
Ok. Fortunately |
Network drives are mounted per user afaik, so you'd need to have them mounted for the user icinga2 runs as to see them. Not sure if the system user even sees them... |
I googled a bit and found a thread.
Possible solution, but it's a dirty one :-/
https://serverfault.com/questions/4623/windows-can-i-map-a-network-drive-for-a-service-account |
Thanks for your suggestions. |
@passboltUser Why not just put a check on the fileserver for the drives? Having it on client(s) could make it check the same volume multiple times, your fileserver is running out of space and you will get 30 warnings from 30 different hosts...
Also you can poll your shares via;
|
I solved this problem with the custom variable disk_win_show_used.
|
That can't be, show_used is only used in the computation and has nothing to do with how the disks are enumerated 😕 |
Expected Behavior
Seeing a correct
check_disk.exe
output in/icignaweb2
.Current Behavior
The output of
disk-windows
in/icingaweb2
seems to be cut off after the:
:Possible Solution
The
/icingaweb2
should print/parse the correct full output as shown when it's called from the PowerShell directly:Steps to Reproduce (for bugs)
This one is hard. I installed and removed the server and the clients several times, also did many config edits. So, unfortunately I don't know what exactly causes this error.
Your Environment
icinga2 --version
):icinga2 feature list
):icinga2 daemon -C
):zones.conf
file (oricinga2 object list --type Endpoint
andicinga2 object list --type Zone
) from all affected nodes.See also https://monitoring-portal.org/index.php?thread/41288-disk-windows-not-working-in-icingaweb2/&postID=252467#post252467.
One related bug I could find is this one: #3159
The text was updated successfully, but these errors were encountered: