NCPA need to run 64 bit version of powershell
NCPA need to run 64 bit version of powershell
I am running a powershell script that uses a FailoverClusters 64bit module not found in the 32bit powershell called NCPA need to run 64 bit version of powershell and load the module. added a copy of the powershell script
You do not have the required permissions to view the files attached to this post.
Re: NCPA need to run 64 bit version of powershell
If you look at the bottom of the ncpa.cfg on the remote machine you should see this:
Please change this:
To this:
Then restart the NCPA services on the system and test it again.
Code: Select all
# Since windows NCPA is 32-bit, if you need to use 64-bit powershell, try the following for
# the powershell plugin definition:
# .ps1 = c:\windows\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -File $plugin_name $plugin_argsCode: Select all
.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_argsCode: Select all
.ps1 = c:\windows\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -File $plugin_name $plugin_argsRe: NCPA need to run 64 bit version of powershell
That worked
Now I am trying a different script
this is what it looks like in powershell
checkClusterOwner.ps1 'UHSPCNTDBCPR' 'SQL Server (MSSQLSERVER)'
how would I pass the argument in nagios?
Now I am trying a different script
this is what it looks like in powershell
checkClusterOwner.ps1 'UHSPCNTDBCPR' 'SQL Server (MSSQLSERVER)'
how would I pass the argument in nagios?
Re: NCPA need to run 64 bit version of powershell
You can try this:
One of the best parts of NCPA is if you go to https://YOURNCPAHOST:5693 and click the API it will show you what options are available and can help you construct the commands you need. Once you get one setup if you click the Run as a nagios check box another button on the bottom left shows up, if you click that View in alternative format button and click Active or Passive it will show you what command you should use.
See here as well:
https://www.nagios.org/ncpa/help.php
https://support.nagios.com/kb/article/n ... a-722.html
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.X.X -t 'mytoken' -P 5693 -M plugins/checkClusterOwner.ps1 -a 'UHSPCNTDBCPR' 'SQL Server (MSSQLSERVER)'See here as well:
https://www.nagios.org/ncpa/help.php
https://support.nagios.com/kb/article/n ... a-722.html