You're right, we're basically missing %NCPA_HOME% (which is a great way to reference it, btw). The very first result when you run it from the command line is C:\DCOM\Nagios\ncpa_passive.exe. This is given to you by this bit of code,Note that if I run from the command line the following output is produced:
C:\DCOM\Nagios\ncpa_passive.exe C:\DCOM\Nagios\ C:\DCOM\Nagios\var\log\ displayEnv.ps1 displayEnv.ps1.seek C:\DCOM\Nagios\var\log\displayEnv.ps1.seek
But when executed through the NCPA API the following output is produced:
Using check_ncpa.py
var\log\ displayEnv.ps1 displayEnv.ps1.seek var\log\displayEnv.ps1.seek
Code: Select all
$NCPA_PATH = Get-Process -Name ncpa_passive | Select -expand Path