Skip to content
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

Windows 'updates.exe' times out #761

Open
5 of 8 tasks
withanhdammit opened this issue May 8, 2024 · 1 comment
Open
5 of 8 tasks

Windows 'updates.exe' times out #761

withanhdammit opened this issue May 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@withanhdammit
Copy link

This issue respects the following points:

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)
  • Compiled for Windows (from download.linuxfabrik.ch)
  • Source Code from GitHub

Bug description

Windows 'updates.exe' plugin always returns a timeout.

I initially had an issue with permissions, but following issue 695 resolved that, but now is returning timeouts.

This happens whether run via a check, from the command line, both standard as well as elevated.
image

image

image

Steps to reproduce - Plugin call

'C:\ProgramData\icinga2\usr\lib64\nagios\plugins\updates.exe' '--critical' '50' '--timeout' '300' '--warning' '2'

Steps to reproduce - Data

Run the check whether from the Icinga2 portal or from the command line.

Environment

Windows Server 2022, domain joined, running either via the Icinga2 check, or manually through a standard command prompt or an elevated command prompt.

Plugin Version

updates: v2023112901 by Linuxfabrik GmbH, Zurich/Switzerland

Python version

No response

List of Python modules

Using Windows compiled version

Additional Information

No response

@withanhdammit withanhdammit added the bug Something isn't working label May 8, 2024
@markuslf
Copy link
Member

How long does the following command take on your machine? What does it return?

powershell -Command "
    $WindowsUpdates = New-Object -ComObject 'Microsoft.Update.Session';
    $SearchIndex = $WindowsUpdates.CreateUpdateSearcher();
    $Pending = $SearchIndex.Search('IsInstalled=0');
    foreach ($update in $Pending.Updates) {
        [string]$name = [string]::Format('{0} [{1}]', $update.Title, $update.LastDeploymentChangeTime);
        Write-Output $name;
    }
    "

@markuslf markuslf self-assigned this May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants