0

We are trying to monitor a custom java app and retrieve JMX data from that host . I've tried to figure out the issue for the past 2 days but with no success . Unfortunately zabbix documentation does not help me at all . We have the following setup :

  1. Zabbix server: Config file: /etc/zabbix/zabbix_server.conf
### Option: JavaGateway
#       IP address (or hostname) of Zabbix Java gateway.
#       Only required if Java pollers are started.
#
# Mandatory: no
# Default:
JavaGateway=172.x.x.x #java gw ip 

### Option: JavaGatewayPort
#       Port that Zabbix Java gateway listens on.
#
# Mandatory: no
# Range: 1024-32767
# Default:
JavaGatewayPort=10052

### Option: StartJavaPollers
#       Number of pre-forked instances of Java pollers.
#
# Mandatory: no
# Range: 0-1000
# Default:
StartJavaPollers=5
  1. Zabbix Java Gateway confi file: /etc/zabbix/zabbix_java_gateway.conf
# This is a configuration file for Zabbix Java Gateway.
# It is sourced by startup.sh and shutdown.sh scripts.

### Option: zabbix.listenIP
#       IP address to listen on.
#
# Mandatory: no
# Default:
 LISTEN_IP=0.0.0.0

### Option: zabbix.listenPort
#       Port to listen on.
#
# Mandatory: no
# Range: 1024-32767
# Default:
LISTEN_PORT=10052

### Option: zabbix.pidFile
#       Name of PID file.
#       If omitted, Zabbix Java Gateway is started as a console application.
#
# Mandatory: no
# Default:
# PID_FILE=

PID_FILE="/var/run/zabbix/zabbix_java.pid"

### Option: zabbix.startPollers
#       Number of worker threads to start.
#
# Mandatory: no
# Range: 1-1000
# Default:
START_POLLERS=5

### Option: zabbix.timeout
#       How long to wait for network operations.
#
# Mandatory: no
# Range: 1-30
# Default:
# TIMEOUT=3

TIMEOUT=3

Network connectivity work from server to host and vice versa . Tested with nc from both ends .

If I connect with jconsole i can retreive data enter image description here

Following zabbix documentation https://www.zabbix.com/documentation/3.0/manual/config/items/itemtypes/jmx_monitoring I've added a test item but I don't receive data for it . I need a idea on how to test if Java Gateway is working properly to exclude that issue and start from there . Logs Don't suggest that is java gw side issue :

2016-04-01 09:11:34.036 [main] INFO  com.zabbix.gateway.JavaGateway - Zabbix Java Gateway 3.0.1 (revision 58734) has started                                      
2016-04-01 09:11:34.040 [main] DEBUG c.z.gateway.ConfigurationManager - starting to parse configuration parameters                                                
2016-04-01 09:11:34.040 [main] DEBUG c.z.gateway.ConfigurationManager - found pidFile configuration parameter with value '/var/run/zabbix/zabbix_java.pid'        
2016-04-01 09:11:34.041 [main] DEBUG c.z.gateway.ConfigurationManager - received pidFile configuration parameter, daemonizing                                     
2016-04-01 09:11:34.041 [main] DEBUG c.z.gateway.ConfigurationManager - found listenIP configuration parameter with value '0.0.0.0'                               
2016-04-01 09:11:34.041 [main] DEBUG c.z.gateway.ConfigurationManager - found listenPort configuration parameter with value '10052'                               
2016-04-01 09:11:34.041 [main] DEBUG c.z.gateway.ConfigurationManager - found startPollers configuration parameter with value '5'                                 
2016-04-01 09:11:34.041 [main] DEBUG c.z.gateway.ConfigurationManager - finished parsing configuration parameters                                                 
2016-04-01 09:11:34.043 [main] INFO  com.zabbix.gateway.JavaGateway - listening on /0.0.0.0:10052                                                                 
2016-04-01 09:11:34.045 [main] DEBUG com.zabbix.gateway.JavaGateway - created a thread pool of 5 pollers
  • Judging by the gateway log you posted, it does not seem like Zabbix server sends any requests to it - at debug level, there should be a log for every request. Is the JMX icon on the host red? If so, what does the error message say? – asaveljevs Apr 4 '16 at 7:38

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.