I'm trying to configure a Windows Server 2012 to be able to run a script by nsclient.
1 - I have nsclient already installed, see the output:
root@nagios ~ # /usr/lib64/nagios/plugins/check_nrpe -H 10.10.10.10 -p 5666
I (0.5.2.39 2018-02-04) seem to be doing fine...
2 - When I try to run the same command above, using the - c "command" it does not work. I have tried everything I know!
root@nagios ~ # /usr/lib64/nagios/plugins/check_nrpe -H 10.10.10.10 -p 5666 -c check_vmware_snapshots -t 50 (-t 70, no way)
CHECK_NRPE: Socket timeout after 50 seconds.
3 - When I run my script in the local nsclient terminal, it works:
powershell.exe -PSConsoleFile "c:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" "& 'C:\Program Files\NSClient++\scripts\check_vmware_snapshots.ps1'"
Critical - 1 snapshots older than 5 days - @{VM=SERVER01}
I'm going to share my powershell script and my nsclient configuration. Note that my nsclient.ini has many conf I tried.
powershell script nsclient config If I use this command: "check_vmware_snapshots = cmd /c echo hello" in that script section and run in my nagios server, I do see the "hello".
How should I add that command into my nsclient.ini to get this working?
Please, any help is really welcome
Thanks!