Apache Tomcat wizard configuration problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Apache Tomcat wizard configuration problem

Post by Frédéric GRANAT »

Hi,
I'm trying to configure the apache tomcat wizard with JMX (without agent on the monitoring host) .
I need the following informations :
Is my server remote-JMX-capable ?
Service URL
Tomcat username/password

About service URL, I saw in "How to monitor Apache Tomcat with NagiosXI" :

Code: Select all

service:jmx:rmi:///jndi/rmi://<host>:<port>/jmxrmi
Is it the correct url and where to find the port ?

Where to find these informations ?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apache Tomcat wizard configuration problem

Post by lmiltchev »

This would depend on how you installed and configured Tomcat. Nagios XI provides a wizard for monitoring Tomcat, but the installation and configuration of Tomcat is out of scope of Nagios support. Having said that, you could run something like this to find the PID of your application:

Code: Select all

ps -ef | grep tomcat
or

Code: Select all

ps -ef | grep java
then check the ports:

Code: Select all

netstat -lnp | grep <PID>
where you substitute <PID> with the actual tomcat PID.

One my "test" tomcat box, I am using port 9090, so my service URL is:

Code: Select all

service:jmx:rmi:///jndi/rmi://192.168.x.x:9090/jmxrmi
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Apache Tomcat wizard configuration problem

Post by Frédéric GRANAT »

Hi,
Thanks, but I'm running apache on Windows.
Could you please provide the same informations for that OS ?
swolf

Re: Apache Tomcat wizard configuration problem

Post by swolf »

Do you have JConsole installed on that windows machine? If so, you can connect to it as a process and you should be able to find the remote Service URL from that browser.

EDIT: I should mention that even if your server isn't currently remote-JMX-capable, you should be able to configure it to enable that. There are quite a few guides available for this, this one seems to be accurate to me.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Apache Tomcat wizard configuration problem

Post by Frédéric GRANAT »

Hi,
Do you have JConsole installed on that windows machine?
=> No
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Apache Tomcat wizard configuration problem

Post by ssax »

Then you will need to do this (same one that swolf posted after reading his):

Code: Select all

https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=439649886
It's the same process as long as the ports are available on the host and open in the windows firewall/network firewall path.
Locked