Zabbix Documentation 2.4

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


manual:config:items:itemtypes:jmx_monitoring

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:config:items:itemtypes:jmx_monitoring [2014/09/26 13:55]
dotneft
manual:config:items:itemtypes:jmx_monitoring [2016/01/13 09:48] (current)
martins-v trying to fix numbering
Line 1: Line 1:
-==== - #14 JMX monitoring ====+==== 14 JMX monitoring ====
  
 === - Overview === === - Overview ===
Line 5: Line 5:
 JMX monitoring can be used to monitor JMX counters of a Java application. JMX monitoring can be used to monitor JMX counters of a Java application.
  
-In Zabbix 1.8, if you wanted to monitor JMX counters of a Java application,​ your best choice would have been the Zapcat [[http://​www.kjkoster.org/​zapcat/​| JMX Zabbix Bridge]]. You would either modify the source code of your application to reference the Zapcat JAR file and programmatically start a Zabbix agent, or you would install a ready-made Zapcat plugin for applications that support it (such as Jetty or Tomcat). +Zabbix 2.0 added native support for JMX monitoring by introducing a new Zabbix daemon called "​Zabbix Java gateway"​. ​
- +
-Zabbix 2.0 adds native support for JMX monitoring by introducing a new Zabbix daemon called "​Zabbix Java gateway"​. ​+
  
 When Zabbix server wants to know the value of a particular JMX counter on a host, it asks the Zabbix **Java gateway**, which in turn uses the [[http://​java.sun.com/​javase/​technologies/​core/​mntr-mgmt/​javamanagement/​|JMX management API]] to query the application of interest remotely. When Zabbix server wants to know the value of a particular JMX counter on a host, it asks the Zabbix **Java gateway**, which in turn uses the [[http://​java.sun.com/​javase/​technologies/​core/​mntr-mgmt/​javamanagement/​|JMX management API]] to query the application of interest remotely.
Line 26: Line 24:
   -jar /​usr/​share/​doc/​openjdk-6-jre-headless/​demo/​jfc/​Notepad/​Notepad.jar   -jar /​usr/​share/​doc/​openjdk-6-jre-headless/​demo/​jfc/​Notepad/​Notepad.jar
  
-This makes Java listen for incoming JMX connections on port 12345 and tells it not to require authentication or SSL.+This makes Java listen for incoming JMX connections on port 12345, from local host only, and tells it not to require authentication or SSL.  
 + 
 +If you want to allow connections on another interface, set the -Djava.rmi.server.hostname parameter to the IP of that interface.
  
 If you wish to be more stringent about security, there are many other Java options available to you. For instance, the next example starts the application with a more versatile set of options and opens it to a wider network, not just local host. If you wish to be more stringent about security, there are many other Java options available to you. For instance, the next example starts the application with a more versatile set of options and opens it to a wider network, not just local host.
Line 65: Line 65:
 For each JMX counter you are interested in you add an item of type **JMX agent** attached to that interface. If you have configured authentication on your Java application,​ then you also specify username and password. ​ For each JMX counter you are interested in you add an item of type **JMX agent** attached to that interface. If you have configured authentication on your Java application,​ then you also specify username and password. ​
  
-The key in the screenshot below says ''​%%jmx["​java.lang:​type=Memory","​HeapMemoryUsage.used"​]%%''​. The JMX item key syntax is similar to Zapcat items, except that a comma is used for separating arguments instead of "​]["​. The key consists of 2 parameters:+The key in the screenshot below says ''​%%jmx["​java.lang:​type=Memory","​HeapMemoryUsage.used"​]%%''​. The key consists of 2 parameters:
  
   * object name - which represents the object name of an MBean   * object name - which represents the object name of an MBean