This support forum board is for support questions relating to
Nagios XI, our flagship commercial network monitoring solution.
-
localit
- Posts: 40
- Joined: Thu Oct 29, 2020 12:50 pm
Post
by localit »
is there a way to monitor or run a .ps1 script on a centos/linux server using ncpa client or another tool?
i have ps1 installed on my centos server and the script is working. i am trying to set this up as service in Nagios to monitor.
can anyone help me achieve this ?

You do not have the required permissions to view the files attached to this post.
-
jdunitz
- Posts: 235
- Joined: Wed Feb 05, 2020 2:50 pm
Post
by jdunitz »
At the end of your ncpa.cfg file, you probably have something like this:
Code: Select all
# Windows
.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
.vbs = cscript $plugin_name $plugin_args //NoLogo
.wsf = cscript $plugin_name $plugin_args //NoLogo
.bat = cmd /c $plugin_name $plugin_args
change the .ps1 one to be like:
Code: Select all
.ps1 = pwsh -ExecutionPolicy Bypass -File $plugin_name $plugin_args
Restart ncpa (systemctl restart ncpa_listener) to make your change take effect and give it a try.
--Jeffrey
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy.
Be sure to check out our
Knowledgebase for helpful articles and solutions!
-
localit
- Posts: 40
- Joined: Thu Oct 29, 2020 12:50 pm
Post
by localit »
ty very much, that's exactly what i needed to know. Works perfect!
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Post
by benjaminsmith »
ty very much, that's exactly what i needed to know. Works perfect!
Excellent! We'll go ahead close this out, but feel free to open another if you have any new questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy.
Be sure to check out our
Knowledgebase for helpful articles and solutions!