Apache tomcat monitoring issue using ncpa

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
deek
Posts: 194
Joined: Fri Apr 26, 2019 2:01 am

Apache tomcat monitoring issue using ncpa

Post by deek »

We are trying to monitor apache tomcat using ncpa agent but we are facing issues.

As this is completely new monitoring set up and not aware of right use case of arguments, could you please suggest. we did follow the document.
https://assets.nagios.com/downloads/nag ... 1773666937

please let us know if ncpa.cfg has to edited with options and right way to have this monitored

./check_ncpa_.py -H XXXXX -t xxxx -P 5693 -M 'plugins/check_jvm.jar' -q "args=-s xxxxxx:1000/jmxrmi,args=-u 'xxx',args=-p 'xxx',args=-t tomcat,args=-C 'ClassCount',args=-w '10000',args=-c '50000'"
UNKNOWN: An error occured connecting to API. (HTTP error: '500 INTERNAL SERVER ERROR')

Please help with this?
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Apache tomcat monitoring issue using ncpa

Post by gsmith »

Hi,

Firstly make sure you have JMX monitoring enabled on the Tomcat machine.

Then give this a try:
Image8.jpg
Let me know if that helps please.

Thanks
You do not have the required permissions to view the files attached to this post.
deek
Posts: 194
Joined: Fri Apr 26, 2019 2:01 am

Re: Apache tomcat monitoring issue using ncpa

Post by deek »

Thanks for the reply yes jmx is installed and i am able to login to jconsole using username and password.

Could you please let me know if the ncpa.cfg has been updated right?
ncpa_cfg.png

still not sure if i am using right verbose.
output.PNG
Please help me update with right config and use case
You do not have the required permissions to view the files attached to this post.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Apache tomcat monitoring issue using ncpa

Post by gsmith »

Hi

The ncpa.cfg line for .jar should be:

Code: Select all

.jar = java -jar $plugin_name $plugin_args
verify that the check_jvm.jar file is in /usr/local/ncpa/plugins (on the Tomcat machine)

make sure this works on the Tomcat machine:

Code: Select all

cd /usr/local/ncpa/plugins
java -jar check_jvm.jar -s service:jmx:rmi:///jndi/rmi://localhost:9000/jmxrmi -u tomcat -p tomcat -t tomcat -C ClassCount:"http-nio-8080"  -w 10000 -c 50000
***** note the -C ClassCount:"http-nio-8080" you have -C ClassCount *****


At this point we should have everything set up correctly on the Tomcat machine. If not we need to fix it first.

Then on the xi server:
Image9.jpg
where $ARGS1$ is:

-t mytoken -P 5693 -M plugins/check_jvm.jar -a '-s "service:jmx:rmi:///jndi/rmi://localhost:9000/jmxrmi" -u tomcat -p tomcat -t tomcat -C ClassCount:"http-nio-8080" -w 10000 -c 50000'

Please let me know the result.

Thanks
You do not have the required permissions to view the files attached to this post.
Locked