Check apache tomcat Heap information

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
anuruddhak
Posts: 8
Joined: Thu Oct 18, 2018 6:47 am

Check apache tomcat Heap information

Post by anuruddhak »

I already try everything from this link but no luck
https://exchange.nagios.org/directory/P ... che-Tomcat

Is there any other way to monitor apache tomcat memory informations using nagios core ?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Check apache tomcat Heap information

Post by tgriep »

I have used this plugin to test Memory Heap on a Tomcat server running on a Centos7 system.

Code: Select all

https://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/Syabru-Nagios-JMX-Plugin/details
Example command you can create.

define command {
command_name check_jmx
command_line $USER1$/check_jmx $ARG1$
}

After you create the command, the following is an example of what you would use for the Service Check Argument. Replace xxx.xxx.xxx.xxx with the IP address of the Tomcat server anf yyyy to the port.
-U service:jmx:rmi:///jndi/rmi://xxx.xxx.xxx.xxx:yyyy/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used

Finally, you will have to reconfigure the Tomcat server to allow remote connections so the Nagios server can gather the data.
This link should help on that.
http://stackoverflow.com/questions/1263 ... g-jconsole
Be sure to check out our Knowledgebase for helpful articles and solutions!
anuruddhak
Posts: 8
Joined: Thu Oct 18, 2018 6:47 am

Re: Check apache tomcat Heap information

Post by anuruddhak »

@tgriep Thank you for your response.

Actually I manged to write own script to get those information and it's working nicely.

# ./check_heap_tomcat
Tomcat Mem:3GB/15GB (21%) and JVM Mem:1GB/7GB (14%)

Alreaday Try to upload this script to here but Unable to do that due to error in webpage
https://exchange.nagios.org/directory/P ... nd-Servers
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check apache tomcat Heap information

Post by scottwilkerson »

anuruddhak wrote:Actually I manged to write own script to get those information and it's working nicely.
Glad you got it working!
anuruddhak wrote:Alreaday Try to upload this script to here but Unable to do that due to error in webpage
https://exchange.nagios.org/directory/P ... nd-Servers
What error were you getting?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
anuruddhak
Posts: 8
Joined: Thu Oct 18, 2018 6:47 am

Re: Check apache tomcat Heap information

Post by anuruddhak »

when I try to post I got the "You need to login first before you can add a listing"

after the logged in got the "Invalid Token"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check apache tomcat Heap information

Post by scottwilkerson »

Hmm, I just tested this and it appears to be working. Do you have JS enabled?

Does the Login box say "Hi Your Name," ?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked