Ad Widget

Collapse

how can i monitor when win after update need to reboot?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • molmi
    Member
    • Jul 2010
    • 39

    #1

    how can i monitor when win after update need to reboot?

    For more windows update from WSUS the reboot are required ...

    can I monitor with zabbix when the server update must reboot for work ?

    usually on weekend i'm login in in each server for check that it's a great job !

    Thx!
  • Russ
    Junior Member
    • Dec 2009
    • 15

    #2
    According to this page there are two registry entries that can be checked:

    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Win dowsUpdate\Auto Update\RebootRequired
    and
    HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations

    You should be able to write a simple VBScript that will check those keys and return a value, then add a custom parameter to the Zabbix client config file to run the VBScript and return the value to Zabbix.

    Comment

    • molmi
      Member
      • Jul 2010
      • 39

      #3
      thx

      I do not know vbscripts I could help ... to make the scripts

      Comment

      • Russ
        Junior Member
        • Dec 2009
        • 15

        #4
        A VBScript file is just a text file with a .vbs extension instead of .txt. Create a text file, name it CheckReboot.vbs (make sure you change the .txt extension to .vbs), then copy & paste the following code into it:

        Code:
        'CheckReboot.vbs - checks registry keys to determine if machine needs to reboot.
        ' Returns 1 if reboot is required, 0 if not
        
        Function ReadRegistry (RegPath)
        	Set oReg = CreateObject ("Wscript.shell")
        	ReadRegistry = oReg.RegRead (RegPath)
        End Function
        
        iReturn = 0
        On Error Resume Next
        
        iReturn = iReturn + CInt (ReadRegistry ("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired"))
        iReturn = iReturn + CInt (ReadRegistry ("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations"))
        
        WScript.Echo iReturn
        That's your VBScript file. I haven't given it much testing, but it should return 1 if the machine needs to reboot, and 0 if it doesn't.

        You can add a custom parameter to your config file to check what that script returns, and use that to alert in Zabbix.

        Comment

        Working...