What to monitor?

With a Java application server, monitoring is not initiated by the actual Java application developers often enough.  Also quite often it's not clear what would be a good set of things to monitor first. In general, the same advice applies as with any other system: somebody who knows the monitored application should determine what is monitored. It's even better if the available Java developers are reasonable and actually implement additional JMX items to monitor application-specific logic. If that isn't easy to achieve, you can always start with a basic set of memory usage, thread count, garbage collector, and other generic metrics. Here are a few potentially useful parameters:

  • jmx["java.lang:type=ClassLoading","LoadedClassCount"]: How many classes have been loaded
  • jmx["java.lang:type=Memory",NonHeapMemoryUsage.used]: We already monitored the heap memory usage on the gateway; this will monitor the non-heap memory usage

In general, it's hard to suggest a static list of things to monitor for JMX—there are several garbage collectors, and exact keys for garbage-collection monitoring will differ depending on which one is in use. Zabbix also provides a couple of templates out of the box for generic and Tomcat-specific JMX monitoring, which could be a good start.

What if we want to use multiple Java gateways—maybe one at each data center, or even one on each Java application server so that JMX connections do not happen over the network? Zabbix server only supports a single Zabbix gateway. Attaching multiple Java gateways to a single server is actually possible using Zabbix proxies, but we will discuss that in Chapter 17, Using Proxies to Monitor Remote Locations.

Since Zabbix 3.4, it is also possible to use custom JMX endpoints in the item. This allows us to monitor applications such as JBoss. Endpoints are set per item, so it is also possible to monitor multiple Java applications on one host with different endpoints.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.33.178