Page 2 of 2

Re: Script works and stops working after couple hours (NSCli

Posted: Mon May 19, 2014 12:53 am
by fogier

Code: Select all

[root@nagiosserver libexec]# ./check_nrpe -H Server1 -t 60 -c check_vdibeschikbaar -a WerkplekVDI
CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs for error messages.
I renamed de servername of my nagios server and citrix xendesktop controller.
The argument "WerkplekVDI" is the name of the xendesktop desktop group which I want to monitor. My script puts it in the @desktopgroep variable.
See my script is the first post here.

Re: Script works and stops working after couple hours (NSCli

Posted: Mon May 19, 2014 10:43 am
by lmiltchev
Can you try modifying your command in the nsclient.ini file from this:

Code: Select all

check_vdibeschikbaar=cmd /c echo scripts\Werkplekken_Beschikbaar.ps1 "$ARG1$"; exit($lastexitcode) | powershell.exe -noprofile -nologo -command -
to this:

Code: Select all

check_vdibeschikbaar=cmd /c echo scripts\Werkplekken_Beschikbaar.ps1 "$ARG1$"; exit($lastexitcode) | powershell.exe -command -
restart the nsclient++ service and try your check again.

BTW, does your check work if you "hardcode" your args?

Code: Select all

check_vdibeschikbaar=cmd /c echo scripts\Werkplekken_Beschikbaar.ps1 WerkplekVDI; exit($lastexitcode) | powershell.exe -command -
./check_nrpe -H Server1 -t 60 -c check_vdibeschikbaar