JMS monitoring is implemented in javax/jms.bsh
script. Agent instruments all classes implementing MessageListener
, MessageProducer
or MessageConsumer
interface. For message listeners full traces (JMS
type) of message handling can be implemented. For message producers and consumers message attributes are collected that can be submitted to collector if instrumented methods are called inside an existing trace.
Enabling JMS instrumentation
In order to enable support for JMS, javax/jms.bsh
script has to be added to scripts
property in zorka.properties
. Note that this script can be loaded by default by other scripts for application servers that support JMS (eg. JBoss).
JMS support script also has capability of logging slow JMS message handling and errors in message listeners. As it is integrated with traps.bsh script, standard properties like traps.slow
, traps.error
, traps.file
etc. can be used to configure slow/error logs. See traps.bsh documentation for more details.
Configuration options reference
Settings for JMS statistics:
jms.stats = yes
- monitor JMS statistics;jms.generic = yes
- instrument generic JMS interfaces (this can be disabled if scripts for specific applicationservers provide their own implementations);jms.stats.mbean = zorka:type=ZorkaStats,name=JMS
- mbean name for JMS statistics;
JMS listeners tracing:
jms.trace = yes
- enable or disable tracing of JMS requests;jms.trace.time = ${tracer.min.trace.time}
- minimum query execution time to be submitted;
Slow JMS log:
jms.slow = ${traps.slow}
- enable or disable slow JMS log;jms.slow.time = 5000
- minimum message handling time;jms.slow.file.max = 8M
- maximum slow log file size;jms.slow.file.num = 8
- maximum number of archived log files;jms.slow.file.path = ${zorka.log.dir}/jms-slow.log
- path to log file;jms.slow.format = [${TIME}] ${ID}
- format of log messages;
JMS error log settings:
jms.error = ${traps.error}
- enable or disable JMS error log;jms.error.file.max = 8M
- maximum error log file size;jms.error.file.num = 8
- maximum number of archived error logs;jms.error.file.path = ${zorka.log.dir}/jms-error.log
- path to log file;jms.error.format = [${TIME}] ${ID} -> ${ERR}
- query log messages format;
Zabbix templates
Templates described below have been created for generic JMS monitoring and should work with all JMS-aware application servers and JMS client libraries:
Template_Zorka_JMS.xml
- general JMS statistics;Template_Zorka_JMS_MessageHandling.xml
- logs for slow message handling and JMS message handling errors;