NCPA plugins causing Python errors

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA plugins causing Python errors

Post by lmiltchev »

We will be waiting on your findings about any possible restrictions for running PS scripts on your system that you might have.

Meanwhile, you can check if your scripts need to use 64-bit powershell in order to work. I can see that you are using the "default" ps1 directive:

Code: Select all

.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
You could try using the 64-bit powershell (if needed):

Code: Select all

.ps1 = c:\windows\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -File $plugin_name $plugin_args
From the ncpa.cfg file:
# 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_args
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
onegative
Posts: 175
Joined: Tue Feb 17, 2015 12:06 pm

Re: NCPA plugins causing Python errors

Post by onegative »

Okay Team,

So we were on the right track. The problem was associated with the Path to powershell.exe
Although it appeared correct when trying to access it gave a generic "not recognized" error
The path was re-created and low and behold the original .ps1 entry began working
I can only summarize that this is not a common failure and was not readily obvious as the path appeared correct but when accessing it fully qualified failed
So hopefully in the future if anyone else runs into a similar error they might take a look at not only the Sysnative virtual folder but the path the to powershell.exe as well.

Thanks for everyone's help and please lock this post,
Danny
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA plugins causing Python errors

Post by lmiltchev »

Thank you so much for the feedback @onegative! I hope this will help other users, who may have similar issues. I am closing this topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked