Monitoring Quartz Jobs

Quartz support script libs/quartz.bsh enables tracing and statistics for quartz jobs. With quartz support enabled agent will instrument execute() method of all classes that implement org.quartz.Job interface.

In order to enable quartz support, add this file to scripts setting in zorka.properties and (optionally) adjust quartz specific options.

Tracing Quartz Jobs

Quartz jobs tracing will enable automatically when tracer is enabled (tracer = yes). Administrator can disable tracing quartz jobs using quartz.trace option and adjust minimum job execution time using quartz.trace.time option. Agent will submit job excecution traces along with basic information extracted from job scheduler data structures:

Trace list containing entries representing quartz jobs

Monitoring quartz with zabbix

Basic job execution statistics are also aggregated and can be collected using Zabbix. In order to enable quartz monitoring with Zabbix, administrator needs to import Template_Zorka_Quartz.xml template and apply it on monitored host. Template contains some general items displaying overall job execution statistics and per-job auto-discovery items that display statistics for specific jobs (by name):

Zabbix items for quartz

Configuration options for Quartz

The following quartz-related properties in zorka.properties can be set (along with default values):

  • quartz.trace = ${tracer} - enables or disables tracing of quartz jobs;

  • quartz.trace.time = ${tracer.min.trace.time} - minimum execution time for traced quartz jobs to be submitted as standalone traces;

  • quartz.stats = yes - enables or disables aggregation of quartz-related statistics;

  • quartz.stats.mbean = zorka:type=ZorkaStats,name=Quartz - object name of mbean keeping quartz statistics aggregated by zorka agent;