Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com


Remember Me

Directory Tree



bysimob82, July 9, 2019
Check MSSQL DataBases, Jobs, Log Files, Time2Connect
I'm facing some trouble make it working, when I run the plugin from nagios server it works fine:
/usr/lib/nagios/plugins/check_nrpe -H -t 30 -c check_mssql -a ConnectionTime

OK: Time to connect for all instances are OK. Total Instances=1.
MSSQLSERVER=0.0388237. |'MSSQLSERVER time to connect'=0.03882;3;5;0.03882
But I don't have any output, and I still have Status "unknow" and "no output returned from plugin".
As reported I've added these lines on my nsclient.ini

[/settings/external scripts/scripts]
; check_mssql = cmd /c echo scripts\\check_mssql.ps1 "$ARG1$" ; exit($lastexitcode) | powershell.exe -ExecutionPolicy Bypass -command -

; CheckExternalScripts.dll

[Script Wrappings]
; vbs=cscript.exe //T:30 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%
; bat=scripts\%SCRIPT% %ARGS%
; ps1 = cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -ExecutionPolicy Bypass -command -
ps1 = cmd /c echo scripts%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -ExecutionPolicy Bypass -command -
; ps1=cmd /c echo scripts\\\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -

[Wrapped Scripts]
check_mssql=check_mssql.ps1 $ARG1$

[/settings/external scripts]
allow arguments = true
;use_file = 1
I made a lot of try and as you can see I've commented in/out some lines =)
Could please give me any hint?? I'm without ideas!

Thank in advance