Run a local shell script by using NCPA

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
titien104
Posts: 13
Joined: Fri Mar 20, 2020 11:12 am

Run a local shell script by using NCPA

Post by titien104 »

Hi Team,

I have a shell script as below:
/opt/TEST_CDC/cdc-processor-audit/bin/audit-processor.sh 0 2500

This script will start up this JVM:

/opt/java/java8/latest/bin/java -Duser.timezone=Pacific/Honolulu -Xms256m -Xmx512m -cp config:./lib/* -Dlog4j.configuration=file:config/log4j.xml -Dcom.med.common.globals=config/audit-processor-globals.xml -DspringConfig=springConfig/processorContext.xml -Dcom.med.rpt.eventprocessor.commons.GenericSpringInvoker.bean=pipelinedEventCopier com.med.rpt.eventprocessor.commons.GenericSpringInvoker copy 0 2500

How do I use NCPA agent to monitor and start up the script if the jvm is stopped any any reason?
Thanks,
kg2857
Posts: 233
Joined: Wed Apr 12, 2023 5:48 pm

Re: Run a local shell script by using NCPA

Post by kg2857 »

You might want to look into running plugins via ncpa.
titien104
Posts: 13
Joined: Fri Mar 20, 2020 11:12 am

Re: Run a local shell script by using NCPA

Post by titien104 »

Thanks kg2857,

I am not an expert with NagiosXI. Can you or someone provide more detail instruction? Thanks
deby23456
Posts: 21
Joined: Tue Apr 11, 2023 1:44 pm

Re: Run a local shell script by using NCPA

Post by deby23456 »

Hello,

Here is some information describing plugins.

https://answerhub.nagios.com/support/s/ ... s-f9e78907

If you want to test it out and get some deeper knowledge about the use of it. I'd start with this KB below.

https://answerhub.nagios.com/support/s/ ... s-7fb3d9a8

If you want to reboot a service if it goes down though. That may need an "event_handler." Check out this article as well.

https://answerhub.nagios.com/support/s/ ... s-dd07d938
maxvilliams
Posts: 1
Joined: Wed May 17, 2023 8:24 am

Re: Run a local shell script by using NCPA

Post by maxvilliams »

Make sure NCPA is installed and configured on your system. NCPA is a monitoring agent that allows you to execute commands remotely, including running shell scripts. Locate the "Plugins" section in the NCPA interface. This is where you can execute various commands and scripts. In the NCPA interface, navigate to the "Plugins" section and find the option to execute a command or script.
This website https://casinowis.com/free-slots-no-deposit provides an exciting and risk-free way to enjoy your favorite slot games without having to spend any money upfront.
Post Reply