monitoring windows updates with check_windows_updates.wsf

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
mfdoom
Posts: 5
Joined: Tue Mar 20, 2012 10:02 am

monitoring windows updates with check_windows_updates.wsf

Post by mfdoom »

Hello,

i´m somewhat stuck in trying to get the
check_windows_updates.wsf
from the website
to work. Maybe someone can shed some insight on me. I d/l the wsf-file and put it on in the /scripts folder on the windowsmachine.

how do i call the script from the nsc.ini (i´m using version 0.38)?

is this correct?:
check_windows_updates=scripts\check_windows_updates.wsf w:1 c:2
and how do i create the checkcommand on the nagios server?

thx for the input
mfdoom
Posts: 5
Joined: Tue Mar 20, 2012 10:02 am

Re: monitoring windows updates with check_windows_updates.ws

Post by mfdoom »

I´ve found a solution posted on another board where a reference is made to "c:\nrpe\bin". i don´t have an NRPE folder but only the NSClient++ dir under program files. With which program can i test the script local?
U:\>c:\windows\system32\cscript.exe -NoLogo -T:120 C:\NRPE\bin\check_windows_updates.wsf /w:0 /c:1
mfdoom
Posts: 5
Joined: Tue Mar 20, 2012 10:02 am

Re: monitoring windows updates with check_windows_updates.ws

Post by mfdoom »

I tested it and it seemed that this works:
Input:
c:\windows\system32\cscript.exe -NoLogo -T:120 "C:\Program Files\NSClient++\scripts\check_windows_updates.wsf" /w:0 /c:1
Output:
reboot required
How do i have to enter the command in the nsc.ini? And how do i set up the check command on the nagios server to call the external command?

thx in forward
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: monitoring windows updates with check_windows_updates.ws

Post by jsmurphy »

You were so close, the command should look something like this:
command[check_windows_updates]=cscript.exe //T:30 //NoLogo scripts\check_windows_updates.wsf /w:0 /c:1

The command[] part is optional, I normally leave it in to keep it in line with the Linux NRPE, cscript acts as a wrapper for executing the script the //T:30 is a 30 second time out for the script and NoLogo suppresses some unnecessary cscript output. The scripts\scriptname is the path to the script, you could alternatively use "C:\Program Files\NSClient++\scripts\check_windows_updates.wsf" explicitly if you didn't want to use a relative path.
mfdoom
Posts: 5
Joined: Tue Mar 20, 2012 10:02 am

Re: monitoring windows updates with check_windows_updates.ws

Post by mfdoom »

Hello jsmurphy,

thank you. Now i got the command tested and running local. Can you tell me with which plugin on the nagios-server can i test the functionality? Is it check_nrpe? since i read that nrpe is integrated in nsclient++

Thanks for the advice.
mfdoom
Posts: 5
Joined: Tue Mar 20, 2012 10:02 am

Re: monitoring windows updates with check_windows_updates.ws

Post by mfdoom »

i tried this on the server but failed:
/usr/lib/nagios/plugins/check_nrpe -H myserver -c check_windows_updates
the output is:

UNKNOWN: No handler for that command
Locked