Menu Search

D.2. Statistic Report Patterns

The statistic report pattern defines the format of a statistic report written to the log.

Statistic report patterns are defined by content variables. The place where the context variable is defined governs the scope i.e. the entities to which the pattern will be applied.

For instance, to define a statistics reporting pattern for a single queue, set the contextvariable on the queue itself. If you want the same statistics report pattern for apply to all queues, set the pattern on a suitable ancestor of the queue. For instance, if set on virtualhost, the pattern will applied to all queues defined on that virtualhost. If set on Broker, the pattern will be applied to all queues on the Broker.

The context variable name is formed as follows: qpid.<category-name>.statisticsReportPattern.

For instance, for queue: qpid.queue.statisticsReportPattern and virtualhost: qpid.virtualhost.statisticsReportPattern

The value of the context variable is a free text string containing reference(s) to the statistic names that are to appear in the report. References are made by surrounding the name of the statistic with '$' and curly braces, thus ${<statistic-name>}.

Statistics references allow an optional formatters. The supported formatters are: :byteunit (produces a human readable byte value e.g. 3 MiB), :duration (produces a ISO-8601 duration)and :datetime (produces a ISO-8601 date/time).

For example, a statistic report pattern for the queue category specifying two queue statistic values: queueDepthMessages=${queueDepthMessages},queueDepthBytes=${queueDepthBytes:byteunit}

Like all context variables, the statistic report pattern can also reference the attributes of the entity or even its ancestors. This feature can be exploited to include things like the name of the entity within the report.

These points are illustrated in the examples in the next section.

A catalogue of statistics names and descriptions is available from the REST API documentation available through the Web Management Console.