Kickq Metrics

Thanasis Polychronakis edited this page Apr 25, 2013 · 1 revision

Kickq does not store any metrics or stats. This is by design, kickq focuses on being a robust job queueing system. However Kickq does emit the total of information you will ever need to generate your own metrics, stats and charts.

Metrics Methods


Provides an Object Literal with information about how many Job Items exist per queue. This method can be consumed either by a callback or as a promise.

kickq.metrics.queues(function(err, queues){});

kickq.metrics.queues.then(fnOk, fnFail);

The Queues Object returned contains the following keys, all values are numerical representinc Job Item count.

queues: {
  queued: 0,
  delayed: 0,
  processing: 0,
  retry: 0,
  ghost: 0,
  success: 0,
  fail: 0

Metrics Events

Typical events to use for metrics, triggered throughout the lifetime of a job.

There are a number of event types, all of them have the same callback signature:

kickq.metrics.on('metrics', function(eventType, jobItem){});
  • eventType {string} The name of the event.
  • jobItem {kickq.JobItem} The job item that triggered the event.

Event Types

  • metrics Catchall event for all the following.
  • create A new job has been created.
  • queued A job has been queued for processing.
  • success A job completed successfully.
  • fail A job completed but has failed.

Metrics Libraries

Kickq Vitals is a library authored by the creators of Kickq. It monitors the vitals of the Kickq Queueing System in predefined intervals.