Monitoring

« Back to User Guide

JMX - java management api

Configuration

Local processes can be monitored using jconsole

Enable remote JMX monitoring by adding arguments to the java command in init.sh(unix) or run.bat(windows). NOTE: when editing the init script, be sure the process is NOT currently running (./init.sh stop) and will not be restarted by cron during editing.

These arguments enable remote monitoring using a socket with no encryption or authentication:

-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=11237
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

For more advanced configuration, see http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html

MBean

The ProductClient provides an MBean for JMX monitoring.

Object Name
ProductClient:name=jmx
Attributes
ListenerQueueStatus
Tab delimited text summary of listener queue sizes. Format is
queueSize<tab>listener<tab>receiver
MaxMemory
Value of Runtime.maxMemory()
FreeMemory
value of Runtime.freeMemory()
Version
build version of client

Nagios

Nagios integrates with JMX using a plugin from http://snippets.syabru.ch/nagios-jmx-plugin/.

Example usage

java -jar ../nagios-jmx-plugin-1.2.3/check_jmx.jar -U service:jmx:rmi:///jndi/rmi://localhost:11237/jmxrmi -O ProductClient:name=jmx -A ListenerQueueStatus
java -jar ../nagios-jmx-plugin-1.2.3/check_jmx.jar
Run check_jmx.jar using java. Run the jar file with no arguments for usage.
-U service:jmx:rmi:///jndi/rmi://localhost:11237/jmxrmi
The service url. Additional arguments may be needed if a username/password is configured.
-O ProductClient:name=jmx
Object name
-A ListenerQueueStatus
Attribute name

Zabbix

Add or change the enableZabbix setting to config.ini and restart the client.

enableZabbix=true

See http://www.kjkoster.org/zapcat/How_To.html for information on how to configure the application in zabbix.