apache tomcat wizard

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

apache tomcat wizard

Post by dslaughter »

NagiosXI 15.10.0
Linux Centos7 64bit
Manual build
using ssl, no other special configuration

I'm trying to use the tomcat wizard using ncpa. Here is my check showing parameters.

[nagios@dean-nagiosxi ~]$ /usr/local/nagios/libexec/check_ncpa.py -H 192.168.89.45 -t YvBoFJFUH2BIKEOM -P 5693 -M plugins/check_jvm.jar -q "args=-s service:jmx:rmi:///jndi/rmi://localhost:8008/jmxrm,args=-t tomcat,args=-C 'MemorySimpleHeap,MemoryMetaspace,ProcessCPUUsage,SystemCPUUsage,Uptime',args=-w '17179869184,34359738368,50,70,1500000:',args=-c '32212254720,68719476736,70,90,300000:'"
UNKNOWN: Failed to connect: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: jmxrm

Here is the jvm application to monitor's startup.

/opt/jdk1.8/bin/java
-Djava.awt.headless=true
-Djava.security.egd=file:/dev/./urandom
-Dactivemq.store.dir=/opt/tomcat/activemq-data
-DJBILLING_HOME=/opt/jbilling
-Xms512M
-Xmx1024M
-server
-XX:+UseParallelGC
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8008
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=localhost
-classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
-Dcatalina.base=/opt/tomcat
-Dcatalina.home=/opt/tomcat
-Djava.io.tmpdir=/opt/tomcat/temp
-Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start

I've been searching for a while and cannot find a solution. I can send system profile in direct message. Please advise...
User avatar
swolf
Developer
Posts: 302
Joined: Tue Jun 06, 2017 9:48 am

Re: apache tomcat wizard

Post by swolf »

Hi @dslaughter, thanks for reaching out.

From looking at your command, it looks like the wrong Service URL was generated. In the argument to -s, you have

Code: Select all

service:jmx:rmi:///jndi/rmi://localhost:8008/jmxrm
I would recommend changing it to

Code: Select all

service:jmx:rmi:///jndi/rmi://localhost:8008/jmxrmi
Please let me know if that helps, or if you get a new error.

-Sebastian Wolf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Re: apache tomcat wizard

Post by dslaughter »

Updating the link did improve the check but still getting an error. Here is the output

[nagios@dean-nagiosxi ~]$ /usr/local/nagios/libexec/check_ncpa.py -H 192.168.89.45 -t YvBoFJFUH2BIKEOM -P 5693 -M plugins/check_jvm.jar -q "args=-s service:jmx:rmi:///jndi/rmi://regr-jbv4-45.tango-networks.com:8008/jmxrmi,args=-t tomcat,args=-C 'MemorySimpleHeap,MemoryMetaspace,ProcessCPUUsage,SystemCPUUsage,Uptime',args=-w '17179869184,34359738368,50,70,1500000:',args=-c '32212254720,68719476736,70,90,300000:'"
UNKNOWN: Invalid Check Type 'memorysimpleheap

Thank you for your help.
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Re: apache tomcat wizard

Post by dslaughter »

The check is actually working. If I run from command line or is run by nagiosxi poller it works but if I try in 'run check command' in core config manager it fails.I guess it doesn't escape correctly. Since this is working you can close this issue. it would be great if the run check command could be fixed to work with all commands.

thank you for your help.
Post Reply