Script works and stops working after couple hours (NSClient)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
fogier
Posts: 66
Joined: Fri Jul 13, 2012 12:53 am

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

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked