Zabbix Documentation 3.2

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:concepts:java

Differences

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

Link to this comparison view

Next revision
Previous revision
manual:concepts:java [2014/09/25 14:42]
sasha Page moved from 2.4:manual:concepts:java to manual:concepts:java
manual:concepts:java [2017/08/24 19:31] (current)
martins-v removing auto numbering
Line 1: Line 1:
-==== - #5 Java gateway ====+==== 5 Java gateway ====
  
 === Overview === === Overview ===
  
-Zabbix 2.0 adds native ​support for monitoring JMX applications ​by introducing ​new Zabbix daemon called "​Zabbix Java gateway"​. Zabbix Java gateway is a daemon written in Java. When Zabbix server wants to know the value of a particular JMX counter on a host, it asks Zabbix Java gateway, which uses the [[http://​java.sun.com/​javase/​technologies/​core/​mntr-mgmt/​javamanagement/​|JMX management API]] to query the application of interest remotely. The application does not need any additional software installed, it just has to be started with ''​-Dcom.sun.management.jmxremote''​ option on the command line.+Native ​support for monitoring JMX applications ​exists in the form of a Zabbix daemon called "​Zabbix Java gateway"​, available since Zabbix 2.0. Zabbix Java gateway is a daemon written in Java. To find out the value of a particular JMX counter on a host, Zabbix server queries ​Zabbix Java gateway, which uses the [[http://​java.sun.com/​javase/​technologies/​core/​mntr-mgmt/​javamanagement/​|JMX management API]] to query the application of interest remotely. The application does not need any additional software installed, it just has to be started with ''​-Dcom.sun.management.jmxremote''​ option on the command line.
  
 Java gateway accepts incoming connection from Zabbix server or proxy and can only be used as a "​passive proxy"​. As opposed to Zabbix proxy, it may also be used from Zabbix proxy (Zabbix proxies cannot be chained). Access to each Java gateway is configured directly in Zabbix server or proxy configuration file, thus only one Java gateway may be configured per Zabbix server or Zabbix proxy. If a host will have items of type **JMX agent** and items of other type, only the **JMX agent** items will be passed to Java gateway for retrieval. Java gateway accepts incoming connection from Zabbix server or proxy and can only be used as a "​passive proxy"​. As opposed to Zabbix proxy, it may also be used from Zabbix proxy (Zabbix proxies cannot be chained). Access to each Java gateway is configured directly in Zabbix server or proxy configuration file, thus only one Java gateway may be configured per Zabbix server or Zabbix proxy. If a host will have items of type **JMX agent** and items of other type, only the **JMX agent** items will be passed to Java gateway for retrieval.
Line 9: Line 9:
 When an item has to be updated over Java gateway, Zabbix server or proxy will connect to the Java gateway and request the value, which Java gateway in turn retrieves and passes back to the server or proxy. As such, Java gateway does not cache any values. When an item has to be updated over Java gateway, Zabbix server or proxy will connect to the Java gateway and request the value, which Java gateway in turn retrieves and passes back to the server or proxy. As such, Java gateway does not cache any values.
  
-Zabbix server or proxy has a specific type of processes that connect to Java gateway, controlled by the option **StartJavaPollers**. Internally, Java gateway starts multiple threads, controlled by the **START_POLLERS** option. On the server side, if a connection takes more than **Timeout** seconds, it will be terminated, but Java gateway might still be busy retrieving value from the JMX counter.+Zabbix server or proxy has a specific type of processes that connect to Java gateway, controlled by the option **StartJavaPollers**. Internally, Java gateway starts multiple threads, controlled by the **START_POLLERS** option. On the server side, if a connection takes more than **Timeout** seconds, it will be terminated, but Java gateway might still be busy retrieving value from the JMX counter. To solve this, since Zabbix 2.0.15, Zabbix 2.2.10 and Zabbix 2.4.5 there is the **TIMEOUT** option in Java gateway that allows to set timeout for JMX network operations.
  
 Zabbix server or proxy will try to pool requests to a single JMX target together as much as possible (affected by item intervals) and send them to the Java Gateway in a single connection for better performance. Zabbix server or proxy will try to pool requests to a single JMX target together as much as possible (affected by item intervals) and send them to the Java Gateway in a single connection for better performance.
Line 23: Line 23:
 == - Downloading from Zabbix website == == - Downloading from Zabbix website ==
  
-This option is not actually available yet, but in future you will be able to download ​Java gateway ​archive from Zabbix website.+Zabbix ​Java gateway ​packages (RHEL, Debian, Ubuntu) are available for download at http://​www.zabbix.com/​download.php.
  
 == - Compiling from source == == - Compiling from source ==
Line 70: Line 70:
 === - Configuring and running Java gateway === === - Configuring and running Java gateway ===
  
-By default, Java gateway listens on port 10052. If you plan on running Java gateway on a different port, you can specify that in settings.sh script. See the description of [[:2.4/manual/appendix/config/zabbix_java|Java gateway configuration file]] for how to specify this and other options.+By default, Java gateway listens on port 10052. If you plan on running Java gateway on a different port, you can specify that in settings.sh script. See the description of [[manual:appendix:config:zabbix_java|Java gateway configuration file]] for how to specify this and other options.
  
 <note warning>​Port 10052 is not [[http://​www.iana.org/​assignments/​service-names-port-numbers/​service-names-port-numbers.txt|IANA registered]].</​note>​ <note warning>​Port 10052 is not [[http://​www.iana.org/​assignments/​service-names-port-numbers/​service-names-port-numbers.txt|IANA registered]].</​note>​
Line 86: Line 86:
 === - Configuring server for use with Java gateway === === - Configuring server for use with Java gateway ===
  
-Now that Java gateway is running, you have to tell Zabbix server where to find Zabbix Java gateway. This is done by specifying JavaGateway and JavaGatewayPort parameters in [[:2.4/manual/appendix/config/zabbix_server|server configuration file]]. If the host on which JMX application is running is monitored by Zabbix proxy, then you specify the connection parameters in [[:2.4/manual/appendix/config/zabbix_proxy|proxy configuration file]] instead.+Now that Java gateway is running, you have to tell Zabbix server where to find Zabbix Java gateway. This is done by specifying JavaGateway and JavaGatewayPort parameters in [[manual:appendix:config:zabbix_server|server configuration file]]. If the host on which JMX application is running is monitored by Zabbix proxy, then you specify the connection parameters in [[manual:appendix:config:zabbix_proxy|proxy configuration file]] instead.
  
   JavaGateway=192.168.3.14   JavaGateway=192.168.3.14