mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
246 stars 94 forks source link

0.4.3.131 - check_updates.vbs not working #122

Open Grejeru opened 9 years ago

Grejeru commented 9 years ago

Hello,

I have problem with NSClient++ 0.4.3.131 I have configured my nsclient.ini like below:

[/settings/external scripts/wrappings]
vbs = cscript.exe //T:120 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%

[/settings/external scripts/wrapped scripts]
check_updates = scripts\\check_updates.vbs

[/settings/external scripts]
allow arguments = true
allow nasty characters = true
timeout = 130

I'm running PS C:\Program Files\NSClient++> .\nscp.exe test and after load when I'm running check_updates it gives me error

cli UNKNOWN: Command check_updates didn't terminate within the timeout period 130s

I'm running it on Windows 2012 R2 server.

When I run it manually from directory C:\Program Files\NSClient++ as cscript.exe //T:120 //NoLogo scripts\\lib\\wrapper.vbs scripts\\check_updates.vbs it finish in around 20 seconds with the proper output.

mathieuchateau commented 9 years ago

Hello,

i think it depends if it checks with (Microsoft or your local wsus) or using cache

since some times i use this one: https://github.com/mathieuchateau/nsclient-plugins/blob/master/WSUS/check_windows_updates.ps1

it generates an XML to avoid timeout. But it still time out some time (no local wsus)

Cordialement, Mathieu CHATEAU http://www.lotp.fr

2015-03-14 22:53 GMT+01:00 Sebastian Szary notifications@github.com:

Hello,

I have problem with NSClient++ 0.4.3.131 I have configured my nsclient.ini like below:

[/settings/external scripts/wrappings] vbs = cscript.exe //T:120 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%

[/settings/external scripts/wrapped scripts] check_updates = scripts\check_updates.vbs

[/settings/external scripts] allow arguments = true allow nasty characters = true timeout = 130

I'm running PS C:\Program Files\NSClient++> .\nscp.exe test and after load when I'm running check_updates it gives me error

cli UNKNOWN: Command check_updates didn't terminate within the timeout period 130s

I'm running it on Windows 2012 R2 server.

When I run it manually from directory C:\Program Files\NSClient++ as cscript.exe //T:120 //NoLogo scripts\lib\wrapper.vbs scripts\check_updates.vbs it finish in around 20 seconds with the proper output.

— Reply to this email directly or view it on GitHub https://github.com/mickem/nscp/issues/122.

Grejeru commented 9 years ago

Hello,

Strange thing, in nscp test it still gets timeout, but I've added it to icinga via NRPE and ... I got the correct check response. At least partially correct as it is showing that there are updates, but says it's ok. I've added alias_updates = check_updates -warning 0 -critical 0, but still I get OK when having output: http://shots.szary.sh/8fb7a28675363a2d30a581d86dc19dd1.png

mickem commented 9 years ago

I think the issue is that it sometimes takes a long time, you can increase the timeouts. Making this "cached" is planned for 0.4.4

But please be aware that there are many more timeouts then the command timeout. See this post for details: http://docs.nsclient.org/faq/index.html#timeout-issues