Is there a way to monitor Java Heap (Total memory) from Tomcat on a Windows server? I think the plugins for Java on Nagios Exchange are for Linux distributions:
Java JDK 1.8.0_112
Tomcat 8.5
Windows 2012 R2
Looking for a way to collect the heap memory usage and set a warning and critical value.
Collecting Java Heap memory usage on Windows 2012 R2
Re: Collecting Java Heap memory usage on Windows 2012 R2
The way practically any Java runtime is monitored is via JMX, either remotely via JMX clients connecting to JMX servers or locally via some tool like jconsole.
Here's the official documentation for monitoring Java runtimes via JMX with Nagios:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
The only tricky part is this particular prerequisite:
https://wiki.scn.sap.com/wiki/pages/vie ... =439649886
https://tomcat.apache.org/tomcat-7.0-do ... oring.html
Depending on how Tomcat was configured, you may also have some Tomcat specific Windows performance counters (like heap usage) being exposed which can be monitored by Nagios XI via an agent NSClient++ , NCPA, or WMI:
https://support.nagios.com/kb/article.php?id=127
Happy to answer questions if you have any!
Here's the official documentation for monitoring Java runtimes via JMX with Nagios:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
The only tricky part is this particular prerequisite:
Which is something most Tomcat admins should be familiar with and able to provide insights on. Else, there's boatloads of guides out there for getting your Tomcat server setup with a JMX server:This document assumes you have the following:
- A remote server running JMX
https://wiki.scn.sap.com/wiki/pages/vie ... =439649886
https://tomcat.apache.org/tomcat-7.0-do ... oring.html
Depending on how Tomcat was configured, you may also have some Tomcat specific Windows performance counters (like heap usage) being exposed which can be monitored by Nagios XI via an agent NSClient++ , NCPA, or WMI:
https://support.nagios.com/kb/article.php?id=127
Happy to answer questions if you have any!
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Collecting Java Heap memory usage on Windows 2012 R2
Thanks for the input, @mcapra! Valuable info as usual.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.