Nagios WSUS Check

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Nagios WSUS Check

Post by HaschkeD »

Hello,
we have included the following WSUS plugin in Nagios:
https://outsideit.net/check-ms-win-updates/

A PS script checks some Reg Keys .....
On some servers, we get the following messages in Nagios:
Install key not found in the registry. This server which probably never updated or your Custom WSUS update solution does not create this key.

The script checks this Key:

HKLM: \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ WindowsUpdate \ AutoUpdate \ Results \ Install


On the systems where these messages come the key does not exist. If i check for new updates on my WSUS there are no ones
If i check online for update the are some updates....if i install These then the key exiists and all is fine.
But why is the key missing when i search my wsus for updates?

Greeting
Dennis
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios WSUS Check

Post by rkennedy »

What version of Windows are the machines running that you get the error? I imagine the key location may have changed based on version.

Tagging @WillemDH as it's his script too.
Former Nagios Employee
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Re: Nagios WSUS Check

Post by HaschkeD »

Server 2008 R2 and Server 2012 R2 (x64).

But if i do an online update and install all updates the key is creating and all works fine.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios WSUS Check

Post by rkennedy »

Ah - I missed the part where you mentioned it's working normally, but not with WSUS.

Are both the 2008 R2 and 2012 R2 machine behaving this way, or is one working?
Former Nagios Employee
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Re: Nagios WSUS Check

Post by HaschkeD »

Yes, both OS have the same problem, but not all machines.........
Some working with WSUS and the key exists.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios WSUS Check

Post by hsmith »

It sounds like it's something finnicky with the way that Windows handles this. I'm trying to look around, but I'm not finding too much information. I don't want to send you away, as we try to help with everything we can, but it's looking like this question would be better answered on the Microsoft website.
Former Nagios Employee.
me.
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Re: Nagios WSUS Check

Post by HaschkeD »

OK, yes, i posted this in the MS TechNet Forum, but i can't get an answer......
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios WSUS Check

Post by hsmith »

We primarily deal with Linux at our company, so we don't have a ton of great answers when it comes to Windows questions. You can reach out to the author of this script, but be warned that he is not under any sort of obligation to respond.
Former Nagios Employee.
me.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Nagios WSUS Check

Post by WillemDH »

For me servers updated with WSUS have that key. Except Windows 10 and Server 16, where MS has decided to no longer use that case. The last version of the plugin has an alternate way to detect the last update installation date, but it needs the PSWindowsUpdate PS module. Check my GitHub.
Add -M PSWindowsUpdate as an argument and the script will try to use PSWindowsUpdate. Make sure it's installed... Let us know if you get it working.
Nagios XI 5.8.1
https://outsideit.net
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios WSUS Check

Post by hsmith »

Thanks for the update, Willem. :)
Former Nagios Employee.
me.
Locked