Page 1 of 1

Checking For Windows Updates

Posted: Mon Dec 24, 2012 3:29 pm
by hillhealthcenter
I'm having trouble configuring Checking for Windows Updates. I'm following the instruction in the document Nagios XI - Checking For Windows Updates.

The client seems to be configured properly and testing at the client works as expected. However, at the Creating and Testing the Check of for Nagios XI section of the document I don't get any output when I run the command:

Code: Select all

./check_nrpe -H 192.168.103.20 -p 5666 -c check_updates -t 60
I checked the nclient log file on the host. Here is the output:
  • 2012-12-24 14:44:57: l:..\..\..\..\trunk\modules\CheckExternalScripts\CheckExternalScripts.cpp:229: Arguments: /c echo scripts\check_windows_updates.ps1; exit $LastExitCode | powershell.exe -command -
    2012-12-24 14:45:00: l:..\..\..\trunk\service\NSClient++.cpp:385: NSClient++ 0,4,0,172 2012-05-08 x64 booting...
    2012-12-24 14:45:00: e:d:\source\nscp\trunk\modules\checkexternalscripts\commands.hpp:91: Failed to parse arguments for command 'check_updates', using old split string method: unknown escape sequence: cmd /c echo scripts\check_windows_updates.ps1; exit $LastExitCode | powershell.exe -command -


Any assistance you could provide is greatly appreciated.

Tom

Re: Checking For Windows Updates

Posted: Wed Dec 26, 2012 10:17 am
by slansing
Hello Tom, What output do you get when you try to run the check from Nagios, there should be some text output in the console.

Re: Checking For Windows Updates

Posted: Wed Dec 26, 2012 11:45 am
by hillhealthcenter
I don't get any output at the Nagios console. There's about 30 second a pause and the command prompt returns.

Tom

Re: Checking For Windows Updates

Posted: Wed Dec 26, 2012 12:07 pm
by scottwilkerson
can you show us the command you have in your nsc.ini

Thanks.

Re: Checking For Windows Updates

Posted: Wed Dec 26, 2012 12:42 pm
by hillhealthcenter
  • ; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
    [/settings/external scripts/scripts]
    check_updates=cmd /c echo scripts\check_windows_updates.ps1; exit $LastExitCode | powershell.exe -command -

Re: Checking For Windows Updates

Posted: Wed Dec 26, 2012 3:59 pm
by slansing
Are you able to return other information to Nagios from NSClient++? If not and this is the only plugin you have tried to use, I suggest installing NSClient++ 3.9 and not the most bleeding edge version which may be causing issues with how the plugin is being interpreted. If this is an option for you please visit the following link and scroll to the 3.x section:

http://nsclient.org/nscp/downloads

Re: Checking For Windows Updates

Posted: Wed Dec 26, 2012 4:02 pm
by scottwilkerson
might be related to this NSClient++ bug in 0.4
http://www.nsclient.org/nscp/ticket/524

I would suggest doing as slansing suggested.